Просмотр исходного кода

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

李磊 2 лет назад
Родитель
Сommit
908861bbf0
100 измененных файлов с 8561 добавлено и 605 удалено
  1. 28 22
      .hbuilderx/launch.json
  2. 19 0
      api/dealerBizParam.js
  3. 26 0
      api/sales.js
  4. 34 0
      api/shelf.js
  5. 8 0
      api/shelfCart.js
  6. 9 0
      api/shelfRecall.js
  7. 38 0
      api/shelfReplenish.js
  8. 55 0
      api/verify.js
  9. 153 0
      components/customPicker/checkBoxPicker.vue
  10. 137 0
      components/customPicker/redioPicker.vue
  11. 0 1
      components/kk-printer/index.vue
  12. 1 1
      config/index.js
  13. 33 0
      hybrid/html/css/common.css
  14. BIN
      hybrid/html/img/close.png
  15. BIN
      hybrid/html/img/open.png
  16. 361 0
      hybrid/html/index.html
  17. 0 0
      hybrid/html/js/axios.min.js
  18. 0 0
      hybrid/html/js/moent.min.js
  19. 51 0
      hybrid/html/js/resize.js
  20. 5 0
      hybrid/html/js/vue.min.js
  21. 1 1
      libs/axios.js
  22. 246 135
      libs/getDate.js
  23. 10 1
      libs/tools.js
  24. 12 3
      main.js
  25. 17 6
      manifest.json
  26. 3 3
      package-lock.json
  27. 1 1
      package.json
  28. 183 20
      pages.json
  29. 7 1
      pages/approveStore/authPass.vue
  30. 5 0
      pages/approveStore/list.vue
  31. 81 2
      pages/batchShelves/cartList.vue
  32. 1 0
      pages/batchShelves/scanProduct.vue
  33. 2 2
      pages/batchShelves/searchProduct.vue
  34. 6 1
      pages/batchShelves/setProductCost.vue
  35. 14 4
      pages/common/commonModal.vue
  36. 30 27
      pages/common/partList.vue
  37. 209 0
      pages/common/pdfView.vue
  38. 2 2
      pages/common/printTag/printTag.vue
  39. 3 3
      pages/index/index.vue
  40. 5 1
      pages/latePlay/chooseBulk.vue
  41. 1 1
      pages/replenishmentManage/chooseTypeModal.vue
  42. 116 7
      pages/replenishmentManage/detail.vue
  43. 5 7
      pages/replenishmentManage/manualPrint.vue
  44. 143 21
      pages/replenishmentManage/outWarehousing.vue
  45. 88 19
      pages/replenishmentManage/replenishmentList.vue
  46. 8 4
      pages/replenishmentManage/scanCodePrint.vue
  47. 3 6
      pages/replenishmentManage/sendOutGoods.vue
  48. 116 11
      pages/replenishmentManage/signWarehousing.vue
  49. 695 0
      pages/sales/bill.vue
  50. 140 0
      pages/sales/billHistory.vue
  51. 205 0
      pages/sales/billHistoryDetail.vue
  52. 135 0
      pages/sales/billListComponent.vue
  53. 10 4
      pages/sales/chooseCustomer.vue
  54. 311 0
      pages/sales/chooseCustomerBill.vue
  55. 234 0
      pages/sales/chooseShelf.vue
  56. 151 0
      pages/sales/customerList.vue
  57. 130 0
      pages/sales/gather.vue
  58. 12 2
      pages/sales/index.vue
  59. 9 40
      pages/sales/list.vue
  60. 6 6
      pages/sales/listComponent.vue
  61. 133 79
      pages/sales/orderInfoModal.vue
  62. 390 0
      pages/sales/salesDetail.vue
  63. 48 10
      pages/sales/salesSearch.vue
  64. 8 13
      pages/shelfOrder/listComponent.vue
  65. 2 1
      pages/shelfOrder/search.vue
  66. 7 2
      pages/shelfOrder/shelfOrder.vue
  67. 7 1
      pages/shelfSetting/addShelfHw.vue
  68. 6 0
      pages/shelfSetting/editShelfHw.vue
  69. 5 0
      pages/shelfSetting/shelfList.vue
  70. 26 20
      pages/shelfSetting/shelfSet.vue
  71. 482 0
      pages/shuntBackManage/addBackOrder.vue
  72. 86 28
      pages/shuntBackManage/cancellingStocks.vue
  73. 649 0
      pages/shuntBackManage/chooseProduct.vue
  74. 72 4
      pages/shuntBackManage/detail.vue
  75. 236 0
      pages/shuntBackManage/productList.vue
  76. 247 0
      pages/shuntBackManage/shelfList.vue
  77. 10 0
      pages/shuntBackManage/shuntBackList.vue
  78. 640 0
      pages/soldOut/chooseProduct.vue
  79. 400 0
      pages/soldOut/creatOrder.vue
  80. 231 0
      pages/soldOut/productList.vue
  81. 271 0
      pages/soldOut/shelfList.vue
  82. 4 2
      pages/statistics/chooseShelf.vue
  83. 28 16
      pages/statistics/index.vue
  84. 4 0
      pages/stockCheck/shelfList.vue
  85. 8 4
      pages/userCenter/index.vue
  86. 182 0
      pages/userCenter/setData.vue
  87. 40 58
      pages/vinAnalyse/shelfAnalyse.vue
  88. 4 0
      pages/vinAnalyse/shelfList.vue
  89. 2 1
      pages/xtNotice/xtNotice.vue
  90. 2 1
      pages/xtNotice/xtNoticeDetail/xtNoticeDetail.vue
  91. BIN
      static/default/navIcon/billImg.png
  92. BIN
      static/default/navIcon/dayImg.png
  93. BIN
      static/default/navIcon/monthImg.png
  94. 0 0
      static/iconfont/iconfont.css
  95. BIN
      static/iconfont/iconfont.ttf
  96. BIN
      static/logo.png
  97. 6 0
      store/index.js
  98. 11 0
      证书/ios/ulink/apple-app-site-association
  99. BIN
      证书/ios/发布证书/iscmApp_pro.mobileprovision
  100. BIN
      证书/ios/开发证书/iscmApp.mobileprovision

+ 28 - 22
.hbuilderx/launch.json

@@ -1,24 +1,30 @@
-{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
-  // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
-    "version": "0.0",
-    "configurations": [{
-     	"app-plus" : 
-     	{
-     		"launchtype" : "remote"
-     	},
-     	"default" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"h5" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"mp-weixin" : 
-     	{
-     		"launchtype" : "local"
-     	},
-     	"type" : "uniCloud"
-     }
+{
+    // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+    // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+    "version" : "0.0",
+    "configurations" : [
+        {
+            "app-plus" : {
+                "launchtype" : "remote"
+            },
+            "default" : {
+                "launchtype" : "local"
+            },
+            "h5" : {
+                "launchtype" : "local"
+            },
+            "mp-weixin" : {
+                "launchtype" : "local"
+            },
+            "type" : "uniCloud"
+        },
+        {
+            "playground" : "custom",
+            "type" : "uni-app:app-android"
+        },
+        {
+            "playground" : "custom",
+            "type" : "uni-app:app-ios"
+        }
     ]
 }

+ 19 - 0
api/dealerBizParam.js

@@ -0,0 +1,19 @@
+import axios from '@/libs/axios.js';
+//获取系统参数列表
+export const queryVerifySalesParams = (params) => {
+  const url = `dealerBizParam/queryVerifySalesParams`
+  return axios.request({
+    url: url,
+	data: params,
+    method: 'GET'
+  }).then(res => res)
+}
+ 
+// 修改系统参数
+export const updateParam = (params) => {
+  return axios.request({
+    url: `dealerBizParam/updateParam`,
+    data: params,
+    method: 'post'
+  })
+}

+ 26 - 0
api/sales.js

@@ -183,4 +183,30 @@ export const salesStatistics = (params) => {
     data: params,
     method: 'post'
   })
+}
+
+// 销售 详情  打印
+export const salesDetailPrint = params => {
+  const data = {
+    url: `sales/print/${params.sn}/NEEDLE/${params.printOrgCode}/${params.printAllName}`,
+    method: 'get'
+  }
+  return axios.request(data)
+}
+// 销售 详情  导出
+export const salesDetailExport = params => {
+  return axios.request({
+    url: `sales/excel/${params.sn}`,
+    method: 'get',
+    responseType: 'blob'
+    })
+}
+//销售详情 -- 收款记录
+export const queryFlowByBizSn = (params) => {
+	const url = `settle/flow/queryFlowByBizSn`
+	  return axios.request({
+		url: url,
+		data: params,
+		method: 'post'
+	  })
 }

+ 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'
+  })
 }

+ 55 - 0
api/verify.js

