Browse Source

提交更新

caojunjie 3 years ago
parent
commit
100c0131d7
36 changed files with 1097 additions and 397 deletions
  1. 8 0
      api/views/customer/index.js
  2. 2 1
      api/views/record/index.js
  3. 9 0
      api/views/sale/collectionManagement.js
  4. 9 0
      api/views/sale/index.js
  5. 9 0
      api/views/sale/salesOrderList.js
  6. 33 0
      api/views/visit/index.js
  7. 2 2
      common/setting.js
  8. 18 12
      components/yzhua006-update/app-update.vue
  9. 3 3
      manifest.json
  10. 6 4
      package-lock.json
  11. 1 1
      package.json
  12. 29 6
      pages.json
  13. 7 7
      pages/login/login.vue
  14. 9 3
      pages/tabBar/home.vue
  15. 2 2
      pages/tabBar/record.vue
  16. 23 1
      pages/views/customer/customerDetails.vue
  17. 7 5
      pages/views/customer/index.vue
  18. 6 6
      pages/views/product/productDetails.vue
  19. 1 1
      pages/views/purchase/index.vue
  20. 1 1
      pages/views/purchase/salesOrderDetails.vue
  21. 4 4
      pages/views/purchase/salesOrderList.vue
  22. 16 13
      pages/views/purchase/selectProduct.vue
  23. 90 57
      pages/views/salesSlip/collectionManagement.vue
  24. 136 116
      pages/views/salesSlip/index.vue
  25. 75 47
      pages/views/salesSlip/salesOrderList.vue
  26. 8 5
      pages/views/salesSlip/selectProduct.vue
  27. 77 49
      pages/views/salesSlip/toBeCollectedlist.vue
  28. 85 44
      pages/views/salesSlip/toBeCollectedlistBatch.vue
  29. 4 2
      pages/views/stock/index.vue
  30. 7 5
      pages/views/supplier/index.vue
  31. 200 0
      pages/views/visit/historical0rders.vue
  32. 210 0
      pages/views/visit/visit.vue
  33. BIN
      static/certificate/distribution/tubao.keystore
  34. BIN
      static/certificate/distribution/tubaosoft.mobileprovision
  35. BIN
      static/certificate/distribution/yichepeipartsshopAppProfile.mobileprovision
  36. BIN
      static/certificate/distribution/yichepeipartsshopAppProfile.p12

+ 8 - 0
api/views/customer/index.js

@@ -7,6 +7,14 @@ export function urbanAreas(data) {
 		data
 	})
 }
