Browse Source

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

李磊 2 năm trước cách đây
mục cha
commit
7e1529e7a0
56 tập tin đã thay đổi với 4256 bổ sung330 xóa
  1. 28 22
      .hbuilderx/launch.json
  2. 19 0
      api/dealerBizParam.js
  3. 26 0
      api/sales.js
  4. 55 0
      api/verify.js
  5. 153 0
      components/customPicker/checkBoxPicker.vue
  6. 137 0
      components/customPicker/redioPicker.vue
  7. 1 1
      config/index.js
  8. 33 0
      hybrid/html/css/common.css
  9. BIN
      hybrid/html/img/close.png
  10. BIN
      hybrid/html/img/open.png
  11. 361 0
      hybrid/html/index.html
  12. 0 0
      hybrid/html/js/axios.min.js
  13. 0 0
      hybrid/html/js/moent.min.js
  14. 51 0
      hybrid/html/js/resize.js
  15. 5 0
      hybrid/html/js/vue.min.js
  16. 246 135
      libs/getDate.js
  17. 8 0
      libs/tools.js
  18. 3 1
      main.js
  19. 17 2
      manifest.json
  20. 3 3
      package-lock.json
  21. 1 1
      package.json
  22. 61 0
      pages.json
  23. 209 0
      pages/common/pdfView.vue
  24. 695 0
      pages/sales/bill.vue
  25. 140 0
      pages/sales/billHistory.vue
  26. 205 0
      pages/sales/billHistoryDetail.vue
  27. 135 0
      pages/sales/billListComponent.vue
  28. 311 0
      pages/sales/chooseCustomerBill.vue
  29. 234 0
      pages/sales/chooseShelf.vue
  30. 151 0
      pages/sales/customerList.vue
  31. 130 0
      pages/sales/gather.vue
  32. 12 2
      pages/sales/index.vue
  33. 9 40
      pages/sales/list.vue
  34. 1 1
      pages/sales/listComponent.vue
  35. 133 79
      pages/sales/orderInfoModal.vue
  36. 390 0
      pages/sales/salesDetail.vue
  37. 48 10
      pages/sales/salesSearch.vue
  38. 1 2
      pages/shuntBackManage/addBackOrder.vue
  39. 2 1
      pages/shuntBackManage/chooseProduct.vue
  40. 4 2
      pages/shuntBackManage/shelfList.vue
  41. 1 0
      pages/soldOut/chooseProduct.vue
  42. 5 8
      pages/soldOut/shelfList.vue
  43. 2 1
      pages/statistics/chooseShelf.vue
  44. 28 16
      pages/statistics/index.vue
  45. 5 1
      pages/userCenter/index.vue
  46. 182 0
      pages/userCenter/setData.vue
  47. BIN
      static/default/navIcon/billImg.png
  48. BIN
      static/default/navIcon/dayImg.png
  49. BIN
      static/default/navIcon/monthImg.png
  50. 0 0
      static/iconfont/iconfont.css
  51. BIN
      static/iconfont/iconfont.ttf
  52. BIN
      static/logo.png
  53. 4 2
      store/index.js
  54. 11 0
      证书/ios/ulink/apple-app-site-association
  55. BIN
      证书/ios/发布证书/iscmApp_pro.mobileprovision
  56. 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'
+	  })
 }

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

+ 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.182: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>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
hybrid/html/js/axios.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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)
+}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 5 - 0
hybrid/html/js/vue.min.js


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

+ 8 - 0
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]);

+ 3 - 1
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:'预发布环境'}

+ 17 - 2
manifest.json

@@ -54,7 +54,8 @@
         },
         /* 模块配置 */
         "modules" : {
-            "Bluetooth" : {}
+            "Bluetooth" : {},
+            "Share" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -92,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隐私信息访问的许可描述
@@ -113,6 +122,12 @@
                     "system" : {
                         "__platform__" : [ "ios", "android" ]
                     }
+                },
+                "share" : {
+                    "weixin" : {
+                        "appid" : "wx1409d0e9171fc6ed",
+                        "UniversalLinks" : "https://iscm.360arrow.com/ulink/"
+                    }
                 }
             },
             "icons" : {
@@ -123,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"
   }
 }

+ 61 - 0
pages.json