@@ -0,0 +1,55 @@
+import axios from '@/libs/axios.js'
+
+//  应收对账单 - 分页查询客户列表数据
+export const queryCustomerPage = (params) => {
+  const url = `verify/queryCustomerPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//应收对账单 - 查找客户待结算订单列表
+export const queryUnsettleSaleList = (params) => {
+  const url = `verify/queryUnsettleSaleList`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+//应收对账单 - 发送对账单
+export const insert = (params) => {
+  const url = `verify/insert`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 应收对账单 - 历史对账单
+export const queryPage = (params) => {
+  const url = `verify/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 应收对账单 - 历史对账单详情
+export const findBySn = (params) => {
+  const url = `verify/findBySn`
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 153 - 0
components/customPicker/checkBoxPicker.vue

@@ -0,0 +1,153 @@
+<template>
+	<view>
+		<u-popup v-model="isShow" @close="isShow = false" mode="bottom" safe-area-inset-bottom border-radius="20">
+			<view class="content flex flex_column">
+				<view class="con">
+					<view class="choose-list u-flex u-row-between" v-for="(item, i) in list" :key="item.id">
+						<view>{{ item.dispName }}</view>
+						<!-- <u-icon v-show="item.isChecked" name="checkbox-mark" color="#2979ff" size="28"></u-icon> -->
+						<u-checkbox v-model="item.checked" :name="item.code" @change="getChooseItem" size="36"></u-checkbox>
+					</view>
+				</view>
+				<view class="btn u-flex">
+					<view class="cancleStyle" @click="isShow = false">取消</view>
+					<view class="confimStyle" :style="{ background: $config('primaryColor'), color: '#fff' }" @click="submit">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+import { getLookUpDatas } from '@/api/data';
+export default {
+	props: {
+		showModal: {
+			type: Boolean,
+			default: false
+		},
+		code: {
+			type: String,
+			default: ''
+		},
+		val: {
+			type: String,
+			default: ''
+		},
+		filtrate:{
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			isShow: this.showModal,
+			chooseObj: null,
+			chooseFlag: -1,
+			list: [],
+			valInfo:this.val
+		};
+	},
+	methods: {
+		getList() {
+			getLookUpDatas({
+				lookupCode: this.code,
+				pageNo: 1,
+				pageSize: 1000
+			}).then(result => {
+				if (result && result.status == 200) {
+					if(this.filtrate){//筛选业务状态
+						var selfArr=['WAIT_SUBMIT','WAIT_AUDIT','WAIT_OUT_WAREHOUSE','FINISH']
+						result.data.list=result.data.list.filter((item,i)=>{
+							if(selfArr.includes(item.code)){
+								return item
+							}
+						})
+						result.data.list.splice()
+					}
+					if (this.valInfo) {//勾选上次选中值
+						var valArr = this.valInfo.split(',');
+						result.data.list.forEach(value => {
+						valArr.includes(value.code) ? value.checked=true:value.checked=false
+						});	
+					}
+					this.list = result.data.list;
+				}
+			});
+		},
+		submit(index) {
+			let arr = [];
+			this.list.forEach(con => {
+				if (con.checked) {
+					arr.push(con);
+				}
+			});
+			if(arr.length == 0){
+				uni.showToast({
+					title:'参数值不能为空',
+					icon:'none'
+				})
+			}else{
+				this.$emit('chooseCon', arr);
+				this.isShow = false;
+			}
+			
+		},
+		getChooseItem(e) {
+			const row = this.list.find(item => item.code == e.name)
+			if(row){
+				row.checked = !row.checked
+				this.list.splice()
+			}
+		}
+	},
+	watch: {
+		//  父页面传过来的弹框状态
+		showModal(newValue, oldValue) {
+			this.isShow = newValue;
+		},
+		//  重定义的弹框状态
+		isShow(newValue, oldValue) {
+			if (!newValue) {
+				this.$emit('close');
+			} else {
+				this.valInfo= this.val
+				this.getList();
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	width: 100%;
+	height: 100%;
+	.con {
+		flex-grow: 1;
+		overflow: auto;
+		padding: 0 40rpx;
+		.choose-list {
+			border-bottom: 1rpx solid #efefef;
+			padding: 20rpx 0;
+			&:last-child {
+				border-bottom: 0rpx solid #efefef;
+			}
+			.u-checkbox{
+				display: inline-block !important;
+			}
+		}
+	}
+	.btn {
+		border-top: 1rpx solid #efefef;
+		.cancleStyle,
+		.confimStyle {
+			width: 50%;
+			text-align: center;
+			height: 89rpx;
+			line-height: 89rpx;
+			text-align: center;
+		}
+	}
+}
+</style>

+ 137 - 0
components/customPicker/redioPicker.vue

@@ -0,0 +1,137 @@
+<template>
+	<view>
+		<u-popup v-model="isShow" @close="isShow = false" mode="bottom" safe-area-inset-bottom border-radius="20">
+			<view class="content flex flex_column">
+				<view class="con" v-if="dataList.length > 0">
+					<view class="choose-list u-flex u-row-between" v-for="(item, i) in dataList" :key="item.id">
+						<view>{{ item.dispName }}</view>
+						<!-- <u-icon v-show="chooseFlag==i" name="checkbox-mark" color="#2979ff" size="28"></u-icon> -->
+						<u-radio-group v-model="chooseVal">
+							<u-radio :name="item.code" @change="getChooseItem"></u-radio>
+						</u-radio-group>
+					</view>
+				</view>
+				<view class="btn u-flex">
+					<view class="cancleStyle" @click="isShow = false">取消</view>
+					<view class="confimStyle" :style="{ background: $config('primaryColor'), color: '#fff' }" @click="submit">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+import { getLookUpDatas } from '@/api/data';
+export default {
+	props: {
+		showModal: {
+			type: Boolean,
+			default: false
+		},
+		code: {
+			type: String,
+			default: ''
+		},
+		val: {
+			type: String,
+			default: ''
+		}
+	},
+	data() {
+		return {
+			isShow: this.showModal,
+			chooseObj: null,
+			chooseVal: null,
+			dataList: []
+		};
+	},
+	methods: {
+		getList() {
+			getLookUpDatas({
+				lookupCode: this.code,
+				pageNo: 1,
+				pageSize: 1000
+			}).then(result => {
+				if (result && result.status + '' === '200') {
+					this.dataList = result.data.list;
+					//勾选上次选中值
+					if (this.val) {
+						this.chooseVal = this.val;
+					}
+				}
+			});
+		},
+		submit(index) {
+			if (!this.chooseVal) {
+				this.chooseObj = null;
+				uni.showToast({
+					title:'参数值不能为空',
+					icon:'none'
+				})
+				return;
+			}
+			this.$emit('chooseItem', this.chooseObj);
+			this.isShow = false;
+		},
+		getChooseItem(e) {
+			if (this.chooseVal == e) {
+				this.chooseVal ='';
+			} else {
+				this.chooseVal = e;
+			}
+			const index = this.dataList.findIndex(item => {
+				return item.code == e;
+			});
+			this.chooseObj = this.dataList[index];
+		}
+	},
+	watch: {
+		//  父页面传过来的弹框状态
+		showModal(newValue, oldValue) {
+			this.isShow = newValue;
+		},
+		//  重定义的弹框状态
+		isShow(newValue, oldValue) {
+			if (!newValue) {
+				this.$emit('close');
+				this.$parent.getData();
+			} else {
+				this.getList();
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	width: 100%;
+	height: 100%;
+	.con {
+		flex-grow: 1;
+		overflow: auto;
+		padding: 0 40rpx;
+		.choose-list {
+			border-bottom: 1rpx solid #efefef;
+			padding: 20rpx 0;
+			&:last-child {
+				border-bottom: 0rpx solid #efefef;
+			}
+			.u-radio{
+				display: inline-block !important;
+			}
+		}
+	}
+	.btn {
+		border-top: 1rpx solid #efefef;
+		.cancleStyle,
+		.confimStyle {
+			width: 50%;
+			text-align: center;
+			height: 89rpx;
+			line-height: 89rpx;
+			text-align: center;
+		}
+	}
+}
+</style>

+ 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.215:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 33 - 0
hybrid/html/css/common.css

@@ -0,0 +1,33 @@
+*{
+    margin:0;
+    padding:0;
+    font-size: 14px;
+	
+}
+.flex{
+    display: -webkit-flex; 
+    display: -moz-flex;
+    display: -ms-flexbox;
+    display: flex;
+}
+.align_center{
+    -webkit-box-align: center;
+    -ms-flex-align: center;
+    -webkit-align-items: center;
+    align-items: center;
+}
+.flex-between{
+    justify-content:space-between;
+}
+.flex-column{
+    -webkit-box-orient: vertical;
+    -ms-flex-direction: column;
+    -webkit-flex-direction: column;
+    flex-direction: column;
+}
+.justify_between{
+    -webkit-box-pack: justify;
+    -ms-flex-pack: justify;
+    -webkit-justify-content: space-between;
+    justify-content: space-between;
+}

BIN
hybrid/html/img/close.png


BIN
hybrid/html/img/open.png


+ 361 - 0
hybrid/html/index.html

@@ -0,0 +1,361 @@
+<!DOCTYPE html>
+<html lang="en">
+
+  <head>
+    <meta charset="UTF-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0">
+    <title>对账单</title>
+    <link rel="stylesheet" href="./css/common.css">
+    <script src="./js/resize.js"></script>
+    <script src="./js/moent.min.js"></script>
+    <script src="./js/vue.min.js"></script>
+    <script src="./js/axios.min.js"></script>
+    <style>
+      [v-cloak] {
+        display: none
+      }
+
+      .content {
+        width: 100%;
+        height: 100vh;
+        background: #f3f3f3;
+      }
+
+      .head {
+        /* 头部 */
+        background: #848484;
+        padding: .3rem .3rem 1rem;
+        box-sizing: border-box;
+        color: #fff;
+        position: relative;
+      }
+
+      .shareTime {
+        text-align: center;
+        margin-bottom: .2rem;
+      }
+
+      .tip {
+        font-weight: bold;
+      }
+
+      .tipDesc {
+        font-weight: bold;
+        font-size: .24rem;
+        line-height: .5rem;
+      }
+
+      .orderInfo {
+        background: #fff;
+        box-sizing: border-box;
+        padding: .2rem;
+        width: calc(100% - .4rem);
+        border-radius: .3rem;
+        overflow: hidden;
+        position: absolute;
+        bottom: -1.9rem;
+        left: .2rem;
+        color: #333;
+      }
+
+      .downLoadTip,
+      .downLoadUrl {
+        max-width: 83%;
+        font-size: .25rem;
+        word-wrap: break-word;
+        white-space: normal;
+        word-break: break-all;
+      }
+
+      .downLoadTip {
+        margin-top: .2rem;
+        line-height: .4rem;
+        color: #999;
+      }
+
+      .downLoadUrl {
+        color: #007aff;
+      }
+
+      .amount {
+        font-weight: bold;
+      }
+
+      .amountName {
+        font-weight: bold;
+      }
+
+      .handleOrder {
+        color: #999;
+        padding: 0rem .2rem .2rem;
+      }
+
+      .handleOrder span:last-child {
+        color: #007aff;
+      }
+
+      /* 滚动盒子 */
+      .oederBox {
+        flex-grow: 1;
+        overflow: auto;
+      }
+
+      .oederList {
+        background: #fff;
+        border-bottom: .01rem solid #e0e0e0;
+        padding: .2rem;
+        box-sizing: border-box;
+      }
+
+      .order-l {
+        flex: 1;
+      }
+
+      .order-t,
+      .order-b {
+        font-size: .12rem;
+        color: #999;
+      }
+
+      .order-t span:first-child {
+        color: #333;
+      }
+
+      .order-b,
+      .list-b {
+        line-height: .5rem;
+      }
+
+      .order-b span {
+        color: #f0ad4e;
+        vertical-align: middle;
+      }
+
+      .order-r img {
+        width: .5rem;
+        height: .5rem;
+        border-radius: 50%;
+        object-fit: contain;
+        margin-left: .2rem;
+      }
+
+      /* 折叠列表 */
+      .otherList {
+        width: 100%;
+        box-sizing: border-box;
+        padding-left: .4rem;
+        background-color: #fff;
+      }
+
+      .list {
+        box-sizing: border-box;
+        padding: .2rem;
+        border-bottom: .01rem solid #e0e0e0;
+        font-size: .12rem;
+      }
+
+      .list:last-child {
+        border-bottom: 0 solid #e0e0e0;
+      }
+
+      .list-b div:first-child {
+        text-overflow: ellipsis;
+        overflow: hidden;
+        white-space: nowrap;
+        width: 70%;
+      }
+
+      .list-b {
+        color: #999;
+      }
+
+      .downLoadCon {
+        position: relative;
+      }
+
+      .finishImg {
+        width: 1rem;
+        height: 1rem;
+        position: absolute;
+        right: .06rem;
+        bottom: -.1rem;
+      }
+
+      .amount_list {
+        margin-bottom: 0.06rem;
+      }
+    </style>
+  </head>
+
+  <body>
+    <div id="app" class="content flex flex-column">
+      <div class="head">
+        <div class="shareTime">
+          分享时间:{{info.createDate}}
+        </div>
+        <div class="tip" v-if="info.customer">
+          尊敬的“{{info.customer.customerName || '--'}}”,您好!
+        </div>
+        <div class="tipDesc">
+          以下是您在本店的未结账单,请查阅。
+        </div>
+        <div class="orderInfo"
+          :style="{bottom:(info.discountAmount && info.discountAmount*1 !=0 ? '-1.9rem':'-1.3rem' )}">
+          <div class="amount_list flex align_center flex-between">
+            <span class="amountName">货款金额</span>
+            <span class="amount" v-if="info.totalAmount"
+              :style="{color:!info.discountAmount? '#f0ad4e':'#333333'}">¥{{toThousands(info.totalAmount,2)}}</span>
+            <span class="amount" v-else :style="{color:!info.discountAmount ? '#f0ad4e':'#333333'}">¥0.00</span>
+          </div>
+          <div v-if="info.discountAmount && info.discountAmount*1!=0">
+            <div class="amount_list flex align_center flex-between">
+              <span class="amountName">折让金额</span>
+              <span class="amount" v-if="info.discountAmount">-¥{{toThousands(info.discountAmount,2)}}</span>
+              <span class="amount" v-else>¥0.00</span>
+            </div>
+            <div class="amount_list flex align_center flex-between">
+              <span class="amountName">折后金额</span>
+              <span class="amount" style="color: #f0ad4e"
+                v-if="info.settleAmount">¥{{toThousands(info.settleAmount,2)}}</span>
+              <span class="amount" style="color: #f0ad4e" v-else>¥0.00</span>
+            </div>
+          </div>
+          <div class="downLoadCon">
+            <div class="downLoadTip">
+              单据明细Excel下载请点击下面的链接:
+            </div>
+            <div class="downLoadUrl" @click="downLoad">
+              http://iscm.360arrow.com/bill/对账单明细.xls
+            </div>
+            <img v-if="info.billStatus != 'UNSETTLE'" src="./img/finishImg.png" alt="" class="finishImg">
+          </div>
+        </div>
+      </div>
+      <div class="orderCon flex flex-column"
+        :style="{paddingTop:(info.discountAmount && info.discountAmount*1 !=0 ? '2.1rem':'1.5rem' )}">
+        <div class="handleOrder flex flex-between align_center">
+          <span>共{{saleList ? saleList.length : 0}}个销售单</span>
+          <span v-if="!flag" @click="openAll">全部展开</span>
+          <span v-else @click="openAll">全部关闭</span>
+        </div>
+        <div class="oederBox">
+          <div v-for="(item,i) in saleList" :key="item.bizSn">
+            <div class="oederList flex align_center" @click="openInfoList(i)">
+              <div class="order-l">
+                <div class="order-t flex align_center flex-between">
+                  <span>{{item.bizDate.substr(0,10)}}</span>
+                  <span>{{item.bizNo}}</span>
+                </div>
+                <div class="order-b  flex align_center flex-between">
+                  <div>应付:¥{{toThousands(item.bizAmount,2)}}</div>
+                  <div>已付:¥{{toThousands(item.settledAmount,2)}}</div>
+                  <div>
+                    待付:<span>¥{{item.unsettleAmount ? toThousands(item.unsettleAmount,2): 0}}</span>
+                  </div>
+                </div>
+              </div>
+              <div class="order-r">
+                <img src="./img/close.png" alt="" v-if="!item.isShow">
+                <img src="./img/open.png" alt="" v-else>
+              </div>
+            </div>
+            <div class="otherList" v-show="item.isShow">
+              <div class="list" v-for="(con,j) in item.list" :key="con.id">
+                <div class="list-t flex align_center flex-between">
+                  <span>{{con.dealerProductEntity.code}}</span>
+                  <span>¥{{con.price?toThousands(con.price,2):0}}</span>
+                </div>
+                <div class="list-b flex align_center flex-between">
+                  <div>
+                    {{con.dealerProductEntity.productBrandName}}{{con.dealerProductEntity.productTypeName3}}
+                  </div>
+                  <div>x{{con.qty}}</div>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+  </body>
+  <script>
+    new Vue({
+      el: '#app',
+      data: {
+        ajaxUrl: 'http://p.iscm.360arrow.com/qpls-md/',
+        saleList: [],
+        saleDetailList: [],
+        info: {},
+        flag: false
+      },
+      created () {
+        this.ajaxUrl = window.location.origin + '/qpls-md/'
+        console.log('请求地址:', window.location.origin + '/qpls-md/')
+        this.loadData()
+      },
+      methods: {
+        loadData () {
+          const ajaxData = {
+            verifySn: this.getUrlParam(1),
+            tenantId: this.getUrlParam(0)
+          }
+          axios.post(this.ajaxUrl + 'verify/findBySn', ajaxData).then((res) => {
+            this.info = res.data.data
+            document.title = res.data.data.dealerName
+            res.data.data.detailList.forEach(item => {
+              item.isShow = false
+              item.list = []
+            })
+            this.saleList = res.data.data.detailList
+
+            this.getALlList(res.data.data.detailList)
+          }).catch((error) => {
+            console.log(error)
+          })
+        },
+        handleShow (con, i) {
+          const req_data = {
+            salesBillSn: con.bizSn
+          }
+          axios.post(this.ajaxUrl + 'salesDetail/queryList', req_data).then((res) => {
+            this.saleList[i].list = res.data.data
+          }).catch((error) => {
+            console.log(error)
+          })
+        },
+        openInfoList (i) {
+          
+          this.saleList[i].isShow = !this.saleList[i].isShow
+          this.flag = this.saleList.every(item=>{return item.isShow})
+          this.saleList.splice()
+        },
+        downLoad () {
+          window.location.href = this.ajaxUrl + 'verify/exportExcel?verifySn=' + this.getUrlParam(1) +
+            '&dealerSn=' + this.getUrlParam(0)
+        },
+        getUrlParam (index) {
+          const urlArr = window.location.search.substr(1).split('&')
+          let newArr = urlArr.map(item=>{return item.replace('=','')})
+          return newArr[index] // 返回参数值
+        },
+        openAll () {
+          this.flag = !this.flag
+          this.saleList.forEach((item, i) => {
+            if (this.flag) {
+              item.isShow = true
+            } else {
+              item.isShow = false
+            }
+          })
+        },
+        getALlList (list) {
+          list.forEach((item, i) => {
+            this.handleShow(item, i)
+          })
+        }
+      }
+    })
+  </script>
+
+</html>

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hybrid/html/js/axios.min.js


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
hybrid/html/js/moent.min.js


+ 51 - 0
hybrid/html/js/resize.js

@@ -0,0 +1,51 @@
+(function(doc, win) {
+	var docEl = doc.documentElement,
+		resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
+		recalc = function() {
+			var clientWidth = docEl.clientWidth;
+			if (!clientWidth) return;
+			if (clientWidth >= 1080) {
+				docEl.style.fontSize = '100px';
+			} else {
+				docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
+			}
+		};
+
+	if (!doc.addEventListener) return;
+	win.addEventListener(resizeEvt, recalc, false);
+	doc.addEventListener('DOMContentLoaded', recalc, false);
+	var docEl = document.documentElement;
+	var clientWidth = docEl.clientHeight;
+})(document, window);
+
+
+// 导出
+function downloadExcel(data, fileName) {
+	if (!data) {
+		return
+	}
+	const a = moment().format('YYYYMMDDHHmmss')
+	const fname = fileName + a
+	const blob = new Blob([data], {
+		type: 'application/vnd.ms-excel'
+	})
+	if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+		navigator.msSaveBlob(blob, fname + '.xlsx')
+	} else {
+		const link = document.createElement('a')
+		link.style.display = 'none'
+		var href = URL.createObjectURL(blob)
+		link.href = href
+		link.setAttribute('download', fname + '.xlsx')
+
+		document.body.appendChild(link)
+		link.click()
+		document.body.removeChild(link)
+		window.URL.revokeObjectURL(href) // 释放掉blob对象
+	}
+}
+
+function toThousands(num, decimal) {
+	let numInfo = num ? num : 0
+	return parseFloat(numInfo).toFixed(decimal)
+}

Разница между файлами не показана из-за своего большого размера
+ 5 - 0
hybrid/html/js/vue.min.js


+ 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) => {

+ 246 - 135
libs/getDate.js

@@ -1,139 +1,250 @@
 // 引入 moment 时间插件
 import moment from 'moment'
-moment.updateLocale('en', { week: {
-  dow: 1, // 星期的第一天是星期一
-  doy: 7 // 年份的第一周必须包含1月1日 (7 + 1 - 1)
-} })
+moment.updateLocale('en', {
+	week: {
+		dow: 1, // 星期的第一天是星期一
+		doy: 7 // 年份的第一周必须包含1月1日 (7 + 1 - 1)
+	}
+})
 // 获取今日/昨日/本周/上周/本月/上月 时间
 export default {
-  // 获取今日的开始结束时间
-  getToday () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取今日的开始结束时间  年月日时分秒
-  getTodayTime () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD HH:mm:ss')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD HH:mm:ss')
-    return obj
-  },
-  //  近7天
-  getRecentday () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  //  近7天  年月日时分秒
-  getRecentTime () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD HH:mm:ss')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD HH:mm:ss')
-    return obj
-  },
-  //  近3天
-  getThreeday () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment().subtract('days', 2).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取昨日的开始结束时间
-  getYesterday () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().add(-1, 'days').startOf('day').valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().add(-1, 'days').endOf('day').valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取当前周的开始到当天结束时间
-  getCurrWeekDays () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().week(moment().week()).startOf('week').add('days').valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取上一周的开始结束时间
-  getLastWeekDays () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().week(moment().week() - 1).startOf('week').add('days').valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().week(moment().week() - 1).endOf('week').add('days').valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取上一月的今天到当月的今天
-  getCurrMonthDays () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().month(moment().month() - 1).valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取当前月的开始到当天结束时间
-  getCurrLastMonthDays () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().month(moment().month()).startOf('month').valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取上一个月的开始结束时间
-  getLastMonthDays () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取三月前的今天到当月的今天
-  getThreeMonthDays () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().month(moment().month() - 3).valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().month(moment().month() - 3).endOf('month').valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  },
-  // 获取近三个月的开始结束时间
-  getThreeMonthCurrDays () {
-    const obj = {
-      starttime: '',
-      endtime: ''
-    }
-    obj.starttime = moment(moment().month(moment().month() - 2).startOf('month').valueOf()).format('YYYY-MM-DD 00:00:00')
-    obj.endtime = moment(moment().month(moment().month() - 2).endOf('month').valueOf()).format('YYYY-MM-DD 23:59:59')
-    return obj
-  }
-}
+	// 获取今日的开始结束时间
+	getToday() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	
+	// 获取今日的开始结束时间  年月日时分秒
+	getTodayTime() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().startOf('day').valueOf()).format('YYYY-MM-DD HH:mm:ss')
+		obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD HH:mm:ss')
+		return obj
+	},
+	//  近7天
+	getRecentday() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	
+	//  近7天  年月日时分秒
+	getRecentTime() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment().subtract('days', 6).format('YYYY-MM-DD HH:mm:ss')
+		obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD HH:mm:ss')
+		return obj
+	},
+	//  近3天
+	getThreeday() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment().subtract('days', 2).format('YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	// 获取昨日的开始结束时间
+	getYesterday() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment().subtract(1, 'days').format('YYYY-MM-DD 00:00:00')
+		obj.endtime = moment().subtract(1, 'days').format('YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	// 获取当前周的开始到当天结束时间
+	getCurrWeekDays() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().week(moment().week()).startOf('week').add('days').valueOf()).format(
+			'YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	// 获取上一周的开始结束时间
+	getLastWeekDays() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().week(moment().week() - 1).startOf('week').add('days').valueOf()).format(
+			'YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().week(moment().week() - 1).endOf('week').add('days').valueOf()).format(
+			'YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	
+	// 获取上一月的今天到当月的今天
+	getCurrMonthDays() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().month(moment().month() - 1).valueOf()).format('YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	// 获取当前月的开始到当天结束时间
+	getCurrLastMonthDays() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().month(moment().month()).startOf('month').valueOf()).format(
+			'YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().valueOf()).format('YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	// 获取上一个月的开始结束时间
+	getLastMonthDays() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format(
+			'YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().month(moment().month() - 1).endOf('month').valueOf()).format(
+			'YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	// 获取三月前的今天到当月的今天
+	getThreeMonthDays() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().month(moment().month() - 3).valueOf()).format('YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().month(moment().month() - 3).endOf('month').valueOf()).format(
+			'YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	// 获取近三个月的开始结束时间
+	getThreeMonthCurrDays() {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		obj.starttime = moment(moment().month(moment().month() - 2).startOf('month').valueOf()).format(
+			'YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(moment().month(moment().month() - 2).endOf('month').valueOf()).format(
+			'YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	// 获取当前日期前7天日期集合
+	getWeekGather() {
+		let newDate = new Date(); //获取今天日期
+		newDate.setDate(newDate.getDate() - 6); //获取7天前的日期
+		let dateArray = [];
+		let dateTemp;
+		let flag = 1;
+		for (let i = 0; i < 7; i++) {
+			dateTemp = (newDate.getMonth() + 1) + "." + newDate.getDate();
+			dateArray.unshift(dateTemp);
+			newDate.setDate(newDate.getDate() + flag);
+		}
+		return dateArray;
+	},
+	// 获取当前日期前6月集合
+	getMonthGather() {
+		let newDate = new Date(); //获取今天日期
+		let year = newDate.getFullYear()
+		let month = newDate.getMonth() + 1
+		let newYear = 0
+		let newMonth = 0
+		let monthArray = []
+		for (let i = 0; i < 6; i++) { //这里是获取前六个月,所以循环6次,根据需要修改
+			if (month - i < 1) { //这里的判断是如果当前月份往前推到了去年需要做的处理
+				newYear = year - 1
+				newMonth = month - i + 12 >= 10 ? month - i + 12 : '0' + (month - i + 12)
+				monthArray.push(newYear + '.' + newMonth) //这里拼接格式化,在时间中间加了个-,根据实际需求来
+			} else {
+				newMonth = month - i >= 10 ? month - i : '0' + (month - i) //这里是对月份小于10做加前面加0处理
+				monthArray.push(year + '.' + newMonth)
+			}
+		}
+		return monthArray;
+	},
+	//根据所传日期获取当前时间
+	getFullToday(dateInfo) {
+		const obj = {
+			starttime: '',
+			endtime: ''
+		}
+		let date_info=moment().year()+'-'+dateInfo;
+		obj.starttime = moment(date_info.replace('.','-')).startOf("day").format('YYYY-MM-DD 00:00:00')
+		obj.endtime =moment(date_info.replace('.','-')).endOf("day").format('YYYY-MM-DD 23:59:59')
+		return obj
+	},
+	//根据所传日期获取当前月份第一天和最后一天
+	  getFullMonth (month) {
+		const obj = {
+		  starttime: '',
+		  endtime: ''
+		}
+		obj.starttime = moment(month.replace('.','-')).startOf("month").format('YYYY-MM-DD 00:00:00')
+		obj.endtime = moment(month.replace('.','-')).endOf("month").format('YYYY-MM-DD 23:59:59')
+		return obj
+	  },
+	  // 获取今日/昨日/本周/上周/本月/上月 年月日时间
+	  getTodayInfo() {
+	  	const date = moment(moment().startOf('day').valueOf()).format('YYYY年MM月DD日')
+	  	return date
+	  },
+	  getYesterdayInfo() {
+	  	const date = moment().subtract(1, 'days').format('YYYY年MM月DD日')
+	  	return date
+	  },
+	  getCurrWeekDaysInfo() {
+	  	const starttime = moment(moment().week(moment().week()).startOf('week').add('days').valueOf()).format(
+	  		'YYYY年MM月DD日')
+	  	const endtime = moment(moment().valueOf()).format('YYYY年MM月DD日')
+	  	return starttime+ '至'+endtime
+	  },
+	  getLastWeekDaysInfo() {
+	  	const starttime = moment(moment().week(moment().week() - 1).startOf('week').add('days').valueOf()).format(
+	  		'YYYY年MM月DD日')
+	  	const endtime = moment(moment().week(moment().week() - 1).endOf('week').add('days').valueOf()).format(
+	  		'YYYY年MM月DD日')
+	  	return starttime+ '至'+endtime
+	  },
+	  getCurrLastMonthDaysInfo() {
+	  const date = moment(moment().month(moment().month()).startOf('month').valueOf()).format(
+	  		'YYYY年MM月')
+	  	return date
+	  },
+	  getLastMonthDaysInfo() {
+	  	const date= moment(moment().month(moment().month() - 1).startOf('month').valueOf()).format(
+	  		'YYYY年MM月')
+	  	return date
+	  },
+	  editDay(start,end){
+		  const obj = {
+		    starttime: '',
+		    endtime: ''
+		  }
+		  obj.starttime = moment(start).format('YYYY年MM月DD日')
+		  obj.endtime =moment(end).format('YYYY年MM月DD日')
+		  return obj 
+	  }
+	}
+	

+ 10 - 1
libs/tools.js

@@ -55,6 +55,14 @@ export function throttle(fn, gaptime) {
 		}
 	}
 }
+
+//延迟函数
+export function delayDel(fn) {
+	setTimeout(()=>{
+		fn();
+	},80)
+}
+
 // 图片转Base64,pad 平台
 export const imgToBase64 = function (path,callback){
 	 // plus.nativeUI.previewImage([path]);
@@ -437,7 +445,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') {

+ 12 - 3
main.js

@@ -2,6 +2,7 @@ import Vue from 'vue'
 import App from './App'
 import store from '@/store'
 import getConfig from '@/config'
+import {delayDel} from '@/libs/tools.js'
 Vue.config.productionTip = false
 
 App.mpType = 'app'
@@ -10,7 +11,8 @@ Vue.use(uView)
 
 let vuexStore = require("@/store/$u.mixin.js")
 Vue.mixin(vuexStore)
-
+//延迟执行函数
+Vue.prototype.$delayDel = delayDel
 // 系统配置
 Vue.prototype.$config = function (key) {
 	const envText = {pro:'生产环境',dev:'开发环境',uat:'预发布环境'}
@@ -44,12 +46,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
 	})
 }
 

+ 17 - 6
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" : {
@@ -55,7 +55,7 @@
         /* 模块配置 */
         "modules" : {
             "Bluetooth" : {},
-            "Push" : {}
+            "Share" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -93,6 +93,14 @@
             "ios" : {
                 "idfa" : false,
                 "dSYMs" : false,
+                "urltypes" : "iscm",
+                "capabilities" : {
+                    "entitlements" : {
+                        // 合并到工程entitlements文件的数据(json格式)  
+                        "com.apple.developer.associated-domains" : [ "applinks:iscm.360arrow.com" ]
+                    },
+                    "plists" : {}
+                },
                 "UIBackgroundModes" : "bluetooth-central",
                 "privacyDescription" : {
                     //可选,JSON对象,iOS隐私信息访问的许可描述
@@ -115,8 +123,11 @@
                         "__platform__" : [ "ios", "android" ]
                     }
                 },
-                "push" : {
-                    "unipush" : null
+                "share" : {
+                    "weixin" : {
+                        "appid" : "wx1409d0e9171fc6ed",
+                        "UniversalLinks" : "https://iscm.360arrow.com/ulink/"
+                    }
                 }
             },
             "icons" : {
@@ -127,7 +138,7 @@
                     "xxxhdpi" : "unpackage/res/icons/192x192.png"
                 },
                 "ios" : {
-                    "appstore" : "证书/安卓/deskicon1.png",
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
                     "ipad" : {
                         "app" : "unpackage/res/icons/76x76.png",
                         "app@2x" : "unpackage/res/icons/152x152.png",

+ 3 - 3
package-lock.json

@@ -10,9 +10,9 @@
       "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
     },
     "uview-ui": {
-      "version": "1.8.4",
-      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
-      "integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
+      "version": "1.8.7",
+      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.7.tgz",
+      "integrity": "sha512-5oOGf6NHiSTCj6/dklKjm8LCSJ7kov3azWEcloEYTTf2Mv+cbov/aARc/8QR0ce6y1hqEtwK/YkBkP+OVKuaWw=="
     }
   }
 }

+ 1 - 1
package.json

@@ -15,6 +15,6 @@
   "license": "ISC",
   "dependencies": {
     "moment": "^2.29.1",
-    "uview-ui": "^1.8.4"
+    "uview-ui": "^1.8.7"
   }
 }

+ 183 - 20
pages.json

@@ -50,6 +50,12 @@
 				"navigationBarTitleText": "修改密码"
 			}
 		},
+		{
+			"path": "pages/userCenter/setData",		//  我的>修改密码
+			"style": {
+				"navigationBarTitleText": "系统参数"
+			}
+		},
 		{
 			"path": "pages/xtNotice/xtNotice",		//  我的>消息
 			"style": {
@@ -118,7 +124,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 +147,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 +171,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 +285,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",
@@ -274,6 +373,54 @@
 				}
 			}
 		},
+		{
+			"path": "pages/sales/bill", // 应收对账单
+			"style": {
+				"navigationBarTitleText": "对账单明细"
+			}
+		},
+		{
+			"path": "pages/sales/billHistory", 
+			"style": {
+				"navigationBarTitleText": "历史对账单",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/sales/billHistoryDetail", 
+			"style": {
+				"navigationBarTitleText": "对账单详情",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/sales/salesDetail", 
+			"style": {
+				"navigationBarTitleText": "销售单详情",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/sales/chooseCustomerBill", 
+			"style": {
+				"navigationBarTitleText": "应收对账单",
+				"navigationBarTextStyle": "black",
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "left",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue60e 历史对账单" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "14",
+								"color":"#fff",
+								"width":"100px"
+							}
+						]
+					}
+				}
+			}
+		},
 		{
 			"path": "pages/sales/addSales", // 新增销售单
 			"style": {
@@ -281,6 +428,13 @@
 				"enablePullDownRefresh": false
 			}
 		},
+		{
+			"path": "pages/sales/chooseShelf",
+			"style": {
+				"navigationBarTitleText": "选择客户",
+				"enablePullDownRefresh": false
+			}
+		},
 		{
 			"path": "pages/sales/edit", // 新增销售单/编辑销售单/销售单详情
 			"style": {
@@ -636,6 +790,7 @@
 								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
 								"fontSrc": "/static/iconfont/iconfont.ttf",
 								"fontSize": "14",
+								"color": "#ffffff",
 								"width":"80px"
 							}
 						]
