Browse Source

Merge branch 'develop_szhj07' of jianguan-web/qpls-md-app into pre-release

李磊 2 years ago
parent
commit
18d202bed7
61 changed files with 4325 additions and 295 deletions
  1. 34 0
      api/shelf.js
  2. 8 0
      api/shelfCart.js
  3. 9 0
      api/shelfRecall.js
  4. 38 0
      api/shelfReplenish.js
  5. 0 1
      components/kk-printer/index.vue
  6. 1 1
      config/index.js
  7. 1 1
      libs/axios.js
  8. 2 1
      libs/tools.js
  9. 9 2
      main.js
  10. 3 7
      manifest.json
  11. 122 20
      pages.json
  12. 7 1
      pages/approveStore/authPass.vue
  13. 5 0
      pages/approveStore/list.vue
  14. 81 2
      pages/batchShelves/cartList.vue
  15. 1 0
      pages/batchShelves/scanProduct.vue
  16. 2 2
      pages/batchShelves/searchProduct.vue
  17. 6 1
      pages/batchShelves/setProductCost.vue
  18. 14 4
      pages/common/commonModal.vue
  19. 30 27
      pages/common/partList.vue
  20. 2 2
      pages/common/printTag/printTag.vue
  21. 3 3
      pages/index/index.vue
  22. 5 1
      pages/latePlay/chooseBulk.vue
  23. 1 1
      pages/replenishmentManage/chooseTypeModal.vue
  24. 116 7
      pages/replenishmentManage/detail.vue
  25. 5 7
      pages/replenishmentManage/manualPrint.vue
  26. 143 21
      pages/replenishmentManage/outWarehousing.vue
  27. 88 19
      pages/replenishmentManage/replenishmentList.vue
  28. 8 4
      pages/replenishmentManage/scanCodePrint.vue
  29. 3 6
      pages/replenishmentManage/sendOutGoods.vue
  30. 116 11
      pages/replenishmentManage/signWarehousing.vue
  31. 10 4
      pages/sales/chooseCustomer.vue
  32. 5 5
      pages/sales/listComponent.vue
  33. 1 1
      pages/sales/orderInfoModal.vue
  34. 8 13
      pages/shelfOrder/listComponent.vue
  35. 2 1
      pages/shelfOrder/search.vue
  36. 7 2
      pages/shelfOrder/shelfOrder.vue
  37. 7 1
      pages/shelfSetting/addShelfHw.vue
  38. 6 0
      pages/shelfSetting/editShelfHw.vue
  39. 5 0
      pages/shelfSetting/shelfList.vue
  40. 26 20
      pages/shelfSetting/shelfSet.vue
  41. 483 0
      pages/shuntBackManage/addBackOrder.vue
  42. 86 28
      pages/shuntBackManage/cancellingStocks.vue
  43. 648 0
      pages/shuntBackManage/chooseProduct.vue
  44. 72 4
      pages/shuntBackManage/detail.vue
  45. 236 0
      pages/shuntBackManage/productList.vue
  46. 245 0
      pages/shuntBackManage/shelfList.vue
  47. 10 0
      pages/shuntBackManage/shuntBackList.vue
  48. 639 0
      pages/soldOut/chooseProduct.vue
  49. 400 0
      pages/soldOut/creatOrder.vue
  50. 231 0
      pages/soldOut/productList.vue
  51. 274 0
      pages/soldOut/shelfList.vue
  52. 2 1
      pages/statistics/chooseShelf.vue
  53. 4 0
      pages/stockCheck/shelfList.vue
  54. 3 3
      pages/userCenter/index.vue
  55. 40 58
      pages/vinAnalyse/shelfAnalyse.vue
  56. 4 0
      pages/vinAnalyse/shelfList.vue
  57. 2 1
      pages/xtNotice/xtNotice.vue
  58. 2 1
      pages/xtNotice/xtNoticeDetail/xtNoticeDetail.vue
  59. 0 0
      static/iconfont/iconfont.css
  60. BIN
      static/iconfont/iconfont.ttf
  61. 4 0
      store/index.js

+ 34 - 0
api/shelf.js

@@ -36,6 +36,22 @@ export const shelfDetail = (params) => {
     method: 'post'
   })
 }
+//待补货产品列表
+export const queryListForReplenish = (params) => {
+  return axios.request({
+    url: `shelf/queryListForReplenish`,
+    data: params,
+    method: 'post'
+  })
+}
+// 补货产品明细
+export const queryProductListForReplenish = (params) => {
+  return axios.request({
+    url: `shelf/queryProductListForReplenish `,
+    data: params,
+    method: 'post'
+  })
+}
 // 货架  货位产品 列表 分页
 export const getShelfProductList = (params) => {
 	let url = `shelf/placeProduct/queryPage/${params.pageNo}/${params.pageSize}`
@@ -80,6 +96,15 @@ export const delShelfPlaceSn = (params) => {
     method: 'post'
   })
 }
+//  新增回调单 列表 不分页
+export const controlQueryList = (params) => {
+  return axios.request({
+    url: `shelf/control/queryList`,
+    data: params,
+    method: 'post'
+  })
+}
+
 // 绑定产品
 export const bindProductList = (params) => {
 	let url = `product/queryPageForXPRH/${params.pageNo}/${params.pageSize}`
@@ -161,4 +186,13 @@ export const orderBillQueryCount = (params) => {
     data: params,
     method: 'post'
   })
+}
+
+// 新增回调单
+export const insert = (params) => {
+  return axios.request({
+    url: `shelfRecall/insert`,
+    data: params,
+    method: 'post'
+  })
 }

+ 8 - 0
api/shelfCart.js

@@ -82,4 +82,12 @@ export const updateBatchById = (params) => {
 		data: params,
 		method: 'post'
 	})
+}
+//批量删除层
+export const deleteBatch = (params) => {
+	return axios.request({
+		url: `shelfCart/deleteBatch`,
+		data: params,
+		method: 'post'
+	})
 }

+ 9 - 0
api/shelfRecall.js

@@ -49,4 +49,13 @@ export const queryStateCount = (params) => {
 		data: params,
 		method: 'post'
 	})
+}
+
+// 生成销售退货单
+export const generateSaleReturnBill = (params) => {
+	return axios.request({
+		url: `shelfRecall/generateSaleReturnBill`,
+		data: params,
+		method: 'post'
+	})
 }

+ 38 - 0
api/shelfReplenish.js

@@ -45,6 +45,21 @@ export const shelfReplenishConfirm = (params) => {
     method: 'post'
   })
 }