@@ -50,6 +50,12 @@
 				"navigationBarTitleText": "修改密码"
 			}
 		},
+		{
+			"path": "pages/userCenter/setData",		//  我的>修改密码
+			"style": {
+				"navigationBarTitleText": "系统参数"
+			}
+		},
 		{
 			"path": "pages/xtNotice/xtNotice",		//  我的>消息
 			"style": {
@@ -367,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": {
@@ -374,6 +428,13 @@
 				"enablePullDownRefresh": false
 			}
 		},
+		{
+			"path": "pages/sales/chooseShelf",
+			"style": {
+				"navigationBarTitleText": "选择客户",
+				"enablePullDownRefresh": false
+			}
+		},
 		{
 			"path": "pages/sales/edit", // 新增销售单/编辑销售单/销售单详情
 			"style": {

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

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

+ 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()
 			},
 			// 配送方式

+ 1 - 1
pages/sales/listComponent.vue

@@ -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.sourceTypeDictValue || '--'}}</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()
 				}
 			}

+ 1 - 2
pages/shuntBackManage/addBackOrder.vue

@@ -137,9 +137,8 @@ export default {
 		_this.theme = getApp().globalData.theme;
 		_this.shelfSn = options.shelfSn;
 		_this.shelfName = options.shelfName;
-		_this.recallBillList=_this.$store.state.shuntBackList || []
+		_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+'');
 			});

+ 2 - 1
pages/shuntBackManage/chooseProduct.vue

@@ -491,7 +491,8 @@
 	.check-list{
 		padding: 0 0.8rem;
 		flex-grow: 1;
-		overflow: auto; 
+		overflow: auto;
+		flex-basis: 0;
 	 }
 	.footer-bar{
 		background-color: #f8f8f8;

+ 4 - 2
pages/shuntBackManage/shelfList.vue

@@ -66,13 +66,15 @@ export default {
 			pageSize: 20
 		};
 	},
-	onLoad() {
-		this.getShelfList();
+	onReady() {
 		uni.setNavigationBarColor({
 			frontColor: '#ffffff',
 			backgroundColor: this.$config('primaryColor')
 		})
 	},
+	onLoad() {
+		this.getShelfList();
+	},
 	methods: {
 		clearSearch() {
 			this.pageNo = 1;

+ 1 - 0
pages/soldOut/chooseProduct.vue

@@ -462,6 +462,7 @@
 	.check-list{
 		padding: 0 0.8rem;
 		flex-grow: 1;
+		flex-basis: 0;
 		overflow: auto; 
 	 }
 	.footer-bar{

+ 5 - 8
pages/soldOut/shelfList.vue

@@ -102,14 +102,11 @@
 				}
 			}
 		},
-		onLoad(opts) {
-			 uni.setNavigationBarColor({
-			 	frontColor: '#ffffff',
-			 	backgroundColor: this.$config('primaryColor')
-			 })
-		},
-		onUnload() {
-			uni.$off("setCustome")
+		onReady() {
+			uni.setNavigationBarColor({
+				frontColor: '#ffffff',
+				backgroundColor: this.$config('primaryColor')
+			})
 		},
 		onShow() {
 			this.search()

+ 2 - 1
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>
@@ -134,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
 				  }
 			  })
 			},

+ 5 - 1
pages/userCenter/index.vue

@@ -23,6 +23,9 @@
 					<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({

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

BIN
static/default/navIcon/billImg.png


BIN
static/default/navIcon/dayImg.png


BIN
static/default/navIcon/monthImg.png


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
static/iconfont/iconfont.css


BIN
static/iconfont/iconfont.ttf


BIN
static/logo.png


+ 4 - 2
store/index.js

@@ -105,16 +105,18 @@ 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, // 货架订单状态
-		shuntBackList:null
+		vuex_shuntBackList:null,//调回单临时存储数据
+		vuex_systemSetList:null//对账单系统参数设置临时存储数据
 	},
 	mutations: {
 		setShuntBackList(state,val){
-			state.shuntBackList = val
+			state.vuex_shuntBackList = val
 		},
 		$uStore(state, payload) {
 			// 判断是否多层级调用,state中为对象存在的情况,诸如user.info.score = 1

+ 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


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác