Ver Fonte

bug 修复

lilei há 2 anos atrás
pai
commit
51b3da11e7

+ 6 - 36
pages.json

@@ -246,25 +246,10 @@
 		},
 		{
 			"path" : "pages/replenishmentManage/outWarehousing",
-			"style" :
-			{
-				"navigationBarTitleText": "补货出库",
-				"navigationStyle":"custom",
-				"app-plus":{
-					"titleNView": {
-						"titleAlign": "left",
-						"buttons": [ //原生标题栏按钮配置,
-							{
-								"text": "\ue603 生成销售单" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
-								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "14",
-								"color": "#ffffff",
-								"width":"120px"
-							}
-						]
+			"style": {
+						"navigationStyle": "custom" ,// 隐藏系统导航栏
+						"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
 					}
-				}
-			}
 		},
 		{
 			"path" : "pages/replenishmentManage/manualPrint",
@@ -292,25 +277,10 @@
 		},
 		{
 			"path" : "pages/replenishmentManage/signWarehousing",
-			"style" :
-			{
-				"navigationBarTitleText": "补货签收",
-				"navigationStyle":"custom",
-				"app-plus":{
-					"titleNView": {
-						"titleAlign": "left",
-						"buttons": [ //原生标题栏按钮配置,
-							{
-								"text": "\ue603 生成销售单" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
-								"fontSrc": "/static/iconfont/iconfont.ttf",
-								"fontSize": "14",
-								"color": "#ffffff",
-								"width":"120px"
-							}
-						]
+			"style": {
+						"navigationStyle": "custom" ,// 隐藏系统导航栏
+						"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
 					}
-				}
-			}
 		},
 		{
 			"path" : "pages/replenishmentManage/detail",

+ 2 - 0
pages/replenishmentManage/detail.vue

@@ -142,8 +142,10 @@
 			// 查询列表
 			getPartList(){
 				const _this = this
+				this.showLoading()
 				shelfReplenishDetailList({ replenishBillSn: this.replenishBillSn }).then(res => {
 					console.log(res.data)
+					uni.hideLoading()
 					if(res.status == 200 && res.data){
 						this.partList = res.data || []
 					}else{

+ 90 - 3
pages/replenishmentManage/outWarehousing.vue

@@ -1,5 +1,11 @@
 <template>
-	<view class="replenishment-outWarehousing-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
+	<view class="replenishment-outWarehousing-wrap">
+		<u-navbar back-text="补货出库" :border-bottom="false" :background="{backgroundColor: $config('primaryColor')}" back-icon-color="#fff" :back-text-style="{ color: '#fff' }">
+			<view slot='right' style="padding: 0 30upx;color: #ffffff;" @click="creatSalesOrder">
+				<u-icon name="chuangjiandingdan" custom-prefix="iscm-icon"></u-icon>
+				<text style="margin-left: 6rpx;">生成销售单</text>
+			</view>
+		</u-navbar>
 		<view class="replenishment-outWarehousing-body">
 			<view class="head-info" v-if="basicInfoData">
 				<view class="states">
@@ -30,12 +36,53 @@
 		<common-modal :openModal="confirmModal" title="确认信息无误并进行出库吗?" confirmText="确认" @confirm="modalConfirm" @close="confirmModal=false">
 			<u-input type='textarea' v-model="remarks" :maxlength="100" placeholder="请输入出库备注(最多100字符)" border :height="100"></u-input>
 		</common-modal>
+		<!-- 生成销售单 -->
+		<common-modal v-if="showModal" :showTitle="false" :openModal="showModal" @confirm="showModalConfirm" @close="showModal=false">
+			<view style="font-size: 28upx;">
+				<view style="padding: 10upx;margin: 20upx 0;" class="flex align_center justify_between">
+					<view>产品总款数:<text style="color: red;">{{partList.length}}</text></view>
+					<view>产品总件数:<text style="color: red;">{{totalNums}}</text></view>
+				</view>
+				<view v-if="salesOrderList.length">
+					<view style="padding: 0 10upx 10upx;">此补货单已经存在对应的销售单?</view>
+					<view style="padding: 0 10upx 20upx;">确认再次生成销售单吗?</view>
+					<view>
+						<view 
+						v-for="item in salesOrderList" 
+						:key="item.id"
+						style="color: #00aaff;border-bottom: 1px solid #eee;padding: 10upx 0;" 
+						class="flex align_center justify_between"
+						@click="viewSales(item)"
+						>
+							<text>{{item.salesBillNo}}</text>
+							<view>
+								<u-icon name="arrow-right"></u-icon>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view v-else>
+					<view style="padding: 0 10upx 20upx;">确认生成销售单?</view>
+					<view>
+						<view 
+						v-for="item in salesOrderList" :key="item.id"
+						style="color: #00aaff;border-bottom: 1px solid #eee;padding: 10upx 0;" 
+						class="flex align_center justify_between">
+							<text>{{item.orderNo}}</text>
+							<view>
+								<u-icon name="arrow-right"></u-icon>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</common-modal>
 	</view>
 </template>
 
 <script>
 	import commonModal from '@/pages/common/commonModal.vue'
-	import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishOutStock } from '@/api/shelfReplenish'
+	import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishOutStock, queryRelationSalesBill } from '@/api/shelfReplenish'
 	import partList from '@/pages/common/partList.vue'
 	export default {
 		components: { partList, commonModal },
@@ -57,7 +104,8 @@
 					background: '#fff'
 				},
 				confirmModal: false,
-				remarks: ''
+				remarks: '',
+				showModal: false
 			}
 		},
 		onReady() {
@@ -70,6 +118,16 @@
 			this.replenishBillSn = option.sn
 			this.getDetail()
 			this.getPartList()
+			this.getSalesOrder()
+		},
+		computed: {
+			totalNums() {
+				let ret = 0
+				this.partList.map(item => {
+					ret = ret + item.qty
+				})
+				return ret
+			}
 		},
 		methods: {
 			// 查询详情
@@ -130,6 +188,35 @@
 			// 发货出库
 			goSendOutGoods(){
 				uni.navigateTo({ url: "/pages/replenishmentManage/sendOutGoods?sn="+this.replenishBillSn+'&shelfSn='+this.basicInfoData.shelfSn })
+			},
+			// 查询关联销售单
+			getSalesOrder () {
+			  queryRelationSalesBill({ replenishBillSn: this.replenishBillSn }).then(res => {
+			    if (res.status == 200) {
+			      this.salesOrderList = res.data
+			    } else {
+			      this.salesOrderList = []
+			    }
+			  })
+			},
+			// 生成销售单
+			creatSalesOrder(){
+				this.showModal = true
+			},
+			showModalConfirm(){
+				this.showLoading("正在生成销售单...")
+				createSalesBill({ replenishBillSn: this.replenishBillSn }).then(res => {
+					if (res.status == 200) {
+						this.getSalesOrder()
+					}
+					this.showModal = false
+					this.toashMsg(res.message)
+					uni.hideLoading()
+				})
+			},
+			// 查看销售单
+			viewSales(data){
+				uni.navigateTo({ url: '/pages/sales/edit?pageType=detail&data='+JSON.stringify(data) })
 			}
 		}
 	}

+ 92 - 3
pages/replenishmentManage/signWarehousing.vue

@@ -1,5 +1,11 @@
 <template>
-	<view class="replenishment-putWarehousing-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
+	<view class="replenishment-putWarehousing-wrap">
+		<u-navbar back-text="补货签收" :border-bottom="false" :background="{backgroundColor: $config('primaryColor')}" back-icon-color="#fff" :back-text-style="{ color: '#fff' }">
+			<view slot='right' style="padding: 0 30upx;color: #ffffff;" @click="creatSalesOrder">
+				<u-icon name="chuangjiandingdan" custom-prefix="iscm-icon"></u-icon>
+				<text style="margin-left: 6rpx;">生成销售单</text>
+			</view>
+		</u-navbar>
 		<view class="replenishment-putWarehousing-body">
 			<view class="head-info" v-if="basicInfoData">
 				<view class="states">
@@ -31,12 +37,53 @@
 		</view>
 		<!-- 确认弹框 -->
 		<common-modal :openModal="confirmModal" content="签收后数字货架的产品数量将增加,确认签收吗?" confirmText="确认签收" @confirm="modalConfirm" @close="confirmModal=false" />
+		<!-- 生成销售单 -->
+		<common-modal v-if="showModal" :showTitle="false" :openModal="showModal" @confirm="showModalConfirm" @close="showModal=false">
+			<view style="font-size: 28upx;">
+				<view style="padding: 10upx;margin: 20upx 0;" class="flex align_center justify_between">
+					<view>产品总款数:<text style="color: red;">{{partList.length}}</text></view>
+					<view>产品总件数:<text style="color: red;">{{totalNums}}</text></view>
+				</view>
+				<view v-if="salesOrderList.length">
+					<view style="padding: 0 10upx 10upx;">此补货单已经存在对应的销售单?</view>
+					<view style="padding: 0 10upx 20upx;">确认再次生成销售单吗?</view>
+					<view>
+						<view 
+						v-for="item in salesOrderList" 
+						:key="item.id"
+						style="color: #00aaff;border-bottom: 1px solid #eee;padding: 10upx 0;" 
+						class="flex align_center justify_between"
+						@click="viewSales(item)"
+						>
+							<text>{{item.salesBillNo}}</text>
+							<view>
+								<u-icon name="arrow-right"></u-icon>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view v-else>
+					<view style="padding: 0 10upx 20upx;">确认生成销售单?</view>
+					<view>
+						<view 
+						v-for="item in salesOrderList" :key="item.id"
+						style="color: #00aaff;border-bottom: 1px solid #eee;padding: 10upx 0;" 
+						class="flex align_center justify_between">
+							<text>{{item.orderNo}}</text>
+							<view>
+								<u-icon name="arrow-right"></u-icon>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</common-modal>
 	</view>
 </template>
 
 <script>
 	import commonModal from '@/pages/common/commonModal.vue'
-	import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishPutStock } from '@/api/shelfReplenish'
+	import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishPutStock, queryRelationSalesBill } from '@/api/shelfReplenish'
 	import partList from '@/pages/common/partList.vue'
 	export default {
 		components: { partList, commonModal },
@@ -53,7 +100,8 @@
 					fontSize:'30rpx',
 					background: this.$config('primaryColor')
 				},