+//  补货单 取消补货单
+export const shelfReplenishCancel = (params) => {
+  return axios.request({
+    url: 'shelfReplenish/cancel',
+    data: params,
+    method: 'post'
+  })
+}
+// 删除补货单
+export const shelfReplenishDelete = (params) => {
+  return axios.request({
+    url: `shelfReplenish/delete/${params.replenishBillSn}`,
+    method: 'get'
+  })
+}
 //  补货单 确认签收
 export const shelfReplenishPutStock = (params) => {
   return axios.request({
@@ -109,4 +124,27 @@ export const saveReplenishBill = (params) => {
     data: params,
     method: 'post'
   })
+}
+// 保存补货单和明细
+export const saveMainAndDetail = (params) => {
+  return axios.request({
+    url: 'shelfReplenish/saveMainAndDetail',
+    data: params,
+    method: 'post'
+  })
+}
+// 查询关联的销售单
+export const queryRelationSalesBill = (params) => {
+  return axios.request({
+    url: `shelfReplenish/queryRelationSalesBill/${params.replenishBillSn}`,
+    method: 'get'
+  })
+}
+// 生成销售单
+export const createSalesBill = (params) => {
+  return axios.request({
+    url: `shelfReplenish/createSalesBill/${params.replenishBillSn}`,
+    data: params,
+    method: 'post'
+  })
 }

+ 0 - 1
components/kk-printer/index.vue

@@ -79,7 +79,6 @@
 					<p>1、连接打印机之前,先打开手机蓝牙开关</p>
 					<p>2、如果已有其它手机连接,请手动断开或重启打印机</p>
 					<p>3、如果连接打印机没有任何反应或需要切换连接其它打印机,请在“我的”页面点击“重置打印机”后再试</p>
-					<p>4、目前仅支持“得力(DL-886BW(NEW))”、“新北洋(BTP-P39)”蓝牙打印机</p>
 					</div>
 				`,
 				//是否正在打印

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'http://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.0.115:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.0.182:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 1 - 1
libs/axios.js

@@ -24,7 +24,7 @@ const request = (opts, hasToken) => {
 		method: opts.method,
 		header: opts.header ? opts.header : header
 	}
-	console.log(DefaultOpts)
+	// console.log(DefaultOpts)
 	let promise = new Promise(function(resolve, reject) {
 		uni.request(DefaultOpts).then(
 			(res) => {

+ 2 - 1
libs/tools.js

@@ -437,7 +437,8 @@ export const openMessagePage = function(data){
 	}
 	// 补货订单
 	if (data.extras.bizType == 'SHELF_REPLENISH') {
-		uni.navigateTo({ url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM' })
+		// uni.navigateTo({ url: '/pages/replenishmentManage/replenishmentList?billState=ALL' })
+		uni.navigateTo({url: '/pages/soldOut/shelfList'})
 	}
 	// 货架订单
 	if (data.extras.bizType == 'SHELF_ORDER') {

+ 9 - 2
main.js

@@ -44,12 +44,19 @@ Vue.prototype.$hasPermissions = function (value) {
 /*
 * 提示信息
 */ 
-Vue.prototype.toashMsg = function (title) {
+Vue.prototype.toashMsg = function (title,duration) {
 	title = title == undefined ? "系统繁忙" : title;
 	uni.showToast({
 		title:title,
 		icon:'none',
-		duration: 4000
+		duration: duration||4000
+	})
+}
+Vue.prototype.showLoading = function (title) {
+	title = title == undefined ? "正在加载..." : title;
+	uni.showLoading({
+		title:title,
+		mask: true
 	})
 }
 

+ 3 - 7
manifest.json

@@ -2,8 +2,8 @@
     "name" : "iSCM智慧供应链",
     "appid" : "__UNI__5B57B68",
     "description" : "iSCM智慧供应链系统",
-    "versionName" : "1.1.9",
-    "versionCode" : 119,
+    "versionName" : "1.2.1",
+    "versionCode" : 121,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -54,8 +54,7 @@
         },
         /* 模块配置 */
         "modules" : {
-            "Bluetooth" : {},
-            "Push" : {}
+            "Bluetooth" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -114,9 +113,6 @@
                     "system" : {
                         "__platform__" : [ "ios", "android" ]
                     }
-                },
-                "push" : {
-                    "unipush" : null
                 }
             },
             "icons" : {

+ 122 - 20
pages.json

@@ -118,7 +118,21 @@
             "style" :                                                                                    
             {
                 "navigationBarTitleText": "调回管理",
-                "enablePullDownRefresh": false
+				"navigationStyle":"custom",
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue8c0 新增" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"color": "#ffffff",
+								"width":"90px"
+							}
+						]
+					}
+				}
             }
         },
 		{
@@ -127,9 +141,23 @@
             {
                 "navigationBarTitleText": "调回退库",
                 "enablePullDownRefresh": false,
-				"titleView":false,
 				// 将回弹属性关掉
-				"bounce":"none"
+				"bounce":"none",
+				"navigationStyle":"custom",
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue859 生成销售退货单" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"color": "#ffffff",
+								"width":"140px"
+							}
+						]
+					}
+				}
             }
         },
 		{
@@ -137,33 +165,100 @@
 		    "style" :                                                                                    
 		    {
 		        "navigationBarTitleText": "调回详情",
+		        "enablePullDownRefresh": false,
+				"navigationStyle":"custom",
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue859 生成销售退货单" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"color": "#ffffff",
+								"width":"140px"
+							}
+						]
+					}
+				}
+		    }
+		},
+		{
+		    "path" : "pages/shuntBackManage/shelfList",
+		    "style" :
+		    {
+		        "navigationBarTitleText": "选择货架",
 		        "enablePullDownRefresh": false
 		    }
 		},
+		{
+		    "path" : "pages/shuntBackManage/chooseProduct",
+		    "style" :
+		    {
+		        "navigationBarTitleText": "选择产品",
+		        "enablePullDownRefresh": false
+		    }
+		},
+		{
+		    "path" : "pages/shuntBackManage/addBackOrder",
+		    "style" :
+		    {
+		        "navigationBarTitleText": "新增调回单",
+				"navigationStyle": "custom"
+		    }
+		},
 		{
 		    "path" : "pages/replenishmentManage/replenishmentList",
 		    "style" :
 		    {
 		        "navigationBarTitleText": "补货管理",
-		        "enablePullDownRefresh": false
+		        "navigationStyle":"custom",
+		        "app-plus":{
+		        	"titleNView": {
+		        		"titleAlign": "left",
+		        		"buttons": [ //原生标题栏按钮配置,
+		        			{
+		        				"text": "\ue64e 待补货" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+		        				"fontSrc": "/static/iconfont/iconfont.ttf",
+		        				"fontSize": "14",
+								"color": "#ffffff",
+		        				"width":"90px"
+		        			}
+		        		]
+		        	}
+		        }
 		    }
 		},
 		{
-			"path" : "pages/replenishmentManage/confirm",
+			"path" : "pages/soldOut/shelfList",
 			"style" :
 			{
-				"navigationBarTitleText": "补货确认",
+				"navigationBarTitleText": "待补货产品",
 				"enablePullDownRefresh": false
 			}
 		},
 		{
-			"path" : "pages/replenishmentManage/outWarehousing",
+			"path" : "pages/soldOut/creatOrder",
+			"style": {
+				"navigationStyle": "custom" ,// 隐藏系统导航栏
+				"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+			}
+		},
+		{
+			"path" : "pages/replenishmentManage/confirm",
 			"style" :
 			{
-				"navigationBarTitleText": "补货出库",
+				"navigationBarTitleText": "补货确认",
 				"enablePullDownRefresh": false
 			}
 		},
+		{
+			"path" : "pages/replenishmentManage/outWarehousing",
+			"style": {
+						"navigationStyle": "custom" ,// 隐藏系统导航栏
+						"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+					}
+		},
 		{
 			"path" : "pages/replenishmentManage/manualPrint",
 			"style" :
@@ -184,25 +279,23 @@
 			"path" : "pages/replenishmentManage/sendOutGoods",
 			"style" :
 			{
-				"navigationBarTitleText": "发货出库",
+				"navigationBarTitleText": "扫码出库",
 				"enablePullDownRefresh": false
 			}
 		},
 		{
 			"path" : "pages/replenishmentManage/signWarehousing",
-			"style" :
-			{
-				"navigationBarTitleText": "补货签收",
-				"enablePullDownRefresh": false
-			}
+			"style": {
+						"navigationStyle": "custom" ,// 隐藏系统导航栏
+						"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+					}
 		},
 		{
 			"path" : "pages/replenishmentManage/detail",
-			"style" :
-			{
-				"navigationBarTitleText": "补货单详情",
-				"enablePullDownRefresh": false
-			}
+			"style": {
+						"navigationStyle": "custom" ,// 隐藏系统导航栏
+						"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+					}
 		}
         ,{
             "path" : "pages/common/printTag/printTag",
@@ -636,6 +729,7 @@
 								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								"fontSize": "14",
+								"color": "#ffffff",
 								"width":"80px"
 							}
 						]
@@ -710,7 +804,6 @@
             "path" : "pages/vinAnalyse/shelfAnalyse",
             "style": {
             	"navigationStyle":"custom",
-				 "enablePullDownRefresh": true,
             	"app-plus":{
             		"titleNView": {
 						"titletext":"VIN分析",
@@ -728,6 +821,15 @@
             	}
             }
         }
+        ,{
+            "path" : "pages/soldOut/chooseProduct",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "选择待补货产品",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 7 - 1
pages/approveStore/authPass.vue

@@ -55,7 +55,7 @@
 			</u-form>
 		</view>
 		<view class="form-btn-con flex justify_center">
-			<u-button class="form-btn" shape="circle" :loading="loading" type="info" :custom-style="{ background: '#066cff', color: '#fff',width:'350rpx' }" @click="formSubmit">审核通过</u-button>
+			<u-button class="form-btn" shape="circle" :loading="loading" type="info" :custom-style="customBtnStyle" @click="formSubmit">审核通过</u-button>
 		</view>
 	</view>
 </template>
@@ -73,6 +73,12 @@
 			return{
 				loading: false,
 				theme: '',
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff',
+					width: '360rpx'
+				},
 				form: {
 					storeName: '', // 门店名称
 					contactPhone: '', //  联系手机

+ 5 - 0
pages/approveStore/list.vue

@@ -81,6 +81,11 @@
 			uni.$on("updateAuthState",function(){
 				_this.getRow(1)
 			})
+			
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
 		},
 		onUnload() {
 			uni.$off("updateAuthState")

+ 81 - 2
pages/batchShelves/cartList.vue

@@ -58,6 +58,9 @@
 		<!-- 合计弹框 -->
 		<u-popup mode="bottom" closeable v-model="showPop" :z-index="100">
 			<view class="heji-content">
+				<view style="color: red;margin-top: -35rpx;margin-bottom: 15rpx;">
+					<text @click="showDelLay=true"><u-icon name="trash"></u-icon>批量删除</text>
+				</view>
 				<scroll-view scroll-y="true" style="height: 400rpx;">
 					<view class="heji-con-list">
 						<view class="flex align_center" v-for="item in countData" :key="item.shelfTierCode">
@@ -89,6 +92,26 @@
 				 </view>
 			</view>
 		</u-popup>
+		<!-- 选择层删除 -->
+		<u-popup mode="center" width="80%" :duration="0" :mask-close-able="false" closeable @close="delLayer=[]" v-model="showDelLay" border-radius="15">
+			<view class="layer-content">
+				 <view class="tits">
+					 <view>请选择需要删除的层</view>
+					 <view>删除后,该层所有已录入的产品都会删除</view>
+				 </view>
+				 <view class="tagbox flex">
+				 	<view>
+				 		<view class="tag" :class="delLayer.indexOf(item)>=0?'active':''" v-for="item in countData" :key="item.shelfTierCode" @click="chooseDelLay(item)">
+				 			{{item.shelfTierCode}}层
+				 		</view>
+				 	</view>
+				 </view>
+				 <view class="newbtn flex justify_between">
+				 	<u-button shape="circle" @click="showDelLay=false" size="medium">取消</u-button>
+				 	<u-button type='primary' @click="confirmDel" shape="circle" size="medium">确定删除</u-button>
+				 </view>
+			</view>
+		</u-popup>
 		<!-- 上架确认 -->
 		<choose-type-modal v-if="chooseModal" :totalKs="totalKs" :totalNums="totalNums" :openModal="chooseModal" @confirm="confirmPut" @close="chooseModal = false" />
 		<printStickerModal v-if="showPrintModal" :layer="curTab" :openModal="showPrintModal" @confirm="confirmPrint" @close="showPrintModal = false"></printStickerModal>
@@ -97,7 +120,7 @@
 
 <script>
 	import { clzConfirm, numberToFixed } from '@/libs/tools';
-	import {queryMapList, queryCountList, shelfCartSave, shelfCartDelete, queryEmptyCostList, shelfCartConfirm} from '@/api/shelfCart.js'
+	import {queryMapList, queryCountList, shelfCartSave, shelfCartDelete, queryEmptyCostList, shelfCartConfirm,deleteBatch} from '@/api/shelfCart.js'
 	import chooseTypeModal from './chooseTypeModal'
 	import printStickerModal from './printStickerModal'
 	export default {
@@ -121,7 +144,9 @@
 				countData: [],
 				layerList: [],
 				showLayer: false,
-				curLayer: ''
+				showDelLay: false,
+				curLayer: '',
+				delLayer: []
 			}
 		},
 		onShow() {
@@ -137,6 +162,22 @@
 				this.chooseModal = true
 			})
 		},
+		onBackPress(e) {
+			console.log(e)
+			if(e.from == "backbutton"){
+				if(this.showLayer || this.showDelLay||this.chooseModal||this.showPrintModal){
+					this.showLayer = false
+					this.showDelLay = false
+					this.chooseModal = false
+					this.showPrintModal = false
+					return true
+				}
+				if(this.showPop){
+					this.showPop = false
+					return true
+				}
+			}
+		},
 		onNavigationBarButtonTap(e) {
 			console.log(e)
 			if(this.placeTab.length){
@@ -206,6 +247,7 @@
 					shelfSn: this.shelfSn,
 					...data
 				}).then(res => {
+					console.log(res)
 					uni.hideLoading()
 					if(res.status == 200){
 						uni.navigateBack()
@@ -300,6 +342,9 @@
 							this.totalKs += item.category||0
 							this.totalNums += item.qty||0
 						})
+						if(res.data.length==0){
+							this.showPop = false
+						}
 					}
 				})
 			},
@@ -328,6 +373,40 @@
 				  }
 				})
 			},
+			// 批量删除选择
+			chooseDelLay(val){
+				const i = this.delLayer.findIndex(item => item == val)
+				if(i>=0){
+					this.delLayer.splice(i,1)
+				}else{
+					this.delLayer.push(val)
+				}
+			},
+			//确定批量删除
+			confirmDel(){
+				console.log(this.delLayer)
+				if(this.delLayer.length){
+					let delLayerArr = [];
+					this.delLayer.map(item=>{
+						delLayerArr.push(item.shelfTierCode);
+					})
+					uni.showLoading({
+						mask: true,
+						title: '正在删除...'
+					})
+					this.showDelLay =false
+					deleteBatch({ shelfSn: this.shelfSn, shelfTierCodeList:delLayerArr }).then(res => {
+					  if (res.status == 200) {
+						  this.toashMsg(res.message)
+						  this.pageInit(true)
+					  }
+					   uni.hideLoading()
+					})
+					
+				}else{
+					this.toashMsg("请选择层号")
+				}
+			},
 			// 修改数量
 			updateNums(e){
 				console.log(e)

+ 1 - 0
pages/batchShelves/scanProduct.vue

@@ -51,6 +51,7 @@
 		<!-- 确认弹框 -->
 		<u-popup v-model="confirmModal" closeable mode="bottom" border-radius="14" width="80%" @close="modalConfirm">
 			<view style="display: flex;flex-direction:column;justify-content: center;padding: 30rpx 30rpx 120rpx;">
+				<view style="margin-top: 40rpx;text-align: center;">扫描结果:{{qrCode}}</view>
 				<view style="margin-top: 40rpx;text-align: center;">没有找到该产品,请重新扫描</view>
 				<view style="color: #999;padding: 30upx 30upx 50upx;text-align: center;">试一试</view>
 				<view style="text-align: center;display: flex;justify-content: space-between;">

+ 2 - 2
pages/batchShelves/searchProduct.vue

@@ -45,7 +45,7 @@
 							<u-number-box :long-press="false" :index="item.id" :input-height="60" @blur="updateNums" @minus="updateNums" @plus="updateNums" color="#000" bg-color="#fff" v-model="item.shelfCartApi.qty" :min="1"></u-number-box>
 						</view>
 						<view v-else>
-							<u-button @click="addItem(item)" plain style="height: 50rpx;line-height: 50rpx;" size="mini" shape="circle">
+							<u-button :loading="status == 'loading'" @click="addItem(item)" plain style="height: 50rpx;line-height: 50rpx;" size="mini" shape="circle">
 								<u-icon name="plus"></u-icon> 添加
 							</u-button>
 						</view>
@@ -187,7 +187,7 @@
 				shelfCartSave(params).then(res => {
 					uni.hideLoading()
 					if(res.status == 200){
-						this.toashMsg(res.message)
+						// this.toashMsg(res.message)
 						this.getProductList()
 					}
 				})

+ 6 - 1
pages/batchShelves/setProductCost.vue

@@ -28,7 +28,7 @@
 			</view>
 		</view>
 		<view class="footer-bar">
-			<u-button type='primary' shape="circle" size="medium" @click="submitForm">设置完成</u-button>
+			<u-button type='primary' shape="circle" size="medium" :custom-style="customBtnStyle" @click="submitForm">设置完成</u-button>
 		</view>
 	</view>
 </template>
@@ -40,6 +40,11 @@
 		data() {
 			return {
 				partList:[],
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
 			}
 		},
 		onLoad() {

+ 14 - 4
pages/common/commonModal.vue

@@ -2,8 +2,11 @@
 	<u-mask class="commonModal" :show="isShow" :mask-click-able="false" z-index="999998">
 		<view class="modal-con">
 			<u-icon v-if="isClose" @click="isShow=false" class="close-icon" name="close-circle" size="40" color="#999"></u-icon>
-			<view class="modal-title">{{title}}</view>
-			<view class="modal-main">{{content}}</view>
+			<view class="modal-title" v-if="showTitle">{{title}}</view>
+			<view class="modal-main">
+			{{content}}
+			<slot></slot>
+			</view>
 			<view class="modal-footer">
 				<view class="button-cancel" v-if="isCancel" @click="handleCancel">{{cancelText}}</view>
 				<view class="button-confirm" @click="handleConfirm">{{confirmText}}</view>
@@ -42,7 +45,11 @@
 			cancelText: { //  取消按钮内容
 				type: String,
 				default: '取消'
-			}
+			},
+			showTitle:{ //  是否显示标题
+				type: Boolean,
+				default: true
+			},
 		},
 		data() {
 			return {
@@ -80,9 +87,12 @@
 		width: 100%;
 		height: 100vh;
 		z-index: 10000;
+		display: flex;
+		flex-direction: column;
+		align-items: center;
+		justify-content: center;
 		.modal-con{
 			width: 70%;
-			margin: 40vh auto 0;
 			background-color: #fff;
 			border-radius: 24upx;
 			position: relative;

+ 30 - 27
pages/common/partList.vue

@@ -8,7 +8,7 @@
 			<view class="partList-list-box" v-for="item in partList" :key="item.id">
 				<view class="product flex align_center">
 					<view class="checkbox" v-if="model == 'checkbox'">
-						<u-checkbox v-model="item.checked" :name="item.id" @change="checkChange" size="40" shape="circle"></u-checkbox>
+						<u-checkbox v-model="item.checked" :disabled="item.putQty==0||item.qty==0" :name="item.id" @change="checkChange" size="40" shape="circle"></u-checkbox>
 					</view>
 					<view class="flex align_center flex_1">
 						<view class="pimgs" @click="checkChange({name:item.id})">
@@ -26,23 +26,25 @@
 									<text class="pcode">{{item.product&&item.product.code?item.product.code:'--'}}</text>
 								</view>
 								<view v-if="pageType=='replenishmentSign'||pageType=='manualPrint'||pageType=='scanCodePrint'">
-									{{item.billState == 'FINISH'?'签收数量':'实发数量'}}:
-									<text class="pnums">{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}{{item.product&&item.product.unit?item.product.unit:'--'}}</text>
+									{{item.billState == 'FINISH'?'签收数量':'补货数量'}}:
+									<text class="pnums" v-if="item.billState == 'FINISH'">{{item.putQty||item.putQty==0?item.putQty:'--'}}{{item.product&&item.product.unit?item.product.unit:'--'}}</text>
+									<text class="pnums" v-else>{{item.qty||item.qty==0?item.qty:'--'}}{{item.product&&item.product.unit?item.product.unit:'--'}}</text>
 								</view>
 								<view v-if="pageType=='replenishmentOut'">
-									x<text class="pnums">{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}</text>
+								   补货数量:<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}{{item.product&&item.product.unit?item.product.unit:'--'}}</text>
 								</view>
 								<view v-if="pageType=='replenishmentDetail'">
-									应发<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>
-									实发<text class="pnums">{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}</text>
+									补货<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>/
 									签收<text class="pnums">{{item.putQty||item.putQty==0?item.putQty:'--'}}</text>
+									({{item.product&&item.product.unit?item.product.unit:'--'}})
 								</view>
 								<view v-if="pageType=='sendOutGoods'">
-									实发:<text class="pnums">{{item.confirmQty||item.confirmQty==0?item.confirmQty:'--'}}{{item.product&&item.product.unit?item.product.unit:'--'}}</text>
-									/已扫:<text class="pnums">{{item.scanQty||item.scanQty==0?item.scanQty:'--'}}</text>
+									补货<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>
+									/已扫<text class="pnums">{{item.scanQty||item.scanQty==0?item.scanQty:'--'}}</text>
+									({{item.product&&item.product.unit?item.product.unit:'--'}})
 								</view>
 								<view v-if="pageType=='replenishmentDetailc'">
-									<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>
+									补货数量:<text class="pnums">{{item.qty||item.qty==0?item.qty:'--'}}</text>
 									{{item.product&&item.product.unit?item.product.unit:'--'}}
 								</view>
 								<view v-if="pageType=='recall'">
@@ -64,16 +66,10 @@
 				<!-- 有复选框 -->
 				<view v-if="model == 'checkbox'" class="ptools flex align_center justify_between">
 					<view></view>
-					<view class="pcurnums flex align_center" v-if="pageType=='recall'">
-						<text>实退数量</text>
-						<view class="u-ninput">
-							<u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="item.confirmQty" :min="1" :max="item.qty"></u-number-box>
-						</view>
-					</view>
 					<view class="pcurnums flex align_center" v-if="pageType=='manualPrint'">
 						<text>打印数量</text>
 						<view class="u-ninput">
-							<u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="item.printQty" :min="1" :max="item.confirmQty"></u-number-box>
+							<u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="item.printQty" :min="1" :max="999999"></u-number-box>
 						</view>
 					</view>
 				</view>
@@ -81,11 +77,17 @@
 				<view v-if="model == 'view'" class="ptools flex align_center justify_between">
 					<view></view>
 					<view class="pcurnums flex align_center" v-if="pageType=='replenishmentSign'">
-						<text>入库数量</text>
+						<text>签收数量</text>
 						<view class="u-ninput">
 							<u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="item.putQty" @change="numberChange" :min="0" :max="999999"></u-number-box>
 						</view>
 					</view>
+					<view class="pcurnums flex align_center" v-if="pageType=='recall'">
+						<text>调回数量</text>
+						<view class="u-ninput">
+							<u-number-box color="#000" :input-height="60" bg-color="#fff" v-model="item.confirmQty" :min="0" :max="item.qty"></u-number-box>
+						</view>
+					</view>
 				</view>
 			</view>
 			<view class="nodata" v-if="list.length==0">
@@ -130,14 +132,13 @@
 				this.pageType = this.fromPage
 				newValue.map(item => {
 					if(_this.pageType=='replenishmentSign'){  // 补货签收
-						this.totalNums = this.totalNums + item.confirmQty
-					}else if(_this.pageType=='replenishmentOut'){  // 补货出库
-						this.totalNums = this.totalNums + item.confirmQty
+						this.totalNums = this.totalNums + item.qty
+					}else if(_this.pageType=='replenishmentOut'||_this.pageType=='sendOutGoods'){  // 补货出库
+						this.totalNums = this.totalNums + item.qty
 					}else if(_this.pageType=='manualPrint'){  // 补货-手动打印
-						this.totalNums = this.totalNums + item.confirmQty
-						item.printQty = item.printQty ? item.printQty : 1
+						this.totalNums = this.totalNums + (item.billState == 'FINISH' ? item.putQty : item.qty)
 					}else if(_this.pageType=='scanCodePrint'){  // 补货-扫码打印
-						this.totalNums = this.totalNums + item.confirmQty
+						this.totalNums = this.totalNums + (item.billState == 'FINISH' ? item.putQty : item.qty)
 						item.printQty = item.printQty ? item.printQty : 1
 					}else if(_this.pageType=='replenishmentDetail'){  // 补货详情-已完成
 						this.totalNums = this.totalNums + item.putQty
@@ -168,24 +169,26 @@
 			// 全选
 			allSelect(val){
 				this.partList.map(item => {
-					item.checked = val
+					item.checked = val && !!item.printQty
 				})
 				this.partList.splice()
+				console.log(this.partList)
 			},
 			checkChange(e){
 				const row = this.partList.find(item => item.id == e.name)
+				const pQty = row.billState == 'FINISH' ? row.putQty : row.qty
 				console.log(row.checked)
 				if(row){
-					row.checked = !row.checked
+					row.checked = pQty ? !row.checked : false
 					this.partList.splice()
 				}
 				// 判断是否全选
-				const isAllNoChecked = this.partList.filter(item => !item.checked)
+				const isAllNoChecked = this.partList.filter(item => !item.checked || !(item.billState == 'FINISH' ? item.putQty : item.qty))
 				this.$emit('allChecked',isAllNoChecked.length == 0)
 			},
 			// 获取所有选择的
 			getAllChecked(){
-				return this.partList.filter(item => item.checked)
+				return this.partList.filter(item => item.checked && item.printQty)
 			},
 			// 获取所有数据
 			getAllData(){

+ 2 - 2
pages/common/printTag/printTag.vue

@@ -21,7 +21,7 @@
 			<view class="shelf-info-body">
 				<view>产品编码:{{fromPage == 'smdy'?infoData.productCode : infoData.productEntity&&infoData.productEntity.code}}</view>
 				<view>产品名称:{{fromPage == 'smdy'?infoData.productName : infoData.productEntity&&infoData.productEntity.productName}}</view>
-				<view>{{fromPage == 'smdy'?'实发数量':'当前库存'}}:{{fromPage == 'smdy'?infoData.confirmQty : infoData.qty}}{{infoData.productEntity&&infoData.productEntity.unit}}</view>
+				<view>{{fromPage == 'smdy'?'补货数量':'当前库存'}}:{{infoData.qty}}{{infoData.productEntity&&infoData.productEntity.unit}}</view>
 				<view v-if="fromPage == 'bdtq'">最大库容:{{infoData.maxQty}}{{infoData.productEntity&&infoData.productEntity.unit}}</view>
 			</view>
 		</view>
@@ -60,7 +60,7 @@
 			const _this = this
 			_this.fromPage = options.page
 			_this.infoData = options.data ? JSON.parse(options.data) : {};
-			_this.printNum = _this.fromPage == 'smdy' ? _this.infoData.confirmQty : _this.infoData.maxQty
+			_this.printNum = _this.fromPage == 'smdy' ? _this.infoData.qty : _this.infoData.maxQty
 			_this.printNum = _this.printNum||1
 			console.log(_this.infoData)
 			// 保持屏幕常亮

+ 3 - 3
pages/index/index.vue

@@ -93,8 +93,8 @@
 				{
 					id: 'scanVin',
 					icon: `/static/${this.theme}/navIcon/home_icon_confirm@3x.png`,
-					name: '待确认',
-					url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM',
+					name: '待补货',
+					url: '/pages/soldOut/shelfList',
 					target: 'page',
 					count: 0,
 					auth: true
@@ -141,7 +141,7 @@
 			queryByTypeSum () {
 				shelfReplenishStateCount({}).then(res => {
 					if (res.data && res.status == 200) {
-						this.storageRacksNavList[0].count = res.data.WAIT_CONFIRM || 0
+						// this.storageRacksNavList[0].count = res.data.WAIT_CONFIRM || 0
 						this.storageRacksNavList[1].count = res.data.WAIT_OUT_STOCK || 0
 						this.storageRacksNavList[2].count = res.data.WAIT_CHECK || 0
 					}

+ 5 - 1
pages/latePlay/chooseBulk.vue

@@ -35,7 +35,7 @@
 					</view>
 				</view>
 				<view v-if="shelfList&&shelfList.length==0">
-					<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+					<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="150"></u-empty>
 				</view>
 				<view style="padding: 20upx;" v-else>
 					<u-loadmore :status="status" />
@@ -63,6 +63,10 @@
 		},
 		onLoad(opts) {
 			this.getShelfList()
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
 		},
 		methods: {
 			clearSearch(){

+ 1 - 1
pages/replenishmentManage/chooseTypeModal.vue

@@ -7,7 +7,7 @@
 					<u-radio v-for="(item, index) in dispatchTypeList" :key="index" :name="item.code">{{item.dispName}}</u-radio>
 				</u-radio-group> -->
 				<view style="padding: 20upx 0 16upx;">备注</view>
-				<u-input v-model="form.remarks" placeholder="请输入出库备注(最多500字符)" type="textarea" :maxlength="500" :border="true" :auto-height="false" :custom-style="{height: '100upx'}" />
+				<u-input v-model="form.remarks" placeholder="请输入出库备注(最多100字符)" type="textarea" :maxlength="100" :border="true" :auto-height="false" :custom-style="{height: '100upx'}" />
 			</view>
 			<view class="modal-footer">
 				<view class="button-cancel" @click="isShow=false">取消</view>

+ 116 - 7
pages/replenishmentManage/detail.vue

@@ -1,6 +1,12 @@
 <template>
-	<view class="replenishment-detail-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
-		<view class="replenishment-detail-body">
+	<view class="replenishment-detail-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" v-if="pageType=='success'&&totalNums">
+				<u-icon name="chuangjiandingdan" custom-prefix="iscm-icon"></u-icon>
+				<text style="margin-left: 6rpx;">生成销售单</text>
+			</view>
+		</u-navbar>
+		<view class="replenishment-detail-body" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
 			<view class="head-info" v-if="basicInfoData">
 				<view class="states">
 					<view>
@@ -9,7 +15,7 @@
 					</view>
 				</view>
 				<view>
-					<view class="label"><u-icon name="icon_order" custom-prefix="iscm-icon" size="32"></u-icon><text>补货单号</text></view>
+					<view class="label"><u-icon name="dingdanhao" custom-prefix="iscm-icon" size="32"></u-icon><text>补货单号</text></view>
 					<view class="info-txt">{{basicInfoData.replenishBillNo || '--'}}</view>
 				</view>
 				<view>
@@ -21,28 +27,78 @@
 					<view class="info-txt">{{basicInfoData.dispatchTypeDictValue || '--'}}</view>
 				</view> -->
 				<view v-if="pageType=='success'">
-					<view class="label"><u-icon name="icon_remark" custom-prefix="iscm-icon" size="32"></u-icon><text>出库备注</text></view>
+					<view class="label"><u-icon name="xinxi" custom-prefix="iscm-icon" size="32"></u-icon><text>出库备注</text></view>
 					<view class="info-txt">{{basicInfoData.remarks || '--'}}</view>
 				</view>
 			</view>
 			<view class="part-list">
 				<!-- 补货产品 -->
-				<partList :list="partList" title="补货产品" model="view" :fromPage="pageType=='success'?'replenishmentDetail':'replenishmentDetailc'" ref="partList" noDataText="暂无产品"></partList>
+				<partList :list="partList" title="配件列表" model="view" :fromPage="pageType=='success'?'replenishmentDetail':'replenishmentDetailc'" ref="partList" noDataText="暂无产品"></partList>
 			</view>
 		</view>
+		<!-- 生成销售单 -->
+		<common-modal v-if="confirmModal" :top="salesOrderList.length?'20vh':'40vh'" :showTitle="false" :openModal="confirmModal" @confirm="modalConfirm" @close="confirmModal=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 5upx;">此补货单已经存在对应的销售单?</view>
+					<view style="padding: 0 10upx 20upx;">确认再次生成销售单吗?</view>
+					<scroll-view :scroll-y="true" style="max-height: 18vh;">
+						<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>
+					</scroll-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 { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishPutStock } from '@/api/shelfReplenish'
+	import { 
+		shelfReplenishDetail, 
+		shelfReplenishDetailList, 
+		shelfReplenishPutStock, 
+		queryRelationSalesBill,
+		createSalesBill} from '@/api/shelfReplenish'
+	import { salesDetailBySn } from '@/api/sales'
 	import partList from '@/pages/common/partList.vue'
+	import commonModal from '@/pages/common/commonModal.vue'
 	export default {
-		components: { partList },
+		components: { partList, commonModal },
 		data() {
 			return {
+				confirmModal: false,
 				replenishBillSn: '',
 				basicInfoData:null,
 				partList: [],
+				salesOrderList:[],
 				customStyle: {
 					borderRadius:'100rpx',
 					fontSize:'30rpx',
@@ -57,11 +113,27 @@
 				backgroundColor: this.$config('primaryColor')
 			})
 		},
+		onBackPress() {
+			if(this.showModal){
+				this.showModal = false
+				return true
+			}
+		},
 		onLoad(option) {
 			this.replenishBillSn = option.sn
 			this.pageType = option.type
 			this.getDetail()
 			this.getPartList()
+			this.getSalesOrder()
+		},
+		computed: {
+			totalNums() {
+				let ret = 0
+				this.partList.map(item => {
+					ret = ret + item.putQty
+				})
+				return ret
+			}
 		},
 		methods: {
 			// 查询详情
@@ -77,14 +149,51 @@
 			// 查询列表
 			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{
 						this.partList = []
 					}
 				})
+			},
+			// 查询关联销售单
+			getSalesOrder () {
+			  queryRelationSalesBill({ replenishBillSn: this.replenishBillSn }).then(res => {
+			    if (res.status == 200) {
+			      this.salesOrderList = res.data
+			    } else {
+			      this.salesOrderList = []
+			    }
+			  })
+			},
+			// 生成销售单
+			creatSalesOrder(){
+				this.confirmModal = true
+			},
+			modalConfirm(){
+				this.showLoading("正在生成销售单...")
+				createSalesBill({ replenishBillSn: this.replenishBillSn }).then(res => {
+					if (res.status == 200) {
+						this.getSalesOrder()
+					}
+					this.confirmModal = false
+					this.toashMsg(res.message)
+					uni.hideLoading()
+				})
+			},
+			// 查看销售单
+			viewSales(data){
+				salesDetailBySn({ salesBillSn: data.salesBillSn }).then(res => {
+				  if (res.data) {
+				    uni.navigateTo({ url: '/pages/sales/edit?pageType=detail&data='+JSON.stringify(data) })
+				  } else {
+				    this.toashMsg('此销售单已被删除!')
+				  }
+				})
 			}
 		}
 	}

+ 5 - 7
pages/replenishmentManage/manualPrint.vue

@@ -8,7 +8,7 @@
 		</view>
 		<view class="replenishment-manualPrint-footer">
 			<view>
-				<u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
+				<u-checkbox size="40" :disabled="basicInfoData&&basicInfoData.billState == 'FINISH' && !basicInfoData.totalPutQty" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
 			</view>
 			<view>
 				<kk-printer @closeConnect="closeConnect" ref="kkprinter" defaultText="开始打印" @startPrint="startPrint"></kk-printer>
@@ -45,7 +45,6 @@
 		onLoad(option) {
 			this.replenishBillSn = option.sn
 			this.getDetail()
-			this.getPartList()
 			// 保持屏幕常亮
 			uni.setKeepScreenOn({
 				keepScreenOn: true
@@ -80,6 +79,7 @@
 					}else{
 						this.basicInfoData = null
 					}
+					this.getPartList()
 				})
 			},
 			// 查询列表
@@ -89,17 +89,15 @@
 					if(res.status == 200 && res.data){
 						res.data.map(item =>{
 							if(item.billState == 'FINISH'){
-								item.confirmQty = item.putQty ? Number(item.putQty) : 0
-								item.printQty = item.confirmQty ? Number(item.confirmQty) : 0
+								item.printQty = item.putQty ? Number(item.putQty) : 0
 							}else{
-								item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
-								item.printQty = item.confirmQty ? Number(item.confirmQty) : 0
+								item.printQty = item.qty ? Number(item.qty) : 0
 							}
 						})
 						this.partList = res.data || []
 						this.$nextTick(()=>{
 							this.allCheckeChange({value:true})
-							this.allChecked = true
+							this.allChecked = !(this.basicInfoData&&this.basicInfoData.billState == 'FINISH' && !this.basicInfoData.totalPutQty)
 						})
 					}else{
 						this.partList = []

+ 143 - 21
pages/replenishmentManage/outWarehousing.vue

@@ -1,6 +1,12 @@
 <template>
-	<view class="replenishment-outWarehousing-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
-		<view class="replenishment-outWarehousing-body">
+	<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" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
 			<view class="head-info" v-if="basicInfoData">
 				<view class="states">
 					<view>
@@ -23,20 +29,64 @@
 			</view>
 		</view>
 		<view class="replenishment-outWarehousing-footer">
-			<u-button class="button" @click="printModal=true" :custom-style="customDefalutStyle" hover-class="none" shape="circle">打印标签</u-button>
-			<u-button class="button" @click="goSendOutGoods" :loading="loading" type="success" :custom-style="customStyle" hover-class="none" shape="circle">发货出库</u-button>
+			<u-button class="button" @click="goSendOutGoods" :custom-style="customDefalutStyle" hover-class="none" shape="circle">扫码出库</u-button>
+			<u-button class="button" @click="confirmModal=true" :loading="loading" type="success" :custom-style="customStyle" hover-class="none" shape="circle">一键出库</u-button>
 		</view>
-		<!-- 打印贴签 -->
-		<print-sticker-modal :openModal="printModal" @confirm="modalPrint" @close="printModal=false" />
+		<!-- 一键出库弹框 -->
+		<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 5upx;">此补货单已经存在对应的销售单?</view>
+					<view style="padding: 0 10upx 20upx;">确认再次生成销售单吗?</view>
+					<scroll-view :scroll-y="true" style="max-height: 18vh;">
+						<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>
+					</scroll-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 printStickerModal from './printStickerModal.vue'
-	import { shelfReplenishDetail, shelfReplenishDetailList } from '@/api/shelfReplenish'
+	import commonModal from '@/pages/common/commonModal.vue'
+	import { salesDetailBySn } from '@/api/sales'
+	import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishOutStock, queryRelationSalesBill, createSalesBill } from '@/api/shelfReplenish'
 	import partList from '@/pages/common/partList.vue'
 	export default {
-		components: { partList, printStickerModal },
+		components: { partList, commonModal },
 		data() {
 			return {
 				loading: false,
@@ -54,7 +104,9 @@
 					color: this.$config('primaryColor'),
 					background: '#fff'
 				},
-				printModal: false
+				confirmModal: false,
+				remarks: '',
+				showModal: false
 			}
 		},
 		onReady() {
@@ -63,10 +115,26 @@
 				backgroundColor: this.$config('primaryColor')
 			})
 		},
+		onBackPress() {
+			if(this.showModal){
+				this.showModal = false
+				return true
+			}
+		},
 		onLoad(option) {
 			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: {
 			// 查询详情
@@ -84,27 +152,81 @@
 				const _this = this
 				shelfReplenishDetailList({ replenishBillSn: this.replenishBillSn }).then(res => {
 					if(res.status == 200 && res.data){
-						res.data.map(item =>{
-							item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
-						})
 						this.partList = res.data || []
 					}else{
 						this.partList = []
 					}
 				})
 			},
-			// 打印贴签 confirm
-			modalPrint(type){
-				this.printModal = false
-				if(type == 'manual'){  // 手动打印
-					uni.navigateTo({ url: "/pages/replenishmentManage/manualPrint?sn="+this.replenishBillSn })
-				}else if(type == 'scan'){  // 扫码打印
-					uni.navigateTo({ url: "/pages/replenishmentManage/scanCodePrint?sn="+this.replenishBillSn })
+			// 一键出库
+			modalConfirm(){
+				const arr = []
+				const _this = this
+				_this.partList.map((item, index) => {
+				  arr.push({
+				    productSn: item.productSn,
+				    confirmQty: item.qty,
+				    replenishBillDetailSn: item.replenishBillDetailSn,
+					id: item.id
+				  })
+				})
+				const params = {
+				  replenishBillSn: _this.replenishBillSn,
+				  detailList: arr,
+				  remarks: _this.remarks,
+				  shelfSn: _this.basicInfoData && _this.basicInfoData.shelfSn
 				}
+				_this.showLoading('正在出库...')
+				shelfReplenishOutStock(params).then(res => {
+					console.log(res)
+				  if (res.status == 200) {
+					_this.remarks = ''
+					uni.$emit('refreshBL')
+					uni.$emit("refreshBhList",'WAIT_CHECK')
+					uni.navigateBack()
+				  }
+				   _this.toashMsg(res.message)
+				   uni.hideLoading()
+				})
 			},
 			// 发货出库
 			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){
+				salesDetailBySn({ salesBillSn: data.salesBillSn }).then(res => {
+				  if (res.data) {
+				    uni.navigateTo({ url: '/pages/sales/edit?pageType=detail&data='+JSON.stringify(data) })
+				  } else {
+				    this.toashMsg('此销售单已被删除!')
+				  }
+				})
 			}
 		}
 	}
@@ -119,7 +241,7 @@
 	width: 100%;
 	height: 100%;
 	overflow: hidden;
-	padding-bottom: 136upx;
+	padding-bottom: 280upx;
 	.replenishment-outWarehousing-body{
 		padding: 0 30rpx;
 		height: 100%;

+ 88 - 19
pages/replenishmentManage/replenishmentList.vue

@@ -21,15 +21,26 @@
 						<view class="check-col">
 							<view>补货单号:{{item.replenishBillNo}}</view>
 							<view class="flex align_center justify_between">
-								<view v-if="item.billState=='WAIT_CONFIRM' || item.billState=='CANCEL'">应发数量:{{item.totalQty}}</view>
-								<view v-if="item.billState=='WAIT_OUT_STOCK' || item.billState=='WAIT_CHECK'">实发数量:{{item.totalConfirmQty}}</view>
-								<view v-if="item.billState=='FINISH'">入库数量:{{item.totalPutQty}}</view>
+								<view v-if="item.billState=='WAIT_OUT_STOCK' || item.billState=='WAIT_CHECK' || item.billState=='CANCEL'">补货数量:{{item.totalQty}}</view>
+								<view v-if="item.billState=='FINISH'">签收数量:{{item.totalPutQty}}</view>
 							</view>
 						</view>
 						<view class="ptools flex align_center justify_between">
-							<view><text>{{item.createDate}}</text></view>
-							<view class="print" v-if="item.billState!='CANCEL'&&item.billState!='WAIT_CONFIRM'" @click.stop="print(item)">
-								<u-image :src="`/static/${$config('themePath')}/icon_printer@3x.png`" width="48" height="48"></u-image>
+							<view>
+								<text v-if="item.billState == 'WAIT_CHECK'">出库时间:{{item.outStockTime}}</text>
+								<text v-else-if="item.billState == 'FINISH'">签收时间:{{item.putStockTime}}</text>
+								<text v-else>创建时间:{{item.createDate}}</text>
+							</view>
+							<view class="flex align_center justify_between">
+								<view v-if="item.billState=='WAIT_CONFIRM'||item.billState=='WAIT_OUT_STOCK'">
+									<u-button shape="circle" size="mini" @click.stop="handleCancelOrder(item)" type="error" plain>取消</u-button>
+								</view>
+								<view v-if="item.billState=='CANCEL'">
+									<u-button shape="circle" size="mini" @click.stop="handleDelOrder(item)" type="error" plain>删除</u-button>
+								</view>
+								<view class="print" v-if="item.billState!='CANCEL'&&item.billState!='WAIT_CONFIRM'" @click.stop="print(item)">
+									<u-image :src="`/static/${$config('themePath')}/icon_printer@3x.png`" width="48" height="48"></u-image>
+								</view>
 							</view>
 						</view>
 					 </view>
@@ -47,7 +58,12 @@
 
 <script>
 	import printStickerModal from './printStickerModal.vue'
-	import { shelfReplenishList, shelfReplenishStateCount } from '@/api/shelfReplenish'
+	import { clzConfirm } from '@/libs/tools';
+	import { 
+		shelfReplenishList, 
+		shelfReplenishStateCount, 
+		shelfReplenishCancel, 
+		shelfReplenishDelete } from '@/api/shelfReplenish'
 	export default {
 		components: {printStickerModal},
 		data() {
@@ -59,11 +75,11 @@
 						dispName: '全部',
 						status: 'ALL'
 					},
-					{
-						dispName: '待确认',
-						status: 'WAIT_CONFIRM',
-						count: 0
-					},
+					// {
+					// 	dispName: '待确认',
+					// 	status: 'WAIT_CONFIRM',
+					// 	count: 0
+					// },
 					{
 						dispName: '待出库',
 						status: 'WAIT_OUT_STOCK',
@@ -110,9 +126,22 @@
 			// 跳到指定tab
 			uni.$on('refreshBhList',this.refreshBhList)
 		},
+		onReady() {
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
+		},
 		onUnload() {
 			uni.$off('refreshBL')
 		},
+		onNavigationBarButtonTap(e) {
+			if(e.index == 0){
+				uni.navigateTo({
+					url: "/pages/soldOut/shelfList"
+				})
+			}
+		},
 		methods:{
 			// tabs通知swiper切换
 			tabsChange(index) {
@@ -206,13 +235,53 @@
 					uni.navigateTo({ url: "/pages/replenishmentManage/detail?sn="+item.replenishBillSn+"&type=cancel" })
 				}
 			},
+			// 取消补货单
+			handleCancelOrder (row) {
+				const _this = this;
+				clzConfirm({
+					title: '提示',
+					content: '确认取消补货单吗?',
+					success: function(res) {
+						if (res.confirm || res.index == 0) {
+							_this.showLoading('正在取消...')
+							shelfReplenishCancel({ replenishBillSn: row.replenishBillSn }).then(res => {
+							  if (res.status == 200) {
+							    _this.toashMsg(res.message)
+								_this.queryByTypeSum()
+							  }
+							  uni.hideLoading()
+							})
+						}
+					}
+				});
+			},
+			// 删除补货单
+			handleDelOrder(row){
+				const _this = this;
+				clzConfirm({
+					title: '提示',
+					content: '确认删除补货单吗?',
+					success: function(res) {
+						if (res.confirm || res.index == 0) {
+							_this.showLoading('正在删除...')
+							shelfReplenishDelete({ replenishBillSn: row.replenishBillSn }).then(res => {
+							  if (res.status == 200) {
+							    _this.toashMsg(res.message)
+								_this.queryByTypeSum()
+							  }
+							  uni.hideLoading()
+							})
+						}
+					}
+				});
+			},
 			// 查询每个状态的数据条数
 			queryByTypeSum (flag) {
 				shelfReplenishStateCount({}).then(res => {
 					if (res.data && res.status == 200) {
-						this.tabList[1].count = res.data.WAIT_CONFIRM || 0
-						this.tabList[2].count = res.data.WAIT_OUT_STOCK || 0
-						this.tabList[3].count = res.data.WAIT_CHECK || 0
+						// this.tabList[1].count = res.data.WAIT_CONFIRM || 0
+						this.tabList[1].count = res.data.WAIT_OUT_STOCK || 0
+						this.tabList[2].count = res.data.WAIT_CHECK || 0
 						if(!flag){
 							this.getRow(1)
 						}
@@ -280,11 +349,11 @@
 			.check-row{
 				 display: flex;
 				 justify-content: space-between;
-				 margin-bottom: 10rpx;
 				 >view{
 					 &:first-child{
-						 color: #222;
-						 font-size: 32rpx;
+						 color: #333;
+						 font-size: 30rpx;
+						 font-weight: bold;
 						 width: 80%;
 					 }
 					 &:last-child{
@@ -303,7 +372,7 @@
 			.ptools{
 				color: #707070;
 				.print{
-					padding: 0 10rpx;
+					padding: 0 10rpx 0 30rpx;
 				}
 			}
 		}

+ 8 - 4
pages/replenishmentManage/scanCodePrint.vue

@@ -98,9 +98,9 @@
 					if(res.status == 200 && res.data){
 						res.data.map(item =>{
 							if(item.billState == 'FINISH'){
-								item.confirmQty = item.putQty ? Number(item.putQty) : 0
+								item.qty = item.putQty ? Number(item.putQty) : 0
 							}else{
-								item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
+								item.qty = item.qty ? Number(item.qty) : 0
 							}
 						})
 						this.partList = res.data || []
@@ -130,13 +130,17 @@
 							productName: res.data&&res.data[0]&&res.data[0].product&&res.data[0].product.name,
 							productCode: res.data&&res.data[0]&&res.data[0].product&&res.data[0].product.code,
 							productSn: res.data&&res.data[0]&&res.data[0].product&&res.data[0].product.productSn,
-							confirmQty: res.data&&res.data[0]&&res.data[0].confirmQty,
+							qty: res.data&&res.data[0]&&res.data[0].qty,
 							shelfSn: res.data&&res.data[0]&&res.data[0].shelfSn,
 							replenishBillDetailSn: res.data&&res.data[0]&&res.data[0].replenishBillDetailSn,
 							shelfPlaceCode: res.data&&res.data[0]&&res.data[0].shelfPlaceCode,
 							shelfPlaceSn: res.data&&res.data[0]&&res.data[0].shelfPlaceSn
 						}
-						uni.navigateTo({ url: "/pages/common/printTag/printTag?page=smdy&data="+JSON.stringify(params) })
+						if(!(res.data[0].billState == 'FINISH'&&!params.qty)){
+							uni.navigateTo({ url: "/pages/common/printTag/printTag?page=smdy&data="+JSON.stringify(params) })
+						}else{
+							this.toashMsg("签收数量为0,不可打印")
+						}
 					}else{
 						this.contTitle = 0
 						this.contModal = "抱歉,该产品不是此补货单的产品请更换产品重新扫描?"

+ 3 - 6
pages/replenishmentManage/sendOutGoods.vue

@@ -107,7 +107,7 @@
 				shelfReplenishDetail({ sn: this.replenishBillSn }).then(res => {
 					console.log(res)
 					if(res.status == 200 && res.data){
-						if(res.data.totalConfirmQty && res.data.totalScanQty && res.data.totalConfirmQty == res.data.totalScanQty){
+						if(res.data.totalQty && res.data.totalScanQty && res.data.totalQty == res.data.totalScanQty){
 							this.isAll = true
 						}else{
 							this.isAll = false
@@ -132,7 +132,7 @@
 				_this.partList.map((item, index) => {
 				  arr.push({
 				    productSn: item.productSn,
-				    confirmQty: item.confirmQty,
+				    confirmQty: item.qty,
 				    replenishBillDetailSn: item.replenishBillDetailSn,
 					id:item.id
 				  })
@@ -193,9 +193,6 @@
 				console.log(qrCode,pa)
 				shelfReplenishDetailOutScan({
 					replenishBillSn: _this.replenishBillSn,
-					// shelfSn: getQueryString('&'+qrCode, 'shelfSn'),
-					// shelfPlaceSn: getQueryString('&'+qrCode, 'shelfPlaceSn'),
-					// productSn: getQueryString('&'+qrCode, 'productSn')
 					shelfSn: pa[0],
 					shelfPlaceSn: pa[3],
 					productSn: pa[2]
@@ -204,7 +201,7 @@
 					if(res.status == 200){
 						// 刷新列表
 						_this.getPartList()
-						if(res.data && res.data.totalConfirmQty && res.data.totalScanQty && res.data.totalConfirmQty == res.data.totalScanQty){
+						if(res.data && res.data.totalQty && res.data.totalScanQty && res.data.totalQty == res.data.totalScanQty){
 							_this.isAll = true
 							_this.handleOutGoods()
 						}else{

+ 116 - 11
pages/replenishmentManage/signWarehousing.vue

@@ -1,6 +1,12 @@
 <template>
-	<view class="replenishment-putWarehousing-wrap" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
-		<view class="replenishment-putWarehousing-body">
+	<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" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 12%)`">
 			<view class="head-info" v-if="basicInfoData">
 				<view class="states">
 					<view>
@@ -13,13 +19,17 @@
 					<view class="info-txt">{{basicInfoData.dispatchTypeDictValue || '--'}}</view>
 				</view> -->
 				<view>
-					<view class="label"><u-icon name="icon_remark" custom-prefix="iscm-icon" size="32"></u-icon><text>出库备注</text></view>
+					<view class="label"><u-icon name="ison_shelf" custom-prefix="iscm-icon" size="32"></u-icon><text>货架名称</text></view>
+					<view class="info-txt">{{basicInfoData.shelfInfo&&basicInfoData.shelfInfo.shelfName || '--'}}</view>
+				</view>
+				<view>
+					<view class="label"><u-icon name="xinxi" custom-prefix="iscm-icon" size="32"></u-icon><text>出库备注</text></view>
 					<view class="info-txt">{{basicInfoData.remarks || '--'}}</view>
 				</view>
 			</view>
 			<view class="part-list">
 				<!-- 补货产品 -->
-				<partList :list="partList" title="补货产品" model="view" fromPage="replenishmentSign" ref="partList" noDataText="暂无产品" @numberChange="numberChange"></partList>
+				<partList :list="partList" title="配件列表" model="view" fromPage="replenishmentSign" ref="partList" noDataText="暂无产品" @numberChange="numberChange"></partList>
 			</view>
 		</view>
 		<view class="replenishment-putWarehousing-footer">
@@ -27,12 +37,54 @@
 		</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 5upx;">此补货单已经存在对应的销售单?</view>
+					<view style="padding: 0 10upx 20upx;">确认再次生成销售单吗?</view>
+					<scroll-view :scroll-y="true" style="max-height: 18vh;">
+						<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>
+					</scroll-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 { salesDetailBySn } from '@/api/sales'
+	import { shelfReplenishDetail, shelfReplenishDetailList, shelfReplenishPutStock, queryRelationSalesBill, createSalesBill } from '@/api/shelfReplenish'
 	import partList from '@/pages/common/partList.vue'
 	export default {
 		components: { partList, commonModal },
@@ -49,7 +101,8 @@
 					fontSize:'30rpx',
 					background: this.$config('primaryColor')
 				},
-				confirmModal: false
+				confirmModal: false,
+				showModal: false
 			}
 		},
 		onReady() {
@@ -58,10 +111,26 @@
 				backgroundColor: this.$config('primaryColor')
 			})
 		},