+// 查询业务员
+export function gainUser(data) {
+	return http.request({
+		url: '/blade-user/client/gainUser',
+		method: 'GET',
+		data
+	})
+}
 // 查询基础资料分类
 export function customerType(data) {
 	return http.request({

+ 2 - 1
api/views/record/index.js

@@ -7,7 +7,8 @@ export function queryList(params) {
     params
   })
 }
-//查询客户率
+
+//查询客户
 export function corpAnalysis(params) {
   return http.request({
     url: '/blade-client/partsCorps/corpAnalysis',

+ 9 - 0
api/views/sale/collectionManagement.js

@@ -15,6 +15,15 @@ export function corpsDescList(params) {
     params
   })
 }
+
+// 查询业务员
+export function gainUser(data) {
+	return http.request({
+		url: '/blade-user/client/gainUser',
+		method: 'GET',
+		data
+	})
+}
 //查询待收款
 export function profitStatistics(params) {
   return http.request({

+ 9 - 0
api/views/sale/index.js

@@ -15,6 +15,15 @@ export function queryGoods(data) {
 		data
 	})
 }
+
+// 查询业务员
+export function gainUser(data) {
+	return http.request({
+		url: '/blade-user/client/gainUser',
+		method: 'GET',
+		data
+	})
+}
 // 查询商品类型
 export function queryitemType(data) {
 	return http.request({

+ 9 - 0
api/views/sale/salesOrderList.js

@@ -15,6 +15,15 @@ export function queryList(params) {
     params
   })
 }
+
+// 查询业务员
+export function gainUser(data) {
+	return http.request({
+		url: '/blade-user/client/gainUser',
+		method: 'GET',
+		data
+	})
+}
 //查询全部客户
 export function corpsDescList(params) {
   return http.request({

+ 33 - 0
api/views/visit/index.js

@@ -0,0 +1,33 @@
+import http from '@/http/api.js'
+//修改和保存
+export function typeSave(data) {
+  return http.request({
+    url: '/trade-purchase/leads/save',
+    method: 'post',
+    data
+  })
+}
+//查询个人信息
+export function getUserInfo(data) {
+  return http.request({
+    url: '/blade-user/info',
+    method: 'GET',
+    data
+  })
+}
+//查询列表
+export function queryList(params) {
+  return http.request({
+    url: '/trade-purchase/leads/list',
+    method: 'get',
+    params
+  })
+}
+//查询全部客户
+export function corpsDescList(params) {
+  return http.request({
+    url: '/blade-client/corpsdesc/corpsDescList',
+    method: 'get',
+    params
+  })
+}

+ 2 - 2
common/setting.js

@@ -9,8 +9,8 @@ module.exports = {
 	// 版本号
 	version: '1.0.0',
 	// 开发环境接口Url
-	// devUrl: 'http://192.168.1.120:1080',
-	devUrl: 'http://121.37.83.47:10004',
+	devUrl: 'http://192.168.1.120:1080',
+	// devUrl: 'http://121.37.83.47:10004',
 	// 线上环境接口Url
 	prodUrl: 'http://121.37.83.47:10004',
 	// 后端数据的接收方式application/json;charset=UTF-8或者application/x-www-form-urlencoded;charset=UTF-8

+ 18 - 12
components/yzhua006-update/app-update.vue

@@ -29,7 +29,8 @@
 							<view class="sche-bg-jindu" :style="lengthWidth">
 								<view class="sche-bg-round">
 									<text class="sche-bg-round-text" v-if="schedule">{{schedule}}%</text>
-									<text class="sche-bg-round-text" v-else>{{(downloadedSize/1024/1024).toFixed(2)}}M</text>
+									<text class="sche-bg-round-text"
+										v-else>{{(downloadedSize/1024/1024).toFixed(2)}}M</text>
 								</view>
 							</view>
 						</view>
@@ -97,7 +98,7 @@
 		},
 		methods: {
 			// 检查更新
-			update() {
+			update() {
 				if (vm.viewObj) vm.viewObj.hide() //隐藏原生遮罩
 				// console.log('父组件触发方法');
 				// #ifdef APP-PLUS
@@ -132,12 +133,12 @@
 						console.log('运行在其他设备上')
 						break;
 				}
-				vm.$u.api.getVersion({
-					packageName:'tubaosoft',
-					type:integer
-				}).then(res=>{
-					console.log(res)
+				vm.$u.api.getVersion({
+					packageName: 'tubaosoft',
+					type: integer
+				}).then(res => {
 					// 这里的返回的数据跟后台约定
+					console.log(res.data.appVersion)
 					vm.update_info = {
 						os: uni.getSystemInfoSync().platform,
 						version: res.data.appVersion.lastVersionCode, //最新版本
@@ -179,6 +180,8 @@
 						});
 						vm.viewObj.show() //显示原生遮罩
 					}
+				} else {
+					// uni.showToast({icon:'none',title:'当前已是最新版本'})
 				}
 			},
 
@@ -195,13 +198,17 @@
 				}
 			},
 			// 立即更新
-			nowUpdate() {
+			nowUpdate() {
+				if (uni.getSystemInfoSync().platform == 'ios') {
+					return plus.runtime.launchApplication({
+						action: `itms-apps://itunes.apple.com/cn/app/id${vm.update_info.download_url}`,
+					})
+				}
 				if (vm.downing) {
 					return false //如果正在下载就停止操作
 				} else {
 					vm.downing = true; //状态改变 正在下载中
 				}
-
 				if (/\.apk$/.test(vm.update_info.download_url)) {
 					// 如果是apk地址
 					vm.download_wgt() // 安装包/升级包更新
@@ -220,8 +227,7 @@
 				let options = {
 					method: "get"
 				};
-				let dtask = plus.downloader.createDownload(vm.update_info.download_url, options, function(d, status) {
-				});
+				let dtask = plus.downloader.createDownload(vm.update_info.download_url, options, function(d, status) {});
 				dtask.addEventListener("statechanged", function(task, status) {
 					if (status === null) {} else if (status == 200) {
 						//在这里打印会不停的执行,请注意,正式上线切记不要在这里打印东西///////////////////////////////////////////////////
@@ -304,7 +310,7 @@
 		top: 0;
 		left: 0;
 		right: 0;
-		bottom: 0;
+		bottom: 0;
 		height: 100%;
 		width: 100%;
 		background-color: rgba(0, 0, 0, .6);

+ 3 - 3
manifest.json

@@ -2,8 +2,8 @@
     "name" : "易车配批发精灵",
     "appid" : "__UNI__E1B82BE",
     "description" : "",
-    "versionName" : "1.0.22",
-    "versionCode" : 22,
+    "versionName" : "1.0.26",
+    "versionCode" : 26,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -65,7 +65,7 @@
                 "geolocation" : {},
                 "maps" : {
                     "amap" : {
-                        "appkey_ios" : "1af1e1cbb3fe696046620a503e7fa49a",
+                        "appkey_ios" : "dd1af6068bd4db430b7eb17fd0213cb1",
                         "appkey_android" : "057bf4ca5e561158f039b19ec46bddd3"
                     }
                 }

+ 6 - 4
package-lock.json

@@ -1,11 +1,13 @@
 {
-  "requires": true,
+  "name": "parts_shop_ui",
+  "version": "1.0.0",
   "lockfileVersion": 1,
+  "requires": true,
   "dependencies": {
     "uview-ui": {
-      "version": "2.0.34",
-      "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.34.tgz",
-      "integrity": "sha512-usJHnPCtk45yLTWTXTpLX9Vuqhzjth/+4t/m+S3J5bZuahv49mVQ126rtSnuAWWVkOUtKCX4CU83gFHZj8nP5g=="
+      "version": "2.0.35",
+      "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-2.0.35.tgz",
+      "integrity": "sha512-OfMttN3XkHvQosXfd8bjz8ASTvypPoGzBWmQZBJ871bYMCA7t2bDFPlzjbxUj/5ykAjKnZ8zMUapSwSisVt99g=="
     }
   }
 }

+ 1 - 1
package.json

@@ -4,7 +4,7 @@
   "description": "易车配批发精灵",
   "main": "main.js",
   "dependencies": {
-    "uview-ui": "^2.0.34"
+    "uview-ui": "^2.0.35"
   },
   "devDependencies": {},
   "scripts": {

+ 29 - 6
pages.json

@@ -54,6 +54,29 @@
 		}
 	}],
 	"subPackages": [{
+		"root": "pages/views",
+		"pages": [{
+			"path": "visit/visit",
+			"style": {
+				"navigationBarTitleText": "拜访",
+				"titleNView": {
+					"buttons": [{
+						"text": "\ue638",
+						"fontSrc": "/static/typeface/iconfont.ttf",
+						"fontSize": "16px",
+						"float": "right",
+						"color": "#fff"
+					}],
+					"backgroundImage": "linear-gradient(to bottom, #FD4B09, #FF6F3B)"
+				}
+			}
+		}, {
+			"path": "visit/historical0rders",
+			"style": {
+				"navigationBarTitleText": "拜访历史"
+			}
+		}]
+	},{
 		"root": "pages",
 		"pages": [{
 			"path": "user/setUp",
@@ -195,7 +218,8 @@
 			}, {
 				"path": "salesSlip/selectProduct",
 				"style": {
-					"navigationBarTitleText": "选择产品",
+					"navigationBarTitleText": "选择产品",
+					"navigationBarBackgroundColor": "#FD4B09",
 					"app-plus": {
 						"titleNView": {
 							"buttons": [{
@@ -204,15 +228,15 @@
 								"fontSize": "16px",
 								"float": "right",
 								"color": "#fff"
-							}],
-							"backgroundImage": "linear-gradient(to bottom, #FD4B09, #FF6F3B)"
+							}]
 						}
 					}
 				}
 			}, {
 				"path": "purchase/selectProduct",
 				"style": {
-					"navigationBarTitleText": "选择产品",
+					"navigationBarTitleText": "选择产品",
+					"navigationBarBackgroundColor": "#FD4B09",
 					"app-plus": {
 						"titleNView": {
 							"buttons": [{
@@ -221,8 +245,7 @@
 								"fontSize": "16px",
 								"float": "right",
 								"color": "#fff"
-							}],
-							"backgroundImage": "linear-gradient(to bottom, #FD4B09, #FF6F3B)"
+							}]
 						}
 					}
 				}

+ 7 - 7
pages/login/login.vue

@@ -42,7 +42,7 @@
 			return {
 				phone: '', //手机号码
 				pwd: '', //密码
-				// phone: '13021669111', //手机号码
+				// phone: '13021669111', //手机号码18669858069
 				// pwd: '123456', //密码
 				checked: false,
 				lifeData: {},
@@ -55,12 +55,12 @@
 			
 			
 			
-			// this.phone = uni.getStorageSync('username')
-			// this.pwd = uni.getStorageSync('password')
-			// if (uni.getStorageSync('username')) {
-			// 	this.checked = true
-			// 	this.checkedList = ['记住密码']
-			// }
+			this.phone = uni.getStorageSync('username')
+			this.pwd = uni.getStorageSync('password')
+			if (uni.getStorageSync('username')) {
+				this.checked = true
+				this.checkedList = ['记住密码']
+			}
 		},
 		methods: {
 			//忘记密码

+ 9 - 3
pages/tabBar/home.vue

@@ -83,7 +83,8 @@
 					value: "customer"
 				}, {
 					url: "../../static/images/view/home/desktop/visit.png",
-					text: "拜访记录"
+					text: "拜访记录",
+					value:"visit"
 				}, {
 					url: "../../static/images/view/home/desktop/product.png",
 					text: "产品信息",
@@ -122,12 +123,14 @@
 			}
 		},
 		mounted() {
-			this.$refs.app_update.update();
+			this.$refs.app_update.update();
+		},
+		onShow() {
 			revenueExpenditure({
 				tenantId:uni.getStorageSync('userInfo').tenant_id
 			}).then(res=>{
 				this.form = res.data
-			})
+			})
 		},
 		methods: {
 			pageJump(value) {
@@ -156,6 +159,9 @@
 					case "collectionManagement":
 						uni.$u.route('/pages/views/salesSlip/collectionManagement');
 						break;
+					case 'visit':
+						this.$u.route('/pages/views/visit/visit');
+						break
 					default:
 						this.$refs.uToast.success("该功能暂未开发~")
 				}

+ 2 - 2
pages/tabBar/record.vue

@@ -47,8 +47,8 @@
 			</view>
 			<view style="width: 40%;display: flex;display: flex;justify-content: space-around;">
 				<view>
-					<view style="font-size: 24rpx;">平均客单</view>
-					<view style="color: #FD4B09;font-size: 36rpx;">{{customerForm.averageAmount}}</view>
+					<view style="font-size: 24rpx;">平均客单</view>
+					<view style="color: #FD4B09;font-size: 36rpx;">¥{{dataForm.averageAmount}}</view>
 				</view>
 			</view>
 		</view>

+ 23 - 1
pages/views/customer/customerDetails.vue

@@ -21,6 +21,11 @@
 					</u-form-item>
 					<u-form-item label="联系电话" prop="cname" borderBottom>
 						<u-input v-model="form.tel" inputAlign="right" border="none" placeholder="请输入" />
+					</u-form-item>
+					<u-form-item label="业务员" :borderBottom="false"
+						@click="filterAll(['adminProfilesName','adminProfiles'])">
+						<u-input border="none" inputAlign="right" suffixIcon="plus-circle" disabled
+							 v-model="form.adminProfilesName" disabledColor="#ffffff" />
 					</u-form-item>
 					<u-form-item label="送货地址" :borderBottom="false"
 						@click="filterAll(['corpsAddrList','corpsAddrList'])">
@@ -164,7 +169,8 @@
 		saveChanges,
 		queryDetail,
 		removeAddr,
-		removeFile
+		removeFile,
+		gainUser
 	} from "@/api/views/customer/index.js"
 	import http from '@/http/api.js'
 	import {
@@ -403,6 +409,19 @@
 						this.show = true
 						this.mask = true
 						break;
+					case "adminProfiles":
+						uni.showLoading({
+							title: '加载中',
+							mask: true
+						});
+						gainUser().then(res => {
+							this.columns = [res.data]
+							this.dropDown = true
+							this.keyName = "name"
+							this.mask = true
+							uni.hideLoading();
+						})
+						break;
 				}
 			},
 			changeHandler(e) {
@@ -497,6 +516,9 @@
 				} else if (this.screen[1] == "corpsTypeId") {
 					this.form[this.screen[0]] = e.value[e.values.length-1].title
 					this.form[this.screen[1]] = e.value[e.values.length-1].id
+				} else if(this.screen[1] == "adminProfiles") {
+					this.form[this.screen[0]] = e.value[0].name
+					this.form[this.screen[1]] = e.value[0].id
 				} else {
 					this.formTwo[this.screen[0]] = e.value[0].cname
 					this.formTwo[this.screen[1]] = e.value[0].id

+ 7 - 5
pages/views/customer/index.vue

@@ -7,15 +7,17 @@
 			</template>
 		</u-navbar>
 		<view
-			style="background-color: #fff;padding-top: 20rpx;position: fixed;top: calc(var(--status-bar-height) + 44px);width: 100%;z-index: 10;">
-			<u-search placeholder="请输入客户名称" v-model="form.cname" @custom="custom"></u-search>
+			style="background-color: #fff;position: fixed;top: calc(var(--status-bar-height) + 44px);width: 100%;z-index: 10;">
 			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick"
 				:current="current">
 				<view slot="right" style="font-size: 15px;display: flex;">
 					<text style="margin-left: 10rpx;">|</text>
 					<u--text text="排序" margin="0rpx 15rpx" @click="sortOpen = !sortOpen,mask=!mask"></u--text>
 				</view>
-			</u-tabs>
+			</u-tabs>
+			<view style="background-color: #fff;padding: 10rpx 20rpx;">
+				<u-search placeholder="请输入客户名称" v-model="form.cname" @custom="custom"></u-search>
+			</view>
 		</view>
 		<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
 			<view style="background-color: #fff;">
@@ -236,11 +238,11 @@
 
 	.dropdown {
 		position: absolute;
-		z-index: 9;
+		z-index: 99;
 		background: rgba(0, 0, 0, .3);
 		width: 100%;
 		left: 0;
-		top: calc(var(--status-bar-height) + 130px);
+		top: calc(var(--status-bar-height) + 90px);
 		bottom: 0;
 	}
 

+ 6 - 6
pages/views/product/productDetails.vue

@@ -33,22 +33,22 @@
 							</template>
 						</u-input>
 					</u-form-item>
-					<u-form-item label="门店售价" prop="standardPrice" borderBottom>
+					<u-form-item label="售价" prop="standardPrice" borderBottom>
 						<u-input v-model="form.standardPrice" border="none" placeholder="请输入" />
 					</u-form-item>
-					<u-form-item label="批发售价" prop="wholesalePrice" borderBottom>
+					<u-form-item label="售价1" prop="wholesalePrice" borderBottom>
 						<u-input v-model="form.wholesalePrice" border="none" placeholder="请输入" />
 					</u-form-item>
-					<u-form-item label="汽修厂售价" labelWidth="160rpx" prop="repairDepotPrice" borderBottom>
+					<u-form-item label="售价2" prop="repairDepotPrice" borderBottom>
 						<u-input v-model="form.repairDepotPrice" border="none" placeholder="请输入" />
 					</u-form-item>
-					<u-form-item label="门店售价" prop="storePrice" borderBottom>
+					<u-form-item label="售价3" prop="storePrice" borderBottom>
 						<u-input v-model="form.storePrice" border="none" placeholder="请输入" />
 					</u-form-item>
-					<u-form-item label="其他" prop="price" borderBottom>
+					<u-form-item label="售价4" prop="price" borderBottom>
 						<u-input v-model="form.price" border="none" placeholder="请输入" />
 					</u-form-item>
-					<u-form-item label="进价" prop="purchasePrice" borderBottom>
+					<u-form-item label="进价" prop="purchasePrice" borderBottom>
 						<u-input v-model="form.purchasePrice" border="none" placeholder="请输入" />
 					</u-form-item>
 					<u-form-item label="标签" prop="label" borderBottom>

+ 1 - 1
pages/views/purchase/index.vue

@@ -40,7 +40,7 @@
 									{{item.cname}}
 								</view>
 								<view style="display: flex;justify-content: space-between;">
-									<view style="color: #707070;">单价:¥{{item.price}}</view>
+									<view style="color: #707070;">单价:¥{{item.purchasePrice}}</view>
 									<view style="color: #707070;">数量:{{item.storageInQuantity}}</view>
 								</view>
 								<view style="display: flex;justify-content: space-between;">

+ 1 - 1
pages/views/purchase/salesOrderDetails.vue

@@ -114,7 +114,7 @@
 										{{item.cname}}
 									</view>
 									<view style="display: flex;justify-content: space-between;">
-										<view style="color: #707070;">单价:¥{{item.price}}</view>
+										<view style="color: #707070;">单价:¥{{item.purchasePrice}}</view>
 										<view style="color: #707070;">数量:{{item.storageInQuantity}}</view>
 									</view>
 									<view style="display: flex;justify-content: space-between;">

+ 4 - 4
pages/views/purchase/salesOrderList.vue

@@ -5,10 +5,10 @@
 				<u-icon name="clock" size="40rpx" color="#fff" @click="historical0rders()"></u-icon>
 			</view> -->
 		</u-navbar>
-		<view style="background-color: #fff;">
+		<view style="background-color: #fff;position: fixed;top: calc(var(--status-bar-height) + 44px);width: 100%;z-index: 8;">
 			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick"
 				:current="current">
-				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen">
+				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen,mask = !mask">
 					<text style="margin-left: 10rpx;">|<text style="margin:0rpx 15rpx">排序</text></text>
 				</view>
 			</u-tabs>
@@ -37,7 +37,7 @@
 				</view>
 			</view>
 		</view>
-		<view class="content">
+		<view class="content" style="margin-top: 100px;">
 			<view class="contentBox" v-for="(item,index) in dataList" :key="index" @click="choice(item,index)">
 				<view style="width: 100%;margin: 0 auto;">
 					<u-cell-group :border="false">
@@ -236,7 +236,7 @@
 		align-items: flex-end;
 	}
 	.dropdown {
-		position: absolute;
+		position: fixed;
 		z-index: 9;
 		background: rgba(0, 0, 0, .3);
 		width: 100%;

+ 16 - 13
pages/views/purchase/selectProduct.vue

@@ -1,10 +1,11 @@
 <template>
 	<view class="u-wrap">
-		<u-tabs :list="tabbar" @click="click" lineColor="#FD4B09"></u-tabs>
-		<view class="u-search-box">
-			<view style="padding: 10rpx;">
-				<u-search placeholder="请输入商品名称" v-model="name" @custom="custom"></u-search>
-			</view>
+		<view class="u-search-box">
+			<u-tabs :list="tabbar" @click="click"  lineColor="#fff" :activeStyle="{ color: '#fff' }"
+					:inactiveStyle="{ color: '#ffffff80' }">></u-tabs>
+			<view style="padding: 10rpx;">
+				<u-search placeholder="请输入商品名称" :actionStyle="{ color: '#fff' }" v-model="name" @custom="custom"></u-search>
+			</view>
 		</view>
 		<view class="u-menu-wrap">
 			<view class="u-tab-view">
@@ -33,9 +34,9 @@
 										<view class="thumb-text">
 											{{itemTwo.cname}}
 										</view>
-										<view style="color: #707070;font-size: 24rpx;">参考售价:{{itemTwo.standardPrice}}
+										<view style="color: #707070;font-size: 24rpx;">进货价:{{itemTwo.purchasePrice}}
 										</view>
-										<view style="color: #707070;font-size: 24rpx;">单位:{{itemTwo.unit}}<text style="margin-left: 30rpx;">库存:{{itemTwo.stockGoods?itemTwo.stockGoods.surplusRouteQuantity:'0'}}</text></view>
+										<view style="color: #707070;font-size: 24rpx;">单位:{{itemTwo.unit}}<text style="margin-left: 30rpx;color: #FD4B09;">库存:{{itemTwo.stockGoods?itemTwo.stockGoods.surplusRouteQuantity:'0'}}</text></view>
 										<view style="color: #707070;font-size: 24rpx;">分类:{{itemTwo.goodsTypeName}}
 										</view>
 									</view>
@@ -82,7 +83,7 @@
 						<u-cell title="单价">
 							<view slot="value">
 								<u--input type='number' style="width: 165rpx;" placeholder="请输入单价" border="none"
-									inputAlign="center" v-model="form.price" clearable disabledColor="#ffffff"></u--input>
+									inputAlign="center" v-model="form.purchasePrice" clearable disabledColor="#ffffff"></u--input>
 							</view>
 						</u-cell>
 						<u-cell title="单位">
@@ -127,7 +128,7 @@
 							</view>
 							<view style="margin-top: 40rpx;color: #000;">
 								金额:<text
-									style="color: red;">¥{{form.price && form.storageInQuantity?(Number(form.price)*Number(form.storageInQuantity)).toFixed(2):'0.00'}}</text>
+									style="color: red;">¥{{form.purchasePrice && form.storageInQuantity?(Number(form.purchasePrice)*Number(form.storageInQuantity)).toFixed(2):'0.00'}}</text>
 							</view>
 						</view>
 						<view style="width: 300rpx;height: 100rpx;line-height: 100rpx;display: flex;">
@@ -194,7 +195,7 @@
 			dataList(val) {
 				this.amount = 0
 				for (let item of this.dataList) {
-					this.amount += (Number(item.price) * Number(item.storageInQuantity))
+					this.amount += (Number(item.purchasePrice) * Number(item.storageInQuantity))
 				}
 				this.amount = this.amount.toFixed(2)
 			}
@@ -289,7 +290,7 @@
 					})
 				}
 				this.show = false
-				this.form.amount = (Number(this.form.price) * Number(this.form.storageInQuantity)).toFixed(2);
+				this.form.amount = (Number(this.form.purchasePrice) * Number(this.form.storageInQuantity)).toFixed(2);
 				this.dataList.push(this.form)
 				this.dataListTwo.push(this.form)
 			},
@@ -311,7 +312,7 @@
 						position: "bottom"
 					})
 				}
-				this.form.amount = (Number(this.form.price) * Number(this.form.storageInQuantity)).toFixed(2);
+				this.form.amount = (Number(this.form.purchasePrice) * Number(this.form.storageInQuantity)).toFixed(2);
 				this.dataList.push(this.form)
 				this.dataListTwo.push(this.form)
 				let pages = getCurrentPages() // 获取当前页面栈的实例,以数组形式按栈的顺序给出,第一个元素为首页,最后一个元素为当前页面。
@@ -469,7 +470,9 @@
 	}
 
 	.u-search-box {
-		padding: 10rpx;
+		padding: 10rpx;
+		padding-top: 0;
+		background-color: #FD4B09;
 	}
 
 	.u-menu-wrap {

+ 90 - 57
pages/views/salesSlip/collectionManagement.vue

@@ -5,59 +5,59 @@
 				<u-icon name="clock" size="40rpx" color="#fff" @click="historical0rders()"></u-icon>
 			</view> -->
 		<!-- </u-navbar> -->
-		<view style="background-color: #fff;">
+		<view style="background-color: #fff;position: fixed;top: var(--window-top);width: 100%;z-index: 8;">
 			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick"
 				:current="current">
-				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen">
+				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen,mask = !mask">
 					<text style="margin-left: 10rpx;">|<text style="margin:0rpx 15rpx">排序</text></text>
 				</view>
 			</u-tabs>
 			<view style="background-color: #fff;padding: 10rpx 20rpx;">
 				<u-search placeholder="请输入客户名称" v-model="form.corpsName" @custom="custom"></u-search>
 			</view>
-			<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
-				<view style="background-color: #fff;">
-					<u-cell-group>
-						<u-cell title="客户名称" @click="sortQuery(1)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(1,form.sort == 0?'1':'0')">
-								{{form.typeSort == 1?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 1?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="销售单号" @click="sortQuery(2)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(2,form.sort == 0?'1':'0')">
-								{{form.typeSort == 2?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 2?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="金额" @click="sortQuery(3)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(3,form.sort == 0?'1':'0')">
-								{{form.typeSort == 3?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 3?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="日期" @click="sortQuery(4)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(4,form.sort == 0?'1':'0')">
-								{{form.typeSort == 4?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 4?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="提交" @click="sortQuery(5)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(5,form.sort == 0?'1':'0')">
-								{{form.typeSort == 5?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 5?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-					</u-cell-group>
-				</view>
-			</view>
+		</view>
+		<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
+			<view style="background-color: #fff;">
+				<u-cell-group>
+					<u-cell title="客户名称" @click="sortQuery(1)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(1,form.sort == 0?'1':'0')">
+							{{form.typeSort == 1?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 1?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="销售单号" @click="sortQuery(2)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(2,form.sort == 0?'1':'0')">
+							{{form.typeSort == 2?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 2?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="金额" @click="sortQuery(3)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(3,form.sort == 0?'1':'0')">
+							{{form.typeSort == 3?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 3?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="日期" @click="sortQuery(4)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(4,form.sort == 0?'1':'0')">
+							{{form.typeSort == 4?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 4?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="提交" @click="sortQuery(5)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(5,form.sort == 0?'1':'0')">
+							{{form.typeSort == 5?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 5?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+				</u-cell-group>
+			</view>
 		</view>
-		<view class="contentBox">
+		<view class="contentBox" style="margin-top: 100px;">
 			<view class="textBox">
 				<view>待收款总金额</view>
 				<view>本月增加</view>
@@ -98,7 +98,7 @@
 		<u-empty v-if="total == 0" style="position: absolute;top: 45%;left: 50%;transform:translate(-50%,-50%)"
 			mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
 		<uni-calendar ref="calendar" :insert="false" :range="true" @confirm="confirmCalendar" />
-		<u-picker :show="show" :columns="columns" keyName="cname" @cancel="show = false" @confirm="confirm"></u-picker>
+		<u-picker :show="show" :columns="columns" :keyName="keyName" @cancel="show = false" @confirm="confirm"></u-picker>
 		<u-loadmore v-if="total !== 0 && dataList.length != 0" :status="status" />
 	</view>
 </template>
@@ -107,7 +107,8 @@
 	import {
 		queryList,
 		corpsDescList,
-		profitStatistics
+		profitStatistics,
+		gainUser
 	} from '@/api/views/sale/collectionManagement.js'
 	export default {
 		data() {
@@ -119,7 +120,8 @@
 				mask: false,
 				current: 0,
 				total: 0,
-				status: 'loadmore',
+				status: 'loadmore',
+				keyName: 'cname',
 				statistics: {
 					flowAmount: "0.00",
 					month: "0.00",
@@ -144,6 +146,11 @@
 					badge: {
 						value: 0,
 					}
+				}, {
+					name: '业务员',
+					badge: {
+						value: 0,
+					}
 				}]
 			}
 		},
@@ -243,7 +250,21 @@
 						corpType: "KH"
 					}).then(res => {
 						this.columns = [res.data]
+						this.show = true
+						this.keyName = "cname"
+						uni.hideLoading();
+					})
+				} else if (item.name == "业务员") {
+					this.keyName = "name"
+					this.screen = ['sales', 'salesName']
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					});
+					gainUser().then(res => {
+						this.columns = [res.data]
 						this.show = true
+						this.mask = true
 						uni.hideLoading();
 					})
 				} else if (item.name == "全部") {
@@ -256,14 +277,27 @@
 				}
 			},
 			confirm(e) {
-				this.form = {
-					current: 1,
-					size: 20,
-					corpId: e.value[0].id
+				if (this.screen[1] == "salesName") {
+					this.form = {
+						current: 1,
+						size: 20,
+						salesName: e.value[0].id
+					}
+					this.dataList = []
+					this.query()
+					this.show = false
+					this.mask = false
+				}else{
+					this.form = {
+						current: 1,
+						size: 20,
+						corpId: e.value[0].id
+					}
+					this.dataList = []
+					this.query()
+					this.show = false
+					this.mask = false
 				}
-				this.dataList = []
-				this.query()
-				this.show = false
 			},
 			//确认日期
 			confirmCalendar(e) {
@@ -301,13 +335,12 @@
 	}
 
 	.dropdown {
-		position: absolute;
+		position: fixed;
 		z-index: 9;
 		background: rgba(0, 0, 0, .3);
 		width: 100%;
 		left: 0;
-		/* top: calc(var(--status-bar-height) + 44px); */
-		top: 44px;
+		top: calc(var(--status-bar-height) + 90px);
 		bottom: 0;
 	}
 

+ 136 - 116
pages/views/salesSlip/index.vue

@@ -11,6 +11,9 @@
 				<u-cell icon="account" :iconStyle="{color: '#FD4B09'}" title="客户" :value="form.corpName" :isLink="true"
 					@click="selectCustomer">
 				</u-cell>
+				<u-cell icon="home" :iconStyle="{color: '#FD4B09'}" title="业务员" :value="form.sales" :isLink="true"
+					@click="filterAll(['sales','salesName'])">
+				</u-cell>
 				<u-cell icon="calendar" :iconStyle="{color: '#FD4B09'}" title="日期"
 					:value="form.businesDate?form.businesDate.slice(0,10):''" :isLink="true" @click="show = true">
 				</u-cell>
@@ -79,49 +82,53 @@
 				</view>
 			</view>
 		</view>
-		<u-popup zIndex="10070" :closeOnClickOverlay="false" :show="openPopup" @close="openPopup = false,mask = false" mode="center" closeable
-			round="10rpx">
+		<u-popup zIndex="10070" :closeOnClickOverlay="false" :show="openPopup" @close="openPopup = false,mask = false"
+			mode="center" closeable round="10rpx">
 			<u--form labelPosition="left" :labelStyle="{color: '#fd4b09'}" :model="formTwo" ref="formTwo"
 				labelWidth="150rpx">
 				<view style="width: calc(700rpx - 20px);margin: 10px;">
 					<text>收款台</text>
 					<view>
-						<!-- <u-form-item label="订单金额" prop="cname" borderBottom>
-							<u-input type="number" v-model="formTwo.purchaseAmount" border="none" inputAlign="right" placeholder="请输入"
-								disabled disabledColor="#ffffff" />
-						</u-form-item> -->
-						<!-- <u-form-item label="优惠金额" prop="cname" borderBottom>
-							<u-input type="number" v-model="formTwo.thisUsedProfit" border="none" inputAlign="right" placeholder="请输入" disabledColor="#ffffff" @blur="discount(0)"/>
-						</u-form-item> -->
-						<u-form-item label="应收金额" prop="cname" borderBottom>
-							<u-input type="number" v-model="formTwo.orderAmount" border="none" inputAlign="right" placeholder="请输入"
-								disabled disabledColor="#ffffff" />
-						</u-form-item>
-						<u-form-item label="已收金额" prop="cname" borderBottom>
-							<u-input type="number" v-model="formTwo.settlmentAmount" border="none" inputAlign="right" placeholder="请输入" disabled disabledColor="#ffffff" />
-						</u-form-item>
-						<u-form-item label="溢付款" prop="cname" borderBottom>
-							<u-input type="number" v-model="formTwo.overPayment" border="none" inputAlign="right" disabled disabledColor="#ffffff" />
-						</u-form-item>
-						<u-form-item label="本次收款" prop="cname" borderBottom>
-							<u-input type="number" clearable v-model="formTwo.currentAmount" border="none" inputAlign="right" placeholder="请输入" disabledColor="#ffffff" @blur="discount(1)" />
-						</u-form-item>
-						<u-form-item label="收款日期" labelWidth="190rpx" prop="cname" borderBottom
-							@click="filterAll(['advanceCollectionDate','advanceCollectionDate'])">
-							<view style="width: 100%;text-align: right;">
-								{{formTwo.advanceCollectionDate?formTwo.advanceCollectionDate.slice(0,10):''}}
-							</view>
-						</u-form-item>
-						<u-form-item label="收款账户" prop="cname" borderBottom @click="filterAll(['account','account'])">
-							<u-input v-model="formTwo.account" border="none" inputAlign="right" placeholder="请选择"
-								disabled disabledColor="#ffffff">
-								<template slot="suffix" style="text-align: center;">
-									<u-icon name="plus-circle" size="18" @click.native.stop="newCompany()"></u-icon>
-								</template>
-							</u-input>
+						<!-- <u-form-item label="订单金额" prop="cname" borderBottom>
+							<u-input type="number" v-model="formTwo.purchaseAmount" border="none" inputAlign="right" placeholder="请输入"
+								disabled disabledColor="#ffffff" />
+						</u-form-item> -->
+						<!-- <u-form-item label="优惠金额" prop="cname" borderBottom>
+							<u-input type="number" v-model="formTwo.thisUsedProfit" border="none" inputAlign="right" placeholder="请输入" disabledColor="#ffffff" @blur="discount(0)"/>
+						</u-form-item> -->
+						<u-form-item label="应收金额" prop="cname" borderBottom>
+							<u-input type="number" v-model="formTwo.orderAmount" border="none" inputAlign="right"
+								placeholder="请输入" disabled disabledColor="#ffffff" />
+						</u-form-item>
+						<u-form-item label="已收金额" prop="cname" borderBottom>
+							<u-input type="number" v-model="formTwo.settlmentAmount" border="none" inputAlign="right"
+								placeholder="请输入" disabled disabledColor="#ffffff" />
+						</u-form-item>
+						<u-form-item label="溢付款" prop="cname" borderBottom>
+							<u-input type="number" v-model="formTwo.overPayment" border="none" inputAlign="right"
+								disabled disabledColor="#ffffff" />
+						</u-form-item>
+						<u-form-item label="本次收款" prop="cname" borderBottom>
+							<u-input type="number" clearable v-model="formTwo.currentAmount" border="none"
+								inputAlign="right" placeholder="请输入" disabledColor="#ffffff" @blur="discount(1)" />
+						</u-form-item>
+						<u-form-item label="收款日期" labelWidth="190rpx" prop="cname" borderBottom
+							@click="filterAll(['advanceCollectionDate','advanceCollectionDate'])">
+							<view style="width: 100%;text-align: right;">
+								{{formTwo.advanceCollectionDate?formTwo.advanceCollectionDate.slice(0,10):''}}
+							</view>
+						</u-form-item>
+						<u-form-item label="收款账户" prop="cname" borderBottom @click="filterAll(['account','account'])">
+							<u-input v-model="formTwo.account" border="none" inputAlign="right" placeholder="请选择"
+								disabled disabledColor="#ffffff">
+								<template slot="suffix" style="text-align: center;">
+									<u-icon name="plus-circle" size="18" @click.native.stop="newCompany()"></u-icon>
+								</template>
+							</u-input>
 						</u-form-item>
 						<view style="display: flex;margin-top: 20rpx;">
-							<u-button text="取消" style="width: 45%;" @click="openPopup = false,mask = false,uni.navigateBack()"></u-button>
+							<u-button text="取消" style="width: 45%;"
+								@click="openPopup = false,mask = false,uni.navigateBack()"></u-button>
 							<u-button type="primary" text="收款" color="#FD4B09" style="width: 45%;"
 								@click="collectionConfirm"></u-button>
 						</view>
@@ -130,8 +137,8 @@
 			</u--form>
 		</u-popup>
 		<u-datetime-picker :show="show" v-model="timeValue" mode="date" @confirm="confirm" @cancel="show = false">
-		</u-datetime-picker>
-		<u-datetime-picker :show="timeOpen" v-model="datetime" mode="date" @cancel="timeOpen = false,mask = false"
+		</u-datetime-picker>
+		<u-datetime-picker :show="timeOpen" v-model="datetime" mode="date" @cancel="timeOpen = false,mask = false"
 			@confirm="confirmTiem"></u-datetime-picker>
 		<u-picker :show="showWarehouse" :columns="columns" :keyName="keyName" @confirm="confirmWarehouse"
 			@cancel="showWarehouse = false"></u-picker>
@@ -143,10 +150,11 @@
 	import {
 		customerList,
 		quickBilling,
-		typeSave
-	} from '@/api/views/sale/index.js'
-	import {
-		collectPayment
+		typeSave,
+		gainUser
+	} from '@/api/views/sale/index.js'
+	import {
+		collectPayment
 	} from '@/api/views/sale/salesOrderDetails.js'
 	import {
 		dateFormat
@@ -154,11 +162,11 @@
 	export default {
 		data() {
 			return {
-				show: false,
+				show: false,
 				timeOpen: false,
 				openPopup: false,
 				showWarehouse: false,
-				timeValue: Number(new Date()),
+				timeValue: Number(new Date()),
 				datetime: Number(new Date()),
 				columns: [],
 				dataList: [],
@@ -191,74 +199,74 @@
 			this.form.businesDate = new Date((new Date()).getTime() + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ')
 				.substr(0, 19)
 		},
-		methods: {
-			newCompany() {
-				uni.$u.route('/pages/views/product/createCompany',{
-					code:"account",
-					title:"收款账户"
-				});
+		methods: {
+			newCompany() {
+				uni.$u.route('/pages/views/product/createCompany', {
+					code: "account",
+					title: "收款账户"
+				});
 			},
 			//时间确认选择
 			confirmTiem(e) {
 				this.formTwo[this.screen[1]] = dateFormat(new Date(e.value), "YYYY-MM-DD HH:mm:ss")
-				this.timeOpen = false
+				this.timeOpen = false
 				this.mask = false
-			},
-			collectionConfirm(){
-				if(!this.formTwo.thisUsedProfit){
-					return uni.showToast({
-						icon: "none",
-						title: '优惠金额不能为空',
-						mask: true
-					});
-				}
-				if(!this.formTwo.orderAmount){
-					return uni.showToast({
-						icon: "none",
-						title: '合同金额不能为空',
-						mask: true
-					});
-				}
-				if(!this.formTwo.currentAmount){
-					return uni.showToast({
-						icon: "none",
-						title: '本次收款金额不能为空',
-						mask: true
-					});
-				}
-				if(!this.formTwo.account){
-					return uni.showToast({
-						icon: "none",
-						title: '收款帐户不能为空',
-						mask: true
-					});
-				}
-				let this_ = this
-				uni.showModal({
-					title: '是否确认收款',
-					content: '本次收款金额'+this_.formTwo.currentAmount,
-					success: function(rest) {
-						if (rest.confirm == true) {
-							uni.showLoading({
-								title: '加载中',
-								mask: true
-							});
-							collectPayment(this_.formTwo).then(res=>{
-								uni.showToast({
-									icon: "none",
-									title: '收款成功',
-									mask: true,
-									duration:2000
-								});
-								this.openPopup = false
+			},
+			collectionConfirm() {
+				if (!this.formTwo.thisUsedProfit) {
+					return uni.showToast({
+						icon: "none",
+						title: '优惠金额不能为空',
+						mask: true
+					});
+				}
+				if (!this.formTwo.orderAmount) {
+					return uni.showToast({
+						icon: "none",
+						title: '合同金额不能为空',
+						mask: true
+					});
+				}
+				if (!this.formTwo.currentAmount) {
+					return uni.showToast({
+						icon: "none",
+						title: '本次收款金额不能为空',
+						mask: true
+					});
+				}
+				if (!this.formTwo.account) {
+					return uni.showToast({
+						icon: "none",
+						title: '收款帐户不能为空',
+						mask: true
+					});
+				}
+				let this_ = this
+				uni.showModal({
+					title: '是否确认收款',
+					content: '本次收款金额' + this_.formTwo.currentAmount,
+					success: function(rest) {
+						if (rest.confirm == true) {
+							uni.showLoading({
+								title: '加载中',
+								mask: true
+							});
+							collectPayment(this_.formTwo).then(res => {
+								uni.showToast({
+									icon: "none",
+									title: '收款成功',
+									mask: true,
+									duration: 2000
+								});
+								this.openPopup = false
 								setTimeout(function() {
 									uni.hideLoading();
-									uni.navigateBack();
-								}, 2000);
-							})
-						}
-					}
-				})
+									uni.navigateBack();
+								}, 2000);
+							})
+						}
+					}
+				})
 			},
 			//集合筛选条件
 			filterAll(screen) {
@@ -270,9 +278,9 @@
 							this.keyName = "dictValue"
 							this.showWarehouse = true
 						})
-						break;
-					case "advanceCollectionDate":
-						this.timeOpen = true
+						break;
+					case "advanceCollectionDate":
+						this.timeOpen = true
 						this.mask = true
 						break;
 					case "storageId":
@@ -284,12 +292,19 @@
 								size: request.data.total,
 								current: 1
 							}).then(res => {
-								this.columns = [res.data.records]
+								this.columns = [res.data.records]
 								this.keyName = 'cname'
 								this.showWarehouse = true
 							})
 						})
 						break;
+					case "salesName":
+						gainUser().then(res => {
+							this.columns = [res.data]
+							this.keyName = 'name'
+							this.showWarehouse = true
+						})
+						break;
 				}
 			},
 			discount(type) {
@@ -326,10 +341,10 @@
 			deleteProduct(index) {
 				this.amount = Number(this.amount) - Number(this.dataList[index].amount)
 				this.amount.toFixed(2)
-				this.dataList.splice(index, 1)
-				this.numberAll = 0
-				for (let item of this.dataList) {
-					this.numberAll += Number(item.storageInQuantity)
+				this.dataList.splice(index, 1)
+				this.numberAll = 0
+				for (let item of this.dataList) {
+					this.numberAll += Number(item.storageInQuantity)
 				}
 			},
 			//客户选择返回触发
@@ -379,6 +394,10 @@
 				if (this.screen[1] == "account") {
 					this.formTwo.account = e.value[0].dictValue
 					this.showWarehouse = false
+				} else if(this.screen[1] == "salesName") {
+					this.form.sales = e.value[0].name
+					this.form.salesName = e.value[0].id
+					this.showWarehouse = false
 				} else {
 					this.form.storageName = e.value[0].cname
 					this.form.storageId = e.value[0].id
@@ -422,8 +441,9 @@
 						mask: true
 					});
 					this.openPopup = true
-					this.formTwo = res.data
-					this.formTwo.currentAmount = (this.formTwo.orderAmount - this.formTwo.settlmentAmount).toFixed(2)
+					this.formTwo = res.data
+					this.formTwo.currentAmount = (this.formTwo.orderAmount - this.formTwo.settlmentAmount).toFixed(
+						2)
 					this.formTwo.advanceCollectionDate = dateFormat(new Date(), "YYYY-MM-DD HH:mm:ss")
 				})
 			},
@@ -457,7 +477,7 @@
 					title: '加载中',
 					mask: true
 				});
-				// typeSave(暂存方法)
+				// typeSave(暂存方法)
 				quickBilling(form).then(res => {
 					uni.showToast({
 						icon: "none",

+ 75 - 47
pages/views/salesSlip/salesOrderList.vue

@@ -5,59 +5,59 @@
 				<u-icon name="clock" size="40rpx" color="#fff" @click="historical0rders()"></u-icon>
 			</view> -->
 		<!-- </u-navbar> -->
-		<view style="background-color: #fff;">
+		<view style="background-color: #fff;position: fixed;top: var(--window-top);width: 100%;z-index: 8;">
 			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick"
 				:current="current">
-				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen">
+				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen,mask = !mask">
 					<text style="margin-left: 10rpx;">|<text style="margin:0rpx 15rpx">排序</text></text>
 				</view>
 			</u-tabs>
 			<view style="background-color: #fff;padding: 10rpx 20rpx;">
 				<u-search placeholder="请输入客户名称" v-model="form.corpsName" @custom="custom"></u-search>
 			</view>
-			<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
-				<view style="background-color: #fff;">
-					<u-cell-group>
-						<u-cell title="客户名称" @click="sortQuery(1)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(1,form.sort == 0?'1':'0')">
-								{{form.typeSort == 1?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 1?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="销售单号" @click="sortQuery(2)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(2,form.sort == 0?'1':'0')">
-								{{form.typeSort == 2?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 2?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="金额" @click="sortQuery(3)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(3,form.sort == 0?'1':'0')">
-								{{form.typeSort == 3?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 3?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="日期" @click="sortQuery(4)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(4,form.sort == 0?'1':'0')">
-								{{form.typeSort == 4?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 4?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="提交" @click="sortQuery(5)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(5,form.sort == 0?'1':'0')">
-								{{form.typeSort == 5?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 5?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-					</u-cell-group>
-				</view>
-			</view>
+		</view>
+		<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
+			<view style="background-color: #fff;">
+				<u-cell-group>
+					<u-cell title="客户名称" @click="sortQuery(1)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(1,form.sort == 0?'1':'0')">
+							{{form.typeSort == 1?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 1?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="销售单号" @click="sortQuery(2)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(2,form.sort == 0?'1':'0')">
+							{{form.typeSort == 2?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 2?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="金额" @click="sortQuery(3)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(3,form.sort == 0?'1':'0')">
+							{{form.typeSort == 3?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 3?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="日期" @click="sortQuery(4)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(4,form.sort == 0?'1':'0')">
+							{{form.typeSort == 4?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 4?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="提交" @click="sortQuery(5)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(5,form.sort == 0?'1':'0')">
+							{{form.typeSort == 5?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 5?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+				</u-cell-group>
+			</view>
 		</view>
-		<view class="content">
+		<view class="content" style="margin-top: 100px;">
 			<view class="contentBox" v-for="(item,index) in dataList" :key="index" @click="choice(item,index)">
 				<view style="width: 100%;margin: 0 auto;">
 					<u-cell-group :border="false">
@@ -159,7 +159,8 @@
 <script>
 	import {
 		queryList,
-		corpsDescList
+		corpsDescList,
+		gainUser
 	} from '@/api/views/sale/salesOrderList.js'
 	import {
 		collectPayment
@@ -203,6 +204,11 @@
 					badge: {
 						value: 0,
 					}
+				}, {
+					name: '业务员',
+					badge: {
+						value: 0,
+					}
 				}],
 				scrollTop: 0
 			}
@@ -421,6 +427,19 @@
 						this.mask = true
 						uni.hideLoading();
 					})
+				} else if (item.name == "业务员") {
+					this.keyName = "name"
+					this.screen = ['sales', 'salesName']
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					});
+					gainUser().then(res => {
+						this.columns = [res.data]
+						this.show = true
+						this.mask = true
+						uni.hideLoading();
+					})
 				} else if (item.name == "全部") {
 					this.form = {
 						current: 1,
@@ -442,6 +461,16 @@
 					this.query()
 					this.show = false
 					this.mask = false
+				}else if (this.screen[1] == "salesName") {
+					this.form = {
+						current: 1,
+						size: 20,
+						salesName: e.value[0].id
+					}
+					this.dataList = []
+					this.query()
+					this.show = false
+					this.mask = false
 				} else {
 					this.formTwo.account = e.value[0].dictValue
 					this.show = false
@@ -489,8 +518,7 @@
 		background: rgba(0, 0, 0, .3);
 		width: 100%;
 		left: 0;
-		/* top: calc(var(--status-bar-height) + 44px); */
-		top: 44px;
+		top: calc(var(--status-bar-height) + 90px);
 		bottom: 0;
 	}
 

+ 8 - 5
pages/views/salesSlip/selectProduct.vue

@@ -1,9 +1,10 @@
 <template>
 	<view class="u-wrap">
-		<u-tabs :list="tabbar" @click="click" lineColor="#FD4B09"></u-tabs>
-		<view class="u-search-box">
+		<view class="u-search-box">
+			<u-tabs :list="tabbar" @click="click"  lineColor="#fff" :activeStyle="{ color: '#fff' }"
+					:inactiveStyle="{ color: '#ffffff80' }">></u-tabs>
 			<view style="padding: 10rpx;">
-				<u-search placeholder="请输入商品名称" v-model="name" @custom="custom"></u-search>
+				<u-search placeholder="请输入商品名称" :actionStyle="{ color: '#fff' }" v-model="name" @custom="custom"></u-search>
 			</view>
 		</view>
 		<view class="u-menu-wrap">
@@ -37,7 +38,7 @@
 										</view>
 										<view style="color: #707070;font-size: 24rpx;">
 											单位:{{itemTwo.unit}}
-											<text style="margin-left: 30rpx;">库存:{{itemTwo.stockGoods?itemTwo.stockGoods.surplusRouteQuantity:'0'}}</text>
+											<text style="margin-left: 30rpx;color: #FD4B09;">库存:{{itemTwo.stockGoods?itemTwo.stockGoods.surplusRouteQuantity:'0'}}</text>
 										</view>
 										<view style="color: #707070;font-size: 24rpx;">分类:{{itemTwo.goodsTypeName}}
 										</view>
@@ -474,7 +475,9 @@
 	}
 
 	.u-search-box {
-		padding: 10rpx;
+		padding: 10rpx;
+		padding-top: 0;
+		background-color: #FD4B09;
 	}
 
 	.u-menu-wrap {

+ 77 - 49
pages/views/salesSlip/toBeCollectedlist.vue

@@ -4,60 +4,60 @@
 		<!-- <view slot="right">
 				<u-icon name="clock" size="40rpx" color="#fff" @click="historical0rders()"></u-icon>
 			</view> -->
-		<!-- </u-navbar> -->
-		<view style="background-color: #fff;">
+		<!-- </u-navbar> -->
+		<view style="background-color: #fff;position: fixed;top: var(--window-top);width: 100%;z-index: 8;">
 			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick"
 				:current="current">
-				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen">
+				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen,mask = !mask">
 					<text style="margin-left: 10rpx;">|<text style="margin:0rpx 15rpx">排序</text></text>
 				</view>
 			</u-tabs>
 			<view style="background-color: #fff;padding: 10rpx 20rpx;">
 				<u-search placeholder="请输入客户名称" v-model="form.corpsName" @custom="custom"></u-search>
 			</view>
-			<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
-				<view style="background-color: #fff;">
-					<u-cell-group>
-						<u-cell title="客户名称" @click="sortQuery(1)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(1,form.sort == 0?'1':'0')">
-								{{form.typeSort == 1?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 1?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="销售单号" @click="sortQuery(2)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(2,form.sort == 0?'1':'0')">
-								{{form.typeSort == 2?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 2?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="金额" @click="sortQuery(3)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(3,form.sort == 0?'1':'0')">
-								{{form.typeSort == 3?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 3?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="日期" @click="sortQuery(4)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(4,form.sort == 0?'1':'0')">
-								{{form.typeSort == 4?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 4?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="提交" @click="sortQuery(5)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(5,form.sort == 0?'1':'0')">
-								{{form.typeSort == 5?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 5?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-					</u-cell-group>
-				</view>
-			</view>
+		</view>
+		<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
+			<view style="background-color: #fff;">
+				<u-cell-group>
+					<u-cell title="客户名称" @click="sortQuery(1)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(1,form.sort == 0?'1':'0')">
+							{{form.typeSort == 1?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 1?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="销售单号" @click="sortQuery(2)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(2,form.sort == 0?'1':'0')">
+							{{form.typeSort == 2?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 2?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="金额" @click="sortQuery(3)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(3,form.sort == 0?'1':'0')">
+							{{form.typeSort == 3?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 3?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="日期" @click="sortQuery(4)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(4,form.sort == 0?'1':'0')">
+							{{form.typeSort == 4?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 4?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="提交" @click="sortQuery(5)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(5,form.sort == 0?'1':'0')">
+							{{form.typeSort == 5?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 5?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+				</u-cell-group>
+			</view>
 		</view>
-		<view class="contentBox">
+		<view class="contentBox" style="margin-top: 100px;">
 			<view class="textBox">
 				<view>待收款总金额</view>
 				<view>本月增加</view>
@@ -177,7 +177,8 @@
 	import {
 		queryList,
 		corpsDescList,
-		profitStatistics
+		profitStatistics,
+		gainUser
 	} from '@/api/views/sale/salesOrderList.js'
 	import {
 		collectPayment
@@ -227,6 +228,11 @@
 					badge: {
 						value: 0,
 					}
+				}, {
+					name: '业务员',
+					badge: {
+						value: 0,
+					}
 				}]
 			}
 		},
@@ -444,6 +450,19 @@
 						this.mask = true
 						uni.hideLoading();
 					})
+				} else if (item.name == "业务员") {
+					this.keyName = "name"
+					this.screen = ['sales', 'salesName']
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					});
+					gainUser().then(res => {
+						this.columns = [res.data]
+						this.show = true
+						this.mask = true
+						uni.hideLoading();
+					})
 				} else if (item.name == "全部") {
 					this.form = {
 						current: 1,
@@ -465,6 +484,16 @@
 					this.query()
 					this.show = false
 					this.mask = false
+				}else if (this.screen[1] == "salesName") {
+					this.form = {
+						current: 1,
+						size: 20,
+						salesName: e.value[0].id
+					}
+					this.dataList = []
+					this.query()
+					this.show = false
+					this.mask = false
 				} else {
 					this.formTwo.account = e.value[0].dictValue
 					this.show = false
@@ -507,13 +536,12 @@
 	}
 
 	.dropdown {
-		position: absolute;
+		position: fixed;
 		z-index: 9;
 		background: rgba(0, 0, 0, .3);
 		width: 100%;
 		left: 0;
-		/* top: calc(var(--status-bar-height) + 44px); */
-		top: 44px;
+		top: calc(var(--status-bar-height) + 90px);
 		bottom: 0;
 	}
 

+ 85 - 44
pages/views/salesSlip/toBeCollectedlistBatch.vue

@@ -5,55 +5,58 @@
 				<u-icon name="clock" size="40rpx" color="#fff" @click="historical0rders()"></u-icon>
 			</view> -->
 		<!-- </u-navbar> -->
-		<view style="background-color: #fff;">
+		<view style="background-color: #fff;position: fixed;top: var(--window-top);width: 100%;z-index: 8;">
 			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick" :current="current">
 				<view slot="right" style="font-size: 15px;" @click="sortOpen = !sortOpen">
 					<text style="margin-left: 10rpx;">|<text style="margin:0rpx 15rpx">排序</text></text>
 				</view>
-			</u-tabs>
-			<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
-				<view style="background-color: #fff;">
-					<u-cell-group>
-						<u-cell title="客户名称" @click="sortQuery(1)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(1,form.sort == 0?'1':'0')">
-								{{form.typeSort == 1?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 1?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="销售单号" @click="sortQuery(2)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(2,form.sort == 0?'1':'0')">
-								{{form.typeSort == 2?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 2?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="金额" @click="sortQuery(3)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(3,form.sort == 0?'1':'0')">
-								{{form.typeSort == 3?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 3?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="日期" @click="sortQuery(4)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(4,form.sort == 0?'1':'0')">
-								{{form.typeSort == 4?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 4?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-						<u-cell title="提交" @click="sortQuery(5)">
-							<view style="display: flex;" slot="value" @click.stop="sortQuery(5,form.sort == 0?'1':'0')">
-								{{form.typeSort == 5?form.sort==0?'正序':'倒序':''}}
-								<u-icon :name="form.typeSort == 5?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
-								</u-icon>
-							</view>
-						</u-cell>
-					</u-cell-group>
-				</view>
+			</u-tabs>
+			<view style="background-color: #fff;padding: 10rpx 20rpx;">
+				<u-search placeholder="请输入客户名称" v-model="form.corpsName" @custom="custom"></u-search>
 			</view>
+		</view>
+		<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
+			<view style="background-color: #fff;">
+				<u-cell-group>
+					<u-cell title="客户名称" @click="sortQuery(1)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(1,form.sort == 0?'1':'0')">
+							{{form.typeSort == 1?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 1?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="销售单号" @click="sortQuery(2)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(2,form.sort == 0?'1':'0')">
+							{{form.typeSort == 2?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 2?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="金额" @click="sortQuery(3)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(3,form.sort == 0?'1':'0')">
+							{{form.typeSort == 3?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 3?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="日期" @click="sortQuery(4)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(4,form.sort == 0?'1':'0')">
+							{{form.typeSort == 4?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 4?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+					<u-cell title="提交" @click="sortQuery(5)">
+						<view style="display: flex;" slot="value" @click.stop="sortQuery(5,form.sort == 0?'1':'0')">
+							{{form.typeSort == 5?form.sort==0?'正序':'倒序':''}}
+							<u-icon :name="form.typeSort == 5?form.sort==0?'arrow-up-fill':'arrow-down-fill':''">
+							</u-icon>
+						</view>
+					</u-cell>
+				</u-cell-group>
+			</view>
 		</view>
-		<view class="contentBox">
+		<view class="contentBox" style="margin-top: 100px;">
 			<view class="textBox">
 				<view>待收款总金额</view>
 				<view>本月增加</view>
@@ -167,7 +170,8 @@
 	import {
 		queryList,
 		corpsDescList,
-		profitStatistics
+		profitStatistics,
+		gainUser
 	} from '@/api/views/sale/salesOrderList.js'
 	import {
 		collectPayment
@@ -216,6 +220,11 @@
 					badge: {
 						value: 0,
 					}
+				}, {
+					name: '业务员',
+					badge: {
+						value: 0,
+					}
 				}]
 			}
 		},
@@ -233,6 +242,15 @@
 			}
 		},
 		methods: {
+			custom(e){
+				this.form = {
+					current: 1,
+					size: 10,
+					corpsName:e
+				}
+				this.dataList = []
+				this.query()
+			},
 			newCompany() {
 				uni.$u.route('/pages/views/product/createCompany',{
 					code:"account",
@@ -425,6 +443,19 @@
 						this.mask = true
 						uni.hideLoading();
 					})
+				} else if (item.name == "业务员") {
+					this.keyName = "name"
+					this.screen = ['sales', 'salesName']
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					});
+					gainUser().then(res => {
+						this.columns = [res.data]
+						this.show = true
+						this.mask = true
+						uni.hideLoading();
+					})
 				} else if (item.name == "全部") {
 					this.form = {
 						current: 1,
@@ -446,6 +477,16 @@
 					this.query()
 					this.show = false
 					this.mask = false
+				}else if (this.screen[1] == "salesName") {
+					this.form = {
+						current: 1,
+						size: 20,
+						salesName: e.value[0].id
+					}
+					this.dataList = []
+					this.query()
+					this.show = false
+					this.mask = false
 				}else{
 					this.formTwo.account = e.value[0].dictValue
 					this.show = false

+ 4 - 2
pages/views/stock/index.vue

@@ -244,8 +244,10 @@
 					this.priceForm = res.data
 				})
 				queryStock(this.form).then(res => {
-					this.total = res.data.total
-					this.dataList = this.dataList.concat(res.data.records)
+					this.total = res.data.total || 0
+					if (res.data.records) {
+						this.dataList = this.dataList.concat(res.data.records)
+					}
 					uni.hideLoading();
 					if (this.total < 10) {
 						this.status = 'nomore'

+ 7 - 5
pages/views/supplier/index.vue

@@ -7,15 +7,17 @@
 			</template>
 		</u-navbar>
 		<view
-			style="background-color: #fff;padding-top: 20rpx;position: fixed;top: calc(var(--status-bar-height) + 44px);width: 100%;z-index: 10;">
-			<u-search placeholder="请输入客户名称" v-model="form.cname" @custom="custom"></u-search>
+			style="background-color: #fff;position: fixed;top: calc(var(--status-bar-height) + 44px);width: 100%;z-index: 10;">
 			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick"
 				:current="current">
 				<view slot="right" style="font-size: 15px;display: flex;">
 					<text style="margin-left: 10rpx;">|</text>
 					<u--text text="排序" margin="0rpx 15rpx" @click="sortOpen = !sortOpen,mask=!mask"></u--text>
 				</view>
-			</u-tabs>
+			</u-tabs>
+			<view style="background-color: #fff;padding: 10rpx 20rpx;">
+				<u-search placeholder="请输入客户名称" v-model="form.cname" @custom="custom"></u-search>
+			</view>
 		</view>
 		<view class="dropdown" v-if="sortOpen" @click.stop="dropdownOpen()">
 			<view style="background-color: #fff;">
@@ -236,11 +238,11 @@
 
 	.dropdown {
 		position: absolute;
-		z-index: 9;
+		z-index: 99;
 		background: rgba(0, 0, 0, .3);
 		width: 100%;
 		left: 0;
-		top: calc(var(--status-bar-height) + 130px);
+		top: calc(var(--status-bar-height) + 90px);
 		bottom: 0;
 	}
 

+ 200 - 0
pages/views/visit/historical0rders.vue

@@ -0,0 +1,200 @@
+<template>
+	<view style="background-color: #f2f2f6;padding-bottom: 0.01rpx;">
+		<view style="background-color: #fff;">
+			<u-tabs :list="tabsList" itemStyle="height:88rpx;" lineColor="#FD4B09" @click="tabsClick"
+				:current="current">
+			</u-tabs>
+		</view>
+		<view class="content">
+			<view class="contentBox" v-for="(item,index) in dataList" :key="index">
+				<view style="width: 100%;margin: 0 auto;">
+					<u-cell-group :border="false">
+						<u-cell :border="false" center :title="item.corpName?item.corpName:'无客户名称'" arrow-direction="down">
+							<view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #FD4B09;"></view>
+							<view slot="right-icon" style="transform:rotate(-90deg);">
+								<view v-if="item.status" style="
+										height: 45rpx;
+										border-radius: 50rpx;
+										color: #FD4B09;
+										line-height: 45rpx;
+										text-align: center;
+										font-size: 22rpx;
+										float: right;
+										padding: 0 20rpx;
+										border: 1rpx solid #FD4B09;">
+									{{item.status == 0?'沟通中':item.status == 1?'成交':item.status == 2?'未成交':item.status}}
+								</view>
+							</view>
+						</u-cell>
+					</u-cell-group>
+					<view class="textBox">
+						<view>订单日期</view>
+						<view>{{item.createTime}}</view>
+					</view>
+					<view class="textBox">
+						<view>联系人</view>
+						<view>{{item.contacts}}</view>
+					</view>
+					<view class="textBox">
+						<view>联系电话</view>
+						<view>{{item.tel}}</view>
+					</view>
+					<view class="textBox">
+						<view style="width: 60rpx;">备注</view>
+						<view style="width: 630rpx;flex: 1;text-align: right;word-wrap:break-word;word-break:break-all;">
+							<text style="display : inline-block;width : auto;text-align : left;">{{item.remarks}}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-empty v-if="total == 0" style="position: absolute;top: 45%;left: 50%;transform:translate(-50%,-50%)"
+			mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
+		<uni-calendar ref="calendar" :insert="false" :range="true" @confirm="confirmCalendar" />
+		<u-picker :show="show" :columns="columns" keyName="cname" @cancel="show = false" @confirm="confirm"></u-picker>
+		<u-loadmore v-if="total !== 0 && dataList.length != 0" :status="status" />
+	</view>
+</template>
+
+<script>
+	import {
+		queryList,
+		corpsDescList
+	} from '@/api/views/visit/index.js'
+	export default {
+		data() {
+			return {
+				dataList: [],
+				columns: [],
+				show: false,
+				current: 0,
+				total: 0,
+				status: 'loadmore',
+				form: {
+					current: 1,
+					size: 10,
+				},
+				tabsList: [{
+					name: '全部',
+					badge: {
+						value: 0,
+					}
+				}, {
+					name: '业务日期',
+					badge: {
+						value: 0,
+					}
+				}, {
+					name: '客户名称',
+					badge: {
+						value: 0,
+					}
+				}]
+			}
+		},
+		created() {
+			this.query()
+		},
+		onLoad(onLoad) {
+			if(onLoad.id){
+				this.form.corpId = onLoad.id
+				this.current = 2
+			}
+		},
+		onReachBottom() {
+			this.status = 'loading'
+			if (this.dataList.length < this.total) {
+				this.form.current++
+				this.query()
+			} else {
+				this.status = 'nomore'
+			}
+		},
+		methods: {
+			//查询
+			query() {
+				uni.showLoading({
+					title: '加载中',
+					mask: true
+				});
+				queryList({
+					...this.form
+				}).then(res => {
+					if (res.data.records) {
+						this.dataList = this.dataList.concat(res.data.records)
+					}
+					this.total = res.data.total || 0
+					uni.hideLoading();
+					if (this.total < 10) {
+						this.status = 'nomore'
+					}
+				})
+			},
+			tabsClick(item) {
+				this.current = item.index
+				if (item.name == "业务日期") {
+					this.$refs.calendar.open()
+				} else if (item.name == "客户名称") {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					});
+					corpsDescList({
+						corpType: "KH"
+					}).then(res => {
+						this.columns = [res.data]
+						this.show = true
+						uni.hideLoading();
+					})
+				}else if(item.name == "全部"){
+					this.form = {
+						current: 1,
+						size: 10
+					}
+					this.dataList = []
+					this.query()
+				}
+			},
+			confirm(e) {
+				this.form = {
+					current: 1,
+					size: 10,
+					corpId:e.value[0].id
+				}
+				this.dataList = []
+				this.query()
+				this.show = false
+			},
+			//确认日期
+			confirmCalendar(e) {
+				this.form = {
+					current: 1,
+					size: 10,
+					beginBizDate: e.range.before + ' 00:00:00',
+					endBizDate: e.range.after + ' 23:59:59'
+				}
+				this.dataList = []
+				this.query()
+			},
+		}
+	}
+</script>
+
+<style scoped>
+	.contentBox {
+		width: 96%;
+		margin: 20rpx auto;
+		background-color: #FFFFFF;
+		border-radius: 20rpx;
+		box-shadow: 0 5rpx 14rpx 0 rgba(101, 176, 249, 0.42);
+		padding-bottom: 10rpx;
+	}
+
+	.textBox {
+		padding: 0 15px;
+		display: flex;
+		justify-content: space-between;
+		font-size: 24rpx;
+		margin-bottom: 10rpx;
+	}
+</style>

+ 210 - 0
pages/views/visit/visit.vue

@@ -0,0 +1,210 @@
+<template>
+	<view style="padding-top: 1rpx;">
+		<!-- :style="{marginTop:revenueTop+120+'rpx'}" -->
+		<view style="width: 96%;margin: 20rpx auto;background-color: #fff;border-radius: 20rpx;">
+			<u-cell-group :border="false">
+				<u-cell icon="account" title="客户" :value="form.corpName" :isLink="true" @click="selectCustomer">
+				</u-cell>
+				<u-cell icon="calendar" title="日期" :value="form.bizDate?form.bizDate.slice(0,10):''" :isLink="true"
+					@click="show = true"></u-cell>
+				<u-cell icon="man-add" title="联系人" :isLink="false">
+					<view slot="right-icon" style="width:400rpx;">
+						<u--input placeholder="请输入联系人" border="none" inputAlign="right" v-model="form.contacts">
+						</u--input>
+					</view>
+				</u-cell>
+				<u-cell icon="phone" title="联系电话" :isLink="false">
+					<view slot="right-icon" style="width:400rpx;">
+						<u--input placeholder="请输入联系电话" border="none" inputAlign="right" v-model="form.tel"></u--input>
+					</view>
+				</u-cell>
+				<u-cell icon="edit-pen" title="备注" :isLink="false">
+					<view slot="right-icon" style="width:400rpx;">
+						<u--textarea :showConfirmBar="false" height="40" v-model="form.remarks" confirmType="return"
+							placeholder="请输入内容" maxlength="-1" autoHeight border="none"></u--textarea>
+					</view>
+				</u-cell>
+			</u-cell-group>
+		</view>
+		<view style="width: 96%;;margin: 0 auto;">
+			<u-button type="primary" class="custom-style" color="linear-gradient(0deg, #FD5003 0%, #FBA680 100%)" shape="circle" @click="saveOrder" text="确认保存">
+			</u-button>
+		</view>
+		<u-datetime-picker :show="show" v-model="timeValue" mode="date" @confirm="confirm" @cancel="show = false">
+		</u-datetime-picker>
+		<u-picker :show="showWarehouse" :columns="columns" keyName="cname" @confirm="confirmWarehouse"
+			@cancel="showWarehouse = false"></u-picker>
+		<u-notify ref="uNotify"></u-notify>
+	</view>
+</template>
+
+<script>
+	import {
+		customerList
+	} from '@/api/views/sale/index.js'
+	import {
+		typeSave,
+		getUserInfo
+	} from '@/api/views/visit/index.js'
+	import {
+		dateFormat
+	} from '@/common/dateFormat.js'
+	export default {
+		data() {
+			return {
+				show: false,
+				showWarehouse: false,
+				timeValue: Number(new Date()),
+				columns: [],
+				dataList: [],
+				amount: 0.00,
+				form: {
+					corpId: '',
+					corpName: '',
+					customer: '',
+					bizDate: '',
+					storageName: '',
+					remarks: '',
+					total: 0
+				},
+				revenueTop: 0
+			}
+		},
+		onLoad() {
+			this.form.bizDate = new Date((new Date()).getTime() + 8 * 60 * 60 * 1000).toJSON().split('T').join(' ').substr(
+				0, 19)
+			uni.getSystemInfo({
+				success: (e) => {
+					this.revenueTop = e.statusBarHeight
+				}
+			})
+		},
+		created() {
+			let this_ = this
+			uni.getLocation({
+				type: 'gcj02',
+				geocode: true,
+				success: function(res) {
+					console.log(res)
+					let positionName= {
+						country: res.address.country||'',
+						province: res.address.province||'',
+						city: res.address.city||'',
+						district: res.address.district||'',
+						street: res.address.street||'',
+						streetNum: res.address.streetNum||'',
+						poiName: res.address.poiName||'',
+					}
+					this_.form.position = [res.latitude, res.longitude]
+					this_.form.positionName = positionName.country + positionName.province + positionName.city + positionName.district + positionName.street + positionName.streetNum + positionName.poiName					
+				},
+				fail: function(err) {
+					console.log('获取定位失败', err);
+					uni.showToast({
+						title: '获取地址失败,将导致部分功能不可用',
+						icon: 'none'
+					});
+				}
+			});
+			getUserInfo().then(res => {
+				this.$set(this.form, 'fromUser', res.data.id);
+				this.$set(this.form, 'toUser', res.data.id);
+			})
+			customerList({
+				size: 1,
+				current: 1
+			}).then(request => {
+				customerList({
+					size: request.data.total,
+					current: 1
+				}).then(res => {
+					this.columns = [res.data.records]
+				})
+			})
+		},
+		onNavigationBarButtonTap(e) {
+			uni.$u.route('/pages/views/visit/historical0rders');
+		},
+		methods: {
+			deleteProduct(index) {
+				this.amount = Number(this.amount) - Number(this.dataList[index].amount)
+				this.amount.toFixed(2)
+				this.dataList.splice(index, 1)
+			},
+			//客户选择返回触发
+			otherFun(customer) {
+				this.form.contacts = customer.attn
+				this.form.tel = customer.tel
+				this.form.corpName = customer.cname
+				this.form.corpId = customer.id
+				this.form.belongToCorpId = customer.belongtocompany
+			},
+			selectCustomer() {
+				this.$u.route('/pages/views/salesSlip/selectCustomer', {
+					corpType: 'KH'
+				});
+			},
+			confirm(e) {
+				this.show = false
+				this.form.bizDate = new Date((new Date(e.value)).getTime() + 8 * 60 * 60 * 1000).toJSON().split('T')
+					.join(' ').substr(0, 19)
+			},
+			confirmWarehouse(e) {
+				this.form.storageName = e.value[0].cname
+				this.form.storageId = e.value[0].id
+				this.showWarehouse = false
+			},
+			//保存订单
+			saveOrder() {
+				let this_ = this
+				uni.showModal({
+					content: '是否确认保存',
+					success: function(res) {
+						if (res.confirm) {
+							if (!this_.form.corpId) return this_.$refs.uNotify.show({
+								top: this_.revenueTop,
+								type: 'warning',
+								message: '请选择客户!'
+							})
+							if (!this_.form.bizDate) return this_.$refs.uNotify.show({
+								top: this_.revenueTop,
+								type: 'warning',
+								message: '请选择日期!'
+							})
+							uni.showLoading({
+								title: '操作中',
+								mask: true
+							});
+							let form = {
+								...this_.form,
+								itemList: []
+							}
+							typeSave(form).then(res => {
+								uni.hideLoading();
+								this_.$refs.uNotify.success('操作成功')
+								uni.navigateBack()
+							})
+						}
+					}
+				});
+			}
+		}
+	}
+</script>
+
+<style scoped>
+	.submitBar {
+		width: 100%;
+		position: fixed;
+		bottom: 20rpx;
+		font-size: 32rpx;
+		color: #000;
+		text-align: center;
+		border-top: 2rpx solid #f2f2f6;
+	}
+	.custom-style {
+		color: #3ab2f7;
+		margin-top: 40rpx;
+		box-shadow: 2px 5px 10px 1px rgba(43, 117, 250, 0.3);
+	}
+</style>

BIN
static/certificate/distribution/tubao.keystore


BIN
static/certificate/distribution/tubaosoft.mobileprovision


BIN
static/certificate/distribution/yichepeipartsshopAppProfile.mobileprovision


BIN
static/certificate/distribution/yichepeipartsshopAppProfile.p12