-				confirmModal: false
+				confirmModal: false,
+				showModal: false
 			}
 		},
 		onReady() {
@@ -66,6 +114,16 @@
 			this.replenishBillSn = option.sn
 			this.getDetail()
 			this.getPartList()
+			this.getSalesOrder()
+		},
+		computed: {
+			totalNums() {
+				let ret = 0
+				this.partList.map(item => {
+					ret = ret + item.qty
+				})
+				return ret
+			}
 		},
 		methods: {
 			// 查询详情
@@ -81,7 +139,9 @@
 			// 查询列表
 			getPartList(){
 				const _this = this
+				this.showLoading()
 				shelfReplenishDetailList({ replenishBillSn: this.replenishBillSn }).then(res => {
+					uni.hideLoading()
 					if(res.status == 200 && res.data){
 						_this.totalQty = 0
 						_this.confirmQty = 0
@@ -143,6 +203,35 @@
 						_this.confirmQty += Number(item.putQty)
 					}
 				})
+			},
+			// 查询关联销售单
+			getSalesOrder () {
+			  queryRelationSalesBill({ replenishBillSn: this.replenishBillSn }).then(res => {
+			    if (res.status == 200) {
+			      this.salesOrderList = res.data
+			    } else {
+			      this.salesOrderList = []
+			    }
+			  })
+			},
+			// 生成销售单
+			creatSalesOrder(){
+				this.showModal = true
+			},
+			showModalConfirm(){
+				this.showLoading("正在生成销售单...")
+				createSalesBill({ replenishBillSn: this.replenishBillSn }).then(res => {
+					if (res.status == 200) {
+						this.getSalesOrder()
+					}
+					this.showModal = false
+					this.toashMsg(res.message)
+					uni.hideLoading()
+				})
+			},
+			// 查看销售单
+			viewSales(data){
+				uni.navigateTo({ url: '/pages/sales/edit?pageType=detail&data='+JSON.stringify(data) })
 			}
 		}
 	}

+ 8 - 9
pages/shelfSetting/shelfSet.vue

@@ -302,7 +302,9 @@
 				shelfSave(params).then(res => {
 					 if (res.status == 200) {
 					  this.toashMsg(res.message)
-					  this.getShelfDetal()
+					  setTimeout(()=>{
+						  this.getShelfDetal()
+					  },4000)
 					 }
 				})
 			},
@@ -325,10 +327,7 @@
 				}).then(res => {
 					if(res.status == 200){
 						this.getShelfPriceShow()
-						uni.showToast({
-							icon: 'none',
-							title: res.message
-						})
+						this.toashMsg(res.message)
 					}
 					uni.hideLoading()
 				})
@@ -344,10 +343,10 @@
 				})
 			},
 			getShelfPlace(flag){
-				uni.showLoading({
-					mask: true,
-					title: '正在查询...'
-				})
+				// uni.showLoading({
+				// 	mask: true,
+				// 	title: '正在查询...'
+				// })
 				getProductPlace({ shelfSn: this.shelfSn }).then(res => {
 				  uni.hideLoading()
 				  if (res.status == 200 && res.data) {