+		onBackPress() {
+			if(this.showModal){
+				this.showModal = false
+				return true
+			}
+		},
 		onLoad(option) {
 			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: {
 			// 查询详情
@@ -77,15 +146,16 @@
 			// 查询列表
 			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
 						res.data.map(item =>{
-							item.confirmQty = item.confirmQty ? Number(item.confirmQty) : 0
-							item.putQty = item.confirmQty ? Number(item.confirmQty) : 0
-							if(item.confirmQty && Number(item.confirmQty)){
-								_this.totalQty += Number(item.confirmQty)
+							item.putQty = item.qty ? Number(item.qty) : 0
+							if(item.qty && Number(item.qty)){
+								_this.totalQty += Number(item.qty)
 							}
 							if(item.putQty && Number(item.putQty)){
 								_this.confirmQty += Number(item.putQty)
@@ -139,6 +209,41 @@
 						_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){
+				salesDetailBySn({ salesBillSn: data.salesBillSn }).then(res => {
+				  if (res.data) {
+				    uni.navigateTo({ url: '/pages/sales/edit?pageType=detail&data='+JSON.stringify(data) })
+				  } else {
+				    this.toashMsg('此销售单已被删除!')
+				  }
+				})
 			}
 		}
 	}
@@ -153,7 +258,7 @@ page{
 	width: 100%;
 	height: 100%;
 	overflow: hidden;
-	padding-bottom: 136upx;
+	padding-bottom: 280upx;
 	.replenishment-putWarehousing-body{
 		padding: 0 30rpx;
 		height: 100%;

+ 10 - 4
pages/sales/chooseCustomer.vue

@@ -35,10 +35,13 @@
 				<view class="picker-main-item" v-for="(item, index) in listData" :key="item.id" @click="chooseItem(item)">
 					<view class="item-name">{{item.customerName}}</view>
 				</view>
-				<view v-if="listData&&listData.length>=20" style="color:#999;font-size: 26upx;text-align: center;padding: 10upx;">最多显示前20条匹配客户,请尝试输入更多内容</view>
-				<view v-if="listData && listData.length == 0">
+				<view v-if="listData&&listData.length>=20 && !loading" style="color:#999;font-size: 26upx;text-align: center;padding: 10upx;">最多显示前20条匹配客户,请尝试输入更多内容</view>
+				<view v-if="listData && listData.length == 0 && !loading">
 					<u-empty text="暂无匹配客户" mode="list" :img-width="200" :margin-top="60"></u-empty>
 				</view>
+				<view v-if="loading">
+					<u-loadmore :load-text="$config('loadText')" status="loading" />
+				</view>
 			</view>
 		</scroll-view>
 	</view>
@@ -49,6 +52,7 @@
 	export default{
 		data(){
 			return{
+				loading: false,
 				listData:[],
 				queryWord:'',
 				pageSize:20,
@@ -96,14 +100,16 @@
 			},
 			getData(){
 				console.log('调用')
-				uni.showLoading({title:'加载中...',mask:true})
+				// uni.showLoading({title:'加载中...',mask:true})
+				this.loading = true
 				customerList({queryWord:this.queryWord,pageNo:this.pageNo,pageSize:this.pageSize}).then(res => {
 					if(res.status == 200 && res.data){
-						uni.hideLoading({})
 						this.listData = res.data.list
 					}else{
 						this.listData = []
 					}
+					// uni.hideLoading()
+					this.loading = false
 				})
 			},
 			// 搜索品牌

+ 5 - 5
pages/sales/listComponent.vue

@@ -13,7 +13,7 @@
 							<view>
 								<view style="display: inline-block;margin-right: 6upx;">{{item.salesBillNo}}</view>
 								<u-tag v-if="item.oosFlag==1" text="急件" :bg-color="$config('errorColor')" mode="dark" shape="circle" size="mini" style="margin-right: 6upx;vertical-align: text-top;" />
-								<u-tag v-if="item.salesBillSourceDictValue" :text="item.salesBillSourceDictValue" :bg-color="$config('primaryColor')" mode="dark" shape="circle" size="mini" style="vertical-align: text-top;" />
+								<u-tag v-if="item.sourceTypeDictValue" :text="item.sourceTypeDictValue" :bg-color="$config('primaryColor')" mode="dark" shape="circle" size="mini" style="vertical-align: text-top;" />
 							</view>
 							<view class="color_6 font_13">{{item.createDate || '--'}}</view>
 						</view>
@@ -30,10 +30,10 @@
 					<!-- <view class="button-box">
 						<u-button @click="handleFun('audit', item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" v-if="item.billStatus == 'WAIT_AUDIT'">审核</u-button>
 						<u-button @click="handleFun('out', item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" v-if="item.billStatus == 'WAIT_OUT_WAREHOUSE'">出库</u-button>
-						<u-button @click="handleEdit(item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" v-if="(item.salesBillSource == 'SATELLITE' || item.salesBillSource == 'SALES' || item.salesBillSource == 'TEMPORARY_DISPATCHING') && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'WAIT_SUBMIT' || item.billStatus == 'AUDIT_REJECT')">编辑</u-button>
-						<u-button @click="handleFun('del', item)" size="mini" :hair-line="false" shape="circle" plain type="error" hover-class="none" v-if="((item.salesBillSource == 'SATELLITE' || item.salesBillSource == 'SALES' || item.salesBillSource == 'TEMPORARY_DISPATCHING') && item.billStatus != 'FINISH')">删除</u-button>
-						<u-button @click="handleEdit(item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" v-if="item.salesBillSource == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE')">改单</u-button>
-						<u-button @click="handleFun('cancel', item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" v-if="item.salesBillSource == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE')">取消</u-button>
+						<u-button @click="handleEdit(item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" v-if="(item.sourceType == 'SATELLITE' || item.sourceType == 'SALES' || item.sourceType == 'TEMPORARY_DISPATCHING') && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'WAIT_SUBMIT' || item.billStatus == 'AUDIT_REJECT')">编辑</u-button>
+						<u-button @click="handleFun('del', item)" size="mini" :hair-line="false" shape="circle" plain type="error" hover-class="none" v-if="((item.sourceType == 'SATELLITE' || item.sourceType == 'SALES' || item.sourceType == 'TEMPORARY_DISPATCHING') && item.billStatus != 'FINISH')">删除</u-button>
+						<u-button @click="handleEdit(item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" v-if="item.sourceType == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE')">改单</u-button>
+						<u-button @click="handleFun('cancel', item)" size="mini" :hair-line="false" shape="circle" plain type="primary" hover-class="none" v-if="item.sourceType == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE')">取消</u-button>
 					</view> -->
 				</view>
 				<view v-if="listData && listData.length == 0 && status!='loading'">

+ 1 - 1
pages/sales/orderInfoModal.vue

@@ -35,7 +35,7 @@
 				</view>
 				<view>
 					<text class="info-item-tit">来源:</text>
-					<text class="info-item-txt">{{infoData && infoData.salesBillSourceDictValue || '--'}}</text>
+					<text class="info-item-txt">{{infoData && infoData.sourceTypeDictValue || '--'}}</text>
 				</view>
 				<view>
 					<text class="info-item-tit">业务状态:</text>

+ 8 - 13
pages/shelfOrder/listComponent.vue

@@ -3,12 +3,14 @@
 		<scroll-view class="sales-list-con" :style="{height: scrollH+'px'}" scroll-y @scrolltolower="onreachBottom">
 			<view class="sales-list-main">
 				<view class="sales-list-item" v-for="(item, index) in listData" :key="item.id" @click="getDetail(item)">
-					<view class="list-item-tit flex align_center justify_between">
-						<view class="u-line" :style="{background: $config('primaryColor')}"></view>
-						<view class="buyer">{{item.shelfName||'--'}}</view>
-						<view><text :style="{color:item.billState=='CLOSE'?'#ff5500':'#999'}">{{item.billStateDictValue}}</text> 
-						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
-					</view>
+					<view class="list-item-tit align_center flex justify_between">
+						<view class="buyer flex">
+							{{item.shelfName||'--'}}
+						</view>
+						<view>
+							<text :style="{color:item.billState=='CLOSE'?'#ff5500':'#999'}">{{item.billStateDictValue}}</text> 
+							<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
+						</view>
 					</view>
 					<view class="detail-list">
 						<view class="flex align_center justify_between" v-for="de in item.orderBillDetailApiEntityList">
@@ -174,13 +176,6 @@
 						padding-bottom: 18upx;
 						padding-top: 10upx;
 						border-bottom: 1px solid #e4e7ed;
-						.u-line{
-							display: inline-block;
-							width: 6upx;
-							height: 28upx;
-							vertical-align: bottom;
-							border-radius: 5upx;
-						}
 						.buyer{
 							flex-grow: 1;
 							font-size: 28upx;

+ 2 - 1
pages/shelfOrder/search.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="salesSearch-wrap">
-		<u-popup v-model="isShow" class="search-popup" mode="right" @close="isShow=false" length="85%">
+		<u-popup v-model="isShow" class="search-popup" closeable mode="right" @close="isShow=false" length="85%">
 			<u-form class="form-content" :model="form" ref="uForm" label-width="150">
 				<u-form-item label="下单时间" prop="date" class="form-item">
 					<u-input clearable v-model="form.date" disabled placeholder="请选择下单时间区间" class="form-item-inp" @click="showDate=true" />
@@ -165,6 +165,7 @@
 		.search-popup {
 			.form-content {
 				display: block;
+				margin-top: 50upx;
 				padding: 0 20upx;
 				box-sizing: content-box;
 				.form-item-inp{

+ 7 - 2
pages/shelfOrder/shelfOrder.vue

@@ -69,9 +69,14 @@
 			}).exec();
 		},
 		onLoad(opts) {
+			console.log(opts)
 			const _this = this
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
+			
 			this.getLookUpItem('ORDER_BILL_STATE')
-			console.log(opts)
 			// 从消息页面过来
 			if(opts.bizType == 'SHELF_WARN'&&opts.shelfSn){
 				this.searchForm.shelfSnList = [opts.shelfSn]
@@ -146,7 +151,7 @@
 			.search-top-box{
 				background-color: #fff;
 				text-align: center;
-				padding-bottom: 20rpx;
+				padding: 20rpx 0;
 			}
 			.countData{
 				background: #fff;

+ 7 - 1
pages/shelfSetting/addShelfHw.vue

@@ -98,6 +98,9 @@
 				_this.form.cost = Number(data.cost)
 				_this.form.productCode = data.code
 				_this.form.productSn = data.productSn
+				_this.form.oldPrice = Number(data.price)
+				_this.form.oldCost = Number(data.cost)
+				_this.form.oldMaxQty = ''
 			})
 			
 			if(this.type == 'edit'){
@@ -154,7 +157,10 @@
 						     productCode: form.productCode,
 						     price: form.price,
 						     cost: form.cost,
-						     maxQty: form.maxQty
+						     maxQty: form.maxQty,
+							 oldPrice: form.oldPrice,
+							 oldCost: form.oldCost,
+							 oldMaxQty: form.oldMaxQty
 						   }
 						 }
 						 // 开始提交数据

+ 6 - 0
pages/shelfSetting/editShelfHw.vue

@@ -103,6 +103,8 @@
 				_this.productEntity = data
 				_this.form.price = Number(data.price)
 				_this.form.cost = Number(data.cost)
+				_this.form.oldPrice = Number(data.price)
+				_this.form.oldCost = Number(data.cost)
 				_this.form.productCode = data.code
 				_this.form.productSn = data.productSn
 				// 更换产品
@@ -180,6 +182,9 @@
 			      this.form.price = res.data.price
 			      this.form.cost = res.data.cost
 			      this.form.maxQty = res.data.maxQty
+				  this.form.oldPrice = res.data.price
+				  this.form.oldCost = res.data.cost
+				  this.form.oldMaxQty = res.data.maxQty
 			    } else {
 			      this.productEntity = null
 			    }
@@ -221,6 +226,7 @@
 				this.$refs.uForm.validate(valid => {
 					if (valid) {
 						 const form = JSON.parse(JSON.stringify(_this.form))
+						 form.shelfSn = _this.nowData && _this.nowData.shelfSn
 						 form.shelfPlaceSn = _this.nowData && _this.nowData.shelfPlaceSn
 						 if(this.type != 'bind'){ // 不是绑定产品
 						 	form.shelfProductSn = _this.nowData && _this.nowData.shelfProductApiEntity && _this.nowData.shelfProductApiEntity.shelfProductSn || _this.nowData.shelfProductSn

+ 5 - 0
pages/shelfSetting/shelfList.vue

@@ -74,6 +74,11 @@
 			uni.$on("setCustome",(data)=>{
 				this.saveShelf(data)
 			})
+			
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
 		},
 		onUnload() {
 			uni.$off("setCustome")

+ 26 - 20
pages/shelfSetting/shelfSet.vue

@@ -1,7 +1,7 @@
 <template>
 	<view class="content">
-		<u-navbar back-text="货架设置">
-			<view slot='right' style="padding: 0 30upx;color: #00aaff;" @click="toPlRacking" v-if="shelfPlaceList">
+		<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="toPlRacking" v-if="shelfPlaceList">
 				<u-icon name="piliangshangjia" custom-prefix="iscm-icon"></u-icon>
 				<text style="margin-left: 6rpx;">批量上架</text>
 				<u-badge v-if="showDot" :is-dot="true" size="mini" type="error"></u-badge>
@@ -66,12 +66,20 @@
 			</view>
 		</view>
 		<view v-else>
-			<view class="nodata">
-				暂无货位信息,请点击 
+			<view class="nodata" v-if="!loading">
 				<view>
-					<text @click="toPlRacking">批量上架</text>
-					<u-badge :offset="[-6,-10]" v-if="showDot" :is-dot="true" size="mini" type="error"></u-badge>
+					<u-image :src="`../../static/${$config('themePath')}/def_no_data@3x.png`" width="180" height="180" border-radius="10"></u-image>
 				</view>
+				<view class="flex">
+					暂无货位信息,请点击
+					<view>
+						<text @click="toPlRacking">批量上架</text>
+						<u-badge :offset="[-6,-10]" v-if="showDot" :is-dot="true" size="mini" type="error"></u-badge>
+					</view>
+				</view>
+			</view>
+			<view class="nodata" v-else>
+				<u-loadmore :load-text="$config('loadText')" status="loading" />
 			</view>
 		</view>
 	</view>
@@ -86,6 +94,7 @@
 		},
 		data() {
 			return {
+				loading: false,
 				shelfSn: null,
 				detailData: null,
 				switchVal: false,
@@ -118,15 +127,17 @@
 			this.shelfSn = option.shelfSn
 			// 获取货架详情
 			this.getShelfDetal()
-			this.getShelfPriceShow()
+			// this.getShelfPriceShow()
 			// 获取货物
 			this.getShelfPlace()
 			this.isLoad = true
 			this.webView = this.$mp.page.$getAppWebview(); 
 			uni.$on("editCustome",(data)=>{
+				this.isLoad = true
 				this.saveShelf(data,0)
 			})
 			uni.$on("editShelfName",(data)=>{
+				this.isLoad = true
 				this.saveShelf(data,1)
 			})
 			
@@ -149,6 +160,7 @@
 			// 刷新货位
 			updateHw(){
 				this.placeTab = []
+				this.shelfPlaceList = null
 				this.getShelfPlace(true)
 			},
 			// 批量上架
@@ -301,10 +313,7 @@
 				}
 				shelfSave(params).then(res => {
 					 if (res.status == 200) {
-					  uni.showToast({
-						icon: 'none',
-						title: res.message
-					  })
+					  this.toashMsg(res.message)
 					  this.getShelfDetal()
 					 }
 				})
@@ -328,10 +337,7 @@
 				}).then(res => {
 					if(res.status == 200){
 						this.getShelfPriceShow()
-						uni.showToast({
-							icon: 'none',
-							title: res.message
-						})
+						this.toashMsg(res.message)
 					}
 					uni.hideLoading()
 				})
@@ -347,12 +353,8 @@
 				})
 			},
 			getShelfPlace(flag){
-				uni.showLoading({
-					mask: true,
-					title: '正在查询...'
-				})
+				this.loading = true
 				getProductPlace({ shelfSn: this.shelfSn }).then(res => {
-				  uni.hideLoading()
 				  if (res.status == 200 && res.data) {
 				    this.shelfPlaceList = res.data
 					// 获取层
@@ -375,6 +377,7 @@
 				  // 是否有已录入的产品
 				  this.getHasCartNotEmpty()
 				  this.isLoad = false
+				  this.loading = false
 				})
 			},
 			tabChange(item){
@@ -396,9 +399,12 @@
 		padding: 100rpx 50rpx;
 		text-align: center;
 		display: flex;
+		flex-direction: column;
 		justify-content: center;
+		align-items: center;
 		> view{
 			position: relative;
+			padding: 10upx 0;
 			text{
 				color: #00aaff;
 				margin-left: 10rpx;

+ 483 - 0
pages/shuntBackManage/addBackOrder.vue

@@ -0,0 +1,483 @@
+<template>
+	<view class="content flex flex_column">
+		<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;" v-if="recallBillList.length" @click="toChooseProduct">
+				<u-icon name="chuangjiandingdan" custom-prefix="iscm-icon"></u-icon>
+				<text style="margin-left: 6rpx;">选择产品</text>
+			</view>
+		</u-navbar>
+		<view class="headerName u-flex">
+			<text class="barBox"></text>
+			<view class="shelfName u-line-1">{{ shelfName }}</view>
+			<!-- <view class="screeningBox" @click="chooseShow = true">
+				<text>滞销天数</text>
+				<u-icon color="#666666" size="36" name="shaixuan" custom-prefix="iscm-icon"></u-icon>
+			</view> -->
+		</view>
+		<view class="backOrderCon">
+			<view v-if="recallBillList && recallBillList.length>0">
+				<view class="partList-list-box" v-for="(item,index) in recallBillList" :key="item.id">
+					<view class="product flex align_center">
+						<view class="uni-col-1" @click="delDetail(item,index)">
+							<u-icon name="close-circle" color="#ff5500" size="35"></u-icon>
+						</view>
+						<view class="flex flex_1">
+							<view class="pimgs">
+								<u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="120" height="120" border-radius="10"></u-image>
+							</view>
+							<view class="pinfo">
+								<view class="pname item-name">
+									<text>{{item.shelfPlaceCode}}</text>
+									{{item.productCode}}
+								</view>
+								<view class="productName u-line-2">
+									{{item.productName}}
+								</view>
+								<view class="ptxt flex align_center">
+									<view>
+										最大库容
+										<text class="pnums">{{item.maxQty}}</text>
+									</view>
+									<view>
+										/货架库存
+										<text class="pnums">{{item.qty}}</text>
+									</view>
+									<view>
+										/滞销
+										<text class="pnums">{{!item.unsalableDays || (item.unsalableDays&&item.unsalableDays) == 0 ?'--天':item.unsalableDays}}</text>
+									</view>
+								</view>
+							</view>
+						</view>
+						</u-checkbox>
+					</view>
+					<view class="ptools flex align_center u-row-between">
+						<view class="ptools_l u-flex">
+							<view v-if="item.replenishBillQty && item.replenishBillQty!=0">
+								补货在途
+								<text class="pnums">{{item.replenishBillQty}}</text>
+							</view>
+							<view v-if="item.recallBillQty && item.recallBillQty!=0">
+								{{item.replenishBillQty && item.replenishBillQty!=0 ? '/':''}}调回在途
+								<text class="pnums">{{item.recallBillQty}}</text>
+							</view>
+						</view>
+						<view class="pcurnums flex align_center">
+							<text>调回数量</text>
+							<view class="u-ninput"><u-number-box color="#000" bg-color="#fff" :input-height="60" v-model="item.confirmQty" :min="item.recallBillQty?item.qty - item.recallBillQty>0 ?1 :0 :1" :max="item.recallBillQty?item.qty - item.recallBillQty>0 ?item.qty - item.recallBillQty :0 :item.qty"></u-number-box></view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="nodata" v-else>
+				<image :src="`/static/${$config('themePath')}/def_no_data@3x.png`"></image>
+				<view class="nodataTip">
+					暂无产品,请点击 
+					<text @click="toChooseProduct">选择产品</text>
+				</view>
+			</view>
+		</view>	
+		<view class="backOrderFooter u-flex" :style="{zIndex:(detailFlag? 99999:11)}">
+			<view class="footerBox u-flex u-row-between">
+				<view class="footerBox_m u-flex">
+					<view class="middle_l">
+						已选
+						<text>{{totalCategory}}</text>
+						款/<text>{{totalQty}}</text>件
+					</view>
+					<view class="middle_r" @click="clearList" v-if="recallBillList && recallBillList.length>0">
+						清空列表
+					</view>
+				</view>
+				<view class="footerBox_r"><u-button size="medium" @click="addBackOrder" :custom-style="customBtnStyle" shape="circle" type="primary" hover-class="none" >新增调回单</u-button></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { reportPage } from '@/api/vinLog';
+import { controlQueryList,insert } from '@/api/shelf';
+import productList from './productList.vue'
+import { clzConfirm } from '@/libs/tools'
+export default {
+	components: {
+		productList
+	},
+	data() {
+		return {
+			shelfSn: '',
+			shelfName: '',
+			recallBillList:[],//回调单列表
+			chooseArr:[],
+			noDataText: '暂无产品,请点击选择产品',
+			totalNum: 0,
+			detailFlag:false,//查看详情
+			chooseShow: false,//滞销天数弹窗
+			theme: '',
+			customBtnStyle: {  //  自定义按钮样式
+				borderColor: this.$config('primaryColor'),
+				backgroundColor: this.$config('primaryColor'),
+				color: '#fff'
+			},
+			allChecked: false,
+			keyword: '',//搜索
+			queryParam: { //  查询条件
+			  shelfSn:undefined,
+			  productCode: undefined,
+			  productName: undefined,
+			  unsalableDaysBegin: undefined,
+			  unsalableDaysEnd: undefined,
+			  queryWord:undefined
+			},
+		};
+	},
+	onLoad(options) {
+		const _this = this
+		_this.theme = getApp().globalData.theme;
+		_this.shelfSn = options.shelfSn;
+		_this.shelfName = options.shelfName;
+		_this.recallBillList=_this.$store.state.shuntBackList || []
+		uni.$on("chooseBackProduct",function(data){
+			
+			_this.recallBillList = _this.recallBillList.concat(data).sort(function(a,b){
+				return (a.shelfPlaceCode+'').localeCompare(b.shelfPlaceCode+'');
+			});
+		})
+	},
+	onBackPress(e) {
+		if (this.sortShow && e.from == "backbutton") {
+			this.chooseShow = false;
+			this.detailPopup = false;
+			return true;
+		}
+	},
+	computed: {
+		totalCategory () {
+		  return this.recallBillList.length
+		},
+		totalQty () {
+		  let ret = 0
+		  this.recallBillList.map(item => {
+		    ret = ret + item.confirmQty
+		  })
+		  return ret
+		},
+		chooseKey(){
+			let ret = []
+			this.recallBillList.map(item => {
+			  ret.push(item.id)
+			})
+			return ret
+		},
+		
+	},
+	methods: {
+		toChooseProduct(){
+			let nowData={
+				shelfSn:this.shelfSn,
+				shelfName:this.shelfName,
+				chooseKey :this.chooseKey
+			}
+			uni.navigateTo({
+				url: "/pages/shuntBackManage/chooseProduct?data="+encodeURIComponent(JSON.stringify(nowData))
+			})
+		},
+		//清空列表
+		clearList(){
+			const _this = this
+			clzConfirm({
+			  title: '提示',
+			  content: '确认要清空列表吗?',
+			  success (ret) {
+				if (ret.confirm || ret.index == 0) {
+					_this.clearChoose()
+				}
+			  }
+			})
+		},
+		clearChoose(){
+			this.recallBillList = []
+		},
+		//删除调回单列表
+		delDetail(item,i){
+			const index = this.recallBillList.findIndex(k => k.id == item.id)
+			this.recallBillList.splice(index,1)
+			// 全部清空
+			if(this.recallBillList.length==0){
+				this.clearChoose()
+			}
+		},
+		addBackOrder(){
+			const arr = []
+			const arrInd = []
+			if(this.recallBillList.length == 0){
+				uni.showToast({
+					title:'请先选择调回产品',
+					icon:'none'
+				})
+				return;
+			}
+			this.recallBillList.forEach((item, index) => {
+			  if (item.confirmQty * 1>0) {
+			    arr.push({
+			      shelfSn: item.shelfSn,
+			      shelfPlaceSn: item.shelfPlaceSn,
+			      shelfPlaceCode: item.shelfPlaceCode,
+			      productSn: item.productSn,
+			      productCode: item.productCode,
+			      productName: item.productName,
+			      qty: item.confirmQty
+			    })
+			  } else {
+			    arrInd.push(index + 1)
+			  }
+			})
+			if (arrInd.length > 0) {
+			  uni.showToast({
+			  	title:'调回数量不能为空或0,请移除后提交',
+				icon:'none'
+			  })
+			  return
+			}
+			uni.showLoading({
+				title: '保存中...'
+			});
+			const params = {
+			  shelfSn: this.shelfSn,
+			  detailList: arr
+			}
+			insert(params).then(res => {
+				if (res.status == 200) {
+					uni.showToast({
+						title:res.message
+					})
+					setTimeout(()=>{
+						uni.redirectTo({
+							url:'/pages/shuntBackManage/cancellingStocks?sn='+res.data
+						})
+					},800)
+				}
+				uni.hideLoading()
+			});
+		},
+		// 校验滞销天数数值范围
+		checkValueRange () {
+		  const isONull = this.queryParam.unsalableDaysBegin === null || this.queryParam.unsalableDaysBegin === undefined
+		  const isOEmpty = this.queryParam.unsalableDaysBegin === ''
+		  const isOZero = this.queryParam.unsalableDaysBegin === 0
+		  const isTNull = this.queryParam.unsalableDaysEnd === null || this.queryParam.unsalableDaysEnd === undefined
+		  const isTEmpty = this.queryParam.unsalableDaysEnd === ''
+		  const isTZero = this.queryParam.unsalableDaysEnd === 0
+		  //  第一个为空(可为null可为空字符)第二个不为空
+		  //  第一个不为空第二个为空(可为null可为空字符)
+		  //  第一个大于第二个
+		  if ((isONull || isOEmpty) && (this.queryParam.unsalableDaysEnd || isTZero)) {
+		    uni.showToast({
+		    	title:'请输入正确的滞销天数查询范围!',
+				icon:'none'
+		    })
+		    return false
+		  }
+		  if ((this.queryParam.unsalableDaysBegin || isOZero) && (isTNull || isTEmpty)) {
+			uni.showToast({
+				title:'请输入正确的滞销天数查询范围!',
+				icon:'none'
+			})
+		    return false
+		  }
+		  if (this.queryParam.unsalableDaysBegin*1 > this.queryParam.unsalableDaysEnd *1) {
+		    uni.showToast({
+		    	title:'请输入正确的滞销天数查询范围!',
+		    	icon:'none'
+		    })
+		    return false
+		  }
+		  this.queryParam.unsalableDaysBegin = this.queryParam.unsalableDaysBegin > 999999999 ? 999999999 : this.queryParam.unsalableDaysBegin
+		  this.queryParam.unsalableDaysEnd = this.queryParam.unsalableDaysEnd > 999999999 ? 999999999 : this.queryParam.unsalableDaysEnd
+		  return true
+		}
+	}
+};
+</script>
+
+<style lang="less" scoped>
+.content {
+	background: #ffffff;
+	width: 100%;
+	height: 100vh;
+		.headerName {
+			padding:20rpx 20rpx 16rpx;
+			color: #222;
+			font-size: 30rpx;
+			.barBox {
+				display: block;
+				height: 30rpx;
+				width: 6rpx;
+				background: #0485f6;
+				margin-right: 10rpx;
+				border-radius: 10rpx;
+			}
+			.shelfName {
+				font-weight: bold;
+				width: calc(100% - 16rpx);
+			}
+			.screeningBox {
+				font-size: 26rpx;
+				width: 150rpx;
+				text-align: right;
+				text {
+					vertical-align: top;
+				}
+			}
+		
+	}
+	.backOrderCon {
+		width: 100%;
+		flex-grow:1;
+		overflow: auto; 
+		.partList-list-box {
+			width: 100%;
+			padding: 10px 20rpx;
+			box-sizing: border-box;
+			border-bottom: 2rpx solid #f5f5f5;
+			&:last-child {
+				border: 0;
+			}
+			.product {
+				flex-grow: 1;
+				.checkbox {
+					width: 60rpx;
+				}
+				.pinfo {
+					flex-grow: 1;
+					padding-left: 20rpx;
+					.pname {
+						font-size: 26rpx;
+						color:#222;
+						text {
+							font-weight: normal;
+							margin-right: 10rpx;
+							padding: 0 10rpx;
+							background: rgba(3, 54, 146, 0.15);
+							border-radius: 30rpx;
+							color: #033692;
+							font-size: 24rpx;
+						}
+					}
+					.productName{
+						width: 100%;
+						font-size: 26rpx;
+						margin:6rpx 0;
+					}
+					.pno {
+						background-color: rgba(3, 54, 146, 0.15);
+						border-radius: 50rpx;
+						padding: 0 20rpx;
+						color: #033692;
+						font-size: 24rpx;
+						margin-right: 10rpx;
+					}
+					.ptxt {
+						font-size: 24rpx;
+						color: #999;
+						.pnums {
+							color: #222;
+							padding: 0 4upx;
+						}
+					}
+				}
+			}
+			.ptools {
+				margin-top: 30rpx;
+				margin-left: 60rpx;
+				.ptools_l{
+					font-size: 24rpx;
+					color: #999;
+					view{
+						:nth-child(2)::before{
+							content: '/';
+						}
+					}
+					.pnums {
+						color: #ff5500;
+						padding: 0 4rpx;
+					}
+				}
+				.pcurnums {
+					> text {
+						font-size: 24rpx;
+						color: #999;
+						margin-right: 20rpx;
+					}
+				}
+				.u-ninput {
+					border: 2rpx solid #eee;
+					border-radius: 50rpx;
+					padding: 0 6rpx;
+				}
+				/deep/ .u-icon-disabled {
+					background: #fff !important;
+				}
+				/deep/ .u-number-input {
+					margin: 0 0;
+					border: 2rpx solid #eee;
+					border-top: 0;
+					border-bottom: 0;
+				}
+				/deep/ .u-icon-plus,
+				/deep/ .u-icon-minus {
+					border-radius: 50rpx;
+				}
+			}
+		}
+		.nodata{
+			text-align: center;
+			image{
+				width: 180rpx;
+				height: 180rpx;
+				margin-top: 200rpx;
+			}
+			.nodataTip{
+				text{
+					color: #00aaff;
+					margin-left: 10rpx;
+					margin-top: 20rpx;
+				}
+			}
+		}
+
+	}
+	.backOrderFooter {
+		height: 98rpx;
+		box-sizing: border-box;
+		padding: 10rpx 20rpx;
+		position: relative;
+		background-color: #f8f8f8;
+		.footerBox {
+			width: 100%;
+			.footerBox_m {
+				.middle_l {
+					text {
+						color: red;
+						margin: 0 6rpx;
+					}
+				}
+				.middle_r {
+					font-size: 24rpx;
+					color: #999;
+					margin-left: 10rpx;
+					color: red;
+				}
+			}
+			.footerBox_r {
+				width: 200rpx;
+				button {
+					width: 100%;
+					font-size: 26rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 86 - 28
pages/shuntBackManage/cancellingStocks.vue

@@ -19,26 +19,61 @@
 			</view>
 			<view class="part-list">
 				<!-- 配件列表 -->
-				<partList title="配件列表" fromPage="recall" ref="partList" :list="partList" @allChecked="allCheckedCallback"></partList>
+				<!-- <partList title="配件列表" fromPage="recall" ref="partList" :list="partList" @allChecked="allCheckedCallback"></partList> -->
+				<partList title="配件列表" fromPage="recall" ref="partList" model="view" :list="partList"></partList>
 			</view>
 		</view>
 		<view class="cancelStockPages-footer">
-			<view>
-				<u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
-			</view>
-			<view>
-				<u-button @click="submit" shape="circle" :custom-style="{background:$config('primaryColor')}" type="primary">确定退库</u-button>
-			</view>
+			<u-button @click="submit" shape="circle" :custom-style="{background:$config('primaryColor')}" type="primary">确定退库</u-button>
 		</view>
 		<!-- 确认弹框 -->
 		<common-modal :openModal="confirmModal" content="调回产品将退回至经销商仓库,确认退库吗?" confirmText="确认退库" @confirm="modalConfirm" @close="confirmModal=false" />
+		<!-- 生成销售退货单弹窗 -->
+		<common-modal :showTitle="false" :openModal="refundModal" @confirm="refundModalConfirm" @close="refundModal=false">
+			<view style="font-size: 28upx;">
+				<view style="padding: 10upx;" class="flex align_center justify_between" v-if="basicInfoData">
+					<view>产品总款数:<text style="color: red;">{{basicInfoData.totalCategory}}</text></view>
+					<view>产品总件数:<text style="color: red;">{{basicInfoData.totalQty}}</text></view>
+				</view>
+				<view v-if="salesOrderList.length">
+					<view style="padding: 0 10upx 10upx;">此调回单已经存在对应的销售退货单?</view>
+					<view style="padding: 0 10upx 20upx;">确认再次生成销售退货单吗?</view>
+					<scroll-view scroll-y="true" style="height: 200rpx;">
+						<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.salesReturnNo}}</text>
+							<!-- <view>
+								<u-icon name="arrow-right"></u-icon>
+							</view> -->
+						</view>
+					</scroll-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 partList from '@/pages/common/partList.vue'
-	import { shelfRecallFindBySn, shelfRecallDetail, shelfRecallConfirm } from '@/api/shelfRecall.js'
+	import { shelfRecallFindBySn, shelfRecallDetail, shelfRecallConfirm,generateSaleReturnBill } from '@/api/shelfRecall.js'
 	export default {
 		components: { commonModal, partList },
 		data() {
@@ -48,6 +83,8 @@
 				basicInfoData: null,
 				partList: [],
 				confirmModal: false,
+				refundModal:false,
+				salesOrderList:[]
 			}
 		},
 		onReady() {
@@ -61,19 +98,23 @@
 			this.getDetail()
 			this.getPartList()
 		},
+		onNavigationBarButtonTap(){
+			this.refundModal = true;
+		},
 		methods: {
 			// 全选
-			allCheckeChange(e){
-				this.$refs.partList.allSelect(e.value)
-			},
-			allCheckedCallback(val){
-				this.allChecked = val
-			},
+			// allCheckeChange(e){
+			// 	this.$refs.partList.allSelect(e.value)
+			// },
+			// allCheckedCallback(val){
+			// 	this.allChecked = val
+			// },
 			// 查询详情
 			getDetail(){
 				shelfRecallFindBySn({sn: this.recallBillSn}).then(res => {
 					if(res.status == 200){
 						this.basicInfoData = res.data || null
+						this.salesOrderList = res.data.salesReturnBillList ? res.data.salesReturnBillList:[];
 					}else{
 						this.basicInfoData = null
 					}
@@ -95,16 +136,17 @@
 			},
 			// 确定退货
 			submit(){
-				const result =this.$refs.partList.getAllChecked()
-				if(result.length){
-					this.confirmModal = true
-				}else{
-					this.toashMsg("请选择配件!")
-				}
+				this.confirmModal = true
+				// const result =this.$refs.partList.getAllChecked()
+				// if(result.length){
+				// 	this.confirmModal = true
+				// }else{
+				// 	this.toashMsg("请选择配件!")
+				// }
 			},
 			// 确认退库 confirm
 			modalConfirm(){
-				const result =this.$refs.partList.getAllChecked()
+				const result =this.$refs.partList.getAllData()
 				const arr = []
 				result.map((item, index) => {
 					if (item.confirmQty || item.confirmQty == 0) {
@@ -116,9 +158,9 @@
 					}
 				})
 				const params = {
-					shelfSn: result[0].shelfSn,
+					shelfSn: this.partList[0].shelfSn,
 					recallBillSn: this.recallBillSn,
-					recallBillNo: result[0].recallBillNo,
+					recallBillNo: this.partList[0].recallBillNo,
 					detailList: arr
 				}
 				shelfRecallConfirm(params).then(res => {
@@ -128,6 +170,25 @@
 					}
 					this.toashMsg(res.message)
 				})
+			},
+			// 生成销售退货单
+			refundModalConfirm(){
+				generateSaleReturnBill({ recallBillSn: this.recallBillSn }).then(res => {
+				  if (res.status == 200) {
+				   uni.showToast({
+				   	title:res.message
+				   })
+				   this.getDetail();
+				   setTimeout(()=>{
+						this.refundModal = false 
+				   },800)
+				  }else{
+					  uni.showToast({
+					  	title:res.message,
+						icon:'none'
+					  }) 
+				  }
+				})
 			}
 		}
 	}
@@ -196,18 +257,15 @@
 		}
 	}
 	.cancelStockPages-footer{
-		padding: 26upx 32upx 30upx;
+		padding: 20upx 32upx 26upx;
 		background-color: #fff;
 		position: fixed;
 		left: 0;
 		bottom: 0;
 		width: 100%;
 		box-shadow: 3px 1px 7px #eee;
-		display: flex;
-		justify-content: space-between;
-		align-items: center;
 		.button{
-			width: 45%;
+			width: 100%;
 		}
 	}
 }

+ 648 - 0
pages/shuntBackManage/chooseProduct.vue

@@ -0,0 +1,648 @@
+<template>
+	<view class="content flex flex_column">
+		<view class="searchBar">
+			<view class="p-title flex align_center">
+				<text></text>
+				<view class="shelfName">
+					<view>{{nowData.shelfName}}</view>
+				</view>
+				<view class="screeningBox" @click="chooseShow = true">
+					<text>滞销天数</text>
+					<u-icon color="#0485F6" size="30" name="shaixuan" custom-prefix="iscm-icon"></u-icon>
+				</view>
+			</view>
+			<view class="search flex align_center">
+				<view class="input">
+					<u-search 
+					v-model="keyword" 
+					@input="$u.debounce(getSearchCon, 800)"
+					@search="getSearchCon"
+					@custom="getSearchCon"
+					@clear="clearSearch"
+					bg-color="#fff" 
+					:show-action="false"
+					placeholder="请输入产品编码或名称搜索"></u-search>
+				</view>
+				<view class="icon" @click="handleScanCode">
+					<u-icon name="scan"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="check-list">
+			<productList ref="productList" noDataText="暂无产品" @allChecked="allCheckedCallback"></productList>
+		</view>
+		<!-- 底部栏 -->
+		<view class="footer-bar flex align_center" v-if="partList.length">
+			<view class="f-left">
+				<u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
+			</view>
+			<view class="f-mid" @click="isDetailShow=!isDetailShow">
+				<view>
+					已选<text>{{totalCategory}}</text>款产品
+				</view>
+				<view v-if="!isDetailShow">
+					查看明细 <u-icon name="arrow-up"></u-icon>
+				</view>
+				<view v-else>
+					关闭明细 <u-icon name="arrow-down"></u-icon>
+				</view>
+			</view>
+			<view class="f-btns">
+				<u-button size="medium" @click="submitOrder" :custom-style="customBtnStyle" shape="circle" type="primary" hover-class="none" >确定选择</u-button>
+			</view>
+		</view>
+		<!-- 滞销天数弹窗 -->
+		<u-popup v-model="chooseShow" mode="right" width="60%">
+			<view class="choosePopup">
+				<view class="chooseTit">滞销天数</view>
+				<view class="chooseDay u-flex">
+					<u-input v-model="queryParam.unsalableDaysBegin" input-align="center" placeholder="起始天数" type="number" />
+					<text>至</text>
+					<u-input v-model="queryParam.unsalableDaysEnd" input-align="center" placeholder="截止天数" type="number" />
+				</view>
+				<view class="butBox u-flex">
+					<u-button hover-class="none" shape="circle" size="medium" @click="reset">重置</u-button>
+					<u-button hover-class="none" :custom-style="customBtnStyle" size="medium" shape="circle" @click="handelFilter">查询</u-button>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 详情弹窗 -->
+		<u-popup v-model="isDetailShow" mode="bottom" :duration="0" height="800" border-radius="25" :closeable="true">
+				<view class="head">
+					已选产品
+					<text @click="clearChoose">清空列表</text>
+				</view>
+				<scroll-view scroll-y class="scroll-view" v-if="chooseList.length>0">
+					<view class="partList-list-box" v-for="(item,index) in chooseList" :key="item.id">
+						<view class="product flex align_center">
+							<view class="uni-col-1" @click="delDetail(item,index)">
+								<u-icon name="close-circle" color="#ff5500" size="35"></u-icon>
+							</view>
+							<view class="flex flex_1">
+								<view class="pimgs">
+									<u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="120" height="120" border-radius="10"></u-image>
+								</view>
+								<view class="pinfo">
+									<view class="pname item-name">
+										<text>{{item.shelfPlaceCode}}</text>
+										{{item.productCode}}
+									</view>
+									<view class="productName u-line-2">
+										{{item.productName}}
+									</view>
+									<view class="ptxt flex align_center justify_end">
+										<view>
+											最大库容
+											<text class="pnums">{{item.maxQty}}</text>
+										</view>
+										<view>
+											/货架库存
+											<text class="pnums">{{item.qty}}</text>
+										</view>
+										<view>
+											/滞销
+											<text class="pnums">{{!item.unsalableDays || (item.unsalableDays&&item.unsalableDays) == 0 ?'--天':item.unsalableDays}}</text>
+										</view>
+									</view>
+								</view>
+							</view>
+							</u-checkbox>
+						</view>
+						<view class="ptools flex align_center">
+							<view class="ptools_l u-flex">
+								<view v-if="item.replenishBillQty && item.replenishBillQty!=0">
+									补货在途
+									<text class="pnums">{{item.replenishBillQty}}</text>
+								</view>
+								<view v-if="item.recallBillQty && item.recallBillQty!=0">
+									{{item.replenishBillQty && item.replenishBillQty!=0 ? '/':''}}调回在途
+									<text class="pnums">{{item.recallBillQty}}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
+				<view style="margin-top:100rpx;" v-else>
+					<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" text="暂无选中产品"></u-empty>
+				</view>
+			</u-popup>
+	</view>
+</template>
+
+<script>
+	
+	import { reportPage } from '@/api/vinLog';
+	import productList from './productList.vue'
+	import { controlQueryList,insert } from '@/api/shelf';
+	export default {
+		components: {
+			productList
+		},
+		data() {
+			return {
+				nowData:null,
+				keyword:'',
+				noDataText: '暂无产品',
+				partList: [],
+				allChecked: false,
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				isDetailShow:false,//详情弹窗显示
+				chooseList: [],
+				chooseShow:false,
+				queryParam: { //  查询条件
+				  shelfSn:undefined,
+				  productCode: undefined,
+				  productName: undefined,
+				  unsalableDaysBegin: undefined,
+				  unsalableDaysEnd: undefined,
+				  queryWord:undefined
+				}
+			}
+		},
+		onBackPress(e) {
+		  if((this.chooseShow || this.isDetailShow) && e.from == "backbutton") {  
+			this.chooseShow = false;
+			this.isDetailShow= false
+			return true;  
+		  } 
+		},
+		onLoad(opts) {
+			this.nowData = JSON.parse(decodeURIComponent(opts.data));
+			let ajaxData = {
+				shelfSn: this.nowData.shelfSn
+			};
+			this.loadData(ajaxData);
+		},
+		onReady() {
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
+		},
+		computed: {
+			totalCategory () {
+			  return this.chooseList.length
+			},
+		},
+		methods: {
+			// 单击全选
+			allCheckeChange(e){
+				this.$refs.productList.allSelect(e.value)
+				const list = this.$refs.productList.getAllData()
+				list.map(item => {
+					this.allCheckedCallback(true,item)
+				})
+				if(!e.value && this.showCart){
+					this.showCart = false
+				}
+			},
+			// 选中事件
+			allCheckedCallback(isAllChecked,row){
+				console.log(isAllChecked,row)
+				const has = this.chooseList.findIndex(k => k.id == row.id)
+				// 在已选列表中
+				if(has>=0){
+					// 取消选中
+					if(!row.checked){
+						this.chooseList.splice(has,1)
+					}
+				}else{
+					// 不在已选列表中,添加
+					if(row.checked){
+						this.chooseList.push(row)
+					}
+				}
+				// 是否全选
+				this.allChecked = isAllChecked
+			},
+			// 清空已选数据
+			clearChoose(){
+				this.chooseList = []
+				this.allChecked = false
+				if(this.$refs.productList){
+					this.$refs.productList.allSelect(false)
+				}
+			},
+			
+			clearSearch(){
+				// 重置
+				this.keyword = ''
+				this.changeSearch()
+			},
+			changeSearch(){
+				let ajaxData = {
+					shelfSn:this.nowData.shelfSn,
+					productCode: undefined,
+					productName: undefined,
+					unsalableDaysBegin: undefined,
+					unsalableDaysEnd: undefined,
+					queryWord:undefined
+				};
+				this.queryParam = ajaxData;
+				this.partList = []
+				this.loadData(ajaxData)
+			},
+			// 重置
+			reset() {
+				let ajaxData = {
+					shelfSn:this.nowData.shelfSn,
+					productCode: undefined,
+					productName: undefined,
+					unsalableDaysBegin: undefined,
+					unsalableDaysEnd: undefined,
+					queryWord:undefined
+				};
+				this.queryParam = ajaxData;
+				this.loadData(ajaxData);
+			},
+			handelFilter(){
+				if(this.checkValueRange()){
+					this.queryParam.shelfSn = this.nowData.shelfSn;
+					this.chooseShow =false;
+					this.loadData(this.queryParam);
+				}	
+			},
+			// 获取数字货架列表
+			loadData(params) {
+				const _this = this;
+				uni.showLoading({
+					mask:true,
+					title:"正在加载..."
+				})
+				if(!this.keyword){
+					params.queryWord = undefined
+				}
+				controlQueryList(params).then(res => {
+					if (res.status == 200) {
+						res.data.forEach(item=>{
+							item.isChecked= false
+							if(item.recallBillQty){
+								item.confirmQty = item.qty - item.recallBillQty>0 ?item.qty - item.recallBillQty: 0;
+							}else{
+								item.confirmQty = item.qty
+							}
+						})
+						_this.partList=res.data;
+					}else{
+						_this.partList =[]
+					}
+					//过滤之前选过的值
+					if(_this.nowData.chooseKey && _this.nowData.chooseKey.length >0){
+						_this.partList = _this.partList.filter(item => {
+							const row = _this.nowData.chooseKey.findIndex(k => k == item.id)
+							return !(row>=0)
+						})
+					}
+					// 已选
+					_this.partList.map(item => {
+						const row = _this.chooseList.find(k => k.id == item.id)
+						item.checked = !!row
+					})
+					this.$refs.productList.setData(_this.partList)
+					setTimeout(()=>{
+						uni.hideLoading()
+					},_this.partList.length*30)
+				});
+			},
+			// 提交
+			submitOrder(){
+				if(this.totalCategory){
+					if(this.nowData.chooseKey && this.nowData.chooseKey.length>0){
+						uni.$emit("chooseBackProduct",this.chooseList)
+						uni.navigateBack()
+					}else{
+						this.$store.commit('setShuntBackList',this.chooseList);
+						uni.redirectTo({
+							url:'/pages/shuntBackManage/addBackOrder?shelfSn='+ this.nowData.shelfSn+'&shelfName='+this.nowData.shelfName
+						})
+					}
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: '请选择产品'
+					})
+				}
+			},
+			// 扫描
+			handleScanCode(){
+				this.mpaasScanModule = uni.requireNativePlugin("wss-scan")
+				this.mpaasScanModule.scan(
+				{
+					"scanMode":"Customized",
+					"scanStyle":{
+						"scanFrameSizePlus":{"width":250,"height":250},
+						"scanFrameSize":200,
+						"scanLight":"visible",
+						"scanText":"对准条形码/二维码进行识别",
+						"scanTitle":"扫码搜索货位产品",
+					}
+				},
+				(result) => {
+					if(result.scanStatus == 1){
+						this.scanResult(result)
+					}
+				})
+			},
+			// 扫描结果
+			scanResult(data){
+				// 二维码
+				if(data.scanType == 'QRCODE'){
+					const ret = data.scanValue.split("&")
+					this.queryParam.queryWord = ret[1] // 产品编码
+					this.keyword= ret[1]
+				}else{
+					this.queryParam.queryWord = data.scanValue;
+					this.keyword= data.scanValue
+				}
+				this.queryParam.shelfSn = this.nowData.shelfSn
+				this.loadData(this.queryParam);
+			},
+			delDetail(con,pot){
+				this.$refs.productList.setChecked(con.id,false)
+				this.chooseList.splice(pot,1);
+				this.allChecked = false
+				// 全部清空
+				if(this.chooseList.length==0){
+					this.clearChoose()
+				}
+			},
+			// 搜索
+			getSearchCon() {
+				var reg = new RegExp('[\\u4E00-\\u9FFF]+', 'g');
+				if(!this.queryParam.queryWord){
+					if (reg.test(this.keyword)) {
+						//包含汉字
+						this.queryParam.productName = this.keyword.trim()
+					} else {
+						this.queryParam.productCode=this.keyword.trim()
+					}
+				}
+				this.queryParam.shelfSn = this.nowData.shelfSn
+				this.loadData(this.queryParam);
+			},
+			// 校验滞销天数数值范围
+			checkValueRange () {
+			  const isONull = this.queryParam.unsalableDaysBegin === null || this.queryParam.unsalableDaysBegin === undefined
+			  const isOEmpty = this.queryParam.unsalableDaysBegin === ''
+			  const isOZero = this.queryParam.unsalableDaysBegin === 0
+			  const isTNull = this.queryParam.unsalableDaysEnd === null || this.queryParam.unsalableDaysEnd === undefined
+			  const isTEmpty = this.queryParam.unsalableDaysEnd === ''
+			  const isTZero = this.queryParam.unsalableDaysEnd === 0
+			  //  第一个为空(可为null可为空字符)第二个不为空
+			  //  第一个不为空第二个为空(可为null可为空字符)
+			  //  第一个大于第二个
+			  if ((isONull || isOEmpty) && (this.queryParam.unsalableDaysEnd || isTZero)) {
+			    uni.showToast({
+			    	title:'请输入正确的滞销天数查询范围!',
+					icon:'none'
+			    })
+			    return false
+			  }
+			  if ((this.queryParam.unsalableDaysBegin || isOZero) && (isTNull || isTEmpty)) {
+				uni.showToast({
+					title:'请输入正确的滞销天数查询范围!',
+					icon:'none'
+				})
+			    return false
+			  }
+			  if (this.queryParam.unsalableDaysBegin*1 > this.queryParam.unsalableDaysEnd *1) {
+			    uni.showToast({
+			    	title:'请输入正确的滞销天数查询范围!',
+			    	icon:'none'
+			    })
+			    return false
+			  }
+			  this.queryParam.unsalableDaysBegin = this.queryParam.unsalableDaysBegin > 999999999 ? 999999999 : this.queryParam.unsalableDaysBegin
+			  this.queryParam.unsalableDaysEnd = this.queryParam.unsalableDaysEnd > 999999999 ? 999999999 : this.queryParam.unsalableDaysEnd
+			  return true
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.content{
+	height: 100vh;
+	width: 100%;
+	background: #fff;
+	.searchBar{
+		padding: 0.5rem 0.3rem;
+		.p-title{
+			padding: 0 15rpx;
+			display: flex;
+			align-items: center;
+			color: #222;
+			font-size: 30rpx;
+			> text{
+					display: block;
+					height: 30rpx;
+					width: 6rpx;
+					background: #0485F6;
+					margin-right: 10rpx;
+					border-radius: 10rpx;
+				}
+			.shelfName{
+				flex-grow: 1;
+				font-weight: bold;
+				width: 74%;
+				> view{
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
+				}
+			}
+			.screeningBox {
+				font-size: 26rpx;
+				width: 150rpx;
+				text-align: right;
+				color: #0485F6;
+				text {
+					vertical-align: top;
+				}
+			}
+			.btns{
+				width:100rpx;
+				text-align: right;
+				font-size: 28rpx;
+				color: #0485F6;
+			}
+		}
+		.search{
+			margin-top: 15upx;
+			padding: 0.1rem;
+			border-radius: 50rpx;
+			border:1rpx solid #eee;
+			.input{
+				flex-grow: 1;
+				padding: 4rpx;
+			}
+			.icon{
+				width: 13%;
+				text-align: center;
+				font-size: 46rpx;
+				color: #999;
+			}
+		}
+	}
+	.check-list{
+		padding: 0 0.8rem;
+		flex-grow: 1;
+		overflow: auto; 
+	 }
+	.footer-bar{
+		background-color: #f8f8f8;
+		padding: 20upx;
+		position: relative;
+		z-index: 99999;
+		.f-left{
+			color: #fff;
+		}
+		.active{
+			background-color: #0485F6;
+		}
+		.f-mid{
+			flex-grow: 1;
+			color: #666;
+			font-size: 0.8rem;
+			> view{
+				padding: 0 5upx;
+				&:first-child{
+					text{
+						color: red;
+					}
+				}
+				&:last-child{
+					font-size: 0.8rem;
+					color: #0485F6;
+				}
+			}
+		}
+		.f-btns{
+			button{
+				width: 200upx;
+			}
+		}
+	}
+	//滞销天数弹窗样式
+	.choosePopup {
+		padding: 30rpx 20rpx;
+		box-sizing: border-box;
+		.chooseTit {
+			text-align: center;
+		}
+		.chooseDay {
+			margin: 60rpx 0;
+			.u-input {
+				border-bottom: 1rpx solid #e0e0e0;
+			}
+		}
+		.butBox {
+			margin-top: 100rpx;
+			.u-size-medium {
+				padding: 0 60rpx !important;
+			}
+		}
+	}
+	// 详情页弹窗样式
+	.head{
+			width: 100%;
+			text-align: center;
+			box-sizing: border-box;
+			padding:30rpx 20rpx;
+			background: #f8f8f8;
+			position: relative;
+			font-weight: bold;
+			text{
+				position: absolute;
+				top:30rpx ;
+				left:20rpx;
+				color:red;
+				font-weight: normal;
+			}
+		}
+		.scroll-view{
+			height: 584rpx;
+			.partList-list-box {
+				width: 700rpx;
+				margin:0 auto;
+				padding: 10px 0;
+				border-bottom: 2rpx solid #f5f5f5;
+				&:last-child {
+					border: 0;
+				}
+				.product {
+					flex-grow: 1;
+					.checkbox {
+						width: 60rpx;
+					}
+					.pinfo {
+						flex-grow: 1;
+						padding-left: 20rpx;
+						.pname {
+							font-size: 26rpx;
+							color:#222;
+							text {
+								font-weight: normal;
+								margin-right: 10rpx;
+								padding: 0 10rpx;
+								background: rgba(3, 54, 146, 0.15);
+								border-radius: 30rpx;
+								color: #033692;
+								font-size: 24rpx;
+							}
+						}
+						.productName{
+							width: 100%;
+							font-size: 30rpx;
+							margin:6rpx 0;
+						}
+						.pno {
+							background-color: rgba(3, 54, 146, 0.15);
+							border-radius: 50rpx;
+							padding: 0 20rpx;
+							color: #033692;
+							font-size: 24rpx;
+							margin-right: 10rpx;
+						}
+						.ptxt {
+							font-size: 28rpx;
+							color: #999;
+							.pnums {
+								color: #222;
+								padding: 0 4upx;
+							}
+						}
+					}
+				}
+				.ptools {
+					margin-top: 10rpx;
+					margin-left: 60rpx;
+					.ptools_l{
+						font-size: 26rpx;
+						color: #999;
+						view{
+							:nth-child(2)::before{
+								content: '/';
+							}
+						}
+						.pnums {
+							color: #ff5500;
+							padding: 0 4rpx;
+						}
+					}
+					.pcurnums {
+						> text {
+							font-size: 24rpx;
+							color: #999;
+							margin-right: 20rpx;
+						}
+					}
+				}
+			}
+		}
+}
+</style>

+ 72 - 4
pages/shuntBackManage/detail.vue

@@ -22,14 +22,43 @@
 				<partList :list="partList" title="调回产品" model="view" :fromPage="pageType=='success'?'shuntBackDetail':'shuntBackDetailc'" ref="partList" noDataText="暂无产品"></partList>
 			</view>
 		</view>
+		<!-- 生成销售退货单弹窗 -->
+		<common-modal :showTitle="false" :openModal="refundModal" @confirm="refundModalConfirm" @close="refundModal=false">
+			<view style="font-size: 28upx;">
+				<view style="padding: 10upx;" class="flex align_center justify_between" v-if="basicInfoData">
+					<view>产品总款数:<text style="color: red;">{{basicInfoData.totalCategory}}</text></view>
+					<view>产品总件数:<text style="color: red;">{{basicInfoData.viewQty}}</text></view>
+				</view>
+				<view v-if="salesOrderList.length">
+					<view style="padding: 0 10upx 10upx;font-size: 26rpx;">此调回单已经存在对应的销售退货单?</view>
+					<view style="padding: 0 10upx 20upx;font-size: 26rpx;">确认再次生成销售退货单吗?</view>
+					<scroll-view scroll-y="true" style="height: 200rpx;">
+						<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.salesReturnNo}}</text>
+							<!-- <view>
+								<u-icon name="arrow-right"></u-icon>
+							</view> -->
+						</view>
+					</scroll-view>
+				</view>
+				<view v-else>
+					<view style="padding: 0 10upx 20upx;">确认生成销售退货单吗?</view>
+				</view>
+			</view>
+		</common-modal>
 	</view>
 </template>
 
 <script>
-	import { shelfRecallFindBySn, shelfRecallDetail } from '@/api/shelfRecall'
+	import { shelfRecallFindBySn, shelfRecallDetail,generateSaleReturnBill } from '@/api/shelfRecall'
 	import partList from '@/pages/common/partList.vue'
+	import commonModal from '@/pages/common/commonModal.vue'
 	export default {
-		components: { partList },
+		components: { partList,commonModal },
 		data() {
 			return {
 				recallBillSn: '',
@@ -40,7 +69,9 @@
 					fontSize:'30rpx',
 					background: this.$config('primaryColor')
 				},
-				pageType: ''
+				pageType: '',
+				refundModal:false,
+				salesOrderList:[]
 			}
 		},
 		onReady() {
@@ -55,12 +86,28 @@
 			this.getDetail()
 			this.getPartList()
 		},
+		onNavigationBarButtonTap(){
+			this.refundModal = true;
+		},
 		methods: {
 			// 查询详情
 			getDetail(){
 				shelfRecallFindBySn({ sn: this.recallBillSn }).then(res => {
 					if(res.status == 200){
-						this.basicInfoData = res.data || null
+						this.basicInfoData = res.data || null;
+						this.salesOrderList = res.data.salesReturnBillList ? res.data.salesReturnBillList:[];
+						//#ifdef APP-PLUS
+						let webView = this.$mp.page.$getAppWebview();
+						let zeroFlag=this.partList.every(item=>{
+							return item.confirmQty ==0
+						})
+						if(res.data.billState == 'CANCEL' ||zeroFlag ){
+							webView.setTitleNViewButtonStyle(0,{
+								"color": "transparent",
+								"width": "0px"
+							})
+						}
+						//#endif
 					}else{
 						this.basicInfoData = null
 					}
@@ -80,6 +127,27 @@
 						this.partList = []
 					}
 				})
+			},
+			// 生成销售退货单
+			refundModalConfirm(){
+				this.showLoading("正在生成销售退货单...")
+				generateSaleReturnBill({ recallBillSn: this.recallBillSn }).then(res => {
+				  if (res.status == 200) {
+				   uni.showToast({
+				   	title:res.message
+				   })
+				   this.getDetail();
+				  setTimeout(()=>{
+					   this.refundModal = false 
+				  },800)
+				  }else{
+					 uni.showToast({
+					 	title:res.message,
+						icon:'none'
+					 }) 
+				  }
+				   uni.hideLoading()
+				})
 			}
 		}
 	}

+ 236 - 0
pages/shuntBackManage/productList.vue

@@ -0,0 +1,236 @@
+<template>
+	<view class="partList-box flex flex_column">
+		<view class="partList-list">
+			<view class="partList-list-box" v-for="item in partList" :key="item.productSn">
+				<view class="product flex align_center">
+					<view class="checkbox">
+						<u-checkbox v-model="item.checked" :name="item.productSn" @change="checkChange" size="40" shape="circle"></u-checkbox>
+					</view>
+					<view class="flex align_center flex_1" @click="checkChange({name:item.productSn})">
+						<view class="pimgs">
+							<u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
+						</view>
+						<view class="pinfo">
+							<view class="pname">
+								<text>{{item.shelfPlaceCode}}</text>
+								{{item.productCode}}
+							</view>
+							<view class="pname pname1">
+								{{item.productName}}
+							</view>
+							<view class="ptxt flex align_center justify_end">
+								<view>
+									最大库容
+									<text class="pnums">{{item.maxQty}}</text>
+								</view>
+								<view>
+									/货架库存
+									<text class="pnums">{{item.qty}}</text>
+								</view>
+								<view>
+									/滞销
+									<text class="pnums">{{!item.unsalableDays || (item.unsalableDays&&item.unsalableDays) == 0 ?'--天':item.unsalableDays}}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				
+				<view class="ptools flex align_center justify_between">
+					<view class="flex align_center">
+						<view v-if="item.replenishBillQty">
+							补货在途:<text class="pnums">{{item.replenishBillQty||0}}</text>
+						</view>
+						<view v-if="item.recallBillQty">
+							调回在途:<text class="pnums">{{item.recallBillQty||0}}</text>
+						</view>
+					</view>
+					<view class="pcurnums flex align_center flex">
+						<!-- <text>补货数量</text>
+						<view class="u-ninput">
+							<u-number-box 
+							color="#000" 
+							@minus="updateNums" 
+							@plus="updateNums" 
+							@blur="updateNums" 
+							:long-press="false" 
+							:input-height="60" 
+							bg-color="#fff" 
+							v-model="item.replenishQty" 
+							:min="1"></u-number-box>
+						</view> -->
+					</view>
+				</view>
+			</view>
+			<view class="nodata" v-if="partList.length==0">
+				<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="120" :text="noDataText" img-width="120" mode="list"></u-empty>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: function(){
+					return []
+				}
+			},
+			noDataText: {
+				type: String,
+				default: '暂无产品'
+			},
+			title: {
+				type: String,
+				default: '列表'
+			},
+			// model: checkbox 可选择模式,view 只显示
+			model: {
+				type: String,
+				default: 'checkbox'
+			},
+		},
+		data() {
+			return {
+				partList: [],
+			}
+		},
+		methods: {
+			setData(list){
+				list.map(item => {
+					item.replenishQty = item.replenishBillWaitQty || 1
+				})
+				this.partList = list
+			},
+			// 全选
+			allSelect(val){
+				this.partList.map(item => {
+					item.checked = val
+				})
+				this.partList.splice()
+			},
+			setChecked(id,val){
+				const row = this.partList.find(item => item.id == id)
+				row.checked = val
+				this.partList.splice()
+			},
+			checkChange(e){
+				const row = this.partList.find(item => item.productSn == e.name)
+				if(row){
+					row.checked = !row.checked
+					this.partList.splice()
+				}
+				// 判断是否全选
+				const isAllNoChecked = this.partList.filter(item => !item.checked)
+				this.$emit('allChecked',isAllNoChecked.length == 0,row)
+			},
+			// 获取所有选择的
+			getAllChecked(){
+				const newArr = []
+				this.partList.map(item => {
+					if(item.checked){
+						newArr.push(item)
+					}
+				})
+				return newArr
+			},
+			// 获取所有数据
+			getAllData(){
+				return this.partList
+			},
+			updateNums(e){
+				this.$emit("updateNums",e)
+			},
+			// 更新数量
+			changeNums(id,val){
+				const row = this.partList.find(item => item.id == id)
+				row.replenishQty = val
+				this.partList.splice()
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+.partList-box{
+	height: 100%;
+	position: relative;
+	.nodata{
+		padding: 10vh 0;
+	}
+	.partList-list{
+		flex-grow: 1;
+	}
+	.partList-list-box{
+		padding: 10px 0;
+		border-bottom: 2rpx solid #f5f5f5;
+		.product{
+			flex-grow: 1;
+			.checkbox{
+				width: 60rpx;
+			}
+			.pinfo{
+				flex-grow: 1;
+				padding-left: 20rpx;
+				.pname{
+					color: #191919;
+					margin-bottom: 5rpx;
+					text{
+						font-weight: normal;
+						margin-right: 10rpx;
+						padding: 0 10rpx;
+						background: rgba(3, 54, 146, 0.15);
+						border-radius: 30rpx;
+						color: #033692;
+						font-size: 24rpx;
+					}
+				}
+				.pname1{
+					font-size: 30rpx;
+				}
+			}
+		}
+		.ptxt{
+			font-size: 28rpx;
+			color: #999;
+			.pnums{
+				color: #222;
+				padding: 0 4upx;
+			}
+		}
+		.ptools{
+			font-size: 26rpx;
+			margin-top: 10rpx;
+			color: #999;
+			.pnums{
+				color: #ff5500;
+				margin-right: 20upx;
+			}
+			.pcurnums{
+				> text{
+					margin-right: 20rpx;
+				}
+			}
+			.u-ninput{
+				border: 2rpx solid #eee;
+				border-radius: 50rpx;
+				padding: 0 6rpx;
+			}
+			/deep/ .u-icon-disabled{
+				background: #fff!important;
+			}
+			/deep/ .u-number-input{
+				margin: 0 0;
+				border: 2rpx solid #eee;
+				border-top: 0;
+				border-bottom: 0;
+			}
+			/deep/ .u-icon-plus, /deep/ .u-icon-minus{
+				border-radius: 50rpx;
+			}
+		}
+	}
+}
+</style>

+ 245 - 0
pages/shuntBackManage/shelfList.vue

@@ -0,0 +1,245 @@
+<template>
+	<view class="moreShelfPart flex flex_column">
+		<view class="moreShelfPart-search">
+			<u-search ref="searchBox"
+				placeholder="请输入货架名称搜索"
+				v-model="shelfName"
+				:show-action="isGobleSearch"
+				@input="change"
+				@focus="isGobleSearch = true"
+				@blur="isGobleSearch = false"
+				@custom="getShelfList"
+				@search="getShelfList"
+				@clear="clearSearch"
+				:action-style="{ color: '#fff', 'font-size': '24upx', 'background-color': '#57a3f3', 'border-radius': '6upx', padding: '12upx 0' }"
+			></u-search>
+		</view>
+		<view class="moreShelfPart-body">
+			<view class="nav-right">
+				<view class="nav-right-item" v-for="(item, index) in shelfList" :key="item.id" @click="viewDetail(item)">
+					<view class="item-info">
+						<view class="item-name clearFix">
+							<text class="barBox"></text>
+							<text class="itemName">{{ item.shelfName }}</text>
+						</view>
+						<view class="item-detail">
+							<view>
+								产品款数:
+								<text class="item-detail-text">{{ item.shelfPlaceBindNum || 0 }}</text>
+							</view>
+							<view>
+								库存总量:
+								<text class="item-detail-text">{{ item.qty || 0 }}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view v-if="shelfList && shelfList.length == 0">
+					<u-empty
+						v-if="status != 'loading'"
+						:src="`/static/${$config('themePath')}/def_no_data@3x.png`"
+						icon-size="180"
+						:text="noDataText"
+						mode="list"
+						:margin-top="100"
+					></u-empty>
+				</view>
+				<view style="padding: 20upx;" v-if="shelfList.length"><u-loadmore :status="status" /></view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import { getShelfList } from '@/api/shelf';
+import { clzConfirm } from '@/libs/tools';
+export default {
+	data() {
+		return {
+			shelfName: '',
+			isGobleSearch: false,
+			shelfList: [],
+			noDataText: '暂无货架',
+			status: 'loading',
+			tempData: null,
+			pageNo: 1,
+			pageSize: 20
+		};
+	},
+	onLoad() {
+		this.getShelfList();
+		uni.setNavigationBarColor({
+			frontColor: '#ffffff',
+			backgroundColor: this.$config('primaryColor')
+		})
+	},
+	methods: {
+		clearSearch() {
+			this.pageNo = 1;
+			this.shelfName = '';
+			this.shelfList = [];
+			this.$nextTick(() => {
+				this.getShelfList();
+			});
+		},
+		change(v) {
+			if (v == '') {
+				this.clearSearch();
+			}else{
+				this.pageNo = 1;
+			}
+		},
+		// 获取数字货架列表
+		getShelfList() {
+			const _this = this;
+			let params = {
+				pageNo: _this.pageNo,
+				pageSize: _this.pageSize,
+				shelfName: _this.shelfName
+			};
+			_this.status = 'loading';
+			getShelfList(params).then(res => {
+				if (res.status == 200) {
+					let list = res.data.list;
+					if (list && list.length) {
+						// 分页 拼接数据
+						if (_this.pageNo > 1) {
+							_this.shelfList = _this.shelfList.concat(res.data.list || []);
+						} else {
+							_this.shelfList = res.data.list;
+						}
+						_this.total = res.data.count;
+						if (_this.shelfList.length == res.data.count) {
+							//是否是最后一页
+							_this.status = 'nomore';
+						} else {
+							_this.status = 'loadmore';
+						}
+					} else {
+						_this.shelfList = list || [];
+						_this.total = 0;
+						_this.status = 'nomore';
+						_this.noDataText = '没有查询到相关货架';
+					}
+					_this.noDataText = '暂无货架';
+				} else {
+					_this.status = 'loadmore';
+					_this.shelfList = [];
+					_this.total = 0;
+					_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试';
+				}
+				
+			});
+		},
+		viewDetail(item) {
+			let nowData={
+				shelfSn:item.shelfSn,
+				shelfName:item.shelfName
+			}
+			uni.navigateTo({
+				url: "/pages/shuntBackManage/chooseProduct?data="+encodeURIComponent(JSON.stringify(nowData))
+			})
+		}
+	},
+	onHide() {
+		this.$nextTick(()=>{
+			this.$refs.searchBox.blur();
+			this.isGobleSearch=false
+			uni.hideKeyboard()
+		})
+		
+	},
+	// 上拉加载更多
+	onReachBottom() {
+		if (this.shelfList.length < this.total) {
+			// if (this.isGobleSearch && this.shelfName == '') {
+			// 	return;
+			// }
+			this.pageNo++;
+			this.getShelfList();
+		} else {
+			this.status = 'nomore';
+		}
+	}
+};
+</script>
+
+<style lang="less">
+.moreShelfPart {
+	width: 100%;
+	height: 100vh;
+	background-color: #f8f8f8;
+	.moreShelfPart-search {
+		padding: 20rpx;
+	}
+	.moreShelfPart-body {
+		flex-grow: 1;
+	}
+	.nav-right {
+		padding: 0 30upx;
+		box-sizing: border-box;
+		overflow: auto;
+		.nav-right-item {
+			padding: 20upx;
+			border: 2rpx solid #f5f5f5;
+			border-radius: 15upx;
+			margin-bottom: 20upx;
+			box-shadow: 3rpx 3rpx 8rpx #eee;
+			background-color: #ffff;
+			&:active {
+				background: #f8f8f8;
+			}
+			.item-info {
+				.item-name {
+					font-size: 30upx;
+					vertical-align: middle;
+					.barBox {
+						display: block;
+						height: 30rpx;
+						width: 6rpx;
+						background: #9da8b5;
+						margin-right: 10rpx;
+						border-radius: 10rpx;
+						float: left;
+						margin-top: 9rpx;
+					}
+					.itemName {
+						vertical-align: top;
+					}
+				}
+				.clearFix::after {
+					clear: both;
+					content: '';
+					display: block;
+					visibility: hidden;
+				}
+				.item-detail {
+					margin-top: 15rpx;
+					display: flex;
+					align-items: center;
+					color: #9da8b5;
+					font-size: 26upx;
+					:nth-child(1) {
+						margin-right: 50rpx;
+					}
+					.item-detail-text {
+						font-size: 26upx;
+						color: #333;
+					}
+				}
+			}
+			.button-box {
+				display: flex;
+				margin-top: 20upx;
+				button {
+					margin: 0 10upx;
+				}
+				> text {
+					font-size: 24upx;
+					color: #00aaff;
+				}
+			}
+		}
+	}
+}
+</style>

+ 10 - 0
pages/shuntBackManage/shuntBackList.vue

@@ -76,6 +76,11 @@
 		},
 		onLoad(options) {
 			const _this = this
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
+			
 			if(options&&options.billState){  // 指定单据状态
 				this.tabList.map((item,index) => {
 					if(item.status == options.billState){
@@ -93,6 +98,11 @@
 		onShow() {
 			this.pageInit()
 		},
+		onNavigationBarButtonTap(){
+			uni.navigateTo({
+				url:'/pages/shuntBackManage/shelfList'
+			})
+		},
 		onUnload() {
 			uni.$off('refreshBL')
 		},

+ 639 - 0
pages/soldOut/chooseProduct.vue

@@ -0,0 +1,639 @@
+<template>
+	<view class="content flex flex_column">
+		<view class="searchBar">
+			<view class="p-title flex align_center">
+				<text></text>
+				<view class="shelfName">
+					<view>{{nowData.shelfName}}</view>
+				</view>
+				<view class="btns" @click="showTab = true">筛选<u-icon size="20" name="arrow-down"></u-icon></view>
+			</view>
+			<view class="search flex align_center">
+				<view class="input">
+					<u-search 
+					v-model="queryWord" 
+					@custom="getpartList" 
+					@search="getpartList" 
+					@clear="clearSearch" 
+					@input="$u.debounce(changeSearch, 800)"
+					bg-color="#fff" 
+					:show-action="false"
+					placeholder="请输入产品编码或名称搜索"></u-search>
+				</view>
+				<view class="icon" @click="toScan">
+					<u-icon name="scan"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="check-list">
+			<productList ref="productList" noDataText="暂无待补货产品" @allChecked="allCheckedCallback"></productList>
+		</view>
+		<!-- 底部栏 -->
+		<view class="footer-bar flex align_center" v-if="partList.length">
+			<view class="f-left">
+				<u-checkbox size="40" @change="allCheckeChange" v-model="allChecked" shape="circle">{{allChecked?'取消全选':'全选'}}</u-checkbox>
+			</view>
+			<view class="f-mid" @click="openCart">
+				<view>
+					已选<text>{{totalCategory}}</text>款产品
+				</view>
+				<view v-if="!showCart">
+					查看明细 <u-icon name="arrow-up"></u-icon>
+				</view>
+				<view v-else>
+					关闭明细 <u-icon name="arrow-down"></u-icon>
+				</view>
+			</view>
+			<view class="f-btns">
+				<u-button size="medium" @click="submitOrder" :custom-style="customBtnStyle" shape="circle" type="primary" hover-class="none" >确定选择</u-button>
+			</view>
+		</view>
+		<!-- 已选配件 购物车 -->
+		<div class="cpb_cart-mask" v-if="showCart">
+			<div class="cpb_cart-box">
+				<div class="cpb_close flex align-center justify_center" @click="showCart=false">
+					<u-icon name="close"></u-icon>
+				</div>
+				<div class="cpb_cart-tit">
+					<view>已选配件</view>
+					<view class="cpb_heji flex align_center justify_between">
+						<text @click="clearDetail">清空列表</text>
+					</view>
+				</div>
+				<div class="cpb_cart-list">
+					<view 
+					v-for="(item, index) in chooseList" 
+					:key="'cpb_'+item.id" 
+					>
+					<view class="nav-right-item flex align_center">
+						<view class="uni-col-1" @click="delDetail(item,index)">
+							<u-icon name="close-circle" color="#ff5500" size="35"></u-icon>
+						</view>
+						<view class="uni-col-9 flex">
+							<view class="uni-col-2">
+								<u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
+							</view>
+							<view class="item-info uni-col-8">
+								<view class="item-name">
+									<text>{{item.shelfPlaceCode}}</text>
+									{{item.productCode}}
+								</view>
+								<view class="item-name ellipsis-two">
+									{{item.productName}}
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="nav-right-item">
+						<view class="item-detail">
+							<view class="item-detail-info align_center flex justify_between">
+								<view></view>
+								<view class="flex justify_end">
+									<view class="item-detail-text">
+									最大库容:<text class="pnums">{{item.maxQty||0}}</text>
+									货架库存:<text class="pnums">{{item.qty||0}}</text>
+									门店库存:<text class="pnums">{{item.qplsStockQty||0}}</text>
+									</view>
+								</view>
+							</view>
+						</view>
+						<view class="item-detail">
+							<view class="item-detail-info">
+								<view class="flex justify_end">
+									<view class="item-detail-text flex">
+										<view v-if="item.replenishBillQty">补货在途:<text class="pnums1">{{item.replenishBillQty||0}}</text></view>
+										<view v-if="item.recallBillQty">调回在途:<text class="pnums1">{{item.recallBillQty||0}}</text></view>
+									</view>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				</div>
+			</div>
+		</div>
+		<!-- 筛选项 -->
+		<u-popup v-model="showTab" mode="right" closeable width="70%">
+			<view class="tabBox flex flex_column">
+				<view class="tabs">
+					<u-checkbox-group wrap @change="checkboxGroupChange">
+						<u-checkbox 
+							v-model="item.checked" 
+							v-for="(item, index) in queryKeys" :key="index" 
+							:name="item.code"
+						>{{item.name}}</u-checkbox>
+					</u-checkbox-group>
+				</view>
+				<view class="btns">
+					<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClear">重置</u-button>
+					<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="changeSearch">查询</u-button>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import { queryProductListForReplenish } from '@/api/shelf'
+	import { saveMainAndDetail } from '@/api/shelfReplenish'
+	import productList from './productList.vue'
+	import { clzConfirm } from '@/libs/tools'
+	export default {
+		components: {
+			productList
+		},
+		data() {
+			return {
+				queryWord: '',
+				nowData:null,
+				detail:null,
+				pageNo:1,
+				pageSize: 20,
+				total: 0, // 列表总数
+				noDataText: '暂无产品',
+				status: 'loading',
+				partList: [],
+				allChecked: false,
+				showCart: false,
+				showTab: false,
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				orderTotal: 0,
+				chooseList: [],
+				tempData: null,
+				queryKeys: [
+					{
+						name: '库存充足',
+						code: 'stockEnough',
+						checked: false
+					},
+					{
+						name: '部分缺货',
+						code: 'portionStockout',
+						checked: false
+					},
+					{
+						name: '全部缺货',
+						code: 'allStockout',
+						checked: false
+					}
+				],
+				stockStateList:[]
+			}
+		},
+		onNavigationBarButtonTap(e) {
+			if(e.index == 0){
+				uni.navigateTo({
+					url: '/pages/stockCheck/checkRecord?shelfSn='+this.nowData.shelfSn
+				})
+			}
+		},
+		onBackPress(e) {
+		  console.log(e)
+		  if((this.showTab || this.showCart)&&e.from != 'navigateBack') {
+			this.showTab = false;
+			this.showCart = false;
+			return true;  
+		  } 
+		},
+		onLoad(opts) {
+			this.nowData = JSON.parse(decodeURIComponent(opts.data));
+			this.getpartList()
+		},
+		onReady() {
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
+		},
+		computed: {
+			totalCategory () {
+			  return this.chooseList.length
+			},
+		},
+		methods: {
+			checkboxGroupChange(e) {
+				this.stockStateList = e
+			},
+			// 单击全选
+			allCheckeChange(e){
+				this.$refs.productList.allSelect(e.value)
+				const list = this.$refs.productList.getAllData()
+				list.map(item => {
+					this.allCheckedCallback(true,item)
+				})
+				if(!e.value && this.showCart){
+					this.showCart = false
+				}
+			},
+			// 选中事件
+			allCheckedCallback(isAllChecked,row){
+				console.log(isAllChecked,row)
+				const has = this.chooseList.findIndex(k => k.id == row.id)
+				// 在已选列表中
+				if(has>=0){
+					// 取消选中
+					if(!row.checked){
+						this.chooseList.splice(has,1)
+					}
+				}else{
+					// 不在已选列表中,添加
+					if(row.checked){
+						this.chooseList.push(row)
+					}
+				}
+				// 是否全选
+				this.allChecked = isAllChecked
+			},
+			// 打开购物车
+			openCart(){
+				if(this.totalCategory){
+					this.showCart = !this.showCart
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: '请先添加产品'
+					})
+				}
+			},
+			// 删除购物车产品
+			delDetail(item,i){
+				console.log(item.id,i)
+				this.$refs.productList.setChecked(item.id,false)
+				const index = this.chooseList.findIndex(k => k.id == item.id)
+				this.chooseList.splice(index,1)
+				this.allChecked = false
+				// 全部清空
+				if(this.chooseList.length==0){
+					this.clearChoose()
+				}
+			},
+			// 空列表
+			clearDetail(){
+				const _this = this
+				clzConfirm({
+				  title: '提示',
+				  content: '确认要清空列表吗?',
+				  success (ret) {
+					if (ret.confirm || ret.index == 0) {
+						_this.clearChoose()
+					}
+				  }
+				})
+			},
+			// 清空已选数据
+			clearChoose(){
+				this.chooseList = []
+				this.showCart = false
+				this.allChecked = false
+				if(this.$refs.productList){
+					this.$refs.productList.allSelect(false)
+				}
+			},
+			clearSearch(){
+				this.queryWord = ''
+				this.changeSearch()
+			},
+			handleClear(){
+				this.stockStateList = []
+				this.queryKeys.map(item => item.checked = false)
+				this.changeSearch()
+			},
+			changeSearch(){
+				this.pageNo = 1
+				this.partList = []
+				this.getpartList()
+			},
+			// 获取数字货架列表
+			getpartList(){
+				const _this = this
+				let params = {
+					shelfSn: this.nowData.shelfSn,
+					queryWord: this.queryWord,
+					stockStateList: this.stockStateList
+				}
+				uni.showLoading({
+					mask:true,
+					title:"正在加载..."
+				})
+				queryProductListForReplenish(params).then(res => {
+					if(res.status == 200){
+						let list = res.data
+						if (list && list.length){
+							_this.partList = list
+						} else {
+							_this.partList = list || []
+						}
+					}else{
+						_this.partList = []
+					}
+					this.showTab = false
+					// 赋值
+					if(_this.nowData.chooseKey.length){
+						_this.partList = _this.partList.filter(item => {
+							const row = _this.nowData.chooseKey.findIndex(k => k == item.id)
+							return !(row>=0)
+						})
+					}
+					// 已选
+					_this.partList.map(item => {
+						const row = _this.chooseList.find(k => k.id == item.id)
+						item.checked = !!row
+					})
+					this.$refs.productList.setData(_this.partList)
+					setTimeout(()=>{
+						uni.hideLoading()
+					},_this.partList.length*30)
+				})
+			},
+			// 提交
+			submitOrder(){
+				if(this.totalCategory){
+					if(this.nowData.chooseKey.length){
+						uni.$emit("chooseDbhProduct",this.chooseList)
+						uni.navigateBack()
+					}else{
+						this.$store.state.vuex_tempData = this.chooseList
+						uni.redirectTo({
+							url: "/pages/soldOut/creatOrder?data="+encodeURIComponent(JSON.stringify(this.nowData))
+						})
+					}
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: '请选择产品'
+					})
+				}
+			},
+			// 扫描
+			toScan(){
+				this.mpaasScanModule = uni.requireNativePlugin("wss-scan")
+				this.mpaasScanModule.scan(
+				{
+					"scanMode":"Customized",
+					"scanStyle":{
+						"scanFrameSizePlus":{"width":250,"height":250},
+						"scanFrameSize":200,
+						"scanLight":"visible",
+						"scanText":"对准条形码/二维码进行识别",
+						"scanTitle":"扫码搜索货位产品",
+					}
+				},
+				(result) => {
+					if(result.scanStatus == 1){
+						this.scanResult(result)
+					}
+				})
+			},
+			// 扫描结果
+			scanResult(data){
+				// 二维码
+				if(data.scanType == 'QRCODE'){
+					const ret = data.scanValue.split("&")
+					this.queryWord = ret[1] // 产品编码
+				}else{
+					this.queryWord = data.scanValue
+				}
+				this.stockStateList = []
+				this.getpartList()
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+.content{
+	height: 100vh;
+	width: 100%;
+	background: #fff;
+	.searchBar{
+		padding: 0.3rem 0.8rem;
+		.p-title{
+			padding: 0 15rpx;
+			display: flex;
+			align-items: center;
+			color: #222;
+			font-size: 30rpx;
+			> text{
+					display: block;
+					height: 30rpx;
+					width: 6rpx;
+					background: #0485F6;
+					margin-right: 10rpx;
+					border-radius: 10rpx;
+				}
+			.shelfName{
+				flex-grow: 1;
+				font-weight: bold;
+				width: 80%;
+				> view{
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
+				}
+			}
+			.btns{
+				width:100rpx;
+				text-align: right;
+				font-size: 28rpx;
+				color: #0485F6;
+			}
+		}
+		.search{
+			margin-top: 15upx;
+			padding: 0.1rem;
+			border-radius: 50rpx;
+			border:1rpx solid #eee;
+			.input{
+				flex-grow: 1;
+				padding: 4rpx;
+			}
+			.icon{
+				width: 13%;
+				text-align: center;
+				font-size: 46rpx;
+				color: #999;
+			}
+		}
+	}
+	.check-list{
+		padding: 0 0.8rem;
+		flex-grow: 1;
+		overflow: auto; 
+	 }
+	.footer-bar{
+		background-color: #f8f8f8;
+		padding: 20upx;
+		.f-left{
+			color: #fff;
+		}
+		.active{
+			background-color: #0485F6;
+		}
+		.f-mid{
+			flex-grow: 1;
+			color: #666;
+			> view{
+				padding: 0 5upx;
+				&:first-child{
+					text{
+						color: red;
+						margin: 0 5upx;
+					}
+				}
+				&:last-child{
+					font-size: 0.8rem;
+					color: #0485F6;
+				}
+			}
+		}
+		.f-btns{
+			button{
+				width: 200upx;
+			}
+		}
+	}
+	// 筛选
+	.tabBox{
+		height: 100vh;
+		.tabs{
+			margin-top: 100rpx;
+			overflow: auto;
+			padding: 20rpx;
+			> view{
+				flex-wrap: wrap;
+				justify-content: space-between;
+				> view{
+					width: 98%;
+					border: 1rpx solid #eee;
+					padding: 15rpx;
+					border-radius: 50rpx;
+					text-align: center;
+					margin-bottom: 15rpx;
+					/deep/ .u-checkbox__label{
+						flex-grow: 1;
+					}
+				}
+				&:first-child{
+					> view{
+						width: 100%;
+					}
+				}
+			}
+		}
+		.btns{
+			display: flex;
+			padding: 40upx 20upx 20upx;
+			justify-content: space-between;
+			.handle-btn {
+				font-size: 28upx;
+			}
+		}
+	}
+	// 购物车
+	.cpb_cart-mask{
+		position: fixed;
+		width: 100%;
+		background: rgba(0,0,0,0.5);
+		z-index: 900;
+		bottom: 100rpx;
+		top: 0;
+	}
+	.cpb_cart-box{
+		background-color: #fff;
+		position: absolute;
+		width: 100%;
+		z-index: 1000;
+		bottom: 0;
+		border-radius: 30rpx 30rpx 0 0;
+		max-height: 70vh;
+		display: flex;
+		flex-direction: column;
+		.cpb_close{
+			position: absolute;
+			top: 10rpx;
+			right: 20rpx;
+			width: 70rpx;
+			height: 70rpx;
+			font-size: 32rpx;
+			color: #999;
+		}
+		.cpb_cart-tit{
+			text-align: center;
+			padding: 20rpx;
+			font-size: 32rpx;
+			border-bottom: 2rpx solid #eee;
+			.cpb_heji{
+				padding-top: 20rpx;
+				font-size: 26upx;
+				> text{
+					color: #ff5500;
+				}
+				> view{
+					color: #999;
+					> text{
+						color: #333;
+						&:first-child{
+							margin-right: 20upx;
+						}
+					}
+				}
+			}
+		}
+		.cpb_cart-list{
+			padding: 20rpx 0;
+			overflow: auto;
+			flex-grow: 1;
+			> view{
+				margin-bottom: 20rpx;
+			}
+			.nav-right-item{
+				padding: 0 30upx;
+				&:last-child{
+					border-bottom:2rpx solid #eee;
+				}
+			}
+			.item-name{
+				font-size: 26rpx;
+				text{
+					background: rgba(3, 54, 146, 0.15);
+					color: #1c588a;
+					border-radius: 1em;
+					font-size: 0.8em;
+					padding: 0 0.5em;
+					margin-right: 10upx;
+				}
+				margin-top: 10upx;
+			}
+			.item-info{
+				flex-grow: 1;
+				padding-left: 0.8em;
+			}
+			.item-detail{
+				.item-detail-info{
+					padding: 5upx 0;
+					font-size: 24upx;
+					.pnums{
+						margin-right: 10rpx;
+						color: #333;
+					}
+					.pnums1{
+							margin-right: 10rpx;
+							color: red;
+						}
+						> view{
+							padding-bottom: 10rpx;
+							align-items: center;
+							.item-detail-text{
+								color: #999;
+							}
+						}
+					}
+				}
+			}
+		}
+}
+</style>

+ 400 - 0
pages/soldOut/creatOrder.vue

@@ -0,0 +1,400 @@
+<template>
+	<view class="content flex flex_column">
+		<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;" v-if="chooseList.length" @click="toChooseProduct">
+				<u-icon name="chuangjiandingdan" custom-prefix="iscm-icon"></u-icon>
+				<text style="margin-left: 6rpx;">选择产品</text>
+			</view>
+		</u-navbar>
+		<view class="searchBar">
+			<view class="p-title flex align_center">
+				<text></text>
+				<view class="shelfName">
+					<view>{{nowData.shelfName}}</view>
+				</view>
+			</view>
+		</view>
+		<!-- 已选配件 购物车 -->
+		<div class="cpb_cart-box">
+			<div class="cpb_cart-list">
+				<view 
+				v-for="(item, index) in chooseList" 
+				:key="'cpb_'+item.id" 
+				>
+				<view class="nav-right-item flex align_center">
+					<view class="uni-col-1" @click="delDetail(item,index)">
+						<u-icon name="close-circle" color="#ff5500" size="35"></u-icon>
+					</view>
+					<view class="uni-col-9 flex">
+						<view class="item-imgs">
+							<u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="120" height="120" border-radius="10"></u-image>
+						</view>
+						<view class="item-info">
+							<view class="item-name">
+								<text>{{item.shelfPlaceCode}}</text>
+								{{item.productCode}}
+							</view>
+							<view class="item-name ellipsis-two">
+								{{item.productName}}
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="nav-right-item">
+					<view class="item-detail">
+						<view class="item-detail-info align_center flex justify_between">
+							<view></view>
+							<view class="flex justify_end">
+								<view class="item-detail-text">
+								最大库容:<text class="pnums">{{item.maxQty||0}}</text>
+								货架库存:<text class="pnums">{{item.qty||0}}</text>
+								门店库存:<text class="pnums">{{item.qplsStockQty||0}}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="item-detail">
+						<view class="item-detail-info">
+							<view class="flex justify_between">
+								<view class="item-detail-text flex">
+									<view v-if="item.replenishBillQty">补货在途:<text class="pnums1">{{item.replenishBillQty||0}}</text></view>
+									<view v-if="item.recallBillQty">调回在途:<text class="pnums1">{{item.recallBillQty||0}}</text></view>
+								</view>
+								 <view class="item-detail-text">
+									补货数量:
+									<u-number-box 
+									v-model="item.replenishQty" 
+									:index="'cart_'+item.id" 
+									:min="1"
+									@change="numsChange(item)"
+									:max="999999"></u-number-box>
+								 </view>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="chooseList.length==0">
+				<view class="nodata">
+					<view>
+						<u-image :src="`../../static/${$config('themePath')}/def_no_data@3x.png`" width="180" height="180" border-radius="10"></u-image>
+					</view>
+					<view class="flex">
+						暂无产品,请点击
+						<view>
+							<text @click="toChooseProduct">选择产品</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			</div>
+		</div>
+		<!-- 底部栏 -->
+		<view class="footer-bar flex align_center justify_between">
+			<view class="f-left flex align_center">
+				<view>
+					已选<text>{{totalCategory}}</text>款/<text>{{totalQty}}</text>件
+				</view>
+				<view v-if="chooseList.length" style="padding-left: 20upx;">
+					<text @click="clearDetail">清空列表</text>
+				</view>
+			</view>
+			<view class="f-btns">
+				<u-button size="medium" @click="submitOrder" :loading="loading" :custom-style="customBtnStyle" shape="circle" type="primary" hover-class="none" >创建补货单</u-button>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { queryProductListForReplenish } from '@/api/shelf'
+	import { saveMainAndDetail } from '@/api/shelfReplenish'
+	import { clzConfirm } from '@/libs/tools'
+	export default {
+		data() {
+			return {
+				nowData:null,
+				detail:null,
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				chooseList: [],
+				tempData: null,
+				loading: false
+			}
+		},
+		onNavigationBarButtonTap(e) {
+			if(e.index == 0){
+				this.toChooseProduct()
+			}
+		},
+		onLoad(opts) {
+			const _this = this
+			this.nowData = JSON.parse(decodeURIComponent(opts.data));
+			// 首次选中产品
+			this.chooseList = this.$store.state.vuex_tempData || []
+			
+			uni.$on("chooseDbhProduct",function(data){
+				_this.chooseList = _this.chooseList.concat(data).sort(function(a,b){
+					return (a.shelfPlaceCode+'').localeCompare(b.shelfPlaceCode+'');
+				});
+			})
+		},
+		computed: {
+			totalCategory () {
+			  return this.chooseList.length
+			},
+			totalQty () {
+			  let ret = 0
+			  this.chooseList.map(item => {
+			    ret = ret + item.replenishQty
+			  })
+			  return ret
+			},
+			chooseKey(){
+				let ret = []
+				this.chooseList.map(item => {
+				  ret.push(item.id)
+				})
+				return ret
+			}
+		},
+		methods: {
+			toChooseProduct(){
+				this.nowData.chooseKey = this.chooseKey
+				uni.navigateTo({
+					url: "/pages/soldOut/chooseProduct?data="+encodeURIComponent(JSON.stringify(this.nowData))
+				})
+			},
+			// 创建补货单
+			creatOrder(data){
+				uni.showLoading({
+					title:"正在保存.."
+				})
+				stockCheckSave({
+					 shelfSn: this.nowData.shelfSn,
+					 totalCategory: this.nowData.totalCategory,
+					 totalStockQty: this.nowData.totalStockQty,
+					 totalFreezeQty: this.nowData.totalFreezeQty
+				}).then(res => {
+					 if(res.status == 200){
+						 this.detail = res.data || null
+						 this.stockCheckSn = res.data.stockCheckSn
+					 }else{
+						 uni.hideLoading()
+					 }
+				})
+			},
+			numsChange(item){
+				this.chooseList.splice()
+			},
+			// 删除购物车产品
+			delDetail(item,i){
+				console.log(item.id,i)
+				const index = this.chooseList.findIndex(k => k.id == item.id)
+				this.chooseList.splice(index,1)
+				// 全部清空
+				if(this.chooseList.length==0){
+					this.clearChoose()
+				}
+			},
+			// 空列表
+			clearDetail(){
+				const _this = this
+				clzConfirm({
+				  title: '提示',
+				  content: '确认要清空列表吗?',
+				  success (ret) {
+					if (ret.confirm || ret.index == 0) {
+						_this.clearChoose()
+					}
+				  }
+				})
+			},
+			// 清空已选数据
+			clearChoose(){
+				this.chooseList = []
+			},
+			// 提交
+			submitOrder(){
+				if(this.totalCategory){
+					this.handleSave()
+				}else{
+					uni.showToast({
+						icon: 'none',
+						title: '请先选择产品'
+					})
+				}
+			},
+			handleSave () {
+			  const data = this.chooseList
+			  const dataList = []
+			  data.map(item => {
+			    dataList.push({
+			      shelfPlaceSn: item.shelfPlaceSn,
+			      shelfPlaceCode: item.shelfPlaceCode,
+			      productSn: item.productSn,
+			      productCode: item.productCode,
+			      qty: item.replenishQty
+			    })
+			  })
+			  this.showLoading("正在提交...")
+			  this.loading = true
+			  // 开始提交
+			  saveMainAndDetail({
+			    shelfSn: this.nowData.shelfSn,
+			    dealerSn: this.nowData.dealerSn,
+			    detailList: dataList
+			  }).then(res => {
+				uni.hideLoading()
+			    if (res.status == 200) {
+			      this.toashMsg(res.message)
+				  uni.redirectTo({ url: "/pages/replenishmentManage/outWarehousing?sn="+res.data.replenishBillSn })
+			    }
+				this.loading = false
+			  })
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+.content{
+	height: 100vh;
+	width: 100%;
+	background: #fff;
+	.footer-bar{
+		background-color: #f8f8f8;
+		padding: 20upx;
+		.active{
+			background-color: #0485F6;
+		}
+		.f-left{
+			color: #666;
+			flex-grow: 1;
+			> view{
+				text{
+					color: red;
+					margin: 0 5rpx;
+				}
+			}
+		}
+		.f-btns{
+			button{
+				width: 200upx;
+			}
+		}
+	}
+	.nodata{
+		padding: 150rpx 50rpx;
+		text-align: center;
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		color: #999;
+		> view{
+			position: relative;
+			padding: 10upx 0;
+			text{
+				color: #00aaff;
+				margin-left: 10rpx;
+			}
+		}
+	}
+
+	.searchBar{
+		padding: 0.3rem 0.8rem;
+		.p-title{
+			padding: 0 15rpx;
+			display: flex;
+			align-items: center;
+			color: #222;
+			font-size: 30rpx;
+			> text{
+					display: block;
+					height: 30rpx;
+					width: 6rpx;
+					background: #0485F6;
+					margin-right: 10rpx;
+					border-radius: 10rpx;
+				}
+			.shelfName{
+				flex-grow: 1;
+				font-weight: bold;
+				width: 80%;
+				> view{
+					overflow: hidden;
+					white-space: nowrap;
+					text-overflow: ellipsis;
+				}
+			}
+			.btns{
+				width:100rpx;
+				text-align: right;
+				font-size: 28rpx;
+				color: #0485F6;
+			}
+		}
+	}
+	// 购物车
+	.cpb_cart-box{
+		flex-grow: 1;
+		width: 100%;
+		overflow: auto;
+		.cpb_cart-list{
+			padding: 20rpx 0;
+			overflow: auto;
+			flex-grow: 1;
+			> view{
+				margin-bottom: 20rpx;
+			}
+			.nav-right-item{
+				padding: 0 30upx;
+				&:last-child{
+					border-bottom:2rpx solid #eee;
+				}
+			}
+			.item-name{
+				font-size: 28rpx;
+				text{
+					background: rgba(3, 54, 146, 0.15);
+					color: #1c588a;
+					border-radius: 1em;
+					font-size: 26rpx;
+					padding: 0 0.5em;
+					margin-right: 10upx;
+				}
+				margin-top: 10upx;
+			}
+			.item-info{
+				padding-left: 0.8em;
+				flex-grow: 1;
+			}
+			.item-detail{
+				.item-detail-info{
+					padding: 10upx 0 4upx;
+					font-size: 24upx;
+					.pnums{
+						margin-right: 10rpx;
+						color: #333;
+					}
+					.pnums1{
+						margin-right: 10rpx;
+						color: red;
+					}
+					> view{
+						padding-bottom: 10rpx;
+						align-items: center;
+						.item-detail-text{
+							color: #999;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 231 - 0
pages/soldOut/productList.vue

@@ -0,0 +1,231 @@
+<template>
+	<view class="partList-box flex flex_column">
+		<view class="partList-list">
+			<view class="partList-list-box" v-for="item in partList" :key="item.productSn">
+				<view class="product flex align_center">
+					<view class="checkbox">
+						<u-checkbox v-model="item.checked" :name="item.productSn" @change="checkChange" size="40" shape="circle"></u-checkbox>
+					</view>
+					<view class="flex align_center flex_1" @click="checkChange({name:item.productSn})">
+						<view class="pimgs">
+							<u-image :src="item.productImageUrl?item.productImageUrl:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
+						</view>
+						<view class="pinfo">
+							<view class="pname">
+								<text>{{item.shelfPlaceCode}}</text>
+								{{item.productCode}}
+							</view>
+							<view class="pname pname1">
+								{{item.productName}}
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="ptxt flex align_center justify_end">
+					<view>
+					最大库容:<text class="pnums">{{item.maxQty||0}}</text>
+					货架库存:<text class="pnums">{{item.qty||0}}</text>
+					门店库存:<text class="pnums">{{item.qplsStockQty||0}}</text>
+					</view>
+				</view>
+				<view class="ptools flex align_center justify_end">
+					<view class="flex align_center">
+						<view v-if="item.replenishBillQty">
+							补货在途:<text class="pnums">{{item.replenishBillQty||0}}</text>
+						</view>
+						<view v-if="item.recallBillQty">
+							调回在途:<text class="pnums">{{item.recallBillQty||0}}</text>
+						</view>
+					</view>
+					<view class="pcurnums flex align_center flex">
+						<!-- <text>补货数量</text>
+						<view class="u-ninput">
+							<u-number-box 
+							color="#000" 
+							@minus="updateNums" 
+							@plus="updateNums" 
+							@blur="updateNums" 
+							:long-press="false" 
+							:input-height="60" 
+							bg-color="#fff" 
+							v-model="item.replenishQty" 
+							:min="1"></u-number-box>
+						</view> -->
+					</view>
+				</view>
+			</view>
+			<view class="nodata" v-if="partList.length==0">
+				<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" img-width="180" mode="list"></u-empty>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		props: {
+			list: {
+				type: Array,
+				default: function(){
+					return []
+				}
+			},
+			noDataText: {
+				type: String,
+				default: '暂无产品'
+			},
+			title: {
+				type: String,
+				default: '列表'
+			},
+			// model: checkbox 可选择模式,view 只显示
+			model: {
+				type: String,
+				default: 'checkbox'
+			},
+		},
+		data() {
+			return {
+				partList: [],
+			}
+		},
+		methods: {
+			setData(list){
+				list.map(item => {
+					item.replenishQty = item.replenishBillWaitQty || 1
+				})
+				this.partList = list
+			},
+			// 全选
+			allSelect(val){
+				this.partList.map(item => {
+					item.checked = val
+				})
+				this.partList.splice()
+			},
+			setChecked(id,val){
+				const row = this.partList.find(item => item.id == id)
+				row.checked = val
+				this.partList.splice()
+			},
+			checkChange(e){
+				const row = this.partList.find(item => item.productSn == e.name)
+				if(row){
+					row.checked = !row.checked
+					this.partList.splice()
+				}
+				// 判断是否全选
+				const isAllNoChecked = this.partList.filter(item => !item.checked)
+				this.$emit('allChecked',isAllNoChecked.length == 0,row)
+			},
+			// 获取所有选择的
+			getAllChecked(){
+				const newArr = []
+				this.partList.map(item => {
+					if(item.checked){
+						newArr.push(item)
+					}
+				})
+				return newArr
+			},
+			// 获取所有数据
+			getAllData(){
+				return this.partList
+			},
+			updateNums(e){
+				this.$emit("updateNums",e)
+			},
+			// 更新数量
+			changeNums(id,val){
+				const row = this.partList.find(item => item.id == id)
+				row.replenishQty = val
+				this.partList.splice()
+			}
+		}
+	}
+</script>
+
+<style lang="less" scoped>
+.partList-box{
+	height: 100%;
+	position: relative;
+	.nodata{
+		padding: 10vh 0;
+	}
+	.partList-list{
+		flex-grow: 1;
+	}
+	.partList-list-box{
+		padding: 10px 0;
+		border-bottom: 2rpx solid #f5f5f5;
+		&:active{
+			background-color: #f8f8f8;
+		}
+		.product{
+			flex-grow: 1;
+			.checkbox{
+				width: 60rpx;
+			}
+			.pinfo{
+				flex-grow: 1;
+				padding-left: 20rpx;
+				.pname{
+					color: #191919;
+					margin-bottom: 5rpx;
+					text{
+						font-weight: normal;
+						margin-right: 10rpx;
+						padding: 0 10rpx;
+						background: rgba(3, 54, 146, 0.15);
+						border-radius: 30rpx;
+						color: #033692;
+						font-size: 24rpx;
+					}
+				}
+				.pname1{
+					font-size: 28rpx;
+				}
+			}
+		}
+		.ptxt{
+			font-size: 26rpx;
+			color: #999;
+			.pnums{
+				color: #222;
+				margin-right: 20upx;
+			}
+		}
+		.ptools{
+			font-size: 26rpx;
+			margin-top: 10rpx;
+			color: #999;
+			.pnums{
+				color: #ff5500;
+				margin-right: 20upx;
+			}
+			.pcurnums{
+				> text{
+					margin-right: 20rpx;
+				}
+			}
+			.u-ninput{
+				border: 2rpx solid #eee;
+				border-radius: 50rpx;
+				padding: 0 6rpx;
+			}
+			/deep/ .u-icon-disabled{
+				background: #fff!important;
+			}
+			/deep/ .u-number-input{
+				margin: 0 0;
+				border: 2rpx solid #eee;
+				border-top: 0;
+				border-bottom: 0;
+			}
+			/deep/ .u-icon-plus, /deep/ .u-icon-minus{
+				border-radius: 50rpx;
+			}
+		}
+	}
+}
+</style>

+ 274 - 0
pages/soldOut/shelfList.vue

@@ -0,0 +1,274 @@
+<template>
+	<view class="moreShelfPart flex flex_column">
+		<view class="moreShelfPart-search">
+			<u-search
+			placeholder="请输入货架名称搜索" 
+			v-model="queryParam.shelfName" 
+			:show-action="isGobleSearch" 
+			@input="change"
+			@focus="isGobleSearch=true"
+			@blur="isGobleSearch=false"
+			@custom="search" 
+			@search="search" 
+			@clear="clearSearch"
+			:action-style="{'color': '#fff', 'font-size': '24upx', 'background-color': '#57a3f3', 'border-radius': '6upx', 'padding': '12upx 0'}">
+			</u-search>
+		</view>
+		<view class="flex align_center justify_between" style="padding: 10rpx 20rpx;">
+			<view class="flex align_center" @click="sortList('productCategory',0)">
+				<text>待补货产品款数</text>
+				<view class="flex flex_column" style="margin-left: 5rpx;" >
+					<u-icon name="arrow-up-fill" size="10" :color="sortVal0=='ASC'?'#666':'#ccc'"></u-icon>
+					<u-icon name="arrow-down-fill" size="10" :color="sortVal0=='DESC'?'#666':'#ccc'"></u-icon>
+				</view>
+			</view>
+			<view class="flex align_center" @click="sortList('productQty',1)">
+				<text>待补货产品数量</text>
+				<view class="flex flex_column" style="margin-left: 5rpx;">
+					<u-icon name="arrow-up-fill" size="10" :color="sortVal1=='ASC'?'#666':'#ccc'"></u-icon>
+					<u-icon name="arrow-down-fill" size="10" :color="sortVal1=='DESC'?'#666':'#ccc'"></u-icon>
+				</view>
+			</view>
+			<view class="flex align_center" @click="sortList('lastDate',2)">
+				<text>最后一次补货时间</text>
+				<view class="flex flex_column" style="margin-left: 5rpx;">
+					<u-icon name="arrow-up-fill" size="10" :color="sortVal2=='ASC'?'#666':'#ccc'"></u-icon>
+					<u-icon name="arrow-down-fill" size="10" :color="sortVal2=='DESC'?'#666':'#ccc'"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="moreShelfPart-body">
+			<scroll-view
+			class="nav-right" 
+			scroll-y 
+			@scrolltolower="onreachBottom">
+				<view class="nav-right-item" v-for="(item, index) in shelfList" :key="item.id" @click="viewDetail(item)">
+					<view class="item-info">
+						<view class="item-name">
+							<text>{{item.shelfName}}</text>
+							<text style="color: #ff5500;" v-if="item.state!='ENABLE'">(状态为"已暂停")</text>
+						</view>
+						<view class="item-detail">
+							<view>
+								待补货产品款数:
+								<text class="item-detail-text">{{item.productCategory}}</text>
+							</view>
+							<view>
+								待补货产品数量:
+								<text class="item-detail-text">{{item.productQty}}</text>
+							</view>
+						</view>
+						<view class="item-detail">
+							<view>
+								最后一次补货时间:
+								<text class="item-detail-text">{{item.lastDate||'--'}}</text>
+							</view>
+						</view>
+					</view>
+					<view class="arrow">
+						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
+					</view>
+				</view>
+				<view v-if="shelfList&&shelfList.length==0">
+					<u-empty v-if="status!='loading'" :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="200"></u-empty>
+				</view>
+				<view style="padding: 20upx;" v-else>
+					<u-loadmore :status="status" />
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { queryListForReplenish } from '@/api/shelf'
+	export default {
+		data() {
+			return {
+				isGobleSearch: false,
+				shelfList: [],
+				pageNo:1,
+				pageSize: 15,
+				total: 0, // 列表总数
+				noDataText: '暂无货架',
+				status: 'loading',
+				tempData: null,
+				allList: [],
+				sortVal0:'',
+				sortVal1:'',
+				sortVal2:'',
+				queryParam: {
+				  shelfName: ''
+				}
+			}
+		},
+		onLoad(opts) {
+			 uni.setNavigationBarColor({
+			 	frontColor: '#ffffff',
+			 	backgroundColor: this.$config('primaryColor')
+			 })
+		},
+		onUnload() {
+			uni.$off("setCustome")
+		},
+		onShow() {
+			this.search()
+		},
+		methods: {
+			clearSearch(){
+				this.queryParam.shelfName = ''
+				this.search()
+			},
+			change(v){
+				if(v==''){
+					this.clearSearch()
+				}
+			},
+			// 排序
+			sortList(key,index){
+				// 重置其它排序字段为空
+				for(let i=0;i<3;i++){
+					if(i!=index){
+						this['sortVal'+i] = ''
+					}
+				}
+				const val = this['sortVal'+index]
+				if(val==''){
+					this['sortVal'+index] = 'ASC'
+				}
+				if(val=='ASC'){
+					this['sortVal'+index] = 'DESC'
+				}
+				if(val=='DESC'){
+					this['sortVal'+index] = ''
+				}
+				
+				this.queryParam.queryWord = key
+				this.queryParam.orderBy = this['sortVal'+index]
+				this.search()
+			},
+			search(){
+				this.pageNo = 1
+				this.shelfList = []
+				this.getShelfList()
+			},
+			// 获取数字货架列表
+			getShelfList(){
+				const _this = this
+				_this.status = 'loading'
+				queryListForReplenish(this.queryParam).then(res => {
+					uni.hideLoading()
+					if(res.status == 200){
+						let list = res.data
+						if (list && list.length){
+							// 分页 拼接数据
+							_this.shelfList = res.data.slice(0,this.pageSize)
+							_this.total = res.data.length
+							if (_this.shelfList.length == res.data.length) {
+								_this.status = 'nomore'
+							} else {
+								_this.status = 'loadmore'
+							}
+						} else {
+							_this.shelfList = list || []
+							_this.total = 0
+							_this.status = 'nomore'
+							_this.noDataText = '没有查询到相关货架'
+						}
+						_this.allList = res.data
+					}else{
+						_this.status = 'loadmore'
+						_this.shelfList = []
+						_this.allList = []
+						_this.total = 0
+						_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
+					}
+				})
+			},
+			// 加载更多
+			onreachBottom () {
+				if(this.shelfList.length < this.total ){
+					if(this.isGobleSearch&&this.queryParam.shelfName==''){
+						return
+					}
+					this.pageNo++
+					this.status = 'loading'
+					const s = (this.pageNo-1)*this.pageSize
+					const e = s + this.pageSize
+					this.shelfList = this.shelfList.concat(this.allList.slice(s,e))
+				}else{
+					this.status = "nomore"
+				}
+			},
+			viewDetail (row) {
+			  if (row.productCategory&&row.productQty) {
+			    this.tempData = row
+				this.tempData.chooseKey = []
+				this.$store.state.vuex_tempData = null
+				uni.navigateTo({
+					url: "/pages/soldOut/chooseProduct?data="+encodeURIComponent(JSON.stringify(this.tempData))
+				})
+			  } else {
+			    this.toashMsg('此货架没有待补货产品')
+			  }
+			},
+		}
+	}
+</script>
+
+<style lang="less">
+	.moreShelfPart{
+		width: 100%;
+		height: 100vh;
+		background-color: #f8f8f8;
+		.moreShelfPart-search{
+			padding: 20rpx;
+			background-color: #fff;
+		}
+		.moreShelfPart-body{
+			flex-grow: 1;
+		}
+		.nav-right{
+			padding: 0 30upx;
+			height: calc(100vh - 160rpx);
+			box-sizing: border-box;
+			 
+			.nav-right-item{
+				padding:20upx;
+				border: 2rpx solid #f5f5f5;
+				border-radius: 15upx;
+				margin-bottom: 20upx;
+				box-shadow: 3rpx 3rpx 8rpx #eee;
+				background-color: #fff;
+				display: flex;
+				align-items: center;
+				&:active{
+					background: #f8f8f8;
+				}
+				.arrow{
+					text-align: right;
+					padding-left: 20rpx;
+				}
+				.item-info{
+					flex:1;
+					.item-name{
+						font-size: 30upx;
+						display: flex;
+						align-items: center;
+					}
+					.item-detail{
+						margin-top: 10rpx;
+						display: flex;
+						align-items: center;
+						justify-content: space-between;
+						color: #666;
+						font-size: 26upx;
+						.item-detail-text{
+							font-size: 26upx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 2 - 1
pages/statistics/chooseShelf.vue

@@ -82,7 +82,8 @@
 				let params = {
 				    pageNo: this.pageNo,
 				    pageSize: this.pageSize,
-					customerName: this.customerName
+					customerName: this.customerName,
+					enabledFlag : 1 //1启用客户 0 禁用用户
 				}
 				_this.status = 'loading'
 				customerList(params).then(res => {

+ 4 - 0
pages/stockCheck/shelfList.vue

@@ -93,6 +93,10 @@
 		},
 		onShow() {
 			this.getShelfList()
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
 		},
 		methods: {
 			clearSearch(){

+ 3 - 3
pages/userCenter/index.vue

@@ -17,7 +17,7 @@
 			</view>
 		</view>
 		<!-- 列表 -->
-		<view class="user-list">
+		<view class="user-list" :style="`backgroundImage:linear-gradient(180deg, ${$config('primaryColor')}, #F5F6F7 30%)`">
 			<u-cell-group>
 				<u-cell-item icon="volume" icon-size="36" :icon-style="{color:'#00aaff'}" index="3" @click="toPage(3)" title="消息">
 					<u-badge :count="noReadNums" :absolute="false" slot="right-icon"></u-badge>
@@ -245,7 +245,7 @@
 		.user-head{
 			display: flex;
 			align-items: center;
-			padding: 80rpx 35rpx;
+			padding: 50rpx 35rpx;
 			.user-photo{
 				flex-shrink: 0;
 				margin-right: 5rpx;
@@ -271,7 +271,7 @@
 		.user-list{
 			padding: 0 20upx;
 			> view{
-				margin: 20upx 0;
+				margin-bottom: 20upx;
 				border-radius: 15upx;
 				box-shadow: 0upx 3upx 6upx #eee;
 				overflow: hidden;

+ 40 - 58
pages/vinAnalyse/shelfAnalyse.vue

@@ -65,25 +65,12 @@
 		<!-- 搜索弹窗 -->
 		<search :showModal="showModal" @refresh="refreshList" @close="showModal = false" />
 		<!-- vin 详情 -->
-		<div
-			class="cpb_cart-mask"
-			v-if="showCart"
-			@click="
-				showCart = false;
-				selFlag = 0;
-			"
-		>
-			<div class="cpb_cart-box" @click.stop="showCart = true">
-				<div
-					class="cpb_close flex align-center justify_center"
-					@click.stop="
-						showCart = false;
-						selFlag = 0;
-					"
-				>
+		<view class="cpb_cart-mask" v-if="showCart" @click=" showCart = false; selFlag = 0;">
+			<view class="cpb_cart-box" @click.stop="showCart = true">
+				<view class="cpb_close flex align-center justify_center" @click.stop="showCart = false;selFlag = 0;">
 					<u-icon name="close"></u-icon>
-				</div>
-				<div class="cpb_cart-tit">
+				</view>
+				<view class="cpb_cart-tit">
 					<view>VIN详情</view>
 					<view class="st-detailList-item-con flex">
 						<view class="pimgs">
@@ -94,15 +81,15 @@
 							<view class="font_13">VIN:{{ tempData.vinCode }}</view>
 						</view>
 					</view>
-				</div>
-				<div class="cpb_body flex justify_between">
-					<div class="cpb_tab">
-						<div :class="selFlag == 0 ? 'active' : ''" @click.stop="changeSel(0)">空调滤清器</div>
-						<div :class="selFlag == 1 ? 'active' : ''" @click.stop="changeSel(1)">空气滤清器</div>
-						<div :class="selFlag == 2 ? 'active' : ''" @click.stop="changeSel(2)">机油滤清器</div>
-					</div>
-					<div class="cpb_cart-list" v-if="productList.length > 0">
-						<div v-for="(item, index) in productList" :key="index">
+				</view>
+				<view class="cpb_body">
+					<view class="cpb_tab">
+						<view :class="selFlag == 0 ? 'active' : ''" @click.stop="changeSel(0)">空调滤清器</view>
+						<view :class="selFlag == 1 ? 'active' : ''" @click.stop="changeSel(1)">空气滤清器</view>
+						<view :class="selFlag == 2 ? 'active' : ''" @click.stop="changeSel(2)">机油滤清器</view>
+					</view>
+					<scroll-view scroll-y class="cpb_cart-list" v-if="productList.length > 0">
+						<view v-for="(item, index) in productList" :key="index">
 							<view class="nav-right-item flex">
 								<view class="uni-col-2">
 									<u-image
@@ -126,15 +113,16 @@
 									</view>
 								</view>
 							</view>
-						</div>
-						<div class="loadmoreStyle"><u-loadmore status="nomore" :load-text="loadText" /></div>
-					</div>
+						</view>
+						<view class="loadmoreStyle"><u-loadmore status="nomore" :load-text="loadText" /></view>
+					</scroll-view>
 					<view v-else class="emptyStyle u-flex">
 						<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="150" text="暂无匹配产品" mode="list"></u-empty>
 					</view>
-				</div>
-			</div>
-		</div>
+					
+				</view>
+			</view>
+		</view>
 	</view>
 </template>
 
@@ -170,6 +158,7 @@ export default {
 			},
 			shelfName: '',
 			isRestCon:false,//是否点击重置按钮
+			scrollHeight:''
 		};
 	},
 	onNavigationBarButtonTap(e) {
@@ -248,9 +237,9 @@ export default {
 					this.noDataText = res.message;
 				}
 				this.status = 'loadmore';
-				if (this.pullDownRefresh) {
+				/* if (this.pullDownRefresh) {
 					uni.stopPullDownRefresh();
-				}
+				} */
 			});
 		},
 		changeSel(num) {
@@ -293,16 +282,16 @@ export default {
 		}
 	},
 
-	onPullDownRefresh() {
-		this.pullDownRefresh = true;
-		this.pageNo = 1;
-		let ajaxData = {
-			shelfSn: this.shelfSn,
-			pageNo: this.pageNo,
-			pageSize: this.pageSize
-		};
-		this.getList(ajaxData);
-	}
+	// onPullDownRefresh() {
+	// 	this.pullDownRefresh = true;
+	// 	this.pageNo = 1;
+	// 	let ajaxData = {
+	// 		shelfSn: this.shelfSn,
+	// 		pageNo: this.pageNo,
+	// 		pageSize: this.pageSize
+	// 	};
+	// 	this.getList(ajaxData);
+	// }
 };
 </script>
 
@@ -421,6 +410,7 @@ export default {
 	.cpb_cart-mask {
 		position: fixed;
 		width: 100%;
+		height: 100%;
 		background: rgba(0, 0, 0, 0.5);
 		z-index: 900;
 		bottom: 0;
@@ -433,7 +423,7 @@ export default {
 		z-index: 1000;
 		bottom: 0;
 		border-radius: 30rpx 30rpx 0 0;
-		max-height: 70vh;
+		height: 60vh;
 		display: flex;
 		flex-direction: column;
 		.cpb_close {
@@ -469,12 +459,14 @@ export default {
 			}
 		}
 		.cpb_body {
-			height: 80vh;
+			height:calc(60vh - 202rpx);
+			box-sizing: border-box;
+			display: flex;
 			.cpb_tab {
 				width: 25%;
 				height: 100%;
 				background-color: #f8f8f8;
-				> div {
+				> view {
 					padding: 30rpx 20rpx;
 					font-size: 24rpx;
 					text-align: center;
@@ -485,7 +477,6 @@ export default {
 				}
 			}
 			.emptyStyle{
-				margin-top:  100rpx;
 				align-items: center !important;
 				margin:160rpx auto 0;
 				/deep/.u-empty{
@@ -497,7 +488,6 @@ export default {
 			width: 75%;
 			height: 100%;
 			padding: 20rpx;
-			overflow: auto;
 			flex-grow: 1;
 			box-sizing: border-box;
 			> view {
@@ -509,14 +499,6 @@ export default {
 			.item-name {
 				font-size: 30rpx;
 				width: 100%;
-				// text{
-				// 	background: rgba(3, 54, 146, 0.15);
-				// 	color: #1c588a;
-				// 	border-radius: 1em;
-				// 	font-size: 0.8em;
-				// 	padding: 0 0.5em;
-				// 	margin-right: 10upx;
-				// }
 			}
 			.item-info {
 				border-bottom: 2rpx solid #eee;

+ 4 - 0
pages/vinAnalyse/shelfList.vue

@@ -63,6 +63,10 @@
 		},
 		onLoad() {
 			this.getShelfList()
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
 		},
 		methods: {
 			clearSearch(){

+ 2 - 1
pages/xtNotice/xtNotice.vue

@@ -142,7 +142,8 @@
 				}
 				// 补货订单
 				if (data.notice.extInfo.bizType == 'SHELF_REPLENISH') {
-					uni.navigateTo({ url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM' })
+					// uni.navigateTo({ url: '/pages/replenishmentManage/replenishmentList?billState=All' })
+					uni.navigateTo({url: '/pages/soldOut/shelfList'})
 				}
 				// 货架订单
 				if (data.notice.extInfo.bizType == 'SHELF_ORDER') {

+ 2 - 1
pages/xtNotice/xtNoticeDetail/xtNoticeDetail.vue

@@ -81,7 +81,8 @@
 			  }
 			  // 补货订单
 			  if (data.extInfo.bizType == 'SHELF_REPLENISH') {
-				uni.redirectTo({ url: '/pages/replenishmentManage/replenishmentList?billState=WAIT_CONFIRM' })
+				// uni.redirectTo({ url: '/pages/replenishmentManage/replenishmentList?billState=ALL' })
+				uni.redirectTo({url: '/pages/soldOut/shelfList'})
 			  }
 			  // 货架订单
 			  if (data.extInfo.bizType == 'SHELF_ORDER') {

File diff suppressed because it is too large
+ 0 - 0
static/iconfont/iconfont.css


BIN
static/iconfont/iconfont.ttf


+ 4 - 0
store/index.js

@@ -110,8 +110,12 @@ const store = new Vuex.Store({
 		vuex_tempPrintList:[], // 临时打印数据
 		vuex_tempData: null, // 临时数据
 		vuex_shelfOrderState: null, // 货架订单状态
+		shuntBackList:null
 	},
 	mutations: {
+		setShuntBackList(state,val){
+			state.shuntBackList = val
+		},
 		$uStore(state, payload) {
 			// 判断是否多层级调用,state中为对象存在的情况,诸如user.info.score = 1
 			let nameArr = payload.name.split('.')

Some files were not shown because too many files changed in this diff