@@ -710,7 +865,6 @@
             "path" : "pages/vinAnalyse/shelfAnalyse",
             "style": {
             	"navigationStyle":"custom",
-				 "enablePullDownRefresh": true,
             	"app-plus":{
             		"titleNView": {
 						"titletext":"VIN分析",
@@ -728,6 +882,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(){

+ 209 - 0
pages/common/pdfView.vue

@@ -0,0 +1,209 @@
+<template>
+  <div class="common-pdfView-modal">
+	  <div>
+	    <div id="canvas"></div>
+	    <div class="tools">
+	      <div>
+	        调整比例:{{ Math.round(scalVal*100) }}%
+	        <div>
+	          <u-button :disabled="scalLoading" style="margin-right: 10px;" size="mini" @click="setScalVal(0)"><a-icon type="minus" /> 缩小</u-button>
+	          <u-button :disabled="scalLoading" size="mini" @click="setScalVal(1)"><a-icon type="plus" /> 放大</u-button>
+	        </div>
+	      </div>
+	      <div>
+	        <div v-if="hasClipboard">
+	          <u-button :disabled="scalLoading" size="mini" @click="handleCapture('export')"><a-icon type="export" /> 导出图片</u-button>
+	        </div>
+	      </div>
+	      <div>
+	      </div>
+	    </div>
+	    <div :style="{width: '100%',height: '70vh',margin:'0 auto',padding: '10px 0',overflow:'auto'}">
+	      <div v-if="loadedRatio > 0 && loadedRatio < 1" style="background-color: green; color: white; text-align: center" :style="{ width: loadedRatio * 100 + '%' }">{{ Math.floor(loadedRatio * 100) }}%</div>
+	      <pdf
+	        ref="pdf"
+	        v-for="(item,index) in pdfList"
+	        :key="'pdf-'+index"
+	        :style="{width: Math.round(scalVal*100)+'%',margin:'0 auto'}"
+	        :src="getUrl('data:application/pdf;base64,' + item)"
+	        :page="page"
+	        :rotate="rotate"
+	        @error="error"
+	      ></pdf>
+	    </div>
+	  </div>
+	  <div class="btn-box">
+	    <u-button size="large" style="margin-right: 25px;" @click="handleCommonCancel">取消</u-button>
+	    <u-button size="large" style="margin-right: 25px;" type="default" @click="handleCapture(hasClipboard?'copy':'export')">
+	      {{ hasClipboard?'复制截图':'导出图片' }}
+	    </u-button>
+	  </div>
+  </div>
+</template>
+
+<script>
+import moment from 'moment'
+import pdf from 'vue-pdf-signature'
+import CMapReaderFactory from 'vue-pdf-signature/src/CMapReaderFactory.js'
+export default {
+  components: {
+    pdf
+  },
+  name: 'PdfView',
+  data () {
+    return {
+      scalLoading: false,
+      pdfAllLoad: 0,
+      scalVal: 0.75,
+      show: true,
+      pdfList: [],
+      src: '',
+      loadedRatio: 0,
+      page: 1,
+      numPages: 0,
+      rotate: 0,
+      curpage: 1,
+      total: 3,
+    }
+  },
+  computed: {
+    hasClipboard () {
+      return typeof ClipboardItem !== 'undefined'
+    }
+  },
+  onload(opts){
+	  this.setData()
+  },
+  methods: {
+    // 缩放
+    setScalVal (t) {
+      if (!this.scalLoading) {
+        this.scalLoading = true
+        this.scalVal = this.scalVal + (t ? 0.05 : -0.05)
+        if (this.scalVal > 1) {
+          this.scalVal = 1
+        }
+        if (this.scalVal < 0.5) {
+          this.scalVal = 0.5
+        }
+        setTimeout(() => {
+          this.scalLoading = false
+        }, 1000)
+      }
+    },
+    getUrl (item) {
+      const src = pdf.createLoadingTask({ url: item, CMapReaderFactory })
+      return src
+    },
+    setData () {
+		this.pdfList = this.$store.state.vuex_tempData
+		this.curpage = 1
+		this.total = data.length
+    },
+    error: function (err) {
+      console.log(err)
+    },
+    // 取消
+    handleCommonCancel () {
+      this.pdfList = []
+	  uni.navigateBack()
+    },
+    // 截图
+    handleCapture (type) {
+      if (this.scalLoading) { return }
+      const pdf = this.$refs.pdf
+      const len = pdf.length
+      const imgsList = []
+      const canvas = document.createElement('canvas')
+      let maxHeight = 0
+      const maxWidth = pdf[0].$refs.canvas.width
+      for (let i = 0; i < len; i++) {
+        const imgs = pdf[i].$refs.canvas
+        maxHeight = maxHeight + imgs.height
+        imgsList.push(imgs)
+      }
+      // 设置画布宽度和高度
+      canvas.width = maxWidth
+      canvas.height = maxHeight
+      const ctx = canvas.getContext('2d')
+      // 开始合并
+      let y = 0
+      imgsList.map(item => {
+        ctx.drawImage(item, 0, y, item.width, item.height)
+        y = y + item.height
+      })
+      const base64Str = canvas.toDataURL('image/png')
+      // 复制图片
+      if (type == 'copy') {
+        this.copyImgBtn(base64Str)
+      }
+      // 下载图片
+      if (type == 'export') {
+        const fileName = moment().format('YYYYMMDDHHmmss')
+        this.downloadFile(fileName, base64Str)
+      }
+      // 清除画布
+      ctx.clearRect(0, 0, maxWidth, maxHeight)
+    },
+    downloadFile (fileName, base64Data) {
+      const aLink = document.createElement('a')
+      const blob = this.convertBase64ToBlob(base64Data.split(',')[1], 'image/png')
+      const evt = document.createEvent('HTMLEvents')
+      // initEvent 不加后两个参数在FF下会报错  事件类型,是否冒泡,是否阻止浏览器的默认行为
+      evt.initEvent('click', true, true)
+      aLink.download = fileName
+      aLink.href = URL.createObjectURL(blob)
+      aLink.click()
+    },
+    // 将照片复制到剪贴版
+    copyImgBtn (base64Data) {
+      const blobInput = this.convertBase64ToBlob(base64Data.split(',')[1], 'image/png')
+      if (navigator.clipboard) {
+        const clipboardItemInput = new ClipboardItem({ 'image/png': blobInput })
+        navigator.clipboard.write([clipboardItemInput])
+        this.$message.success('截图成功,可以右键去粘贴图片!')
+      } else {
+        const image = nativeImageElectron.createFromDataURL(base64Data)
+        clipboardElectron.writeImage(image)
+        this.$message.success('截图成功,可以右键去粘贴图片!')
+      }
+    },
+    convertBase64ToBlob (base64, type) {
+      var bytes = window.atob(base64)
+      var ab = new ArrayBuffer(bytes.length)
+      var ua = new Uint8Array(ab)
+      for (var i = 0; i < bytes.length; i++) {
+        ua[i] = bytes.charCodeAt(i)
+      }
+      return new Blob([ab], { type: type })
+    }
+  },
+  watch: {
+  }
+}
+</script>
+
+<style lang="less">
+  .common-pdfView-modal{
+    background-color: #666;
+    .tools{
+      padding: 10px;
+      display: flex;
+      align-items: center;
+      border-bottom: 1px solid #eee;
+      background-color: #f8f8f8;
+      justify-content: space-between;
+      > div{
+        display: flex;
+        align-items: center;
+        >div{
+          padding: 0 10px;
+        }
+      }
+    }
+    .btn-box{
+      text-align: center;
+      margin-top: 20px;
+    }
+  }
+</style>

+ 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%;

+ 695 - 0
pages/sales/bill.vue

@@ -0,0 +1,695 @@
+<template>
+	<view class="content flex flex_column">
+		<view class="header">
+			<view class="headerList u-flex">
+				<view class="list_l">
+					<u-icon name="account" color="#00aaff" size="32"></u-icon>
+					<text>客户名称</text>
+				</view>
+				<view class="list_r u-flex">
+					<u-input v-model="customerObj.customerName" @click="goChooseCustomer" disabled placeholder="请选择客户名称" />
+					<u-icon name="arrow-right" color="#999" size="30"></u-icon>
+				</view>
+			</view>
+			<view class="headerList u-flex">
+				<view class="list_l">
+					<u-icon name="clock" color="#00aaff" size="32"></u-icon>
+					<text>对账周期</text>
+					<u-icon name="question-circle-fill" @click="tipShow = true" :color="wordColor" size="32"></u-icon>
+				</view>
+				<view class="list_r u-flex">
+					<u-input v-model="cycleName" @click="chooseCycleData" disabled placeholder="请选择对账日期" />
+					<u-icon name="arrow-right" color="#999" size="30"></u-icon>
+				</view>
+			</view>
+			<view class="statistical u-flex">
+				<view class="statisticalList">
+					<text>总单数:</text>
+					<text>{{ bill.length }}</text>
+				</view>
+				<view class="statisticalList">
+					<text>待收金额合计:</text>
+					<text>¥{{ totalPayPrice }}</text>
+				</view>
+			</view>
+		</view>
+		<view class="chooseCon"><billList ref="bill" :showCheck="true" :list="bill" @allChecked="allCheckedCallback"></billList></view>
+		<view class="footerCon u-flex">
+			<view class="f-left">
+				<u-checkbox @change="allCheckeChange" v-model="allChecked" shape="circle">{{ allChecked ? '取消全选' : '全选' }}</u-checkbox>
+			</view>
+			<view class="f-mid" @click="isDetailShow = !isDetailShow">
+				<view>
+					待收:
+					<text class="fontColor">¥{{ chooseTotalPayPrice }}</text>
+				</view>
+				<view v-if="chooseList.length > 0 && backDiscountVal">
+					折后:
+					<text class="fontColor">¥{{ backDiscountPrice }}</text>
+				</view>
+				<view class="u-flex" v-if="chooseList.length > 0">
+					<view>
+						折让:
+						<text>¥{{ Number(backDiscountVal) ? Number(backDiscountVal).toFixed(2) : 0 }}</text>
+					</view>
+					<view class="costBtn" @click="openCostShow">打折</view>
+				</view>
+			</view>
+			<view class="f-btns">
+				<u-button size="medium" @click="submitOrder" :custom-style="customBtnStyle" :loading="submitLoading" shape="circle" type="primary" hover-class="none">
+					发送对账单
+				</u-button>
+			</view>
+		</view>
+		<!-- 对账周期弹窗 -->
+		<u-popup v-model="showSearch" mode="right" width="70%">
+			<view class="tabBox">
+				<view class="tabs">
+					<view class="flex">
+						<view :class="item.val == curTab ? 'active' : 'all'" v-for="item in placeTab" :key="item.val" @click="tabChange(item)">{{ item.name }}</view>
+					</view>
+				</view>
+				<view class="flex align_center form-item-inp" style="padding: 0 30rpx;" v-if="curTab == 6">
+					<u-input clearable v-model="dateArray" disabled placeholder="请选择时间段" input-align="center" @click="showDate = true" />
+				</view>
+				<view class="form-footer-btn">
+					<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClean">重置</u-button>
+					<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 选择日期范围 -->
+		<u-calendar v-model="showDate" ref="rangeDate" @change="dateChange" mode="range"></u-calendar>
+		<!-- 打折弹窗 -->
+		<u-popup v-model="costShow" mode="center" @close="closeCost" :border-radius="20" closeable width="82%">
+			<view class="costPopup">
+				<view class="costPopupTit">{{customerObj&&customerObj.customerName||'--'}}</view>
+				<view class="costPopupCon">
+					<view class="costList">
+						<text class="label">待收金额:</text>
+						<text>¥{{ chooseTotalPayPrice }}</text>
+					</view>
+					<view class="costList u-flex">
+						<view class="label">折让金额:</view>
+						<u-input type="number" :custom-style="{color:'#ffa500'}" placeholder="请输入折让金额(最多2位小数)" v-model="discountVal" :border="true" :height="50" />
+					</view>
+					<view class="tip" v-if="discountVal*1 > chooseTotalPayPrice*1">折让金额不能大于待收金额,请重新输入</view>
+					<view class="costText">折让后金额</view>
+					<view class="costText">¥{{ settlement<0?0:settlement }}</view>
+				</view>
+				<u-button type="primary" :custom-style="customStyle"  shape="circle" @click="handleDisCount">确定</u-button>
+			</view>
+		</u-popup>
+		<!-- 对账周期弹窗 -->
+		<u-modal v-model="tipShow" :show-title="false" confirm-text="知道了">
+			<view class="slot-content"><rich-text :nodes="tipContent"></rich-text></view>
+		</u-modal>
+		<!-- 分享询问弹窗 -->
+		<u-modal v-model="shareShow" :show-cancel-button="true" :content="shareContent" @confirm="handleShare" @cancel="shareShow = false;submitLoading = false;"></u-modal>
+	</view>
+</template>
+
+<script>
+import billList from './billListComponent.vue';
+import { queryUnsettleSaleList, insert } from '@/api/verify.js';
+import getDate from '@/libs/getDate.js';
+export default {
+	components: { billList },
+	data() {
+		return {
+			customBtnStyle: {
+				//  自定义按钮样式
+				borderColor: this.$config('primaryColor'),
+				backgroundColor: this.$config('primaryColor'),
+				color: '#fff',
+				width: '180rpx'
+			},
+			wordColor: this.$config('infoColor'),
+			customStyle: {
+				borderColor: this.$config('primaryColor'),
+				backgroundColor: this.$config('primaryColor'),
+				color: '#fff'
+			},
+			allChecked: false,
+			tipShow: false,
+			discountVal: null, //折让金额
+			tipContent: `账单周期指<br>销售单的创建时间`,
+			shareContent: `是否同意发送对账单给微信好友?`,
+			placeTab: [
+				{
+					name: '今日',
+					val: '0'
+				},
+				{
+					name: '昨日',
+					val: '1'
+				},
+				{
+					name: '本周',
+					val: '2'
+				},
+
+				{
+					name: '上周',
+					val: '3'
+				},
+				{
+					name: '本月',
+					val: '4'
+				},
+				{
+					name: '上月',
+					val: '5'
+				},
+				{
+					name: '自定义',
+					val: '6'
+				},
+				{
+					name: '全部',
+					val: '7'
+				}
+			],
+			curTab: '0',
+
+			showSearch: false,
+			showDate: false,
+			costShow: false,
+
+			customerObj: {
+				customerName: null
+			},
+			cycleName: '',
+
+			params: {
+				targetSn: undefined,
+				bizBeginDate: undefined,
+				bizEndDate: undefined
+			},
+			bill: [],
+			dateArray: '',
+			chooseList: [],
+			isDetailShow: false,
+			submitLoading: false,
+			shareShow: false,
+			verifySn:'',
+			backDiscountPrice:null,
+			backDiscountVal: 0,
+			cycleNameShow:'',
+			verifyIdNum:''
+		};
+	},
+	onReady() {
+		uni.setNavigationBarColor({
+			frontColor: '#ffffff',
+			backgroundColor: this.$config('primaryColor')
+		});
+	},
+	onLoad(options) {
+		//获取对账周期默认值
+		if (uni.getStorageSync('curTab')) {
+			this.curTab = uni.getStorageSync('curTab');
+		} else {
+			let systemList = this.$store.state.vuex_systemSetList;
+			if(systemList){
+				let cycleObj = systemList.find(item => {
+					return item.remarks == 'sales_bill_period';
+				});
+				this.curTab = this.placeTab.findIndex(con => con.name == cycleObj.valueShow);
+			}
+		}
+		
+		// 获取选择客户
+		if (options && options.data) {
+			this.customerObj = JSON.parse(decodeURIComponent(options.data));
+			this.params.targetSn = this.customerObj.customerSn;
+		}
+		uni.$on('customerInfo', res => {
+			this.customerObj = res;
+			this.params.targetSn = res.customerSn;
+			this.changeTime();
+		});
+		if(this.curTab !=6 && this.curTab !=7){
+			this.cycleName = this.changeShowTime();
+		}
+	},
+	onReady() {
+		setTimeout(()=>{
+			this.changeTime();
+		},500)
+	},
+	onBackPress() {
+		if (this.showSearch) {
+			this.showSearch = false;
+		} else {
+			uni.removeStorageSync('curTab');
+			uni.removeStorageSync('chooseList');
+		}
+	},
+	onUnload() {
+		uni.removeStorageSync('curTab');
+		uni.removeStorageSync('chooseList');
+	},
+	computed: {
+		//经销商信息
+		userData() {
+			return this.$store.state.vuex_userData;
+		},
+		totalPayPrice() {
+			let totalPrice = 0;
+			for (let i = 0; i < this.bill.length; i++) {
+				this.bill[i].unsettleAmount = this.bill[i].unsettleAmount ? this.bill[i].unsettleAmount : 0;
+				totalPrice += this.bill[i].unsettleAmount;
+			}
+			return totalPrice.toFixed(2);
+		},
+		chooseTotalPayPrice() {
+			let price = 0;
+			this.chooseList.forEach(item => {
+				item.unsettleAmount = item.unsettleAmount ? item.unsettleAmount : 0;
+				price += item.unsettleAmount;
+			});
+			return price.toFixed(2);
+		},
+		settlement() {
+			let totalPrice=this.chooseTotalPayPrice?this.chooseTotalPayPrice:0;
+			let discountPrice=this.discountVal?this.discountVal:0
+			let priceNum=totalPrice - discountPrice;
+			const ret = priceNum.toFixed(2)
+			return Number(this.chooseTotalPayPrice)>=Number(this.backDiscountVal) ? ret : 0
+		}
+	},
+	methods: {
+		closeCost(){
+			this.costShow = false
+		},
+		chooseCycleData() {
+			uni.setStorageSync('chooseList', this.chooseList);
+			this.showSearch = true;
+		},
+		handleClean() {
+			this.showSearch = false;
+			// 清空选择周期时组件值
+			this.$refs.rangeDate.init();
+			let systemList = this.$store.state.vuex_systemSetList;
+			let cycleObj = systemList.find(item => {
+				return item.remarks == 'sales_bill_period';
+			});
+			this.curTab = this.placeTab.findIndex(con => con.name == cycleObj.valueShow);
+			this.cycleName = this.changeShowTime();
+			this.changeTime();
+		},
+		//选择客户
+		goChooseCustomer() {
+			uni.setStorageSync('curTab', this.curTab);
+			this.jumpPage('/pages/sales/chooseCustomerBill');
+			this.allChecked = false
+		},
+		changeTime() {
+			if (this.curTab != 6 && this.curTab != 7) {
+				this.params.bizBeginDate = this.getQueryDate().beginDate;
+				this.params.bizEndDate = this.getQueryDate().endDate;
+				this.cycleName = this.changeShowTime();
+			} else if (this.curTab == 7) {
+				this.cycleName = this.placeTab[this.curTab].name;
+				this.params.bizBeginDate = undefined;
+				this.params.bizEndDate = undefined;
+			}
+			this.dateArray = '';
+			this.getList();
+		},
+		getList() {
+			const _this = this;
+			queryUnsettleSaleList(this.params).then(res => {
+				if (res.status == 200) {
+					let chooseArr = uni.getStorageSync('chooseList');
+					if (chooseArr && chooseArr.length > 0) {
+					res.data.forEach(item => {
+							const row = chooseArr.findIndex(k => k.bizSn == item.bizSn);
+							item.checked = row > -1;
+						});
+					}
+					this.bill = res.data;
+					this.$refs.bill.setData(res.data);
+					this.getChooseList()
+				}
+			});
+		},
+		getChooseList(){
+			this.chooseList=this.bill.filter(item=>item.checked);
+		},
+		// 时间  change
+		dateChange(date) {
+			this.dateArray = date.startDate + ' ~ ' + date.endDate;
+			this.params.bizBeginDate = date.startDate + ' 00:00:00';
+			this.params.bizEndDate = date.endDate + ' 23:59:59';
+			this.cycleNameShow = date.startDate + '至' + date.endDate;
+		},
+		// 更改日期格式显示
+		changeShowTime() {
+			const fun = [
+				getDate.getTodayInfo,
+				getDate.getYesterdayInfo,
+				getDate.getCurrWeekDaysInfo,
+				getDate.getLastWeekDaysInfo,
+				getDate.getCurrLastMonthDaysInfo,
+				getDate.getLastMonthDaysInfo
+			];
+			return fun[this.curTab]();
+		},
+		tabChange(data) {
+			this.curTab = data.val;
+		},
+		getQueryDate() {
+			const fun = [getDate.getToday, getDate.getYesterday, getDate.getCurrWeekDays, getDate.getLastWeekDays, getDate.getCurrLastMonthDays, getDate.getLastMonthDays];
+			return {
+				beginDate: fun[this.curTab]().starttime,
+				endDate: fun[this.curTab]().endtime
+			};
+		},
+		handleSearch() {
+			this.showSearch = false;
+			if(this.curTab == 6){
+				this.cycleName = this.cycleNameShow;
+			}else{
+				this.cycleNameShow = ''
+			}
+			this.changeTime();
+		},
+		jumpPage(url) {
+			uni.navigateTo({
+				url
+			});
+		},
+		openCostShow(){
+			this.costShow = true
+			this.discountVal = this.backDiscountVal||''
+		},
+		handleDisCount() {
+			if (this.discountVal*1 > this.chooseTotalPayPrice*1) {
+				uni.showToast({
+					title: '折让金额不能大于待收金额,请重新输入',
+					icon: 'none'
+				});
+				return;
+			}
+			let reg = /^(([1-9][0-9]*)|(([0]\.\d{1,2}|[1-9][0-9]*\.\d{1,2})))$/;
+			console.log(this.discountVal,!reg.test(this.discountVal),this.discountVal && !reg.test(this.discountVal))
+			if(this.discountVal!=0){
+				if (!reg.test(this.discountVal)) {
+					uni.showToast({
+						title: '折让金额格式不正确,请重新输入',
+						icon: 'none'
+					});
+					return;
+				}
+			}
+			this.costShow = false;
+			this.backDiscountPrice = this.settlement
+			this.backDiscountVal = Number(this.discountVal||0).toFixed(2)
+		},
+		submitOrder() {
+			//发送对账单
+			if (this.chooseList.length == 0) {
+				uni.showToast({
+					title: '请选择要发送的对账单',
+					icon: 'none'
+				});
+				return;
+			}
+			this.shareShow = true;
+			this.submitLoading = true;
+		},
+		allCheckeChange(e) {
+			this.$refs.bill.allSelect(e.value);
+			const list = this.$refs.bill.getAllData();
+			list.map(item => {
+				this.allCheckedCallback(true,item)
+			})
+			
+		},
+		// 选中事件
+		allCheckedCallback(isAllChecked, row) {
+			const has = this.chooseList.findIndex(k => k.bizSn == row.bizSn);
+			// 在已选列表中
+			if (has >= 0) {
+				// 取消选中
+				if (!row.checked) {
+					this.chooseList.splice(has, 1);
+				}
+			} else {
+				if (row.checked) {
+					this.chooseList.push(row);
+					// this.backDiscountVal = 0
+				}
+			}
+			 this.backDiscountPrice = this.settlement
+			 
+			if(Number(this.chooseTotalPayPrice)<Number(this.backDiscountVal)){
+				this.backDiscountVal = 0
+				this.discountVal = 0
+			}
+			// 是否全选
+			this.allChecked = isAllChecked;
+		},
+		// 分享图文
+		handleShare() {
+			this.submitLoading = false;
+			let verifyId = Date.now()+this.nanoid();
+			this.verifyIdNum = verifyId
+			let settlement=this.chooseTotalPayPrice - this.backDiscountVal
+			let jumpUrl = getApp().globalData.baseUrl.replace('qpls-md/','')
+			let url = jumpUrl +'dzd/index.html?' + this.userData.orgSn + '&'+verifyId;
+			if (uni.getSystemInfoSync().platform == 'ios') {
+				this.setBillOrder();
+				uni.share({
+					provider: 'weixin',
+					scene: 'WXSceneSession',
+					type: 0,
+					href: url,
+					title: this.customerObj.customerName+'的对账单',
+					summary: '共' + settlement + '元,请您查阅',
+					imageUrl: '../../static/logo.png',
+					success: (res)=> {
+						console.log('success:' + JSON.stringify(res));
+					},
+					fail: (err)=> {
+						console.log('fail:' + JSON.stringify(err));
+					}
+				});
+			} else {
+				uni.shareWithSystem({
+					summary: this.customerObj.customerName + '您好,您有一个对账单共' + settlement + '元,请您查阅',
+					href: url,
+					success:()=> {
+						this.setBillOrder();
+						console.log('调取微信列表成功,分享不一定成功')
+					},
+					fail:()=> {
+						console.log('分享失败')
+					}
+				});
+			}
+		},
+		// 生成历史对账单
+		setBillOrder(){
+			let obj = {
+				detailNum: this.chooseList.length,
+				totalAmount: this.chooseTotalPayPrice,
+				discountAmount: this.backDiscountVal || 0,
+				settleAmount: this.chooseTotalPayPrice - this.backDiscountVal ,
+				detailList: this.chooseList,
+				verifySn:this.verifyIdNum
+			};
+			let ajaxData = Object.assign(this.params, obj);
+			insert(ajaxData).then(res => {
+				this.shareShow = false;
+				if (res.status == 200) {
+					console.log('生成历史对账单成功')
+				} else {
+					uni.showToast({
+						title: res.message,
+						icon: 'none'
+					});
+				}
+			});
+		},
+		// 生成随机对账单id
+		nanoid (size = 5) {
+			let urlAlphabet ='0123456789'
+		  let id = ''
+		  let i = size
+		  while (i--) {
+		    id += urlAlphabet[(Math.random() * 10) | 0]
+		  }
+		  return id
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	width: 100%;
+	height: 100vh;
+	.header {
+		width: 100%;
+		.headerList {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 16rpx 20rpx;
+			background: #fff;
+			&:nth-child(2) {
+				border-top: 1rpx solid #e4e7ed;
+			}
+			.list_l {
+				width: 208rpx;
+				text {
+					font-size: 28rpx;
+					color: #666666;
+					margin-left: 10rpx;
+					margin-right: 10rpx;
+				}
+			}
+			.list_r {
+				width: calc(100% - 208rpx);
+			}
+		}
+
+		.statistical {
+			padding: 20rpx;
+			background: #fff;
+			margin: 10rpx 0;
+			.statisticalList {
+				&:first-child {
+					width: 210rpx;
+				}
+			}
+			text {
+				&:last-child {
+					color: $uni-color-warning;
+					font-weight: 600;
+				}
+			}
+		}
+	}
+
+	.chooseCon {
+		flex-grow: 1;
+		flex-basis: 0;
+		overflow: auto;
+		background-color: #fff;
+	}
+	.footerCon {
+		background-color: #f8f8f8;
+		padding: 10rpx 20rpx;
+		box-sizing: border-box;
+		.f-mid {
+			flex: 1;
+			color: #666;
+			font-size: 0.8rem;
+			font-weight: 600;
+			.fontColor {
+				color: $uni-color-warning;
+				vertical-align: middle;
+			}
+			.costBtn {
+				width: 70rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				text-align: center;
+				color: #fff;
+				font-size: 20rpx;
+				border-radius: 30rpx;
+				background: #999;
+				margin-left: 20rpx;
+			}
+		}
+	}
+	// 历史对账单弹窗
+	.tabBox {
+		height: 100vh;
+		.tabs {
+			flex-grow: 1;
+			overflow: auto;
+			padding: 20rpx;
+			> view {
+				flex-wrap: wrap;
+				justify-content: space-between;
+				> view {
+					width: 45%;
+					border: 1rpx solid #eee;
+					padding: 15rpx;
+					border-radius: 50rpx;
+					text-align: center;
+					margin-bottom: 15rpx;
+				}
+				.active {
+					border: 0;
+					background-color: #0485f6;
+					color: #fff;
+				}
+			}
+		}
+		.form-item-inp {
+			border-bottom: 1rpx solid #eee;
+		}
+		.form-footer-btn {
+			margin: 30upx;
+			display: flex;
+			justify-content: space-between;
+		}
+		.form-footer-btn {
+			display: flex;
+			.handle-btn {
+				font-size: 28upx;
+				margin: 0 10upx;
+				flex: 1;
+			}
+		}
+	}
+	//打折弹窗
+	.costPopup {
+		padding: 26rpx 20rpx 40rpx;
+		box-sizing: border-box;
+		.costPopupTit {
+			text-align: center;
+			font-weight: bold;
+		}
+		.costPopupCon {
+			margin-top: 40rpx;
+			.costList {
+				margin-bottom: 20rpx;
+				.label {
+					color: $uni-text-color-grey;
+				}
+			}
+			.tip {
+				color: $uni-color-error;
+				font-size: 20rpx;
+				margin-left: 140rpx;
+			}
+			.costText {
+				text-align: center;
+				color: $uni-text-color-grey;
+				font-size: 22rpx;
+				margin-top: 40rpx;
+				&:last-child {
+					font-weight: bold;
+					color: $uni-color-error;
+					font-size: 32rpx;
+					line-height: 60rpx;
+					margin-top: 0rpx;
+					margin-bottom: 50rpx;
+				}
+			}
+		}
+	}
+	.slot-content {
+		font-size: 28rpx;
+		color: $u-content-color;
+		padding: 60rpx 30rpx;
+		text-align: center;
+	}
+}
+</style>

+ 140 - 0
pages/sales/billHistory.vue

@@ -0,0 +1,140 @@
+<template>
+	<view class="content flex flex_column">
+		<view class="p-header" @click="jumpPage('/pages/sales/chooseShelf?customerSn='+(targetSn?targetSn:''))">
+			<text>{{ curCustomerName || '全部客户' }}</text>
+			<u-icon name="arrow-right"></u-icon>
+		</view>
+		<view class="p-content" v-if="billList && billList.length>0">
+			<view class="list" @click="jumpPage('/pages/sales/billHistoryDetail?billId='+item.verifySn)" v-for="(item,i) in billList" :key="i">
+				<view class="list_t u-flex u-row-between">
+					<view class="u-line-1">{{item.customer.customerName}}</view>
+					<view>¥{{toThousands(item.settleAmount||0,2)}}</view>
+				</view>
+				<view class="list_b u-flex u-row-between" >
+					<view>{{item.createDate}}</view>
+					<view class="u-flex" v-if="item.billStatus != 'UNSETTLE'">
+						<view>已付款</view>
+						<u-icon name="yifukuan" custom-prefix="iscm-icon" size="40" :color="wordColor"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view v-if="billList&&billList.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>
+		</view>
+		<view style="padding: 20upx;" v-else>
+			<u-loadmore :status="status" v-if="status=='loading'"/>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { queryPage } from '@/api/verify.js';
+	import { toThousands } from '@/libs/tools.js'
+	export default {
+		data(){
+			return {
+				toThousands,
+				wordColor:this.$config('infoColor'),
+				curCustomerName:'',
+				pageNo: 1,
+				pageSize: 10,
+				totalNum: 0,
+				status: 'loadmore',
+				noDataText: '暂无数据',
+				billList:[],
+				targetSn:undefined
+			}
+		},
+		onLoad() {
+			uni.$on('chooseShelfOk',(data)=>{
+				this.pageNo=1;
+				this.targetSn = data.customerSn ?data.customerSn :undefined
+				this.curCustomerName=data.customerName
+				this.getList();
+			})
+		},
+		onReady() {
+			setTimeout(()=>{
+				this.getList();
+			},500)
+		},
+		methods:{
+			jumpPage(url){
+				uni.navigateTo({
+					url
+				})
+			},
+			getList(){
+				let params = {targetSn:this.targetSn, pageNo: this.pageNo, pageSize: this.pageSize };
+				this.status = 'loading';
+				queryPage(params).then(res => {
+					if (res.status == 200) {
+						if (this.pageNo > 1) {
+							this.billList = this.billList.concat(res.data.list || []);
+						} else {
+							this.billList = res.data.list || [];
+						}
+						this.totalNum = res.data.count || 0;
+					} else {
+						this.billList = [];
+						this.totalNum = 0;
+						this.noDataText = res.message;
+					}
+					this.status = 'loadmore';
+				});
+			}
+		},
+		onReachBottom() {
+			if (this.billList.length < this.totalNum) {
+				this.pageNo += 1;
+				this.getList();
+			}else{
+				this.status = 'nomore'
+			}
+		},
+		onUnload(){
+			uni.$off('chooseShelfOk')
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.content {
+	height: 100vh;
+	width: 100%;
+	.p-header {
+		background-color: #fff;
+		text-align: center;
+		padding-bottom: 20rpx;
+	}
+	.p-content{
+		flex-grow: 1;
+		padding:20rpx;
+		.list{
+			width: 100%;
+			background: #ffffff;
+			padding:30rpx 20rpx;
+			border-radius: 20rpx;
+			box-sizing: border-box;
+			margin-bottom: 20rpx;
+			.list_t{
+				margin-bottom: 20rpx;
+				view{
+					&:first-child{
+						width: calc(100% - 200rpx);
+					}
+					&:last-child{
+						color:$uni-color-warning;
+					}
+				}
+			}
+			.list_b{
+				color:$uni-text-color-grey;
+				font-size: $uni-font-size-sm;
+				font-weight: 500;
+			}
+		}
+	}
+}
+</style>

+ 205 - 0
pages/sales/billHistoryDetail.vue

@@ -0,0 +1,205 @@
+<template>
+	<view class="content flex flex_column" v-if="billInfo">
+		<view class="b_head">
+			<view class="head_list">
+				<text>分享时间</text>
+				<text>{{ billInfo.createDate }}</text>
+			</view>
+			<view class="head_list" v-if="billInfo.customer">
+				<text>客户名称</text>
+				<text>{{ billInfo.customer.customerName }}</text>
+			</view>
+			<!-- <view class="head_list">
+				<text>对账周期</text>
+				<text>{{ timeInfo || '--' }}</text>
+			</view> -->
+			<view class="head_list">
+				<text>付款状态</text>
+				<text>{{ billInfo.billStatus == 'UNSETTLE' ? '未付款' : billInfo.settleStyleSnDictValue ? '已付款(' + billInfo.settleStyleSnDictValue + ')' : '已付款' }}</text>
+			</view>
+		</view>
+		<view class="b_detail">
+			<view class="detail_list u-flex">
+				<view class="detail_box">
+					<text>总单数:</text>
+					<text>{{ billInfo.detailNum }}</text>
+				</view>
+				<view class="detail_box">
+					<text>待收金额合计:</text>
+					<text>¥{{ billInfo.totalAmount ||billInfo.totalAmount == 0 ? toThousands(billInfo.totalAmount,2):'--' }}</text>
+				</view>
+			</view>
+			<view class="detail_list u-flex">
+				<view class="detail_box">
+					<text>折让金额:</text>
+					<text>¥{{ billInfo.discountAmount||billInfo.discountAmount==0? toThousands(billInfo.discountAmount,2):'--'}}</text>
+				</view>
+				<view class="detail_box">
+					<text>折让后待收金额:</text>
+					<text>¥{{ billInfo.settleAmount||billInfo.settleAmount ==0? toThousands(billInfo.settleAmount,2):'--' }}</text>
+				</view>
+			</view>
+		</view>
+		<view class="detail_con"><billList ref="billBox" :list="billArr"></billList></view>
+		<view class="footer" v-if="billInfo.billStatus == 'UNSETTLE'">
+			<u-button type="primary" :loading="btnLoading" @click="submitOrder" :custom-style="customStyle" shape="circle">再次发送对账单</u-button>
+		</view>
+		<!-- 分享询问弹窗 -->
+		<u-modal v-model="shareShow" :show-cancel-button="true" :content="shareContent" @confirm="handleShare" @cancel="shareShow = false;btnLoading = false;"></u-modal>
+	</view>
+</template>
+
+<script>
+import billList from './billListComponent.vue';
+import { findBySn, insert } from '@/api/verify.js';
+import getDate from '@/libs/getDate.js';
+import { toThousands } from '@/libs/tools.js'
+export default {
+	components: { billList },
+	data() {
+		return {
+			customStyle: {
+				backgroundColor: this.$config('primaryColor'),
+				color: '#fff',
+				verifySn: ''
+			},
+			billInfo: null,
+			billArr: [],
+			timeInfo: '',
+			btnLoading: false,
+			shareShow: false,
+			shareContent: `是否同意发送对账单给微信好友?`,
+			toThousands
+		};
+	},
+	onReady() {
+		uni.setNavigationBarColor({
+			frontColor: '#ffffff',
+			backgroundColor: this.$config('primaryColor')
+		});
+	},
+	onLoad(options) {
+		if (options && options.billId) {
+			this.verifySn = options.billId;
+			this.loadData({ verifySn: options.billId });
+		}
+	},
+	computed: {
+		//经销商信息
+		userData() {
+			return this.$store.state.vuex_userData;
+		}
+	},
+	methods: {
+		loadData(ajaxData) {
+			let that = this;
+			findBySn(ajaxData).then(res => {
+				if (res.status == 200) {
+					that.billInfo = res.data;
+					that.billArr = res.data.detailList;
+					let timeobj = getDate.editDay(res.data.bizBeginDate, res.data.bizEndDate);
+					that.timeInfo = timeobj.starttime + '~' + timeobj.endtime;
+					that.$nextTick(() => {
+						that.$refs.billBox.setData(res.data.detailList);
+					});
+				}
+			});
+		},
+		submitOrder() {
+			//发送对账单
+			this.shareShow = true;
+		},
+		// 分享图文
+		handleShare() {
+			let jumpUrl = getApp().globalData.baseUrl.replace('qpls-md/','')
+			let url = jumpUrl+'dzd/index.html?' + this.userData.orgSn + '&' + this.verifySn;
+			if (uni.getSystemInfoSync().platform == 'ios') {
+				uni.share({
+					provider: 'weixin',
+					scene: 'WXSceneSession',
+					type: 0,
+					href: url,
+					title: this.billInfo.customer.customerName + '的对账单',
+					summary: '共' + this.billInfo.settleAmount + '元,请您查阅',
+					imageUrl: '../../static/logo.png',
+					success: function(res) {
+						console.log('success:' + JSON.stringify(res));
+					},
+					fail: function(err) {
+						console.log('fail:' + JSON.stringify(err));
+					}
+				});
+			} else {
+				uni.shareWithSystem({
+					summary: this.billInfo.customer.customerName + '您好,您有一个对账单共' + this.billInfo.settleAmount + '元,请您查阅',
+					href: url,
+					success() {
+						console.log('调取微信列表成功,分享不一定成功');
+					},
+					fail() {
+						console.log('分享失败');
+					}
+				});
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	height: 100vh;
+	width: 100%;
+	.b_head {
+		background-color: #fff;
+		.head_list {
+			padding: 14rpx 20rpx;
+			border-bottom: 1rpx solid #f8f8f8;
+			text {
+				&:first-child {
+					color: $uni-text-color-grey;
+					display: inline-block;
+					width: 160rpx;
+				}
+			}
+		}
+	}
+	.b_detail {
+		margin: 6rpx 0;
+		background-color: #fff;
+		padding: 20rpx;
+		box-sizing: border-box;
+		.detail_list {
+			margin-bottom: 10rpx;
+			&:last-child {
+				margin-bottom: 0rpx;
+			}
+			.detail_box::after {
+				content: ';';
+				color: $uni-text-color-grey;
+			}
+			.detail_box {
+				text {
+					&:first-child {
+						color: $uni-text-color-grey;
+					}
+					&:last-child {
+						color: $uni-color-warning;
+						font-weight: 600;
+					}
+				}
+			}
+		}
+	}
+	.detail_con {
+		flex-grow: 1;
+		overflow: auto;
+		background-color: #fff;
+	}
+	.footer {
+		padding: 10rpx 20rpx;
+		background: #fff;
+		margin-top: 20rpx;
+	}
+}
+</style>

+ 135 - 0
pages/sales/billListComponent.vue

@@ -0,0 +1,135 @@
+<template>
+	<view class="bill-list-component">
+		<view class="chooseList u-flex" v-for="(item,index) in listData" :key="item.bizSn">
+			<view class="checkbox" v-show="showCheck"><u-checkbox v-model="item.checked" :name="item.bizSn" @change="checkChange" size="40" shape="circle"></u-checkbox></view>
+			<view class="choose_r" @click="jumpPage('/pages/sales/salesDetail?salesBillId='+item.bizSn)" >
+				<view class="u-flex u-row-between">
+					<view class="billInfo u-flex">
+						<text>{{item.bizDate.substr(0,10)}}</text>
+						<view v-if="item.bizStatusDictValue">{{item.bizStatusDictValue}}</view>
+						<view v-if="item.bizSourceTypeDictValue && item.bizSourceTypeDictValue!='自建'">{{item.bizSourceTypeDictValue}}</view>
+						<view v-if="item.distributionFlag && item.distributionFlag == 1">铺货</view>	
+					</view>
+					<view class="billOrder">{{item.bizNo}}</view>
+				</view>
+				<view class="rigth_b u-flex u-row-between">
+					<view>应收:¥{{toThousands(item.bizAmount||0,2)}}</view>
+					<view>已收:¥{{toThousands(item.settledAmount ||0,2)}}</view>
+					<view>
+						待收:
+						<text>¥{{toThousands(item.unsettleAmount||0,2)}}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view v-if="listData&&listData.length==0" @click="jumpPage('/pages/test')">
+			<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="180" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { toThousands } from '@/libs/tools.js'
+export default {
+	props: {
+		list: {
+			type: Array,
+			default: () => {
+				return [];
+			}
+		},
+		showCheck:{
+			type: Boolean,
+			default:false
+		}
+	},
+	data() {
+		return {
+			listData:[],
+			noDataText:'暂无数据',
+			toThousands
+		};
+	},
+	methods: {
+		setData(list){
+			this.listData = list
+		},
+		checkChange(e){
+			const row = this.listData.find(item => item.bizSn == e.name)
+			if(row){
+				row.checked = !row.checked
+				this.listData.splice()
+			}
+			// 判断是否全选
+			const isAllNoChecked = this.listData.filter(item => !item.checked)
+			this.$emit('allChecked',isAllNoChecked.length == 0,row)
+		},
+		// 获取所有数据
+		getAllData(){
+			return this.listData
+		},
+		// 全选
+		allSelect(val){
+			this.listData.map(item => {
+				item.checked = val
+			})
+			this.listData.splice()
+		},
+		jumpPage(url){
+			uni.navigateTo({
+				url
+			})
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.bill-list-component {
+	height: 100%;
+	.chooseList {
+		padding: 30rpx 20rpx;
+		border-bottom: 1rpx solid #e4e7ed;
+		&:last-child {
+			border-bottom: 0rpx solid #e4e7ed;
+		}
+		.checkbox {
+			width: 74rpx;
+		}
+		.choose_r {
+			flex: 1;
+			.billInfo {
+				text {
+					font-weight: 600;
+				}
+				view {
+					padding: 4rpx 10rpx;
+					text-align: center;
+					border-radius: 30rpx;
+					border: 1rpx solid #e4e7ed;
+					margin-left: 10rpx;
+					font-size: 0.7rem;
+					color: #666;
+				}
+			}
+			.billOrder {
+				font-size: 0.8rem;
+				color: #666;
+			}
+			.rigth_b {
+				color: #666;
+				font-size: 0.8rem;
+				margin-top: 20rpx;
+				view {
+					&:last-child {
+						color: #333;
+						text {
+							color: #f0ad4e;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 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
 				})
 			},
 			// 搜索品牌

+ 311 - 0
pages/sales/chooseCustomerBill.vue

@@ -0,0 +1,311 @@
+<template>
+	<view class="content flex flex_column">
+		<view id="tab">
+			<view class="header u-flex">
+				<view class="tab">
+					<u-tabs :show-bar="false" :active-item-style="activeItemStyle" :list="tabsList" :is-scroll="false" :current="params.allCustomerFlag" @change="changeTabs"></u-tabs>
+				</view>
+				<view class="payType u-flex" @click="gatherShow = true">
+					<view class="u-line-1" v-if="!payTypeWord" :style="{ color: wordColor }">收款方式</view>
+					<view class="u-line-1" v-else :style="{ color: $config('primaryColor') }">{{payTypeWord}}</view>
+					<u-icon name="shaixuan" custom-prefix="iscm-icon" size="30" :color="wordColor"></u-icon>
+				</view>
+			</view>
+			<view class="scroll-con u-flex u-row-between" v-show="params.allCustomerFlag == 0">
+				<scroll-view scroll-x class="scroll-date">
+					<view class="u-flex" v-show="!showType">
+						<view v-for="(item, i) in dayGatherArr" :key="i">
+							<view class="scroll-box" :class="chooseNum == i ? 'activeBox' : ''" v-if="i < 2" @click="handleDate(i)">
+								<view>{{item}}</view>
+								<view>{{i==0?'今日':'昨日'}}</view>
+							</view>
+							<view class="scroll-box" v-else :class="chooseNum == i ? 'activeBox' : ''" @click="handleDate(i)">{{item.split('.')[1]}}</view>
+						</view>
+					</view>
+					<view class="u-flex" v-show="showType">
+						<view v-for="(con, j) in monthGatherArr" :key="j">
+							<view class="scroll-box" :class="chooseNum == j ? 'activeBox' : ''" v-if="j < 2" @click="handleDate(j)">
+								<view>{{con}}</view>
+								<view>{{j==0?'本月':'上月'}}</view>
+							</view>
+							<view class="scroll-box" v-else :class="chooseNum == j ? 'activeBox' : ''" @click="handleDate(j)">{{con}}</view>
+						</view>
+					</view>
+				</scroll-view>
+				<u-image :src="`../../static/${theme}/navIcon/dayImg.png`" width="42" height="42" v-show="!showType" @click="chooseType"></u-image>
+				<u-image :src="`../../static/${theme}/navIcon/monthImg.png`" width="42" height="42" v-show="showType" @click="chooseType"></u-image>
+			</view>
+			<view class="customer-search" v-show="params.allCustomerFlag == 1">
+				<!-- <u-search 
+					v-model="keyword"
+					@input="$u.debounce(getSearchCon, 800)"
+					@search="getSearchCon"
+					@custom="getSearchCon"
+					@clear="clearSearch"
+					:show-action="false"
+					placeholder="请输入客户名称/拼音首字母查询"
+				></u-search> -->
+				<view class="searchInput u-flex u-row-between">
+					<icon type="search" color="#333" @click="getSearchCon" size="18"/>
+					<input class="uni-input" placeholder="请输入客户名称/拼音首字母查询" :value="keyword" @input="clearInput"/>
+					<icon type="clear" :style="{'opacity':isGobleSearch?1:0}" @click="$delayDel(clearSearch)" size="18"/>
+				</view>
+			</view>
+		</view>
+		<view class="customer-con">
+			<customerList ref="customer" :height="listHeight" :params="params" ></customerList>
+		</view>
+		<!-- 收款方式弹窗 -->
+		<search :showModal="gatherShow" @refresh="refreshList" @close="gatherShow=false"/>
+	</view>
+	
+</template>
+
+<script>
+import search from './gather.vue'
+import customerList from './customerList.vue'
+import { queryVerifySalesParams } from '@/api/dealerBizParam.js';
+import getDate from '@/libs/getDate.js';
+export default {
+	components:{search,customerList},
+	data() {
+		return {
+			tabsList: [
+				{
+					name: '最近开单'
+				},
+				{
+					name: '全部客户'
+				}
+			],
+			isGobleSearch:false,
+			payTypeWord:null,
+			activeItemStyle: {
+				color: this.$config('primaryColor'),
+				borderBottom: '4rpx solid ' + this.$config('primaryColor')
+			},
+			wordColor: this.$config('infoColor'),
+			theme: '',
+			showType: false,
+			
+			chooseNum: 0,
+			
+			keyword:'',
+			gatherShow:false,
+			params:{
+				allCustomerFlag:0 ,//1全部  0需要查询条件
+				customer:{
+					queryWord:undefined,
+					settleStyleSn:undefined
+				},
+				bizBeginDate:undefined,
+				bizEndDate:undefined
+			},
+			pageNo:1,
+			pageSize:15,
+			noDataText: '暂无数据',
+			listHeight:200,
+			dayGatherArr:[],
+			monthGatherArr:[]
+		};
+	},
+	onReady() {
+		uni.setNavigationBarColor({
+			frontColor: '#ffffff',
+			backgroundColor: this.$config('primaryColor')
+		});
+		const query = uni.createSelectorQuery().in(this);
+		query.select('#tab').boundingClientRect(data => {
+		  this.listHeight = Math.floor(data.height)
+		}).exec();
+	},
+	onNavigationBarButtonTap() {
+		uni.navigateTo({
+			url: '/pages/sales/billHistory'
+		});
+	},
+	onLoad() {
+		this.theme = getApp().globalData.theme;
+		this.getSetInfo();
+		//获取日期集合
+		this.dayGatherArr = getDate.getWeekGather();
+		this.monthGatherArr = getDate.getMonthGather();
+	},
+	onBackPress() {
+		if(this.gatherShow){
+			this.gatherShow = false
+		}else{
+			uni.removeStorageSync('curTab')
+		}
+	},
+	onUnload() {
+		uni.removeStorageSync('curTab')
+	},
+	methods: {
+		//获取系统参数
+		getSetInfo(){
+			// month day all
+			queryVerifySalesParams({}).then(res => {
+				let result = res.data;
+				let obj=result.find(item=>{return item.remarks == 'verify_default_customer'})
+				if(obj.paramValue == 'all'){
+					this.params.allCustomerFlag = 1;
+					this.refreshList();
+				}else if(obj.paramValue == 'month'){
+					this.showType = true
+				}else{
+					this.showType = false
+				}
+				if(this.params.allCustomerFlag != 1){
+					this.momentTime(0)
+				}
+				//获取系统对账周期设置
+				this.$store.state.vuex_systemSetList = result
+			});
+		},
+		changeTabs(index) {
+			this.params.allCustomerFlag = index;
+			if(index==1){
+				this.clearTime();
+				this.$refs.customer.refash();
+			}else{
+				this.momentTime(this.chooseNum)
+				this.keyword = ''
+				this.params.customer.queryWord = ''
+			}
+		},
+		handleDate(i) {
+			this.chooseNum = i;
+			this.momentTime(i)
+		},
+		chooseType() {
+			this.chooseNum  = 0;
+			this.showType = !this.showType;
+			this.momentTime(0)
+		},
+		momentTime(pos){
+			var obj=null;
+			if(!this.showType){//日
+				 obj =getDate.getFullToday(this.dayGatherArr[pos])
+			}else{
+				obj=getDate.getFullMonth(this.monthGatherArr[pos])
+			}
+			this.params.bizBeginDate = obj.starttime;
+			this.params.bizEndDate = obj.endtime;
+			this.refreshList();
+		},
+		clearInput(event) {
+		    this.keyword = event.detail.value;
+		    if (event.detail.value.length > 0) {
+		        this.isGobleSearch = true;
+		    } else {
+		        this.isGobleSearch = false;
+		    }
+			this.getSearchCon()
+		},
+		getSearchCon(){
+			this.params.customer.queryWord = this.keyword.trim();
+			this.refreshList();
+		},
+		clearSearch(){
+			this.keyword = ''
+			this.isGobleSearch = false
+			this.params.customer.queryWord = undefined
+			this.refreshList();
+		},
+		refreshList(e){
+			const _this= this
+			if(e){
+				_this.params.customer.settleStyleSn = e.code;
+				_this.payTypeWord = e.dispName
+			}
+			if(e == 'reSet'){
+				_this.params.customer.settleStyleSn= undefined;
+				_this.payTypeWord = null
+			}
+			this.$nextTick(()=>{
+				_this.$refs.customer.refash();
+			})
+		},
+		clearTime(){
+			this.params.bizBeginDate = undefined;
+			this.params.bizEndDate = undefined;
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	width: 100%;
+	height: 100vh;
+	.header {
+		position: relative;
+		background: #fff;
+		.tab {
+			width: 50%;
+			margin: 0 auto;
+		}
+		.payType {
+			position: absolute;
+			right: 18rpx;
+			max-width: 160rpx;
+			view {
+				font-size: 26rpx;
+			}
+		}
+	}
+	.scroll-con {
+		width: 100%;
+		background: #fff;
+		margin: 6rpx 0;
+		padding: 10rpx 20rpx;
+		.scroll-date {
+			width: calc(100% - 62rpx);
+			.scroll-box {
+				margin-right: 28rpx;
+				padding: 10rpx 20rpx;
+				text-align: center;
+				font-size: 26rpx;
+				view {
+					&:last-child {
+						font-size: 24rpx;
+						color: #666;
+					}
+				}
+			}
+			.activeBox {
+				font-weight: bold;
+				color: $uni-color-primary;
+				view {
+					&:last-child {
+						font-size: 24rpx;
+						color: $uni-color-primary;
+					}
+				}
+			}
+		}
+	}
+	.customer-con {
+		flex-grow: 1;
+		overflow: auto;
+		background: #fff;
+	}
+	//选择客户
+	.customer-search {
+		padding: 10rpx 20rpx;
+		background: #fff;
+		margin: 6rpx 0;
+		.searchInput{
+			padding: 12rpx 20rpx;
+			box-sizing: border-box;
+			border-radius: 38rpx;
+			background-color: rgb(242, 242, 242);
+			input{
+				width: 82%;
+				font-size: 30rpx;
+			}
+		}
+	}
+}
+</style>

+ 234 - 0
pages/sales/chooseShelf.vue

@@ -0,0 +1,234 @@
+<template>
+	<view class="moreShelfPart flex flex_column">
+		<view class="search_box u-flex u-row-between">
+			<!-- <u-search
+			placeholder="请输入客户名称/拼音首字母查询"
+			v-model="customerName" 
+			@input="$u.debounce(search, 800)"
+			@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 class="moreShelfPart-search u-flex u-row-between" :style="{width: !searchBtn? '100%' : 'calc(100% - 120rpx)'}">
+				<icon type="search" color="#333" @click="search" size="18"/>
+				<input class="uni-input" @focus="focus" @blur="blur" placeholder="请输入客户名称/拼音首字母查询" :value="customerName" @input="clearInput"/>
+				<icon type="clear" :style="{'opacity':isGobleSearch?1:0}" @click="$delayDel(clearSearch)" size="18"/>
+			</view>
+			<view @click="search" v-if="searchBtn">
+				<u-button size="mini" type="primary" :custom-style="{'color': '#fff', 'font-size': '24upx', 'background-color': '#57a3f3'}">搜索</u-button>
+			</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="index" @click="viewDetail(item)">
+					<view class="item-info uni-col-10">
+						<view class="item-name" v-if="item.customer">
+							<text>{{item.customer.customerName}}</text>
+						</view>
+					</view>
+					<view class="arrow" v-if="item.targetSn == checkedSn">
+						<u-icon name="checkbox-mark" color="#3dc50b" 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="50"></u-empty>
+				</view>
+				<view style="padding: 20upx;" v-else>
+					<u-loadmore :status="status" />
+				</view>
+			</scroll-view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { queryCustomerPage } from '@/api/verify.js';
+	export default {
+		data() {
+			return {
+				customerName: '',
+				isGobleSearch: false,
+				shelfList: [],
+				pageNo:1,
+				pageSize: 30,
+				total: 0, // 列表总数
+				noDataText: '暂无客户',
+				status: 'loading',
+				vinstatus: 'loading',
+				checkedSn: null,
+				customer:{
+					queryWord:''
+				},
+				searchBtn:false
+			}
+
+		},
+		onLoad(opts) {
+			this.checkedSn = opts.customerSn
+			this.getShelfList()
+		},
+		methods: {
+			focus(){
+				this.searchBtn=true
+			},
+			blur(){
+				this.searchBtn=false
+			},
+			clearInput: function(event) {
+			    this.customerName = event.detail.value;
+			    if (event.detail.value.length > 0) {
+			        this.isGobleSearch = true;
+			    } else {
+			        this.isGobleSearch = false;
+			    }
+				this.search()
+			},
+			clearSearch(){
+				this.customerName = ''
+				this.isGobleSearch = false;
+				this.search()
+			},
+			// change(v){
+			// 	if(v==''){
+			// 		this.clearSearch()
+			// 	}
+			// },
+			search(){
+				this.pageNo = 1
+				this.shelfList = []
+				this.customer.queryWord = this.customerName;
+				this.getShelfList()
+			},
+			// 获取客户列表
+			getShelfList(){
+				const _this = this
+				let params = {
+				    pageNo: this.pageNo,
+				    pageSize: this.pageSize,
+					allCustomerFlag: 1
+				}
+				params.customer = _this.customer
+				_this.status = 'loading'
+				queryCustomerPage(params).then(res => {
+					uni.hideLoading()
+					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 || []
+								let obj={}
+								obj.targetSn = ''
+								obj.customer={
+									customerSn: '',
+									customerName: '全部客户'
+								}
+								_this.shelfList.unshift(obj)
+							}
+							_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 = '暂无客户'
+					}else{
+						_this.status = 'loadmore'
+						_this.shelfList = []
+						_this.total = 0
+						_this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
+					}
+				})
+			},
+			// 加载更多
+			onreachBottom () {
+				if(this.shelfList.length < this.total ){
+					if(this.isGobleSearch&&this.customerName==''){
+						return
+					}
+					this.pageNo++
+					this.getShelfList()
+				}else{
+					this.status = "nomore"
+				}
+			},
+			viewDetail(item){
+				uni.$emit('chooseShelfOk',item.customer)
+				uni.navigateBack()
+			}
+		}
+	}
+</script>
+
+<style lang="less">
+	.moreShelfPart{
+		width: 100%;
+		height: 100vh;
+		padding: 0;
+		background-color: #fff;
+		.search_box{
+			padding: 12rpx 20rpx;
+			box-sizing: border-box;
+			width: 100%;
+			.moreShelfPart-search{
+				padding: 12rpx 20rpx;
+				border-radius: 40rpx;
+				background-color: rgb(242, 242, 242);
+				input{
+					width: 80%;
+					font-size: 30rpx;
+				}
+			}
+		}
+		
+		.moreShelfPart-body{
+			flex-grow: 1;
+			background-color: #fff;
+		}
+		.nav-right{
+			padding: 0 0;
+			height: calc(100vh - 110rpx);
+			box-sizing: border-box;
+			 
+			.nav-right-item{
+				padding:20upx;
+				border-bottom: 2rpx solid #f5f5f5;
+				display: flex;
+				align-items: center;
+				&:active{
+					background: #f8f8f8;
+				}
+				.arrow{
+					text-align: right;
+					padding-left: 20rpx;
+				}
+				.item-info{
+					.item-name{
+						font-size: 30upx;
+						display: flex;
+						align-items: center;
+					}
+					.item-detail{
+						margin-top: 10rpx;
+						.item-detail-text{
+							font-size: 30upx;
+							color: #9DA8B5;
+							word-break: break-all;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 151 - 0
pages/sales/customerList.vue

@@ -0,0 +1,151 @@
+<template>
+	<view class="sales-list-component">
+		<scroll-view class="sales-list-con" :scroll-top="scrollTop" :style="{ height: scrollH + 'px' }" scroll-y @scrolltolower="onreachBottom">
+			<view class="customer-list" v-for="(item, i) in listData" :key="i" @click="getDetail(item)">
+				<view class="u-line-1">{{ item.customer.customerName }}</view>
+				<view class="customer-b u-flex">
+					<view class="customer-box">
+						<text>欠款:</text>
+						<text>¥{{ Number(item.settleAmount)?Number(item.settleAmount).toFixed(2):'0.00' }}</text>
+					</view>
+					<view class="customer-box">收款方式:{{ item.customer.settleStyleSnDictValue || '--' }}</view>
+				</view>
+			</view>
+			<view v-if="listData && listData.length == 0"><u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="150" :text="noDataText" mode="list" :margin-top="100"></u-empty></view>
+			<view style="padding:20upx 0;"><u-loadmore v-if="totalNum > listData.length || status == 'loading'" :status="status" /></view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+import { queryCustomerPage } from '@/api/verify.js';
+export default {
+	props: {
+		height: {
+			// 滚动区域高度   upx
+			type: [String, Number],
+			default: 300
+		},
+		params: {
+			// 列表查询条件
+			type: Object,
+			default: () => {
+				return {};
+			}
+		}
+	},
+	data() {
+		return {
+			listData: [],
+			pageNo: 1,
+			pageSize: 15,
+			totalNum: 0,
+			status: 'loadmore',
+			noDataText: '暂无数据',
+			dataInfo: null,
+			scrollH: 300,
+			scrollTop:0
+		};
+	},
+	watch: {
+		height(a, b) {
+			const sys = uni.getSystemInfoSync();
+			if (sys.platform == 'android') {
+				this.scrollH = sys.windowHeight - a;
+			} else {
+				if (sys.safeArea.top) {
+					this.scrollH = sys.windowHeight - a + sys.statusBarHeight - 34;
+				} else {
+					this.scrollH = sys.windowHeight - a - 14;
+				}
+			}
+		}
+	},
+	methods: {
+		refash() {
+			this.listData = [];
+			this.totalNum = 0;
+			this.getList(1);
+		},
+		// 列表
+		getList(pageNo) {
+			const _this = this;
+			if (pageNo) {
+				this.pageNo = pageNo;
+			}
+			let params = Object.assign(this.params, { pageNo: this.pageNo, pageSize: this.pageSize });
+			this.status = 'loading';
+			uni.showLoading({
+				title:'加载中',
+				mask:true
+			})
+			queryCustomerPage(params).then(res => {
+				if (res.status == 200) {
+					if (this.pageNo > 1) {
+						this.listData = this.listData.concat(res.data.list || []);
+					} else {
+						this.listData = res.data.list || [];
+					}
+					this.totalNum = res.data.count || 0;
+					if (this.listData.length == res.data.count) {
+						this.status = 'nomore'
+					} else {
+						this.status = 'loadmore'
+					}
+				} else {
+					this.status = 'loadmore'
+					this.listData = []
+					this.totalNum = 0
+					this.noDataText = res.message ? res.message : '网络似乎出错了,请稍后再试'
+				}
+				uni.hideLoading();
+				this.noDataText = '暂无客户'
+				this.scrollTop = 0;
+			});
+		},
+		// scroll-view到底部加载更多
+		onreachBottom() {
+			if (this.listData.length < this.totalNum) {
+				this.pageNo += 1;
+				this.getList();
+			}else{
+				this.status = "nomore"
+			}
+		},
+		getDetail(data) {
+			if(uni.getStorageSync('curTab')){
+				uni.$emit('customerInfo',data.customer);
+				uni.navigateBack();
+			}else{
+				uni.navigateTo({
+					url: '/pages/sales/bill?data=' + encodeURIComponent(JSON.stringify(data.customer))
+				})
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.sales-list-component {
+	.sales-list-con {
+		.customer-list {
+			padding: 20rpx;
+			border-bottom: 1rpx solid #f8f8f8;
+		}
+		.customer-b {
+			margin-top: 10rpx;
+			color: #666;
+			font-size: 26rpx;
+			.customer-box {
+				width: 46%;
+				text {
+					&:last-child {
+						color: $uni-color-warning;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 130 - 0
pages/sales/gather.vue

@@ -0,0 +1,130 @@
+<template>
+	<view class="modal-box">
+		<u-popup v-model="isShow"  @close="isShow=false" mode="right" length="85%" >
+			<view class="modal-con u-flex u-flex-wrap u-row-between" :style="{height:toggle? 'auto':'180rpx'}">
+				<view class="list" :class="selectNum==i?'selectBox':''" v-for="(item,i) in list" :key="item.id" @click="handleChoole(i)">{{item.dispName}}</view>
+			</view>
+			<view class="showMore" :style="{color:$config('primaryColor')}" @click="toggle=!toggle">
+				<text>{{toggle?'收起':'更多选项'}}</text>
+				<u-icon :name="toggle?'arrow-up':'arrow-down'" :color="$config('primaryColor')" size="28"></u-icon>
+			</view>
+			<view class="form-footer-btn">
+				<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="handleSearch">查询</u-button>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import { getLookUpDatas } from '@/api/data';
+	export default{
+		props:{
+			showModal:{
+				type: Boolean,
+				default: false
+			}
+		},
+		data(){
+			return{
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				isShow:this.showModal,
+				toggle:false,
+				selectNum:-1,
+				list:[]
+			}
+		},
+		methods:{
+			getList() {
+				getLookUpDatas({
+					lookupCode: 'SETTLE_STYLE',
+					pageNo: 1,
+					pageSize: 1000
+				}).then(result => {
+					if (result && result.status == 200) {
+						this.list = result.data.list;
+					}
+				});
+			},
+			handleChoole(e){
+				if(this.selectNum == e){
+					this.selectNum = -1;
+				}else{
+					this.selectNum = e
+				}
+			},
+			handleSearch(){
+				if(this.selectNum != -1){
+					this.$emit('refresh',this.list[this.selectNum]);
+				}
+				this.isShow = false
+			},
+			handleClear(){
+				this.selectNum=-1;
+				this.isShow = false
+				this.$emit('refresh','reSet');
+			}
+		},
+		watch:{
+			//  父页面传过来的弹框状态
+			showModal (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			//  重定义的弹框状态
+			isShow (newValue, oldValue) {
+				if (!newValue) {
+					this.$emit('close')
+				}else{
+					this.getList();
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.modal-box{
+		width: 100%;
+		.modal-con{
+			padding:20upx;
+			overflow: hidden;
+			.list{
+				width: 46%;
+				text-align: center;
+				line-height: 70rpx;
+				height: 70rpx;
+				border-radius: 38rpx;
+				margin-bottom: 20rpx;
+				background:#f0f0f0;
+				font-size: 26rpx;
+			}
+			.selectBox{
+				background:#007aff;
+				color:#fff;
+			}
+		}
+		.showMore{
+			text-align: center;
+			margin-top: 30rpx;
+			text{
+				margin-right: 10rpx;
+			}
+		}
+		
+		.form-footer-btn {
+			display: flex;
+			padding: 20upx;
+			margin-top: 180upx;
+			.handle-btn {
+				font-size: 28upx;
+				margin: 0 30upx;
+				width: 100%;
+				flex: 1;
+			}
+		}
+	}
+</style>

+ 12 - 2
pages/sales/index.vue

@@ -22,7 +22,7 @@
 				</view>
 			</view>
 			<!-- 产品报价及新增销售单 -->
-			<view class="nav-cont flex align_center justify_between">
+			<view class="nav-cont flex align_center">
 				<view class="nav-item" @click="toPage('/pages/sales/productPricing')" v-if="$hasPermissions('M_productPrice_mobile')">
 					<u-image class="nav-pic" style="margin-top: 5upx;" :src="`../../static/${theme}/navIcon/price_icon.png`" width="60" height="60"></u-image>
 					<text class="nav-txt" style="margin-top: 5upx;">产品报价</text>
@@ -34,6 +34,10 @@
 				<view class="nav-item" @click="toPage('/pages/webviews/openview?title=产品查询&url=https://jgqp.51cjml.com/h5/#!/')" v-if="$hasPermissions('M_queryProduct_mobile')">
 					<u-image class="nav-pic" :src="`../../static/${theme}/navIcon/pfind.png`" width="64" height="64"></u-image>
 					<text class="nav-txt">产品查询</text>
+				</view>	
+				<view class="nav-item" @click="toPage('/pages/sales/chooseCustomerBill')" v-if="$hasPermissions('M_ARStatement_mobile')">
+					<u-image class="nav-pic" :src="`../../static/${theme}/navIcon/billImg.png`" width="64" height="64"></u-image>
+					<text class="nav-txt">应收对账单</text>
 				</view>
 			</view>
 			<!-- 销售单 -->
@@ -139,6 +143,8 @@
 			this.getListLookUp();
 			// 获取支付,收款方式
 			this.getLookUpList('SETTLE_STYLE', 'vuex_paymentTypeList');
+			// 获取单据来源
+			this.getLookUpList('SALES_SOURCE', 'vuex_salesSourceList');
 			// 获取门店审核状态
 			this.getLookUpList('XPRH_STORE_APPLY_STATUS', 'vuex_storeAuthState');
 			// 门店审核结算方式
@@ -257,7 +263,8 @@
 		}
 		.nav-cont{
 			.nav-item{
-				width: 49%;
+				flex:1;
+				margin-right: 2%;
 				border-radius: 25upx;
 				background-color: #ffffff;
 				padding: 14upx 0;
@@ -272,6 +279,9 @@
 					color: #666666;
 				}
 			}
+			.nav-item:last-child{
+				margin-right: 0 !important;
+			}
 		}
 		.sales-list{
 			.title{

+ 9 - 40
pages/sales/list.vue

@@ -6,10 +6,10 @@
 		</u-dropdown>
 		<!-- 销售单列表 -->
 		<view class="list-box">
-			<listComponent ref="salesList" :height="listHeight" :params="searchParams" />
+			<listComponent ref="salesList" :height="listHeight" :params="searchForm" />
 		</view>
 		<!-- 查询右侧弹框 -->
-		<salesSearch :openModal="openModal" :defaultParams="searchForm" @refresh="refresh" @close="openModal=false" />
+		<salesSearch ref="searchBox" :openModal="openModal" :defaultParams="searchForm" @refresh="refresh" @close="openModal=false" />
 	</view>
 </template>
 
@@ -33,7 +33,6 @@
 					billStatus: null,
 					financialStatus: null
 				},
-				searchParams: {},
 				listHeight: 200,
 				openModal: false
 			}
@@ -43,6 +42,7 @@
 		},
 		onBackPress() {
 			if(this.openModal){
+				this.$refs.searchBox.closeBox()
 				this.openModal = false
 				return true
 			}
@@ -71,50 +71,19 @@
 			// 获取查询参数 刷新列表
 			refresh(params){
 				const _this = this
-				const data = {}
-				if(this.searchForm.billStatus){
-					data.billStatus = this.searchForm.billStatus
-				}
-				if(this.searchForm.financialStatus){
-					data.financialStatus = this.searchForm.financialStatus
-				}
-				
-				if(params){
-					if(params.beginDate){
-						data.beginDate = params.beginDate
-					}
-					if(params.endDate){
-						data.endDate = params.endDate
-					}
-					if(params.buyerName){
-						data.buyerName = params.buyerName
-					}
-					if(params.salesBillNo){
-						data.salesBillNo = params.salesBillNo
-					}
-					if(params.purchaseBillNo){
-						data.purchaseBillNo = params.purchaseBillNo
-					}
-					if(params.settleStyleSn){
-						data.settleStyleSn = params.settleStyleSn
-					}
+				const data = params ? Object.assign(this.searchForm,params) :  {
+					billStatus: null,
+					financialStatus: null
 				}
-				
-				this.searchParams = data
-				this.searchParams.beginDate = data.beginDate ? (data.beginDate + ' 00:00:00') : ''
-				this.searchParams.endDate = data.endDate ? (data.endDate + ' 23:59:59') : ''
-				console.log(this.searchParams,'this.searchParams')
+				data.beginDate = data.beginDate ? (data.beginDate + ' 00:00:00') : ''
+				data.endDate = data.endDate ? (data.endDate + ' 23:59:59') : ''
+				this.searchForm = data
 				this.$nextTick(function(){
 					_this.$refs.salesList.refash()
 				})
 			},
 			// 状态  change
 			handleChange(type){
-				if(type == 'bill'){
-					this.searchParams.billStatus = this.searchForm.billStatus
-				}else if(type == 'financial'){
-					this.searchParams.financialStatus = this.searchForm.financialStatus
-				}
 				this.$refs.salesList.refash()
 			},
 			// 配送方式

+ 6 - 6
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'">
@@ -250,7 +250,7 @@
 						}
 						>view{
 							&:last-child{
-								width: 150upx;
+								width: 160upx;
 								text-align: right;
 								color: #666;
 								font-size: 26upx;

+ 133 - 79
pages/sales/orderInfoModal.vue

@@ -1,121 +1,175 @@
 <template>
 	<u-mask class="orderInfoModal" :show="isShow" :mask-click-able="false">
 		<view class="order-info-con">
+			<scroll-view scroll-y>
 			<view class="order-info-main">
-				<view>
+				<view class="order-info-list">
 					<text class="info-item-tit">销售单号:</text>
-					<text class="info-item-txt">{{infoData && infoData.salesBillNo || '--'}}</text>
+					<text class="info-item-txt">{{ (infoData && infoData.salesBillNo) || '--' }}</text>
 				</view>
-				<view>
+				<view class="order-info-list">
 					<text class="info-item-tit">客户名称:</text>
-					<text class="info-item-txt">{{infoData && infoData.buyerName || '--'}}</text>
+					<text class="info-item-txt">{{ (infoData && infoData.buyerName) || '--' }}</text>
 				</view>
-				<view>
+				<view class="order-info-list">
 					<text class="info-item-tit">客户地址:</text>
-					<text class="info-item-txt" v-if="infoData && (infoData.shippingAddressProvinceName || infoData.shippingAddressCityName || infoData.shippingAddressCountyName || infoData.shippingAddress)">
-						{{infoData.shippingAddressProvinceName || ''}}{{infoData.shippingAddressCityName || ''}}{{infoData.shippingAddressCountyName || ''}}{{infoData.shippingAddress || ''}}
+					<text
+						class="info-item-txt"
+						v-if="
+							infoData &&
+								(infoData.shippingAddressProvinceName || infoData.shippingAddressCityName || infoData.shippingAddressCountyName || infoData.shippingAddress)
+						"
+					>
+						{{ infoData.shippingAddressProvinceName || '' }}{{ infoData.shippingAddressCityName || '' }}{{ infoData.shippingAddressCountyName || ''
+						}}{{ infoData.shippingAddress || '' }}
 					</text>
 					<text class="info-item-txt" v-else>--</text>
 				</view>
-				<view>
+				<view class="order-info-list">
+					<text class="info-item-tit">{{ infoFlag ? '单据来源' : '来源' }}:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.sourceTypeDictValue) || '--' }}</text>
+				</view>
+				<view class="order-info-list">
+					<text class="info-item-tit">业务状态:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.billStatusDictValue) || '--' }}</text>
+				</view>
+				<view class="order-info-list">
+					<text class="info-item-tit">财务状态:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.financialStatusDictValue) || '--' }}</text>
+				</view>
+				<view v-if="infoFlag">
+					<view class="order-info-list">
+						<text class="info-item-tit">创建时间:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.createDate) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">审核时间:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.auditDate) || '--' }}</text>
+					</view>
+					<view class="order-info-list">
+						<text class="info-item-tit">联系人:</text>
+						<text class="info-item-txt">{{ (infoData && infoData.consigneeName) || '--' }}</text>
+					</view>
+				</view>
+					
+				<view class="order-info-list">
 					<text class="info-item-tit">联系电话:</text>
-					<text class="info-item-txt">{{infoData && infoData.consigneeTel || '--'}}</text>
+					<text class="info-item-txt">{{ (infoData && infoData.consigneeTel) || '--' }}</text>
 				</view>
-				<view>
-					<text class="info-item-tit">收款方式:</text>
-					<text class="info-item-txt">{{infoData && infoData.settleStyleSnDictValue || '--'}}</text>
+				<view class="order-info-list">
+					<text class="info-item-tit">联系手机:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.consigneeMobile) || '--' }}</text>
 				</view>
-				<view>
-					<text class="info-item-tit">制单人:</text>
-					<text class="info-item-txt">{{infoData && infoData.operatorName || '--'}}</text>
+				<view class="order-info-list" v-if="infoFlag">
+					<text class="info-item-tit">价格类型:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.priceTypeDictValue) || '--' }}</text>
 				</view>
-				<view>
-					<text class="info-item-tit">业务员:</text>
-					<text class="info-item-txt">{{infoData && infoData.salesManName || '--'}}</text>
+				<view class="order-info-list">
+					<text class="info-item-tit">收款方式:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.settleStyleSnDictValue) || '--' }}</text>
 				</view>
-				<view>
-					<text class="info-item-tit">来源:</text>
-					<text class="info-item-txt">{{infoData && infoData.salesBillSourceDictValue || '--'}}</text>
+				<view class="order-info-list" v-if="infoFlag">
+					<text class="info-item-tit">配送方式:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.dispatchTypeDictValue) || '--' }}</text>
 				</view>
-				<view>
-					<text class="info-item-tit">业务状态:</text>
-					<text class="info-item-txt">{{infoData && infoData.billStatusDictValue || '--'}}</text>
+				<view class="order-info-list">
+					<text class="info-item-tit">业务:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.salesManName) || '--' }}</text>
 				</view>
-				<view>
-					<text class="info-item-tit">财务状态:</text>
-					<text class="info-item-txt">{{infoData && infoData.financialStatusDictValue || '--'}}</text>
+				<view class="order-info-list" v-if="infoFlag">
+					<text class="info-item-tit">铺货出库:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.distributionFlag)?infoData.distributionFlag==0?'否':'是':'--' }}</text>
 				</view>
-				<view>
+				<view class="order-info-list">
 					<text class="info-item-tit">备注:</text>
-					<text class="info-item-txt">{{infoData && infoData.remarks || '--'}}</text>
+					<text class="info-item-txt">{{ (infoData && infoData.remarks) || '--' }}</text>
+				</view>
+				<view class="order-info-list">
+					<text class="info-item-tit">{{ infoFlag ? '开单人' : '制单人' }}:</text>
+					<text class="info-item-txt">{{ (infoData && infoData.operatorName) || '--' }}</text>
 				</view>
 			</view>
-			<view class="order-info-footer">
-				<view class="button-cancel" @click="isShow=false">关闭</view>
-			</view>
+			
+			</scroll-view>
+			<view class="order-info-footer"><view :class="infoFlag?'button-cancel':''" @click="isShow = false">关闭</view></view>
 		</view>
 	</u-mask>
 </template>
 
 <script>
-	export default {
-		props: {
-			openModal: { //  弹框显示状态
-				type: Boolean,
-				default: false
-			},
-			infoData: {
-				tyoe: Object,
-				default: ()=>{
-					return null
-				}
-			}
+export default {
+	props: {
+		openModal: {
+			//  弹框显示状态
+			type: Boolean,
+			default: false
 		},
-		data() {
-			return {
-				isShow: this.openModal, //  是否打开弹框
+		infoData: {
+			tyoe: Object,
+			default: () => {
+				return null;
 			}
 		},
-		methods: {},
-		watch: {
-			//  父页面传过来的弹框状态
-			openModal (newValue, oldValue) {
-				this.isShow = newValue
-			},
-			//  重定义的弹框状态
-			isShow (newValue, oldValue) {
-			  if (!newValue) {
-			    this.$emit('close')
-			  }
+		infoFlag: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			isShow: this.openModal //  是否打开弹框
+		};
+	},
+	methods: {},
+	watch: {
+		//  父页面传过来的弹框状态
+		openModal(newValue, oldValue) {
+			this.isShow = newValue;
+		},
+		//  重定义的弹框状态
+		isShow(newValue, oldValue) {
+			if (!newValue) {
+				this.$emit('close');
 			}
 		}
 	}
+};
 </script>
 
 <style lang="scss" scoped>
-	.orderInfoModal{
-		width: 100%;
-		height: 100%;
-		.order-info-con{
-			width: 78%;
-			margin: 30% auto 0;
-			background-color: #fff;
-			border-radius: 24upx;
-			.order-info-main{
-				padding: 20upx 20upx;
-				>view{
-					padding: 10upx 0;
-					border-bottom: 1upx solid #e4e7ed;
-					.info-item-tit{
-						color: #666;
-						display: inline-block;
-					}
+.orderInfoModal {
+	width: 100%;
+	height: 100%;
+	.order-info-con {
+		width: 78%;
+		margin: 30% auto 0;
+		background-color: #fff;
+		border-radius: 24upx;
+		.order-info-main {
+			padding: 20upx 20upx;
+			height:800rpx;
+			.order-info-list {
+				padding: 20upx 0;
+				border-bottom: 1upx solid #e4e7ed;
+				.info-item-tit {
+					color: #666;
+					display: inline-block;
 				}
 			}
-			.order-info-footer{
-				text-align: center;
-				padding-bottom: 20upx;
-			}
 		}
+		.order-info-footer {
+			text-align: center;
+			padding: 20upx 0;
+			text-align: center;
+			.button-cancel{
+				width:160rpx;
+				height: 68rpx;
+				line-height: 68rpx;
+				margin:auto;
+				border-radius: 38rpx;
+				border:1rpx solid #e4e7ed;
+			}
+		}	
 	}
+}
 </style>

+ 390 - 0
pages/sales/salesDetail.vue

@@ -0,0 +1,390 @@
+<template>
+	<view class="sales-edit-wrap flex flex_column">
+		<!-- 基础信息 -->
+		<view class="sales-info-con">
+			<u-section @click="infoModal=true" title="基础信息" sub-title="查看更多" :line-color="$config('primaryColor')"></u-section>
+			<view class="info-item-box">
+				<text class="info-item-tit color_6">客户名称</text>
+				<text>{{detailData && detailData.buyerName || '--'}}</text>
+			</view>
+			<view class="info-item-box">
+				<text class="info-item-tit color_6">销售单号</text>
+				<text>{{detailData && detailData.salesBillNo || '--'}}</text>
+			</view>
+		</view>
+		<!-- 产品列表 -->
+		<view class="sales-product-con">
+			<!-- 标题 -->
+			<view class="sales-product-header">
+				<u-tabs :show-bar="false" :active-item-style="activeItemStyle" :list="tabsList" :is-scroll="false" :current="current" @change="changeTabs"></u-tabs>
+			</view>
+			<view class="flex flex_column" v-show="current == 0">
+			<!-- 合计 -->
+			<view ref="salesTotal" v-if="detailData" class="sales-total-box border-b font_13 flex justify_between">
+				<view class="sales-total-con flex_1">
+					<view>
+						总款数:<text class="sales-total-num" :style="{ color: $config('warringColor') }">
+								{{ (detailData.totalCategory || detailData.totalCategory == 0) ? toThousands(detailData.totalCategory) : '--' }}</text>;
+						总数量:<text class="sales-total-num" :style="{ color: $config('warringColor') }">
+								{{ (detailData.totalQty || detailData.totalQty == 0) ? toThousands(detailData.totalQty) : '--' }}
+							</text>;
+					</view>
+					<view>
+						总售价:<text class="sales-total-num" :style="{ color: $config('warringColor') }">
+								¥{{ detailData.totalAmount || detailData.totalAmount == 0 ? toThousands(detailData.totalAmount, 2) : '--' }}
+							</text>;
+						折后总售价:<text class="sales-total-num" :style="{ color: $config('warringColor') }">
+								¥{{ detailData.discountedAmount || detailData.discountedAmount == 0 ? toThousands(detailData.discountedAmount, 2) : '--' }}
+							</text>;
+					</view>
+				</view>
+			</view>
+			<!-- 产品列表 -->
+			<view class="sales-list-box">
+				<scroll-view class="sales-list-con" :style="{height:scrollH+'upx'}" scroll-y @scrolltolower="onreachBottom">
+					<view class="sales-list-item border-b flex align_center justify_between" v-for="(item, index) in listData" :key="item.id">
+						<view class="font_13 flex_1 flex justify_between">
+							<view class="pimgs">
+								<u-image :src="item.productMainImage?item.productMainImage:`../../static/${$config('themePath')}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
+								<view v-if="item.oosFlag == 1" class="sign" :style="{backgroundColor: $config('errorColor')}">急</view>
+								<view v-if="item.price < item.cost" class="sign" :style="{backgroundColor: $config('errorColor')}">亏</view>
+								<view v-if="item.price == 0" class="sign" :style="{backgroundColor: $config('errorColor')}">赠</view>
+							</view>
+							<view class="sales-item-main flex_1">
+								<view class="sales-item-name">{{item.productName || '--'}}</view>
+								<view class="sales-item-txt">{{item.productCode || '--'}}</view>
+								<!-- <view class="sales-item-txt color_6" style="font-size: 24upx;" v-if="item.warehouseEntity&&item.warehouseEntity.name || item.warehouseLocationEntity&&item.warehouseLocationEntity.name">{{item.warehouseEntity&&item.warehouseEntity.name}} > {{item.warehouseLocationEntity&&item.warehouseLocationEntity.name}}</view> -->
+								<view class="sales-item-txt flex align_center justify_between">
+									<view class="sales-item-priceInfo">
+										<view :style="{color: $config('errorColor'), display: 'inline-block'}">¥<text style="font-size: 30upx;">{{toThousands(item.price||0, 2)}}</text></view>
+										<text style="display: inline-block;margin: 0 10upx;">X</text> 
+										<text style="font-size: 30upx;">{{toThousands(item.qty||0)}}</text>
+										<!-- {{item.productUnit}} -->
+									</view>
+									<view class="sales-item-price">¥{{item.totalAmount || item.totalAmount == 0?toThousands(item.totalAmount, 2):0}}</view>
+								</view>
+								<!-- <view class="sales-item-price" v-if="detailData&&detailData.discountAmount">折后:¥{{toThousands(item.discountedAmount||0, 2)}}</view> -->
+							</view>
+						</view>
+					</view>
+					<view v-if="listData && listData.length == 0">
+						<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="150" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+					</view>
+					<view style="padding: 20upx;" v-else>
+						<u-loadmore v-if="totalNum>listData.length || status=='loading'" :status="status" />
+					</view>
+				</scroll-view>
+			</view>
+			</view>
+			<!-- 收款记录列表 -->
+			<view class="flex flex_column" v-show="current == 1">
+			<view class="sales-list-box">
+				<scroll-view class="sales-list-con" :style="{height:scrollH+'upx'}" scroll-y>
+					<view class="sales-list-item flex align_center justify_between" v-for="(con,i) in payRecode" :key="">
+						<view class="sales-list-l">
+							<view>{{con.settleTime}}</view>
+							<view v-if="con.settleStyleSnDictValue">{{con.settleStyleSnDictValue}}</view>
+						</view>
+						<view class="sales-list-r income" >
+							{{con.settleAmount * 1 > 0?'+':'-'}}¥{{Number(con.settleAmount)?Number(con.settleAmount).toFixed(2):'0.00'}}
+						</view>
+					</view>
+					<view v-if="payRecode.length==0">
+						<u-empty :src="`/static/${$config('themePath')}/def_no_data@3x.png`" icon-size="150" :text="noDataText" mode="list" :margin-top="50"></u-empty>
+					</view>
+					<view style="padding: 20upx;" v-if="payRecode.length!=0">
+						<u-loadmore  status="nomore" />
+					</view>
+				</scroll-view>
+			</view>
+			</view>
+		</view>
+		<!-- 基础信息 -->
+		<orderInfoModal :infoFlag="true" :openModal="infoModal" :infoData="detailData" @close="infoModal=false" />
+	</view>
+</template>
+
+<script>
+	
+	import OrderInfoModal from './orderInfoModal.vue'
+	import { toThousands } from '@/libs/tools'
+	import { salesDetailList, salesDetailDel, salesDel, salesDetailBySn, salesSubmit, salesDiscount, salesDetailUpdate,queryFlowByBizSn } from '@/api/sales'
+	export default{
+		components: { OrderInfoModal },
+		data(){
+			return{
+				tabsList:[{
+					name:'产品列表'
+				},{
+					name:'收款记录'
+				}],
+				current:0,
+				activeItemStyle:{
+					color:this.$config('primaryColor'),
+					borderBottom:'4rpx solid '+this.$config('primaryColor')
+				},
+				toThousands,
+				
+				listData: [],
+				pageNo: 1,
+				pageSize: 10,
+				totalNum: 0,
+				status: 'loadmore',
+				noDataText: '暂无数据',
+				scrollH: 916,
+				
+				infoModal: false,
+				discountModal: false,
+				commonModal: false,
+				modalText: '确认要删除吗?',
+				detailData: null,  // 销售单详情
+				openProductModal: false,  // 编辑产品信息弹框是否显示
+				productData: null,  // 当前操作的产品信息
+				productInfo: null,  // 编辑产品需要的参数
+				editInfo: null,  // 添加/编辑 提交的值
+				commonType: 1,  // 公共弹框类型  1删除产品,2删除销售单,3编辑产品时库存不足
+				payRecode:[],
+				toggle:true
+			}
+		},
+		onLoad(options) {
+			if(options && options.salesBillId){
+				this.salesBillSn = options.salesBillId;
+				this.init();
+			}
+		},
+		onUnload() {
+			uni.$off('refreshEditBL')
+		},
+		watch: {
+			toggle (newValue, oldValue) {
+				this.changeScrollH()
+			}
+		},
+		methods: {
+			//获取收款记录
+			getRecodeData(pageNo){
+				if (pageNo) {
+					this.pageNo = pageNo
+				}
+				queryFlowByBizSn({bizSn: this.salesBillSn}).then(res => {
+					if (res.status == 200) {
+						this.payRecode =res.data
+					}
+			
+				})
+			},
+			changeTabs(index){
+				this.current= index
+			},
+			init(){
+				this.getList(1)
+				this.getDetail()
+				this.getRecodeData(1)
+			},
+			// 销售单详情
+			getDetail(){
+				salesDetailBySn({ salesBillSn: this.salesBillSn }).then(res => {
+					if(res.status == 200){
+						this.detailData = res.data
+					}else{
+						this.detailData = null
+					}
+					this.toggle = false
+				})
+			},
+			// 列表
+			getList(pageNo){
+				const _this = this
+				if (pageNo) {
+					this.pageNo = pageNo
+				}
+				let params = {
+					pageNo: this.pageNo,
+					pageSize: this.pageSize,
+					salesBillSn: this.salesBillSn
+				}
+				this.status = "loading"
+				salesDetailList(params).then(res => {
+					if (res.status == 200) {
+						if(res.data && res.data.list){
+							res.data.list.map(item => {
+								item.productName = item.productEntity && item.productEntity.name || item.dealerProductEntity && item.dealerProductEntity.name
+								item.productCode = item.productEntity && item.productEntity.code || item.dealerProductEntity && item.dealerProductEntity.code
+								item.productUnit = item.productEntity && item.productEntity.unit || item.dealerProductEntity && item.dealerProductEntity.unit
+							})
+							if(this.pageNo>1){
+								this.listData = this.listData.concat(res.data && res.data.list || [])
+							}else{
+								this.listData = res.data.list || []
+							}
+						}else{
+							this.listData = []
+						}
+						this.totalNum = res.data && res.data.count || 0
+					} else {
+						this.listData = []
+						this.totalNum = 0
+						this.noDataText = res.message
+					}
+					this.status = "loadmore"
+				})
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.listData.length < this.totalNum){
+					this.pageNo += 1
+					this.getList()
+					this.getRecodeData()
+				}
+			},
+			changeScrollH(){
+				const _this = this
+				uni.getSystemInfo({
+					success: function (res) {
+						const winH = res.windowHeight * 2
+						let totalH = _this.$refs.salesTotal && _this.$refs.salesTotal.$el && _this.$refs.salesTotal.$el.offsetHeight || 0
+						if(_this.toggle){
+							_this.scrollH = winH - 656 - totalH
+						}else{
+							_this.scrollH = winH - 522 - totalH
+						}
+						// if(_this.detailData&&_this.detailData.billStatus=='FINISH'){
+							_this.scrollH = _this.scrollH + 100
+						// }
+					}
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.sales-edit-wrap{
+		width: 100%;
+		.color_6{
+			color: #666;
+		}
+		.font_13{
+			font-size: 26upx;
+		}
+		.border-b{
+			border-bottom: 1px solid #e4e7ed;
+		}
+		.sales-info-con{
+			background-color: #fff;
+			margin-bottom: 6upx;
+			>view{
+				padding: 14upx 20rpx;
+				border-bottom: 1px solid #e4e7ed;
+			}
+			>view:last-child{
+				border-bottom: none;
+			}
+			.info-item-box{
+				.info-item-tit{
+					display: inline-block;
+					width: 20%;
+				}
+			}
+		}
+		.sales-product-con{
+			background-color: #fff;
+			.sales-product-header{
+				/deep/.u-tab-item{
+					border-bottom:1rpx solid #e4e7ed;
+				}
+			}
+			.sales-total-box{
+				align-items: flex-end;
+				padding: 16upx 20rpx;
+				.sales-total-con{
+					color: #666;
+					overflow: hidden;
+					view{
+						padding: 4upx 0;
+						.sales-total-num{
+							font-size: 24upx;
+							color: rgb(48, 49, 51);
+						}
+					}
+				}
+				.sales-total-btn{
+					display: inline-block;
+					margin-bottom: 6upx;
+				}
+			}
+			.sales-list-box{
+				flex-grow: 1;
+				.sales-list-con{
+					.sales-list-item{
+						padding: 20upx;
+						.pimgs{
+							margin-right: 20upx;
+							position: relative;
+							.sign{
+								position: absolute;
+								right: -2upx;
+								top: -2upx;
+								color: #fff;
+								border-radius: 50%;
+								width: 40upx;
+								height: 40upx;
+								text-align: center;
+							}
+						}
+						.sales-item-main{
+							.sales-item-name{
+								font-size: 28upx;
+								color: rgb(48, 49, 51);
+								font-weight: bold;
+								overflow: hidden;
+								text-overflow: ellipsis;
+								display: -webkit-box;
+								-webkit-box-orient: vertical;
+								-webkit-line-clamp: 1;
+							}
+							.sales-item-txt{
+								margin: 8upx 0;
+							}
+							.sales-item-price{
+								text-align: right;
+							}
+						}
+						.btn-box{
+							padding: 30upx 30upx;
+						}
+						.sales-list-l{
+							font-size: 20rpx;
+							view{
+								&:last-child{
+									font-size: 26rpx;
+									margin-top:10rpx;
+								}
+							}
+						}
+						.sales-list-r.spending{
+							color:$uni-color-error;
+						}
+						.sales-list-r.income{
+							color:$uni-color-success;
+						}
+					}
+					.sales-list-item:last-child{
+						border: none;
+					}
+				}
+			}
+		}
+		.sales-btn-box{
+			background-color: #fff;
+			padding: 12upx 50upx;
+			.handle-btn{
+				width: 47%;
+			}
+			.edit-btn{
+				width: 100%;
+			}
+		}
+	}
+</style>

+ 48 - 10
pages/sales/salesSearch.vue

@@ -19,6 +19,10 @@
 					<u-input v-model="settleStyleName" @click="settleStyleModal=true" disabled placeholder="请选择收款方式" class="form-item-inp" />
 					<u-icon v-show="settleStyleName.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearSettleStyle"></u-icon>
 				</u-form-item>
+				<u-form-item label="单据来源" prop="settleStyleSn" class="form-item">
+					<u-input v-model="sourceTypeName" @click="sourceTypeModal=true" disabled placeholder="请选择单据来源" class="form-item-inp" />
+					<u-icon v-show="sourceTypeName.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearSourceType"></u-icon>
+				</u-form-item>
 			</u-form>
 			<view class="uni-list-btns">
 				<u-button class="handle-btn" size="medium" shape="circle" hover-class="none" @click="resetForm">重置</u-button>
@@ -29,6 +33,8 @@
 		<u-calendar v-model="showDate" @change="dateChange" mode="range"></u-calendar>
 		<!-- 选择收款方式 -->
 		<u-picker v-model="settleStyleModal" @confirm="settleStyleChange" :range="settleStyleList" range-key="dispName" mode="selector"></u-picker>
+		<!-- 选择单据来源 -->
+		<u-picker v-model="sourceTypeModal" @confirm="sourceTypeChange" :range="sourceTypeList" range-key="dispName" mode="selector"></u-picker>
 	</view>
 </template>
 
@@ -71,13 +77,20 @@
 				showDate: false, // 是否显示时间弹窗
 				settleStyleName: '',
 				settleStyleModal: false,
-				settleStyleList: []
+				settleStyleList: [],
+				sourceTypeName: '',
+				sourceTypeModal: false,
+				sourceTypeList: []
 			}
 		},
 		mounted() {
-			this.init()
+			// this.init()
 		},
 		methods: {
+			closeBox(){
+				this.settleStyleModal = false
+				this.sourceTypeModal = false
+			},
 			//  初始化数据
 			init(){
 				if(this.defaultParams.beginDate && this.defaultParams.endDate){
@@ -91,10 +104,18 @@
 				this.form.salesBillNo = this.defaultParams.salesBillNo ? this.defaultParams.salesBillNo : ''
 				this.form.purchaseBillNo = this.defaultParams.purchaseBillNo ? this.defaultParams.purchaseBillNo : ''
 				this.form.settleStyleSn = this.defaultParams.settleStyleSn ? this.defaultParams.settleStyleSn : ''
+				this.form.sourceType = this.defaultParams.sourceType ? this.defaultParams.sourceType : ''
 			},
 			// 查询
 			handleSearch() {
 				let params = JSON.parse(JSON.stringify(this.form))
+				console.log(params)
+				if(!params.settleStyleSn){
+					params.settleStyleSn = ''
+				}
+				if(!params.sourceType){
+					params.sourceType = ''
+				}
 				delete params.date
 				this.$emit('refresh', params)
 				this.isShow = false
@@ -102,9 +123,12 @@
 			// 重置
 			resetForm() {
 				this.settleStyleName = ''
+				this.sourceTypeName = ''
 				this.form.beginDate = ''
 				this.form.endDate = ''
 				this.$refs.uForm.resetFields()
+				this.clearSettleStyle()
+				this.clearSourceType()
 				this.$emit('refresh', null)
 				this.isShow = false
 				this.clearTime()
@@ -119,17 +143,30 @@
 				this.form.settleStyleSn = this.settleStyleList[ind].code || undefined
 				this.settleStyleName = this.settleStyleList[ind].dispName || ''
 			},
-			// 收款方式
+			// 清空单据来源
+			clearSourceType(){
+				this.sourceTypeName = ''
+				this.form.sourceType = undefined
+			},
+			// 单据来源 change
+			sourceTypeChange(ind){
+				this.form.sourceType = this.sourceTypeList[ind].code || undefined
+				this.sourceTypeName = this.sourceTypeList[ind].dispName || ''
+			},
+			// 收款方式单据来源// 有值时,匹配对应name
 			getTypeList () {
+				console.log(this.defaultParams)
+				// 收款方式
 				this.settleStyleList = this.$store.state.vuex_paymentTypeList
-				console.log(this.settleStyleList)
-				// 收款方式有值时,匹配对应name
 				if(this.defaultParams.settleStyleSn || this.defaultParams.settleStyleSn==0){
-					this.settleStyleList.map(item => {
-						if(item.code == this.defaultParams.settleStyleSn){
-							this.settleStyleName = item.dispName
-						}
-					})
+					const s = this.settleStyleList.find(item => item.code == this.defaultParams.settleStyleSn)
+					this.settleStyleName = s ? s.dispName : ''
+				}
+				// 单据来源
+				this.sourceTypeList = this.$store.state.vuex_salesSourceList
+				if(this.defaultParams.sourceType){
+					const b = this.sourceTypeList.find(item => item.code == this.defaultParams.sourceType)
+					this.sourceTypeName = b ? b.dispName : ''
 				}
 			},
 			// 时间  change
@@ -155,6 +192,7 @@
 				if (!newValue) {
 					this.$emit('close')
 				}else{
+					this.init()
 					this.getTypeList()
 				}
 			}

+ 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;

+ 482 - 0
pages/shuntBackManage/addBackOrder.vue

@@ -0,0 +1,482 @@
+<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.vuex_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%;
 		}
 	}
 }

+ 649 - 0
pages/shuntBackManage/chooseProduct.vue

@@ -0,0 +1,649 @@
+<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;
+		flex-basis: 0;
+	 }
+	.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>

+ 247 - 0
pages/shuntBackManage/shelfList.vue

@@ -0,0 +1,247 @@
+<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
+		};
+	},
+	onReady() {
+		uni.setNavigationBarColor({
+			frontColor: '#ffffff',
+			backgroundColor: this.$config('primaryColor')
+		})
+	},
+	onLoad() {
+		this.getShelfList();
+	},
+	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')
 		},

+ 640 - 0
pages/soldOut/chooseProduct.vue

@@ -0,0 +1,640 @@
+<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;
+		flex-basis: 0;
+		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>

+ 271 - 0
pages/soldOut/shelfList.vue

@@ -0,0 +1,271 @@
+<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: ''
+				}
+			}
+		},
+		onReady() {
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
+		},
+		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>

+ 4 - 2
pages/statistics/chooseShelf.vue

@@ -10,7 +10,7 @@
 			@blur="isGobleSearch=false"
 			@custom="search" 
 			@search="search" 
-			@clear="clearSearch"
+			@clear="$delayDel(clearSearch)"
 			:action-style="{'color': '#fff', 'font-size': '24upx', 'background-color': '#57a3f3', 'border-radius': '6upx', 'padding': '12upx 0'}">
 			</u-search>
 		</view>
@@ -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 => {
@@ -133,6 +134,7 @@
 				}
 			},
 			viewDetail(item){
+				console.log('111111',item)
 				uni.$emit('chooseShelfOk',item)
 				uni.navigateBack()
 			}

+ 28 - 16
pages/statistics/index.vue

@@ -173,6 +173,7 @@
 					}
 				],
 				curTab: '4',
+				searcTab: '', // 实际查询条件
 				webView: null
 			}
 		},
@@ -199,8 +200,13 @@
 		},
 		onNavigationBarButtonTap() {
 			this.showSearch = true
+			this.curTab = this.searcTab
 		},
 		onBackPress() {
+			if(this.showDate){
+				this.showDate = false
+				return true
+			}
 			if(this.showSearch){
 				this.showSearch = false
 				return true
@@ -212,25 +218,10 @@
 				this.dateArray = date.startDate + ' ~ ' + date.endDate
 				this.queryPramas.beginDate = date.startDate + ' 00:00:00'
 				this.queryPramas.endDate = date.endDate + ' 23:59:59'
-				//#ifdef APP-PLUS
-				this.webView.setTitleNViewButtonStyle(0, {
-					"text":"\ue626 "+date.startDate.substr(5)+"至"+date.endDate.substr(5),
-					"color": "#00aaff",
-					"width": "130px"
-				});
-				//#endif
 			},
 			tabChange(data){
 				this.curTab = data.val
-				if(data.val != 6){
-					//#ifdef APP-PLUS
-					this.webView.setTitleNViewButtonStyle(0, {
-						"text":"\ue626 "+data.name,
-						"color": "#00aaff",
-						"width": "80px"
-					});
-					//#endif
-				}else{
+				if(data.val == 6){
 					this.dateArray = ''
 					this.queryPramas.beginDate = ''
 					this.queryPramas.endDate = ''
@@ -239,6 +230,7 @@
 			// 重置
 			handleClean(){
 				this.tabChange(this.placeTab[2])
+				this.searcTab = this.placeTab[2].val
 				this.$refs.rangeDate.init()
 				this.showSearch = false
 				this.getServerData()
@@ -325,6 +317,26 @@
 					  this.opts1 = this.getOpts(res.data.orderDateList)
 					  this.chartData2 = this.getFormatData(res.data.tempDateList,res.data.tempAmountList,"急送产品金额")
 					  this.opts2 = this.getOpts(res.data.tempDateList)
+					  
+					  // 不是自定义时间段
+					  if(this.curTab != 6){
+						  //#ifdef APP-PLUS
+						  this.webView.setTitleNViewButtonStyle(0, {
+						  	"text":"\ue626 "+ this.placeTab[this.curTab].name,
+						  	"color": "#00aaff",
+						  	"width": "80px"
+						  });
+						  //#endif
+					  }else{
+						  //#ifdef APP-PLUS
+						  this.webView.setTitleNViewButtonStyle(0, {
+						  	"text":"\ue626 "+this.queryPramas.beginDate.substr(5,5)+"至"+this.queryPramas.endDate.substr(5,5),
+						  	"color": "#00aaff",
+						  	"width": "130px"
+						  });
+						  //#endif
+					  }
+					  this.searcTab = this.curTab
 				  }
 			  })
 			},

+ 4 - 0
pages/stockCheck/shelfList.vue

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

+ 8 - 4
pages/userCenter/index.vue

@@ -17,12 +17,15 @@
 			</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>
 				</u-cell-item>
 				<u-cell-item icon="edit-pen" icon-size="38" :icon-style="{color:'#00aaff'}" index="1" @click="toPage(1)" title="修改密码"></u-cell-item>
+				<u-cell-item  index="1" @click="toPage(4)" title="系统参数" v-if="$hasPermissions('M_ARStatement_mobile')">
+					<u-icon slot="icon" name="xitongcanshu-05" custom-prefix="iscm-icon" size="42" color="#00aaff"></u-icon>
+				</u-cell-item>
 				<u-cell-item icon="man-delete" icon-size="38" :icon-style="{color:'#00aaff'}" index="1" @click="closeAccount" title="注销账户"></u-cell-item>
 				<u-cell-item icon="reload" icon-size="35" :icon-style="{color:'#00aaff'}" index="1" @click="resetPrint" title="重置打印机"></u-cell-item>
 			</u-cell-group>
@@ -162,7 +165,8 @@
 					'/pages/login/userAuthYs?fromPage=usercenter',
 					'/pages/userCenter/changePwd',
 					'getVersion',
-					'/pages/xtNotice/xtNotice'
+					'/pages/xtNotice/xtNotice',
+					'/pages/userCenter/setData'
 					]
 				if(index != 2){
 					uni.navigateTo({
@@ -245,7 +249,7 @@
 		.user-head{
 			display: flex;
 			align-items: center;
-			padding: 80rpx 35rpx;
+			padding: 50rpx 35rpx;
 			.user-photo{
 				flex-shrink: 0;
 				margin-right: 5rpx;
@@ -271,7 +275,7 @@
 		.user-list{
 			padding: 0 20upx;
 			> view{
-				margin: 20upx 0;
+				margin-bottom: 20upx;
 				border-radius: 15upx;
 				box-shadow: 0upx 3upx 6upx #eee;
 				overflow: hidden;

+ 182 - 0
pages/userCenter/setData.vue

@@ -0,0 +1,182 @@
+<template>
+	<view class="content">
+		<view class="tit">应收对账单</view>
+		<view class="con">
+			<u-cell-group :border="false">
+				<u-cell-item :title="item.paramName" v-for="(item, i) in systemList" :key="item.id" @click="openModal(item,i)">
+					<u-input
+						v-show="item.remarks != 'FLAG'"
+						slot="right-icon"
+						v-model="item.value"
+						disabled
+						@click="openModal(item,i)"
+						placeholder="请选择"
+						placeholder-style="text-align:right"
+						:custom-style="inputStyle"
+					/>
+					<u-switch
+						v-show="item.remarks == 'FLAG'"
+						:size="40"
+						:active-color="activeColor"
+						slot="right-icon"
+						:value="item.paramValue == 1"
+						@change="
+							status => {
+								changeSwitch(status, i);
+							}
+						"
+					></u-switch>
+				</u-cell-item>
+				<!-- <u-cell-item title="参与对账的销售单业务状态">
+					<u-input slot="right-icon" v-model="billStatus" @click="showCheckBoxModal=true" disabled placeholder="请选择参与对账的销售单业务状态" placeholder-style="text-align:right" :custom-style="inputStyle"/>
+				</u-cell-item>
+				<u-cell-item title="参与对账的销售单来源">
+					<u-input slot="right-icon" v-model="billCycle" @click="showModal=true" disabled placeholder="请选择参与对账的销售单来源" placeholder-style="text-align:right" :custom-style="inputStyle"/>
+				</u-cell-item>
+				<u-cell-item  title="铺货销售单是否参与对账">
+					<u-switch :size="40" :active-color="activeColor" slot="right-icon" v-model="checked"></u-switch>
+				</u-cell-item>
+				<u-cell-item title="对账单选择客户默认页签" :border-bottom="false">
+					<u-input slot="right-icon" v-model="billCycle" @click="showModal=true" disabled placeholder="请选择对账单客户" placeholder-style="text-align:right" :custom-style="inputStyle"/>
+				</u-cell-item> -->
+			</u-cell-group>
+		</view>
+		<!-- 类似于picker单选 -->
+		<redioPicker :showModal="showModal0" @chooseItem="chooseCycle" @close="showModal0 = false" :val="val0"  code="sales_bill_period"></redioPicker>
+		<!-- 类似于picker多选 -->
+		<checkBoxPicker :showModal="showModal1" @chooseCon="chooseStatus" @close="showModal1 = false" :val="val1" :filtrate="true" code="SALES_BILL_STATUS"></checkBoxPicker>
+		<checkBoxPicker :showModal="showModal2" @chooseCon="chooseStatus" @close="showModal2 = false" :val="val2" code="SALES_SOURCE"></checkBoxPicker>
+		<redioPicker :showModal="showModal3" @chooseItem="chooseCycle" @close="showModal3 = false" :val="val3" code="verify_default_customer"></redioPicker>
+	</view>
+</template>
+
+<script>
+import redioPicker from '@/components/customPicker/redioPicker.vue';
+import checkBoxPicker from '@/components/customPicker/checkBoxPicker.vue';
+import { queryVerifySalesParams, updateParam } from '@/api/dealerBizParam.js';
+
+export default {
+	components: {
+		redioPicker,
+		checkBoxPicker
+	},
+	data() {
+		return {
+			systemList: null,
+			showModal0: false,
+			showModal1: false,
+			showModal2: false,
+			showModal3: false,
+			siteNum:null,
+			
+			val0:undefined,
+			val1:undefined,
+			val2:undefined,
+			val3:undefined,
+			
+			inputStyle: {
+				'text-align': 'right'
+			},
+			activeColor: this.$config('primaryColor')
+		};
+	},
+	onLoad() {
+		this.getData();
+	},
+	methods: {
+		getData() {
+			queryVerifySalesParams({}).then(res => {
+				res.data.forEach(item=>{
+					if(item.valueShow && item.valueShow.indexOf(",")!=-1){
+						let arr = item.valueShow.split(',');
+						item.value = '已选' + arr.length + '项'
+					}else{
+						item.value  = item.valueShow
+					}
+				})
+				this.systemList = res.data;	
+			});
+		},
+		openModal(code,index) {
+			const newArr = ['sales_bill_period','SALES_BILL_STATUS','SALES_SOURCE','verify_default_customer']
+			newArr.forEach((con,i)=>{
+				if(code.remarks==con){
+					this['showModal' + i] = true;
+					this['val' + i] = code.paramValue;
+				}
+			})
+			//打开弹窗
+			this.siteNum=index;
+		},
+		changeSwitch(status, i) {
+			//是否参与对账单 0否 1是
+			this.systemList[i].paramValue = status ? 0 : 1;
+			let ajaxObj = {
+				id: this.systemList[i].id,
+				paramValue: this.systemList[i].paramValue
+			};
+			this.updateList(ajaxObj);
+		},
+		
+		chooseCycle(con) {
+			this.systemList[this.siteNum].value=con.dispName;
+			let ajaxObj = {
+				id: this.systemList[this.siteNum].id,
+				paramValue: con.code
+			};
+			this.updateList(ajaxObj);
+		},
+		chooseStatus(arr) {
+			this.systemList[this.siteNum].value='已选' + arr.length + '项';
+			let newArr =arr.map(item=>{
+				return item.code
+			})
+			let ajaxObj = {
+				id: this.systemList[this.siteNum].id,
+				paramValue: newArr.toString()
+			};
+			this.updateList(ajaxObj);
+		},
+		updateList(ajaxdata) {//修改系统参数
+			updateParam(ajaxdata).then(res => {
+				if (res.status == 200) {
+					uni.showToast({
+						title: res.message,
+						icon: 'success'
+					});
+					this.getData();
+				} else {
+					uni.showToast({
+						title: res.message,
+						icon: 'none'
+					});
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.content {
+	width: 100%;
+	height: 100vh;
+	.tit {
+		padding: 30rpx 20rpx 16rpx;
+	}
+	.con {
+		box-sizing: border-box;
+		width: calc(100% - 40rpx);
+		margin: 0 auto;
+		border-radius: 30rpx;
+		overflow: hidden;
+		.u-cell {
+			padding: 14rpx 26rpx;
+			color: #333;
+			/deep/.u-cell_right {
+				max-width: 40% !important;
+			}
+		}
+	}
+}
+</style>

+ 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') {

BIN
static/default/navIcon/billImg.png


BIN
static/default/navIcon/dayImg.png


BIN
static/default/navIcon/monthImg.png


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
static/iconfont/iconfont.css


BIN
static/iconfont/iconfont.ttf


BIN
static/logo.png


+ 6 - 0
store/index.js

@@ -105,13 +105,19 @@ const store = new Vuex.Store({
 		vuex_OrderAddress: {}, // 地址
 		vuex_allLookUp: [],  //  数据字典
 		vuex_paymentTypeList: [], // 收款方式
+		vuex_salesSourceList: [], // 销售单据来源
 		vuex_storeAuthState: [], // 门店审核状态
 		vuex_shelfSettleType: [], // 门店审核结算方式
 		vuex_tempPrintList:[], // 临时打印数据
 		vuex_tempData: null, // 临时数据
 		vuex_shelfOrderState: null, // 货架订单状态
+		vuex_shuntBackList:null,//调回单临时存储数据
+		vuex_systemSetList:null//对账单系统参数设置临时存储数据
 	},
 	mutations: {
+		setShuntBackList(state,val){
+			state.vuex_shuntBackList = val
+		},
 		$uStore(state, payload) {
 			// 判断是否多层级调用,state中为对象存在的情况,诸如user.info.score = 1
 			let nameArr = payload.name.split('.')

+ 11 - 0
证书/ios/ulink/apple-app-site-association

@@ -0,0 +1,11 @@
+{  
+    "applinks": {  
+        "apps": [],  
+        "details": [  
+            {  
+                "appID": "WT844B4R33.com.iscm.arrow360",  
+                "paths": [ "/ulink/*"]  
+            }  
+        ]  
+    }  
+}

BIN
证书/ios/发布证书/iscmApp_pro.mobileprovision


BIN
证书/ios/开发证书/iscmApp.mobileprovision


Некоторые файлы не были показаны из-за большого количества измененных файлов