cmy 2 anni fa
commit
c2cf2a2083
100 ha cambiato i file con 42879 aggiunte e 0 eliminazioni
  1. 13 0
      .gitignore
  2. 47 0
      App.vue
  3. 12 0
      README.md
  4. 0 0
      common/amap-wx.js
  5. 58 0
      common/check.js
  6. 24 0
      common/config.js
  7. 458 0
      common/http.api.js
  8. 66 0
      common/http.interceptor.js
  9. 631 0
      common/node.js
  10. 172 0
      common/qiniuUploader.js
  11. 213 0
      common/utils.js
  12. 54 0
      components/AddData.vue
  13. 35 0
      components/CateTree.vue
  14. 66 0
      components/SelDepartment.vue
  15. 74 0
      components/Tabbar/index.vue
  16. 236 0
      components/editor/editor-icon.css
  17. BIN
      components/editor/editor-icon.ttf
  18. 278 0
      components/editor/editor.vue
  19. 42 0
      components/empty/index.vue
  20. 200 0
      components/ly-tree/components/ly-checkbox.vue
  21. 435 0
      components/ly-tree/ly-tree-node.vue
  22. 611 0
      components/ly-tree/ly-tree.vue
  23. 538 0
      components/ly-tree/model/node.js
  24. 419 0
      components/ly-tree/model/tree-store.js
  25. 115 0
      components/ly-tree/tool/util.js
  26. 191 0
      components/qiniu/QiniuUpload.vue
  27. 172 0
      components/qiniu/qiniuUploader.js
  28. 36 0
      components/region/RegionSel.vue
  29. 14010 0
      components/region/area.json
  30. 151 0
      components/tki-tree/style.css
  31. 90 0
      components/tki-tree/tki-tree.vue
  32. 30 0
      components/uni-status-bar.vue
  33. 60 0
      main.js
  34. 113 0
      manifest.json
  35. 55 0
      mixin/goPage.js
  36. 787 0
      pages.json
  37. 235 0
      pages/app/app.js
  38. 201 0
      pages/app/index.vue
  39. 613 0
      pages/customer/CustomerList.vue
  40. 118 0
      pages/enterprise/index.vue
  41. 796 0
      pages/goods/AddGoodsOneStore.vue
  42. 723 0
      pages/goods/AddSelGoods.vue
  43. 322 0
      pages/goods/SaleGoodsDetail.vue
  44. 1159 0
      pages/goods/SkuOneStore.vue
  45. 288 0
      pages/goods/goodsDetail.vue
  46. 695 0
      pages/goods/index.vue
  47. 649 0
      pages/goods/sku.vue
  48. 131 0
      pages/index/WxCode.vue
  49. 1107 0
      pages/index/index.vue
  50. 291 0
      pages/login/index.vue
  51. 982 0
      pages/order/OrderAdd.vue
  52. 127 0
      pages/order/OrderGoodsList.vue
  53. 782 0
      pages/order/OrderList.vue
  54. 523 0
      pages/order/OrderReturn.vue
  55. 111 0
      pages/order/index.vue
  56. 899 0
      pages/order/orderInfo.vue
  57. 386 0
      pages/user/index.vue
  58. 421 0
      pagesT/Finance/AddApplyReceipt.vue
  59. 196 0
      pagesT/Finance/ApplyReceipt.vue
  60. 206 0
      pagesT/Finance/ApplyReceiptDetail.vue
  61. 248 0
      pagesT/Finance/CustomerBalance.vue
  62. 380 0
      pagesT/Finance/CustomerBalanceDetail.vue
  63. 342 0
      pagesT/Finance/ReturnFrom.vue
  64. 264 0
      pagesT/Finance/ReturnFromAdd.vue
  65. 149 0
      pagesT/Finance/ReturnFromDetails.vue
  66. 509 0
      pagesT/Purchase/AddPurchase.vue
  67. 388 0
      pagesT/Purchase/AddPurchaseReturn.vue
  68. 147 0
      pagesT/Purchase/AddSupplier.vue
  69. 289 0
      pagesT/Purchase/PurchaseDetail.vue
  70. 206 0
      pagesT/Purchase/PurchaseGoods.vue
  71. 294 0
      pagesT/Purchase/PurchaseReturnDetail.vue
  72. 222 0
      pagesT/Purchase/PurchaseReturnOrder.vue
  73. 141 0
      pagesT/Purchase/Supplier.vue
  74. 154 0
      pagesT/Purchase/SupplierDetail.vue
  75. 215 0
      pagesT/Purchase/index.vue
  76. 303 0
      pagesT/account/AccountDetails.vue
  77. 297 0
      pagesT/account/AccountManagement.vue
  78. 301 0
      pagesT/account/AddAcount.vue
  79. 99 0
      pagesT/account/selAccount.vue
  80. 128 0
      pagesT/brand/selBrand.vue
  81. 300 0
      pagesT/customer/AddCustomer.vue
  82. 236 0
      pagesT/customer/BuyLogs.vue
  83. 295 0
      pagesT/customer/CommunicationLogs.vue
  84. 208 0
      pagesT/customer/CommunicationLogsAdd.vue
  85. 339 0
      pagesT/customer/CustomerDetail.vue
  86. 41 0
      pagesT/customer/CustomerMap.vue
  87. 413 0
      pagesT/customer/StaffList.vue
  88. 332 0
      pagesT/customer/VisitLogs.vue
  89. 218 0
      pagesT/customer/components/BuyLogs.vue
  90. 129 0
      pagesT/customer/components/CommunicationLogs.vue
  91. 328 0
      pagesT/customer/components/CustomerOrder.vue
  92. 229 0
      pagesT/customer/components/Visitslogs.vue
  93. 165 0
      pagesT/customer/components/moneyDetail.vue
  94. 147 0
      pagesT/customer/selCustomer.vue
  95. 123 0
      pagesT/customer/selCustomerType.vue
  96. 164 0
      pagesT/driver/driver.vue
  97. 187 0
      pagesT/goods/AddGoodsclassification.vue
  98. 377 0
      pagesT/goods/BaseGoodslist.vue
  99. 535 0
      pagesT/goods/GoodsbyWarehouse.vue
  100. 584 0
      pagesT/goods/addGoods.vue

+ 13 - 0
.gitignore

@@ -0,0 +1,13 @@
+.DS_Store
+/dist
+package-lock.json
+yarn.lock
+yarn-error.log
+.idea/
+.vscode/
+loader
+electron-dist/
+build/packages
+/unpackage/
+/node_modules/
+.hbuilderx/

+ 47 - 0
App.vue

@@ -0,0 +1,47 @@
+<script>
+// #ifdef APP-PLUS
+import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
+// #endif
+export default {
+	onLaunch: function() {
+		// #ifdef MP-WEIXIN
+		const updateManager = wx.getUpdateManager();
+		updateManager.onCheckForUpdate(function(res) {
+			// 请求完新版本信息的回调
+			console.log(res.hasUpdate);
+		});
+		updateManager.onUpdateReady(function() {
+			wx.showModal({
+				title: '更新提示',
+				content: '新版本已经准备好,是否重启应用?',
+				success: function(res) {
+					if (res.confirm) {
+						// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
+						updateManager.applyUpdate();
+					}
+				}
+			});
+		});
+		updateManager.onUpdateFailed(function() {
+			// 新版本下载失败
+		});
+		// #endif
+		// #ifdef APP-PLUS
+		checkUpdate();
+		// #endif
+	},
+	onShow: function() {
+		// console.log('App Show');
+	},
+	onHide: function() {
+		// console.log('App Hide');
+	}
+};
+</script>
+<style lang="scss">
+@import 'uview-ui/index.scss';
+</style>
+<style>
+@import url('./static/css/iconfont.css');
+@import url('./static/css/common.css');
+</style>

+ 12 - 0
README.md

@@ -0,0 +1,12 @@
+# 千年云商 手机管理端 微信小程序
+
+#### 介绍
+六牛云商 - 为传统商户量身打造的全渠道线上线下一体化新零售营销系统! 以客户为中心,将线上和线下、进销存、CRM、财务一体化,完美融合!支持连锁、代理、经销多种运营模式,小程序一键发布,自定义APP界面,多套模板选择。7X24小时为您服务
+#### 软件架构
+uni-app 开发,前端框架uView
+
+#### git仓库
+
+git@gitee.com:qianniaoyunshang/new-mobile-management-terminal.git
+
+

File diff suppressed because it is too large
+ 0 - 0
common/amap-wx.js


+ 58 - 0
common/check.js

@@ -0,0 +1,58 @@
+import store from '@/store';
+/**
+ * 获取用户权限节点
+ * @returns {*}
+ */
+export function getUserAccess() {
+	return store.state.access.custom
+}
+/**
+ * 获取用户数据域权限
+ * @returns {*}
+ */
+export function getDataField() {
+	return store.state.access.dataField
+}
+
+/**
+ * 是否超级管理员
+ * @returns {boolean}
+ */
+export function isSuperAdmin() {
+	return store.state.access.isAdministrator
+}
+
+
+/**
+ * 检查操作权限
+ * @param role
+ * @returns {boolean}
+ */
+export function checkActionAccess(role) {
+	if (isSuperAdmin()) {
+		return true;
+	}
+	if (role === undefined) {
+		return true;
+	}
+	const roles = getUserAccess();
+	return checkAccess(role, roles);
+}
+
+/**
+ * 检查权限
+ * @param role
+ * @param rolescheckRouterAccess
+ * @returns {boolean}
+ */
+export function checkAccess(role, roles = []) {
+	let isCheck = false;
+	for (let i in roles) {
+		const item = roles[i];
+		if (item === role) {
+			isCheck = true;
+			break;
+		}
+	}
+	return isCheck;
+}

+ 24 - 0
common/config.js

@@ -0,0 +1,24 @@
+const url = {
+	dev: {
+		QN_URL: 'http://crm.frp.liuniu946.com',
+		QINIU_URL: 'http://image.qianniao.vip',
+		QINIU_KEY: 'devdemo',
+		QN_UP: 'https://upload-z2.qiniup.com', //文件上传地址
+		QRC_SRC: 'https://upload.qianniao.vip/',
+		gdKey:"775628a360cfa78c86d58691ec58cb4e"
+	},
+	master: {
+		// #ifdef H5
+		QN_URL: 'http://localhost:8080',
+		// #endif
+		// #ifndef H5
+		QN_URL: 'http://crm.frp.liuniu946.com',
+		// #endif
+		QINIU_URL: 'https://onlineimg.qianniao.vip',
+		QINIU_KEY: 'qianniaoonline',
+		QN_UP: 'https://upload-z2.qiniup.com', //文件上传地址
+		QRC_SRC: 'https://upload.qianniao.vip/',
+		gdKey:"775628a360cfa78c86d58691ec58cb4e"
+	},
+}
+export default url.master

+ 458 - 0
common/http.api.js

@@ -0,0 +1,458 @@
+// 此处第二个参数vm,就是我们在页面使用的this,你可以通过vm获取vuex等操作,更多内容详见uView对拦截器的介绍部分:
+// https://uviewui.com/js/http.html#%E4%BD%95%E8%B0%93%E8%AF%B7%E6%B1%82%E6%8B%A6%E6%88%AA%EF%BC%9F
+const install = (Vue, vm) => {
+
+	// 将各个定义的接口名称,统一放进对象挂载到vm.$u.api(因为vm就是this,也即this.$u.api)下
+	vm.$u.api = {
+		// 单据小票统一打印
+		toPrint: (params = '') => vm.$u.post(`/Common/Receipt/toPrint`, params),
+		//  获取企业基本设置 
+		getBasicSetup: (params = '') => vm.$u.get(`/System/BasicSetup/getBasicSetup`, params),
+		//新增/修改用户常用应用
+		updateCommonApp: (userid, params = '') => vm.$u.put(
+			`/SystemSettings/CommonApp/updateCommonApp/${userid}`, params),
+		//用户常用应用详情
+		getCommonAppInfo: (userid, params = '') => vm.$u.get(
+			`/SystemSettings/CommonApp/getCommonAppInfo/${userid}`, params),
+		// 生成七牛上传凭证
+		uploadToken: (params = '') => vm.$u.post(`/Common/Upload/uploadToken`, params),
+		UploadDel: (params = '') => vm.$u.post(`/Common/Upload/delete`, params),
+		// 获取分享微信小程序码 //{"path":"/pages/product/product?id=62"}
+		createwxaqrcode: (params = '') => vm.$u.post(`/common/login/createwxaqrcode`, params),
+		// 首页概况
+		overview: (params = '') => vm.$u.post(`/Enterprise/Enterprise/overview`, params),
+		// 登录
+		login: (params = '') => vm.$u.post(`/UserCenter/UserCenterLogin/login`, params),
+		// 获取企业列表
+		getAllEnterprise: (params = '') => vm.$u.get(`/Enterprise/UserEnterprise/getAllEnterprise`, params),
+		//  当前登录用户的权限
+		getAclList: (roleType, params = '') => vm.$u.get(`/Enterprise/UserEnterprise/getAclList/${roleType}`,
+			params),
+		//  获取当前登录员工信息
+		getStaffByToken: (roleType, params = '') => vm.$u.get(
+			`/Enterprise/Enterprise/getStaffByToken/${roleType}`, params),
+		// 修改密码
+		updateUserCenterData: (params = '') => vm.$u.post(`/Enterprise/UserEnterprise/updateUserCenterData`,
+			params),
+		// 修改账号
+		updateUserMobile: (params = '') => vm.$u.post(`/UserCenter/UserCenterRegister/updateUserMobile`,
+			params),
+		/*------商品------*/
+		//  获取所有商品分类
+		getAllCategory: (params = '') => vm.$u.post(`/GoodsCategory/GoodsCategory/getAllCategory`, params),
+		//  商品资料列表
+		getAllGoodsBasic: (params = '') => vm.$u.post(`/GoodsManage/GoodsBasic/getAllGoodsBasic`, params),
+		// 商铺下允许销售的商品列表
+		getGoodsBasicOfShopId: (params = '') => vm.$u.post(`GoodsManage/GoodsBasic/getGoodsBasicOfShopId`,
+			params),
+		//  搜索商品列表
+		searchGoods: (params = '') => vm.$u.post(`/GoodsManage/GoodsBasic/search`, params),
+		// 添加商品(单店铺版新增)
+		addBasicAndPublishGoods: (params = '') => vm.$u.post(`/Goods/QuickGoods/addBasicAndPublishGoods`,
+			params),
+		// 编辑商品(单店铺版编辑)
+		editQuickGoods: (params = '') => vm.$u.post(`/Goods/QuickGoods/editQuickGoods`,
+			params),
+		// 商品详情(单店铺版编辑)
+		getQuickGoodsInfo: (id, params = '') => vm.$u.post(`/Goods/QuickGoods/getQuickGoodsInfo/${id}`,
+			params),
+		//  品牌列表
+		getAllBrand: (params = '') => vm.$u.post(`/GoodsManage/GoodsBrand/getAllBrand`, params),
+		// 获取计量单位
+		getAllUnit: (params = '') => vm.$u.post(`/GoodsManage/Units/getAll`, params),
+
+		// 获取属性列表
+		getAllSpecManage: (params = '') => vm.$u.post(`/GoodsManage/SpecManage/getAll`, params),
+		// 添加商品基础数据
+		addGoodsBasic: (params = '') => vm.$u.post(`/GoodsManage/GoodsBasic/addGoodsBasic`, params),
+		// 基础商品资料
+		getAllGoodsBasicBySku: (params = '') => vm.$u.post(`GoodsManage/GoodsBasic/getAllGoodsBasicBySku`,
+			params),
+		//  获取商品基础资料详情
+		getGoodsBasicInfoById: (id, params = '') => vm.$u.post(
+			`/GoodsManage/GoodsBasic/getGoodsBasicInfoById/${id}`, params),
+		// 修改基础商品
+		editGoodsBasic: (id, params = '') => vm.$u.put(`/GoodsManage/GoodsBasic/editGoodsBasic/${id}`, params),
+		// 商品禁用启用操作
+		updateEnableStatusGoods: (params = '') => vm.$u.put(`/GoodsManage/GoodsBasic/updateEnableStatus`,
+			params),
+		// 商品列表
+		getAllGoods: (params = '') => vm.$u.post(`/Goods/Goods/getAllGoods`, params),
+		// 商品搜索
+		getAllGoodsSearch: (params = '') => vm.$u.post(`/Goods/Goods/search`, params),
+		// 添加商品
+		addGoods: (params = '') => vm.$u.post(`/Goods/Goods/addGoods`, params),
+		// 商品详情
+		getGoodsInfo: (id, params = '') => vm.$u.post(`/Goods/Goods/getGoodsInfo/${id}`, params),
+		// 商品修改
+		editGoods: (id, params = '') => vm.$u.put(`/Goods/Goods/editGoods/${id}`, params),
+		// 删除商品
+		delGoods: (id, params = '') => vm.$u.get(`/Goods/Goods/delGoods/${id}`, params),
+		// 商品上下架
+		GoodsUpdateEnableStatus: (params = '') => vm.$u.post(`/Goods/Goods/updateEnableStatus`, params),
+		// 商品上下架
+		getAllGoodsBySku: (params = '') => vm.$u.post(`/Goods/Goods/getAllGoodsBySku`, params),
+		// 根据条码获取商品
+		getGoodsByBarCode: (params = '') => vm.$u.post(`/Goods/Goods/getGoodsByBarCode`, params),
+		// 获取所有商品服务
+		getAllGoodsSupport: (params = '') => vm.$u.post(`Goods/GoodsSupport/getAllGoodsSupport`, params),
+		// 新增商品分类
+		addCategory: (params = '') => vm.$u.post(`GoodsCategory/GoodsCategory/addCategory`, params),
+		// 获取商品分类详情
+		getCategoryInfoById: (id, params = '') => vm.$u.get(
+			`GoodsCategory/GoodsCategory/getCategoryInfoById/${id}`, params),
+		// 修改商品分类
+		editCategory: (id, params = '') => vm.$u.put(`GoodsCategory/GoodsCategory/editCategory/${id}`, params),
+		// 删除商品分类
+		delCategory: (id, params = '') => vm.$u.delete(`GoodsCategory/GoodsCategory/delCategory/${id}`, params),
+		/*------客户------*/
+		// 新建客户
+		addCustomer: (params = '') => vm.$u.post(`/Customer/Customer/addCustomer`, params),
+		// 客户详情
+		getCustomerInfo: (id, params = '') => vm.$u.get(`/Customer/Customer/getCustomerInfo/${id}`, params),
+		// 编辑客户
+		editCustomer: (id, params = '') => vm.$u.post(`/Customer/Customer/editCustomer/${id}`, params),
+		// 客户列表
+		getAllCustomer: (params = '') => vm.$u.post(`/Customer/Customer/getAllCustomer`, params),
+		// 客户搜索
+		searchCustomer: (params = '') => vm.$u.post(`/Customer/Customer/search`, params),
+		// 客户类型无分页
+		getCustomerSourceList: (params = '') => vm.$u.post(`/System/CustomerSource/getCustomerSourceList`,
+			params),
+		// 客户收货地址列表
+		getAllShippingAddress: (id, params = '') => vm.$u.post(
+			`/Customer/ShippingAddress/getAllShippingAddress/${id}`, params),
+		// 客户收货地址添加
+		addShippingAddress: (params = '') => vm.$u.post(`/Customer/ShippingAddress/addShippingAddress`, params),
+		// 获取指定客户浏览记录
+		getCustomerVisitsLogInfo: (params = '') => vm.$u.post(
+			`/Customer/CustomerVisitsLog/getCustomerVisitsLogInfo`, params),
+		// 客户购买记录
+		searchCustomerBuyLog: (params = '') => vm.$u.post(`/Customer/Customer/searchCustomerBuyLog`, params),
+		// 客户跟进记录
+		getAllCustomerCommunication: (params = '') => vm.$u.post(
+			`/Customer/CustomerCommunication/getAllCustomerCommunication`, params),
+		// 单个客户跟进记录
+		getCustomerCommunication: (id, params = '') => vm.$u.get(
+			`/Customer/CustomerCommunication/getCustomerCommunication/${id}`, params),
+		// 新增跟进记录
+		addCustomerCommunication: (params = '') => vm.$u.post(
+			`Customer/CustomerCommunication/addCustomerCommunication`, params),
+		// 修改跟进记录
+		updateCustomerCommunication: (id, params = '') => vm.$u.put(
+			`/Customer/CustomerCommunication/updateCustomerCommunication/${id}`, params),
+		// 客户浏览记录
+		getAllCustomerVisitsLog: (params = '') => vm.$u.post(
+			`/Customer/CustomerVisitsLog/getAllCustomerVisitsLog`, params),
+		// 销售排行
+		salesManRank: (params = '') => vm.$u.post(`/Customer/Customer/salesManRank`, params),
+		// 客户审核
+		updateCustomerCheckStatus: (params = '') => vm.$u.post(`/Customer/Customer/updateCustomerCheckStatus`,
+			params),
+		/*------订单------*/
+		//销售退货驳回
+		rejectOrderReturn: (params = '') => vm.$u.put(`/Order/OrderReturn/rejectOrderReturn`, params),
+		// 退货单的搜索
+		searchAllOrderOut: (params = '') => vm.$u.post(`/Order/OrderReturn/searchAllOrderReturn`, params),
+		// 销售退货单列表
+		getAllOrderReturn: (params = '') => vm.$u.post(`/Order/OrderReturn/getAllOrderReturn`, params),
+		// 销售退货审核
+		auditOrderOut: (id, params = '') => vm.$u.put(`/Order/OrderReturn/auditOrderReturn/${id}`, params),
+		// 删除销售退货单
+		deleteOrderOut: (id, params = '') => vm.$u.get(`/Order/OrderReturn/deleteOrderReturn/${id}`, params),
+		// 销售退货详情
+		getOrderOut: (id, params = '') => vm.$u.get(`/Order/OrderReturn/getOrderReturn/${id}`, params),
+		// 销售退货修改
+		updateOrderReturn: (id, params = '') => vm.$u.put(`/Order/OrderReturn/updateOrderReturn/${id}`, params),
+		// 销售退货添加
+		addOrderOut: (params = '') => vm.$u.post(`/Order/OrderReturn/addOrderReturn`, params),
+		// 获取订单
+		getAllOrder: (params = '') => vm.$u.post(`/Order/Order/getAllOrder`, params),
+		// 搜索订单(旧接口,废弃)
+		searchOrder: (params = '') => vm.$u.post(`/Order/Order/search`, params),
+		// 搜索订单新接口
+		keywordSearch: (params = '') => vm.$u.post(`/Order/Order/keywordSearch`, params),
+		// 添加订单
+		newAddOrder: (params = '') => vm.$u.post(`/Order/Order/add`, params),
+		// 新订单编辑
+		newOrderEdit: (id, params = '') => vm.$u.post(`/Order/Order/edit/${id}`, params),
+		// 订单详情
+		getOrderInfoById: (id, params = '') => vm.$u.post(`/Order/Order/getOrderInfoById/${id}`, params),
+		// 审核订单
+		updateAuditStatus: (id, params = '') => vm.$u.put(`/Order/Order/updateAuditStatus/${id}`, params),
+		// 取消订单
+		updateOrderStatus: (id, params = '') => vm.$u.put(`/Order/Order/updateOrderStatus/${id}`, params),
+		// 驳回订单
+		revokeAudit: (id, params = '') => vm.$u.put(`/Order/Order/revokeAudit/${id}`, params),
+		// 再次出库
+		reStockOut: (id, params = '') => vm.$u.post(`/Order/Order/reStockOut/${id}`, params),
+		// 配送方式列表
+		getAllDelivery: (params = '') => vm.$u.post(`/System/DeliverySetting/allDelivery`, params),
+		// 获取自提点
+		getAllSelfExpressRule: (params = '') => vm.$u.get(`/System/DeliverySetting/getAllSelfExpressRule`,
+			params),
+		/*------组织------*/
+
+		// 部门
+		getAllDepartment: (params = '') => vm.$u.post(`/Department/Department/getAllDepartment`, params),
+		// 员工
+		getAllStaff: (params = '') => vm.$u.post(`/Department/Staff/getAllStaff`, params),
+		/*------商铺------*/
+		// 商铺列表
+		getAllShop: (params = '') => vm.$u.post(`/Shop/Shop/getAllShop`, params),
+		// 商铺列表搜索
+		shopSearch: (params = '') => vm.$u.post(`/Shop/Shop/search`, params),
+		// 获取指定店铺绑定的所有仓库数据
+		getShopBindWarehouse: (id, params = '') => vm.$u.post(`/shop/shop/getShopBindWarehouse/${id}`, params),
+		/*------设置------*/
+		// 支付方式
+		getAllPayment: (params = '') => vm.$u.post(`/System/PaymentSetting/getAllPayment`, params),
+		// 运费模版
+		getAllExpressRule: (params = '') => vm.$u.post(`/System/DeliverySetting/getAllExpressRule`, params),
+		/*------采购------*/
+		// 供应商管理
+		getAllSupplier: (params = '') => vm.$u.post(`/Purchase/Supplier/getAllSupplier`, params),
+		// 添加供应商
+		addSupplier: (params = '') => vm.$u.post(`Purchase/Supplier/addSupplier`, params),
+		// 获取供应商详情
+		getSupplierByUserCenterId: (params = '') => vm.$u.get(`/Purchase/Supplier/getSupplierByUserCenterId`,
+			params),
+		// 编辑供应商
+		editSupplier: (id, params = '') => vm.$u.post(`Purchase/Supplier/editSupplier/${id}`, params),
+		// 供应商余额表
+		getAllSupplierBalanceDetail: (params = '') => vm.$u.post(
+			`/Finance/SupplierBalanceDetail/getAllSupplierBalanceDetail`, params),
+		// 采购单列表
+		getAllPurchase: (params = '') => vm.$u.post(`/Purchase/Purchase/getAllPurchase`, params),
+		// 采购单详情
+		getPurchaseInfoById: (id, params = '') => vm.$u.get(`/Purchase/Purchase/getPurchaseInfoById/${id}`,
+			params),
+		// 采购订单详情和批次数据(采购退货单用)
+		getPurchaseAndBatchInfoById: (params = '') => vm.$u.post(
+			`/Purchase/Purchase/getPurchaseAndBatchInfoById`,
+			params),
+		// 删除采购单
+		delPurchase: (id, params = '') => vm.$u.delete(`/Purchase/Purchase/delPurchase/${id}`,
+			params),
+		// 采购单审核
+		updateAuditStatusPurchase: (id, params = '') => vm.$u.put(`/Purchase/Purchase/updateAuditStatus/${id}`,
+			params),
+		// 增加采购订单
+		addPurchase: (params = '') => vm.$u.put(`/Purchase/Purchase/addPurchase`, params),
+		// 编辑采购单
+		editPurchase: (id, params = '') => vm.$u.put(`/Purchase/Purchase/editPurchase/${id}`, params),
+		// 采购退货单
+		getAllPurchaseOut: (params = '') => vm.$u.post(`/Purchase/PurchaseOut/getAllPurchaseOut`,
+			params),
+		// 采购退货单详情
+		getPurchaseOutInfoById: (id, params = '') => vm.$u.get(
+			`/Purchase/PurchaseOut/getPurchaseOutInfoById/${id}`,
+			params),
+		// 采购退货单审核
+		updatePurchaseOut: (id, params = '') => vm.$u.put(`/Purchase/PurchaseOut/updateAuditStatus/${id}`,
+			params),
+		// 删除采购退货单
+		delPurchaseOut: (id, params = '') => vm.$u.delete(`/Purchase/PurchaseOut/delPurchaseOut/${id}`,
+			params),
+		// 编辑采购退货单
+		editPurchaseOut: (id, params = '') => vm.$u.put(`/Purchase/PurchaseOut/editPurchase/${id}`, params),
+		// 增加采购退货单
+		addPurchaseOut: (params = '') => vm.$u.post(`/Purchase/PurchaseOut/addPurchaseOut`, params),
+
+		// 供应商详情
+		getSupplierInfoById: (id, params = '') => vm.$u.get(`/Purchase/Supplier/getSupplierInfoById/${id}`,
+			params),
+		// 供应商状态切换
+		SupplierUpdateEnableStatus: (id, params = '') => vm.$u.put(
+			`/Purchase/Supplier/updateEnableStatus/${id}`,
+			params),
+		// 供应商删除
+		delSupplier: (id, params = '') => vm.$u.delete(`/Purchase/Supplier/delSupplier/${id}`, params),
+		// 获取价格暂存
+		getMoneyPauseSave: (params = '') => vm.$u.post(`/Common/PauseSave/getMoneyPauseSave`, params),
+		// 换算基本单位sku数量
+		getMasterSkuNum: (params = '') => vm.$u.post(`/Stock/Inventory/getMasterSkuNum`, params),
+		// 价格暂存添加
+		addMoneyPauseSave: (params = '') => vm.$u.post(`/Common/PauseSave/addMoneyPauseSave`, params),
+		// 库位列表
+		getAllStorageLocation: (params = '') => vm.$u.post(`/Stock/StorageLocation/getAllStorageLocation`,
+			params),
+		// 库区列表
+		getAllReservoir: (params = '') => vm.$u.post(`/Stock/StorageLocation/getAllReservoir`, params),
+		/*------财务------*/
+		// 收款申请单
+		getAllReceiptRequisition: (params = '') => vm.$u.post(
+			`/Finance/ReceiptRequisition/getAllReceiptRequisition`, params),
+		// 收款申请单详情
+		getReceiptRequisitionInfo: (id, params = '') => vm.$u.post(
+			`/Finance/ReceiptRequisition/getReceiptRequisitionInfo/${id}`, params),
+		// 收款申请单审核
+		updateReceiptRequisitionStatus: (params = '') => vm.$u.post(
+			`/Finance/ReceiptRequisition/updateReceiptRequisitionStatus`, params),
+		// 编辑收款申请单
+		editReceiptRequisition: (id, params = '') => vm.$u.post(
+			`/Finance/ReceiptRequisition/editReceiptRequisition/${id}`, params),
+		// 新增收款申请单
+		addReceiptRequisition: (params = '') => vm.$u.post(`/Finance/ReceiptRequisition/addReceiptRequisition`,
+			params),
+		// 账户列表
+		getAllAccount: (params = '') => vm.$u.post(`/Finance/Account/getAllAccount`, params),
+		// 客户余额表
+		getAllCustomerBalance: (params = '') => vm.$u.post(`Finance/CustomerBalance/getAllCustomerBalance`,
+			params),
+		// 客户余额明细表
+		getAllCustomerBalanceDetail: (params = '') => vm.$u.post(
+			`/Finance/CustomerBalanceDetail/getAllCustomerBalanceDetail`, params),
+		/*------库存------*/
+		// 仓库管理
+		getAllWarehouse: (params = '') => vm.$u.post(`/Stock/Warehouse/getAllWarehouse`, params),
+
+		// 库区列表(不分页)
+		getListReservoir: (params = '') => vm.$u.post(`/Stock/ReservoirArea/getListReservoir`, params),
+		// 出库单
+		getAllInventoryOut: (params = '') => vm.$u.post(`/Stock/InventoryOut/getAllInventoryOut`, params),
+		// 出库单搜索
+		searchAllInventoryOut: (params = '') => vm.$u.post(`/Stock/InventoryOut/searchAllInventoryOut`, params),
+		// 出库单详情
+		getInventoryOutInfo: (id, params = '') => vm.$u.get(`/Stock/InventoryOut/getInventoryOutInfo/${id}`,
+			params),
+		// 出库状态修改
+		updateSaleOutStatus: (params = '') => vm.$u.post(`/Stock/InventoryOut/updateInventoryOutStatus`,
+			params),
+		// 根据条码获取出库单商品信息
+		getDetailByGoodsCode: (params = '') => vm.$u.post(`/Stock/InventoryOut/getDetailByGoodsCode`,
+			params),
+		// 入库单
+		getAllInventoryIn: (params = '') => vm.$u.post(`/Stock/InventoryIn/getAllInventoryIn`, params),
+		// 入库单搜索
+		searchAllInventoryIn: (params = '') => vm.$u.post(`/Stock/InventoryIn/searchAllInventoryIn`, params),
+		// 入库单详情
+		getInventoryInInfo: (id, params = '') => vm.$u.post(`/Stock/InventoryIn/getInventoryInInfo/${id}`,
+			params),
+		// 入库状态修改
+		updateInventoryInStatus: (params = '') => vm.$u.post(`/Stock/InventoryIn/updateInventoryInStatus`,
+			params),
+		// 库存查询
+		getInventoryAll: (params = '') => vm.$u.post(`/Stock/Inventory/getInventoryAll`,
+			params),
+		// 库存流水搜索
+		searchAllInventoryDetails: (params = '') => vm.$u.post(`stock/Inventory/searchAllInventoryDetails`,
+			params),
+		// 仓库库存
+		getInventoryByWarehouseId: (params = '') => vm.$u.post(`stock/Inventory/getInventoryByWarehouseId`,
+			params),
+		// 库存分布
+		getWarehouseInventory: (id, params = '') => vm.$u.post(
+			`/Stock/Inventory/getWarehouseInventory/${id}`,
+			params),
+		// 库区库位By商品
+		getAreaDateBySkuId: (params = '') => vm.$u.post(`/Stock/Inventory/getAreaDateBySkuId`, params),
+		// 收益
+		getStaffInfo: (id, params = '') => vm.$u.post(`Department/Staff/getStaffInfo/${id}`, params),
+		/*------司机------*/
+		// 司机列表
+		getAllDriver: (params = '') => vm.$u.post(`/System/Driver/getAllDriver`, params),
+		// 物流信息
+		addLogistics: (params = '') => vm.$u.post(`/Order/Order/addLogistics`, params),
+		// 出库设置物流信息
+		inventoryOutAddLogistics: (params = '') => vm.$u.post(`/Stock/InventoryOut/addLogistics`, params),
+		/*------公告------*/
+		//公告列表
+		getAllAnnouncement: (params = '') => vm.$u.post(`/System/Announcement/getAllAnnouncement`, params),
+		// 公告详情
+		getAnnouncementInfo: (id, params = '') => vm.$u.get(`/System/Announcement/getAnnouncementInfo/${id}`,
+			params),
+		// 首页弹窗公告详情
+		getupStatusAnnouncementInfo: (params = '') => vm.$u.get(
+			`/System/Announcement/getupStatusAnnouncementInfo`, params),
+		// 盘点单
+		getAllStocktaking: (params = '') => vm.$u.post(`/Stock/Stocktaking/getAllStocktaking`, params),
+		// 盘点单审核
+		auditStocktaking: (id, params = '') => vm.$u.post(`/Stock/Stocktaking/auditStocktaking/${id}`, params),
+		// 盘点单编辑
+		updateStocktaking: (id, params = '') => vm.$u.post(`/Stock/Stocktaking/updateStocktaking/${id}`,
+			params),
+		// 盘点添加
+		addStocktaking: (params = '') => vm.$u.post(`/Stock/Stocktaking/addStocktaking`, params),
+		// 盘点单搜索
+		searchAllStocktaking: (params = '') => vm.$u.post(`/Stock/Stocktaking/searchAllStocktaking`, params),
+		// 盘点单详情
+		getStocktakingInfo: (id, params = '') => vm.$u.get(`/Stock/Stocktaking/getStocktakingInfo/${id}`,
+			params),
+		// 商品销售报表
+		goods: (params = '') => vm.$u.post(`/Charts/Charts/goods`, params),
+		// 客户商品报表
+		customerGoods: (params = '') => vm.$u.post(`/Charts/Charts/customerGoods`, params),
+		// 报损单
+		getAllReportLoss: (params = '') => vm.$u.post(`/Stock/ReportLoss/getAllReportLoss`, params),
+		// 报损单删除
+		deleteReportLoss: (id, params = '') => vm.$u.post(`/Stock/ReportLoss/deleteReportLoss/${id}`, params),
+		// 报损单详情
+		getReportLossInfo: (id, params = '') => vm.$u.post(`/Stock/ReportLoss/getReportLossInfo/${id}`, params),
+		// 报损单添加
+		addReportLoss: (params = '') => vm.$u.post(`/Stock/ReportLoss/addReportLoss`, params),
+		// 报损单审核
+		auditReportLoss: (id, params = '') => vm.$u.post(`/Stock/ReportLoss/auditReportLoss/${id}`, params),
+		// 调拨单
+		getAllAllocate: (params = '') => vm.$u.post(`/Stock/Allocate/getAllAllocate`, params),
+		// 调拨单编辑
+		updateAllocate: (id, params = '') => vm.$u.post(`/Stock/Allocate/updateAllocate/${id}`, params),
+		// 调拨单详情
+		getAllocateInfo: (id, params = '') => vm.$u.get(`/Stock/Allocate/getAllocateInfo/${id}`, params),
+		// 新增调拨单
+		addAllocate: (params = '') => vm.$u.post(`/Stock/Allocate/addAllocate`, params),
+		// 调拨单审核
+		auditAllocate: (id, params = '') => vm.$u.post(`/Stock/Allocate/auditAllocate/${id}`, params),
+		// 调拨单搜索
+		searchAllocate: (params = '') => vm.$u.post(`/Stock/Allocate/searchAllocate`, params),
+		//调拨删除
+		deleteAllocate: (id, params = '') => vm.$u.post(`/Stock/Allocate/deleteAllocate/${id}`, params),
+		// 客户订单报表
+		customerOrder: (params = '') => vm.$u.post(`/Charts/Charts/customerOrder`, params),
+		// 订单数据报表
+		order: (params = '') => vm.$u.post(`/Charts/Charts/order`, params),
+		// 地区订单报表
+		areaOrder: (params = '') => vm.$u.post(`/Charts/Charts/areaOrder`, params),
+		// 拜访报表
+		getAllCustomerVisit: (params = '') => vm.$u.post(`/Customer/CustomerCommunication/getAllCustomerVisit`,
+			params),
+		// 拜访报表
+		getCustomerCallOnReportForm: (params = '') => vm.$u.post(
+			`/Customer/CustomerCommunication/getCustomerCallOnReportForm`,
+			params),
+		// 拜访明细
+		getCustomerVisitInfo: (params = '') => vm.$u.post(
+			`/Customer/CustomerCommunication/getCustomerVisitInfo`, params),
+
+		// 退款单列表
+		getAllRefund: (params = '') => vm.$u.post(`Finance/Refund/getAllRefund`, params),
+		// 退款单详情
+		getRefundInfo: (params = '') => vm.$u.post(`Finance/Refund/getRefundInfo`, params),
+		// 退款单审核
+		updateRefundStatus: (params = '') => vm.$u.post(`Finance/Refund/updateRefundStatus`, params),
+		// 退款单新增
+		addRefund: (params = '') => vm.$u.post(`Finance/Refund/addRefund`, params),
+		// 客户分布图
+		getCustomerDistributed: (params = '') => vm.$u.post(`Customer/Customer/getCustomerDistributed`, params),
+
+		// 账户管理明细
+		getAllAccountDetail: (params = '') => vm.$u.post(`/Finance/AccountDetail/getAllAccountDetail`, params),
+		// 账户管理详情
+		getAccountInfo: (id, params = '') => vm.$u.post(`/Finance/Account/getAccountInfo/${id}`, params),
+		// 账户管理删除
+		delAccount: (id, params = '') => vm.$u.post(`/Finance/Account/delAccount/${id}`, params),
+		// 账户管理禁用启用
+		updateAccountStatus: (params = '') => vm.$u.post(`Finance/Account/updateAccountStatus`, params),
+		// 账户管理新增
+		addAccount: (params = '') => vm.$u.post(`/Finance/Account/addAccount`, params),
+		// 账户管理新增
+		editAccount: (id, params = '') => vm.$u.put(`/Finance/Account/editAccount/${id}`, params),
+		//财务类型列表(不含分页)
+		getAllFinanceTypeNoPage: (id, params = '') => vm.$u.get(
+			`/Finance/FinanceType/getAllFinanceTypeNoPage/${id}`, params),
+	};
+}
+
+export default {
+	install
+}

+ 66 - 0
common/http.interceptor.js

@@ -0,0 +1,66 @@
+// 这里的vm,就是我们在vue文件里面的this,所以我们能在这里获取vuex的变量,比如存放在里面的token
+// 同时,我们也可以在此使用getApp().globalData,如果你把token放在getApp().globalData的话,也是可以使用的
+import url from './config.js'
+const install = (Vue, vm) => {
+	Vue.prototype.$u.http.setConfig({
+		baseUrl: url.QN_URL,
+		// 如果将此值设置为true,拦截回调中将会返回服务端返回的所有数据response,而不是response.data
+		// 设置为true后,就需要在this.$u.http.interceptor.response进行多一次的判断,请打印查看具体值
+		// originalData: true, 
+		// 设置自定义头部content-type
+		// header: {
+		// 	'content-type': 'xxx'
+		// }
+	});
+	// 请求拦截,配置Token等参数
+	Vue.prototype.$u.http.interceptor.request = (config) => {
+		// 登录token
+		config.header.Authorization = vm.$store.state.token;
+		// 企业Token
+		config.header.Token = vm.$store.state.enToken;
+
+		// 方式一,存放在vuex的token,假设使用了uView封装的vuex方式,见:https://uviewui.com/components/globalVariable.html
+		// config.header.token = vm.token;
+
+		// 方式二,如果没有使用uView封装的vuex方法,那么需要使用$store.state获取
+		// config.header.token = vm.$store.state.token;
+
+		// 方式三,如果token放在了globalData,通过getApp().globalData获取
+		// config.header.token = getApp().globalData.username;
+
+		// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
+		// const token = uni.getStorageSync('token');
+		// config.header.token = token;
+
+		return config;
+	}
+	// 响应拦截,判断状态码是否通过
+	Vue.prototype.$u.http.interceptor.response = (res) => {
+		uni.hideNavigationBarLoading();
+		uni.stopPullDownRefresh()
+		// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
+		// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
+		if (res.state) {
+			// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
+			return res;
+		} else {
+			if (res.errorcode === 1017 || res.data === '当前企业不存在') {
+				vm.$store.dispatch('logout')
+				// uni.clearStorageSync()
+				// uni.reLaunch({
+				// 	url: '/pages/login/index'
+				// })
+			} else {
+				uni.showToast({
+					title: res.data,
+					icon: 'none'
+				})
+			}
+			return false
+		};
+	}
+}
+
+export default {
+	install
+}

+ 631 - 0
common/node.js

@@ -0,0 +1,631 @@
+export const overview = "overview"; // 首页概况
+// 商品资料
+export const BaseDataList = "goodsManage_BaseDataList"; // 基础资料
+export const getAllGoodsBasic = "BaseDataList_getAllGoodsBasic"; // 列表
+export const AddBaseData = "BaseDataList_addGoodsBasic"; // 添加基础资料
+export const EditBaseData = "BaseDataList_editGoodsBasic"; // 修改基础资料
+export const delBaseData = "BaseDataList_delGoodsBasic"; // 删除基础资料
+export const BaseDataListUpdateEnableStatus = "BaseDataList_updateEnableStatus"; // 启用/禁用
+export const BaseDataListDetail = "BaseDataList_getGoodsBasicInfoById"; // 详情
+export const BaseDataListSearch = "BaseDataList_search"; // 搜索基础商品
+export const BaseDataListUpdateCategory = "BaseDataList_updateCategory"; // 移动基础商品的分类
+export const BaseDataListGetGoodsBasicOfShopId =
+	"BaseDataList_getGoodsBasicOfShopId"; // 商铺下允许销售的商品列表
+export const BaseDataListSetNoSalesShop = "BaseDataList_setNoSalesShop"; // 批量设置不可销售店铺
+export const BaseDataListSetBrand = "BaseDataList_setBrand"; // 批量设置品牌
+export const BaseDataListSetSku = "BaseDataList_setSku"; // 批量设置辅助单位
+
+// 商品分类
+export const GoodsClassify = "goodsManage_GoodsBasicCategory"; // 商品分类
+export const GoodsBasicCategoryAddGoodsClassify =
+	"GoodsBasicCategory_addCategory"; // 新增
+export const GoodsBasicCategoryEditCategory = "GoodsBasicCategory_editCategory"; // 编辑
+export const GoodsBasicCategoryDelCategory = "GoodsBasicCategory_delCategory"; // 删除
+export const GoodsBasicCategoryGetAllCategory =
+	"GoodsBasicCategory_getAllCategory"; // 列表
+export const GoodsBasicCategoryGetCategoryInfoById =
+	"GoodsBasicCategory_getCategoryInfoById"; // 详情
+export const GoodsBasicCategoryUpdateCategoryStatus =
+	"GoodsBasicCategory_updateCategoryStatus"; // 启用禁用
+// 商品品牌
+export const BrandManage = "goodsManage_BrandManage"; // 商品品牌
+export const BrandManageGetAllBrand = "BrandManage_getAllBrand"; // 列表
+export const BrandManageDelBrand = "BrandManage_delBrand"; // 删除
+export const BrandManageUpdateBrandStatus = "BrandManage_updateBrandStatus"; // 启用/禁用
+export const BrandManageAddBrand = "BrandManage_addBrand"; // 新增
+export const BrandManageGetBrandInfoById = "BrandManage_getBrandInfoById"; // 详情
+export const BrandManageEditBrand = "BrandManage_editBrand"; // 编辑
+// 计量单位
+export const UnitSet = "goodsManage_UnitSet"; // 计量单位
+export const UnitSetGetAll = "UnitSet_getAll"; // 列表
+export const UnitSetDel = "UnitSet_del"; // 删除
+export const UnitSetAdd = "UnitSet_add"; // 新增
+export const UnitSetUpdateEnablesStatus = "UnitSet_updateEnablesStatus"; // 启用/禁用
+export const UnitSetEdit = "UnitSet_edit"; // 编辑
+// 属性管理
+export const specManage = "goodsManage_specManage"; // 属性管理
+export const specManageGetAll = "specManage_getAll"; // 列表
+export const specManageAdd = "specManage_add"; // 新增
+export const specManageEdit = "specManage_edit"; // 编辑
+export const specManageDel = "specManage_del"; // 删除
+// 订单
+export const newOrderList = "newOrderList"; // 新订单列表
+export const newOrderListGetAllOrder = "newOrderList_getAllOrder"; // 列表
+export const newOrderListAddOrder = "newOrderList_add"; // 新的新增
+export const newOrderListEdit = "newOrderList_edit"; // 编辑
+export const newOrderLitSearch = "newOrderList_search"; // 搜索
+export const newOrderLitUpdateAuditStatus = "newOrderList_updateAuditStatus"; // 审核
+export const newOrderLitGetOrderInfoById = "newOrderList_getOrderInfoById"; // 详情
+// 取消订单
+export const CancelOrder = "cancelOrder"; // 取消订单
+export const CancelOrderGetAllOrde = "cancelOrder_getAllOrder"; // 列表
+export const CancelOrderGetOrderInfoById = "cancelOrder_getOrderInfoById"; // 详情
+export const CancelOrderSearch = "cancelOrder_search"; // 搜索
+// 订单汇总
+export const OrderStatistics = "orderManage_OrderStatistics"; // 订单汇总
+export const OrderStatisticsGetAllOrderData = "OrderStatistics_getAllOrderData"; // 订单汇总
+// 代客下单
+export const OrderAdd = "orderManage_OrderAdd"; // 创建订单
+export const OrderAddAddOrder = "OrderAdd_add"; // 新增
+export const OrderAddeditGoodsPrice = "OrderAdd_editGoodsPrice"; // 修改商品价格
+// 订单查询
+export const orderQuery = "orderManage_orderQuery"; // 订单查询
+export const orderQueryAddOrder = "orderQuery_add"; // 新增
+export const orderQueryGetAllOrder = "orderQuery_getAllOrder"; // 列表
+export const orderQuerySearch = "orderQuery_search"; // 搜索
+export const orderQueryDelOrder = "orderQuery_delOrder"; // 删除
+export const orderQueryUpdateAuditStatus = "orderQuery_updateAuditStatus"; // 审核
+export const orderQueryUpdateOrderStatus = "orderQuery_updateOrderStatus"; // 取消订单
+export const orderQueryUpdateOrderPayData = "orderQuery_updateOrderPayData"; // 确认收款
+// 退货单
+export const ReturnWarehousingOrder = "orderManage_ReturnWarehousingOrder"; // 退货单
+export const ReturnWarehousingOrderGetAllOrderReturn =
+	"ReturnWarehousingOrder_getAllOrderReturn"; // 列表/导出
+export const ReturnWarehousingOrderUpdateOrderReturn =
+	"ReturnWarehousingOrder_updateOrderReturn"; // 编辑
+export const ReturnWarehousingOrderDeleteOrderReturn =
+	"ReturnWarehousingOrder_deleteOrderReturn"; // 删除
+export const ReturnWarehousingOrderAuditOrderReturn =
+	"ReturnWarehousingOrder_auditOrderReturn"; // 审核
+export const ReturnWarehousingOrderAddOrderReturn =
+	"ReturnWarehousingOrder_addOrderReturn"; // 添加
+export const ReturnWarehousingOrderGetOrderReturn =
+	"ReturnWarehousingOrder_getOrderReturn"; // 详情
+export const ReturnWarehousingOrderSearchAllOrderReturn =
+	"ReturnWarehousingOrder_searchAllOrderReturn"; // 搜索
+// 自提订单
+export const selfOrder = "orderManage_selfOrder"; // 自提订单
+// 创建销售单
+export const addSaleOrder = "addSaleOrder"; // 创建销售单
+
+// 销售单列表
+export const saleOrderList = "saleOrderList"; // 销售单列表
+export const saleOrderListGetAllOrder = "saleOrderList_getAllOrder"; // 列表
+export const saleOrderListAddSalesOrder = "saleOrderList_addSalesOrder"; // 新增
+export const saleOrderListSearch = "saleOrderList_search"; // 搜索
+export const saleOrderListGetOrderInfoById = "saleOrderList_getOrderInfoById"; // 详情
+
+// 客户
+export const CustomerList = "customerManage_CustomerList"; // 客户
+export const CustomerListAddCustomer = "CustomerList_addCustomer"; // 新增
+export const CustomerListGetCustomerInfo = "CustomerList_getCustomerInfo"; // 详情
+export const CustomerListEditCustomer = "CustomerList_editCustomer"; // 编辑
+export const CustomerListDelCustomer = "CustomerList_delCustomer"; // 删除
+export const CustomerListUpdateCustomerStatus =
+	"CustomerList_updateCustomerStatus"; // 禁用
+export const CustomerListUpdateCustomerCheckStatus =
+	"CustomerList_updateCustomerCheckStatus"; // 审核
+export const CustomerListGetAllCustomer = "CustomerList_getAllCustomer"; // 列表
+export const CustomerListAddCustomerTag = "CustomerList_addCustomerTag"; // 添加标签
+export const CustomerListDelCustomerTag = "CustomerList_delCustomerTag"; // 删除标签
+export const CustomerListSearch = "CustomerList_search"; // 搜索
+export const CustomerListExport = "CustomerList_export"; // 导出
+export const CustomerListIntegralDetail = "CustomerList_IntegralDetail"; // 积分明细
+export const CustomerListSaldoDetail = "CustomerList_SaldoDetail"; // 余额明细
+export const CustomerListvisitedLogs = "CustomerList_visitedLogs"; // 跟进记录
+export const CustomerListupdateBalance = "CustomerList_updateBalance"; // 修改余额
+export const CustomerListupdateIntegral = "CustomerList_updateIntegral"; // 修改积分
+
+// 标签管理
+export const LabelManagement = "customerManage_LabelManagement"; // 标签管理
+export const LabelManagementaddTabs = "LabelManagement_addTabs"; // 创建标签组
+export const LabelManagementeditTags = "LabelManagement_editTags"; // 编辑标签组
+export const LabelManagementdeleteTags = "LabelManagement_deleteTags"; // 删除
+
+// 客户行为
+
+export const CustomerBehaviorBrowsingHistory =
+	"CustomerBehavior_BrowsingHistory"; // 浏览记录
+export const CustomerBehaviorPurchaseHistory =
+	"CustomerBehavior_PurchaseHistory"; // 购买记录
+export const CustomerBehaviorDemandReporting =
+	"CustomerBehavior_DemandReporting"; // 需求提报
+
+//客户报表
+export const CustomerStatementsAnomalyAnalysisTable =
+	"CustomerStatements_AnomalyAnalysisTable"; // 异常客户分析表
+export const CustomerStatementsPullNewStatistics =
+	"CustomerStatements_PullNewStatistics"; // 拉新统计
+export const CustomerStatementsVisitRepor = "CustomerStatements_VisitRepor"; // 拜访报表
+export const CustomerStatementsCustomerDistribution =
+	"CustomerStatements_CustomerDistribution"; // 客户分布图
+
+// 客户类型
+export const CustomerType = "customerManage_CustomerType"; // 客户类型
+export const CustomerTypeAddCustomerSource = "CustomerType_addCustomerSource"; // 新增
+export const CustomerTypeGetCustomerSourceInfo =
+	"CustomerType_getCustomerSourceInfo"; // 详情
+export const CustomerTypeEditCustomerSource = "CustomerType_editCustomerSource"; // 编辑
+export const CustomerTypeDelCustomerSource = "CustomerType_delCustomerSource"; // 删除
+export const CustomerTypeGetAllCustomerSource =
+	"CustomerType_getAllCustomerSource"; // 列表
+export const CustomerTypeUpdateCustomerSourceStatus =
+	"CustomerType_updateCustomerSourceStatus"; // 禁用
+export const CustomerTypeUpdateDefaultStatus =
+	"CustomerType_updateDefaultStatuss"; // 设置默认
+// 客户查询
+export const CustomerQuery = "CustomerQuery"; // 客户查询
+export const CustomerQueryQuery = "CustomerQuery_query"; // 列表
+// 客户分群
+export const CustomerClustering = "CustomerClustering"; // 客户分群
+// 客户已审核
+export const FinishCheck = "FinishCheck"; // 已审核
+export const FinishCheckGetAllCustomer = "FinishCheck_getAllCustomer"; // 查看
+export const FinishCheckSearch = "FinishCheck_search"; // 搜索
+// 客户未审核
+export const NotCheck = "customerCheck_NotCheck"; // 未审核
+export const NotCheckGetAllCustomer = "NotCheck_getAllCustomer"; // 查看
+export const NotCheckSearch = "NotCheck_search"; // 搜索
+// 待完善资料
+export const getAuditAllCustomer = "customerCheck_getAuditAllCustomer"; // 待完善资料
+
+// 商品服务
+export const GoodsEmprego = "goodsManage_GoodsEmprego"; // 查看
+export const GoodsEmpregoaddGoodsEmprego = "GoodsEmprego_addGoodsEmprego"; // 添加商品服务
+export const GoodsEmpregoeditGoodsEmprego = "GoodsEmprego_editGoodsEmprego"; // 编辑
+export const GoodsEmpregodeleteGoodsEmprego = "GoodsEmprego_deleteGoodsEmprego"; // 删除
+// 商品分组
+export const GoodsGrouping = "goodsManage_GoodsGrouping";
+export const GoodsGroupingAddGoodsGrouping = "GoodsGrouping_addGoodsGrouping"; //添加
+export const GoodsGroupingEditGoodsGrouping = "GoodsGrouping_editGoodsGrouping"; //编辑
+export const GoodsGroupingDelGoodsGrouping = "GoodsGrouping_delGoodsGrouping"; //删除
+export const GoodsGroupingUpdateGoodsGrouping =
+	"GoodsGrouping_updateGoodsGrouping"; //启用/禁用
+// 商品列表
+export const PublishGoods = "goodsManage_PublishGoods"; // 商品列表
+export const PublishGoodsGetAllGoods = "PublishGoods_getAllGoods"; // 列表
+export const PublishGoodsAddGoods = "PublishGoods_addGoods"; // 新增
+export const PublishGoodsEditGoods = "PublishGoods_editGoods"; // 编辑
+export const PublishGoodsGetGoodsInfo = "PublishGoods_getGoodsInfo"; // 查看详情
+export const PublishGoodsDelGoods = "PublishGoods_delGoods"; // 删除
+export const PublishGoodsUpdateEnableStatus = "PublishGoods_updateEnableStatus"; // 上架/下架
+export const PublishGoodsSearch = "PublishGoods_search"; // 搜索
+// 商品列表(单店铺)
+export const PublishGoodsAddBasicAndPublishGoods =
+	"PublishGoods_addBasicAndPublishGoods"; // 新增(单店铺)
+export const PublishGoodsGetQuickGoodsInfo = "PublishGoods_getQuickGoodsInfo"; // 详情(单店铺)
+export const PublishGoodsEditQuickGoods = "PublishGoods_editQuickGoods"; // 编辑(单店铺)
+
+//--------
+export const PublishGoodsgetGoodsByBarCode = "PublishGoods_getGoodsByBarCode"; // 扫条码查询商品
+export const PublishGoodssetSalesNum = "PublishGoods_setSalesNum"; // 设置虚拟销量
+export const PublishGoodssetTop = "PublishGoods_setTop"; // 商品置顶
+export const PublishGoodssetSalesNumBatch = "PublishGoods_setSalesNumBatch"; // 设置虚拟销量(批量)
+export const PublishGoodsbatchGoodsExpress = "PublishGoods_batchGoodsExpress"; // 设置物流(批量)
+
+// 价格管理
+export const PriceTable = "goodsPrice_PriceTable"; // 价格管理
+export const PriceTableGetAllGoodsPrice = "PriceTable_getAllGoodsPrice"; // 价格管理
+export const PriceTableSearch = "PriceTable_search"; // 价格搜索
+// 商品调价
+export const AdjustPrice = "goodsPrice_AdjustPrice"; // 商品调价
+export const AdjustPriceAdd = "AdjustPrice_add"; // 新增
+export const AdjustPriceGetAll = "AdjustPrice_getAll"; // 列表
+export const AdjustPriceEffective = "AdjustPrice_effective"; // 生效
+// 客户调价
+export const CostumeAdjustPrice = "goodsPrice_CostumeAdjustPrice"; // 客户调价
+export const CostumeAdjustPriceAdd = "CostumeAdjustPrice_add"; // 新增
+export const CostumeAdjustPriceGetAll = "CostumeAdjustPrice_getAll"; // 列表
+export const CostumeAdjustPriceEffective = "CostumeAdjustPrice_effective"; // 生效
+// 客户类型调价
+export const CustomerTypeAdj = "goodsPrice_customerTypeAdj"; // 客户类型调价
+export const CustomerTypeAdjGetAll = "customerTypeAdj_getAll"; // 列表
+export const CustomerTypeAdjEffective = "customerTypeAdj_effective"; // 生效
+export const CustomerTypeAdjAdd = "customerTypeAdj_add"; // 新增
+// 供应商管理
+export const Supplier = "SupplyManageGroup_Supplier"; // 生效
+export const SupplierAddSupplier = "Supplier_addSupplier"; // 新增
+export const SupplierGetAllSupplier = "Supplier_getAllSupplier"; // 列表
+export const SupplierDelSupplier = "Supplier_delSupplier"; // 删除
+export const SupplierEditSupplier = "Supplier_editSupplier"; // 编辑
+export const SupplierUpdateEnableStatus = "Supplier_updateEnableStatus"; // 启用/禁用
+export const SupplierGetSupplierInfoById = "Supplier_getSupplierInfoById"; // 详情
+// 采购单
+export const PurchaseOrder = "SupplyManageGroup_PurchaseOrder"; // 采购单
+export const PurchaseOrderGetAllPurchase = "PurchaseOrder_getAllPurchase"; // 列表
+export const PurchaseOrderAddPurchase = "PurchaseOrder_addPurchase"; // 新增
+export const PurchaseOrderGetPurchaseInfoById =
+	"PurchaseOrder_getPurchaseInfoById"; // 详情
+export const PurchaseOrderUpdateAuditStatus = "PurchaseOrder_updateAuditStatus"; // 审核
+export const PurchaseOrderDelPurchase = "PurchaseOrder_delPurchase"; // 删除
+export const PurchaseOrderEditPurchase = "PurchaseOrder_editPurchase"; // 编辑
+// 采购汇总
+export const PurchaseStatistics = "SupplyManageGroup_PurchaseStatistics"; // 采购汇总
+export const PurchaseStatisticsGetAllPurchaseByFields =
+	"PurchaseStatistics_getAllPurchaseByFields"; // 采购汇总
+export const GetSupplierAllPurchaseByFields =
+	"PurchaseStatistics_getSupplierAllPurchaseByFields"; // 供应商汇总表
+export const GetStaffAllPurchaseByFields =
+	"PurchaseStatistics_getStaffAllPurchaseByFields"; // 人员汇总表
+// 采购退货单
+export const PurchaseReturnOrder = "SupplyManageGroup_PurchaseReturnOrder"; // 采购退货单
+export const PurchaseReturnOrderAddPurchaseOut =
+	"PurchaseReturnOrder_addPurchaseOut"; // 新增
+export const PurchaseReturnOrderGetAllPurchaseOut =
+	"PurchaseReturnOrder_getAllPurchaseOut"; // 列表
+export const PurchaseReturnOrderDelPurchaseOut =
+	"PurchaseReturnOrder_delPurchaseOut"; // 删除
+export const PurchaseReturnOrderGetPurchaseOutInfoById =
+	"PurchaseReturnOrder_getPurchaseOutInfoById"; // 详情
+export const PurchaseReturnOrderUpdateAuditStatus =
+	"PurchaseReturnOrder_updateAuditStatus"; // 审核
+export const PurchaseReturnOrderEditPurchase =
+	"PurchaseReturnOrder_editPurchase"; // 编辑
+// 采购明细
+export const PurchaseDetail = "SupplyManageGroup_PurchaseDetail"; // 采购明细
+export const PurchaseDetailSearchAllPurchaseDetails =
+	"PurchaseDetail_searchAllPurchaseDetails"; // 采购明细
+export const PurchaseDetailGetAllPurchaseDetails =
+	"PurchaseDetail_getAllPurchaseDetails"; // 导出
+export const PurchaseDetailGetAllData = "PurchaseDetail_getAllData"; // 统计
+
+// 缺货单
+export const Stockout = "SupplyManageGroup_Stockout"; // 缺货单
+
+// 出库管理
+export const InventoryOut = "stockOutManage_InventoryOut"; // 出库管理
+export const InventoryOutGetAllInventoryOut = "InventoryOut_getAllInventoryOut"; // 列表
+export const InventoryOutGetInventoryOutInfo =
+	"InventoryOut_getInventoryOutInfo"; // 详情
+export const InventoryOutUpdateInventoryOutStatus =
+	"InventoryOut_updateInventoryOutStatus"; // 审核
+export const InventoryOutSearchAllInventoryOut =
+	"InventoryOut_searchAllInventoryOut"; // 搜索
+export const InventoryOutStatisticsAllInventoryOut =
+	"InventoryOut_statisticsAllInventoryOut"; // 统计
+// 入库管理
+export const InventoryIn = "stockOutManage_InventoryIn"; // 入库管理
+export const InventoryInGetInventoryInInfo = "InventoryIn_getInventoryInInfo"; // 详情
+export const InventoryInGetAllInventoryIn = "InventoryIn_getAllInventoryIn"; // 列表
+export const InventoryInUpdateInventoryInStatus =
+	"InventoryIn_updateInventoryInStatus"; // 审核
+export const InventoryInStatisticsAllInventoryIn =
+	"InventoryIn_statisticsAllInventoryIn"; // 统计
+export const InventoryInSearchAllInventoryIn =
+	"InventoryIn_searchAllInventoryIn"; // 搜索
+// 库存查询
+export const query = "kucunManage_query"; // 库存查询
+export const queryGetInventoryAll = "query_getInventoryAll"; // 列表
+export const queryGetInventoryByWarehouseId = "query_getInventoryByWarehouseId"; // 仓库下的库存列表
+// 库存流水
+export const flowing = "kucunManage_flowing"; // 库存流水
+export const flowingGetInventoryDetailsAll = "flowing_getInventoryDetailsAll"; // 列表
+export const flowingSearchAllInventoryDetails =
+	"flowing_searchAllInventoryDetails"; // 搜索
+// 仓库管理
+export const management = "warehouseManageGroup_management"; // 仓库管理
+export const managementGetWarehouseInfo = "management_getWarehouseInfo"; // 详情
+export const managementEnableWarehouse = "management_enableWarehouse"; // 启用
+export const managementUpdateWarehouse = "management_updateWarehouse"; // 修改
+export const managementDeleteWarehouse = "management_deleteWarehouse"; // 删除
+export const managementAddWarehouse = "management_addWarehouse"; // 添加
+export const managementAddWarehouseBeginning =
+	"management_addWarehouseBeginning"; // 期初
+//库位管理
+export const WarehouseArea = "warehouseManageGroup_WarehouseArea";
+export const WarehouseAreaAddWarehouseArea = "WarehouseArea_addWarehouseArea"; //新增
+export const WarehouseAreaEditWarehouseArea = "WarehouseArea_editWarehouseArea"; //编辑
+export const WarehouseAreaAuditWarehouseArea =
+	"WarehouseArea_auditWarehouseArea"; //审核状态
+export const WarehouseAreaDeleteWarehouseArea =
+	"WarehouseArea_deleteWarehouseArea"; //删除
+
+//报损单
+export const LossReport = "warehouseManageGroup_LossReport";
+export const LossReportAddLossReport = "LossReport_addLossReport"; //新增
+export const LossReportAuditLossReport = "LossReport_auditLossReport"; //审核
+export const LossReportDeleteLossReport = "LossReport_deleteLossReport"; //删除
+export const LossReportEditLossReport = "LossReport_editLossReport"; //编辑
+export const LossReportDetailLossReport = "LossReport_detailLossReport"; //详情
+
+// 金额查看
+export const moneyshow = "stock_moneyshow";
+export const moneyshowinventoryStatisticsMoney =
+	"moneyshow_inventoryStatisticsMoney"; // 库存汇总金额
+export const moneyshowstockInMoenyShow = "moneyshow_stockInMoenyShow"; // 入库金额
+export const moneyshowstockOutMoneyShow = "moneyshow_stockOutMoneyShow"; // 出库金额
+export const moneyshowcostPriceShow = "moneyshow_costPriceShow"; // 成本金额
+// 批次流水
+export const Batch = "kucunManage_Batch"; // 批次流水
+export const BatchGetInventoryDetailsAll = "Batch_getInventoryDetailsAll"; // 批次流水
+// 保质期查询
+export const GetBatch = "kucunManage_getBatch"; // 保质期查询
+export const GetBatchGetAllBatch = "getBatch_getAllBatch"; // 保质期查询
+export const GetBatchSearchAllInventoryBatch =
+	"getBatch_searchAllInventoryBatch"; // 保质期搜索
+// 库存汇总
+export const inventoryStatistics = "kucunManage_inventoryStatistics"; // 库存汇总
+export const inventoryStatisticsList =
+	"inventoryStatistics_inventoryStatistics"; // 库存汇总汇列表
+export const inventoryStatisticsSearchInventoryStatistics =
+	"inventoryStatistics_searchInventoryStatistics"; // 库存汇总搜索
+
+// 盘点单
+export const inventoryInfo = "warehouseManageGroup_inventoryInfo"; // 盘点单
+export const inventoryInfoGetStocktakingInfo =
+	"inventoryInfo_getStocktakingInfo"; // 详情
+export const inventoryInfoUpdateStocktaking = "inventoryInfo_updateStocktaking"; // 修改
+export const inventoryInfoAuditStocktaking = "inventoryInfo_auditStocktaking"; // 审核
+export const inventoryInfoGetAllStocktaking = "inventoryInfo_getAllStocktaking"; // 列表
+export const inventoryInfoAddStocktaking = "inventoryInfo_addStocktaking"; // 添加
+export const inventoryInfoSearchAllStocktaking =
+	"inventoryInfo_searchAllStocktaking"; // 搜索
+
+// 调拨单
+export const AllocationForm = "warehouseManageGroup_AllocationForm"; // 调拨单
+export const AllocationFormAddAllocate = "AllocationForm_addAllocate"; // 添加
+export const AllocationFormAuditAllocate = "AllocationForm_auditAllocate"; // 审核
+export const AllocationFormDeleteAllocate = "AllocationForm_deleteAllocate"; // 删除
+export const AllocationFormGetAllocateInfo = "AllocationForm_getAllocateInfo"; // 详情
+export const AllocationFormUpdateAllocate = "AllocationForm_updateAllocate"; // 修改
+export const AllocationFormGetAllAllocate = "AllocationForm_getAllAllocate"; // 列表
+export const AllocationFormSearchAllocate = "AllocationForm_searchAllocate"; // 搜索
+
+// 商铺列表
+export const ShopList = "system_ShopList"; // 商铺列表
+export const ShopListAddShop = "ShopList_addShop"; // 新增
+export const ShopListGetShopInfo = "ShopList_getShopInfo"; // 查看
+export const ShopListEditShop = "ShopList_editShop"; // 编辑
+export const ShopListDelShop = "ShopList_delShop"; // 删除
+export const ShopListGetAllShop = "ShopList_getAllShop"; // 列表
+export const ShopListSearch = "ShopList_search"; // 搜索
+export const ShopListChangeManagerForShop = "ShopList_changeManagerForShop"; // 更换负责人
+export const ShopListUpdateShopStatus = "ShopList_updateShopStatus"; // 启用禁用
+
+// 支付方式
+export const PayList = "system_PayList"; // 支付方式
+export const PayListEditPayment = "PayList_editPayment"; // 编辑
+export const PayListGetAllPayment = "PayList_getAllPayment"; // 列表
+export const PayListUpdateEnableStatus = "PayList_updateEnableStatus"; // 禁用
+export const PayListUpdateDefaultStatus = "PayList_updateDefaultStatus"; // 默认/非默认
+export const PayListGetPaymentInfoById = "PayList_getPaymentInfoById"; // 详情
+
+// 配送设置
+export const Deliverys = "system_Delivery"; // 配送设置
+export const DeliverySet = "Delivery_DeliverySet"; // 配送配置
+export const DeliverySetgetAllDelivery = "DeliverySet_getAllDelivery"; // 列表
+export const DeliverygetInfo = "DeliverySet_getInfo"; // 详情
+export const DeliverygetRuleInfo = "DeliverySet_getRuleInfo"; // 运费模版详情
+export const DeliverysetData = "DeliverySet_setData"; // 设置运费模版
+export const DeliverydelDeliveryRule = "DeliverySet_delDeliveryRule"; // 删除运费模版
+export const DeliverySetupdateEnableStatus = "DeliverySet_updateEnableStatus"; // 启用/禁用
+export const DeliverySetupdateDefaultStatus = "DeliverySet_updateDefaultStatus"; // 设置默认
+export const DeliverySetgetSelfRuleInfo = "DeliverySet_getSelfRuleInfo"; // 自提点详情
+export const DeliverySetsetSelfData = "DeliverySet_setSelfData"; // 新增自提点
+export const DeliverySeteditSelfData = "DeliverySet_editSelfData"; // 编辑自提点
+export const DeliverySetdelDeliverySelfRule = "DeliverySet_delDeliverySelfRule"; // 删除自提点
+
+//物流接口
+export const Logistics = "Delivery_Logistics"; // 物流接口
+export const LogisticsgetBasicSetup = "Logistics_getBasicSetup"; // 物流接口
+export const Logisticssetting = "Logistics_setting"; // 配置
+
+// 财务
+// 应收管理
+export const shouldReceiveManage = "shouldReceiveManage"; // 应收管理
+// 应收列表
+export const ReceivableList = "shouldReceiveManage_ReceivableList"; // 应收列表
+export const ReceivableListAddReceipt = "ReceivableList_AddReceipt"; //收款
+export const ReceivableListGetReceiveInfo = "ReceivableList_getReceiveInfo"; // 详情
+export const ReceivableListUpdateReceiveStatus =
+	"ReceivableList_updateReceiveStatus"; // 审核
+export const ReceivableListGetAllReceive = "ReceivableList_getAllReceive"; // 列表
+// 收款单列表
+export const ReceiptList = "ReceiptList"; // 收款单列表
+export const ReceiptListAddReceived = "ReceiptList_addReceived"; // 添加
+export const ReceiptListUpdateReceivedStatus =
+	"ReceiptList_updateReceivedStatus"; // 审核
+export const ReceiptListGetAllReceived = "ReceiptList_getAllReceived"; // 列表
+export const ReceiptListSearch = "ReceiptList_search"; // 搜索
+export const ReceiptListGetTempReceivedData = "ReceiptList_getTempReceivedData"; // 暂存
+export const ReceiptListGetReceivedInfo = "ReceiptList_getReceivedInfo"; // 详情
+// 客户余额
+export const CustomerBalance = "CustomerBalance"; // 客户余额
+export const CustomerBalanceGetAllCustomerBalance =
+	"CustomerBalance_getAllCustomerBalance"; // 列表
+//往来汇总表--余额流水
+export const CustomerBalanceSaldoDetail = "CustomerBalance_SaldoDetail";
+//往来汇总表--收款
+export const CustomerBalanceAddReceipt = "CustomerBalance_AddReceipt";
+
+// 余额明细
+export const CustomerBalanceDetail =
+	"shouldReceiveManage_CustomerBalanceDetail"; // 客户余额
+export const CustomerBalanceDetailGetAllCustomerBalanceDetail =
+	"CustomerBalanceDetail_getAllCustomerBalanceDetail"; // 列表
+// 应付列表
+export const HandleList = "HandleList_getAllPay"; // 应付列表
+export const HandleListGetPayInfo = "HandleList_getPayInfo"; // 详情
+export const HandleListUpdatePayStatus = "HandleList_updatePayStatus"; // 审核
+export const HandleListGetAllPay = "HandleList_getAllPay"; // 列表
+export const HandleListSearch = "HandleList_search"; // 搜索
+// 付款单列表
+export const PaymentList = "shouldPayManage_PaymentList"; // 付款单列表
+export const PaymentListAddPaid = "PaymentList_addPaid"; // 添加
+export const PaymentListUpdatePaidStatus = "PaymentList_updatePaidStatus"; // 审核
+export const PaymentListGetAllPaid = "PaymentList_getAllPaid"; // 列表
+export const PaymentListSearch = "PaymentList_search"; // 搜索
+export const PaymentListGetTempPaidData = "PaymentList_getTempPaidData"; // 暂存
+export const PaymentListGetPaidInfo = "PaymentList_getPaidInfo"; // 详情
+// 供应商余额表
+export const SupplierBalance = "shouldPayManage_SupplierBalance"; // 供应商余额表
+export const CustomerBalanceGetAllSupplierBalance =
+	"SupplierBalance_getAllSupplierBalance"; // 列表
+// 供应商明细
+export const SupplierBalanceDetails = "shouldPayManage_SupplierBalance"; // 客户余额
+export const SupplierBalanceDetailsGetAllSupplierBalanceDetail =
+	"SupplierBalanceDetails_getAllSupplierBalanceDetail"; // 列表
+
+// 资金转账单
+export const FunTransfer = "cashierManagement_FunTransfer"; // 资金转账单
+export const FunTransferAddAccountTransfer = "FunTransfer_addAccountTransfer"; // 添加
+export const FunTransferUpdateAccountTransferStatus =
+	"FunTransfer_updateAccountTransferStatus"; // 审核
+export const FunTransferGetAllAccountTransfer =
+	"FunTransfer_getAllAccountTransfer"; // 搜索 列表
+export const FunTransferGetTempAccountTransferData =
+	"FunTransfer_getTempAccountTransferData"; // 暂存
+export const FunTransferGetAccountTransferInfo =
+	"FunTransfer_getAccountTransferInfo"; // 详情
+export const AccountListEditAccountTransfer = "AccountList_editAccountTransfer"; // 编辑
+
+// 账户管理
+export const AccountList = "cashierManagement_AccountList"; // 账户管理
+export const AccountListAddAccount = "AccountList_addAccount"; // 添加
+export const AccountListEditAccount = "AccountList_editAccount"; // 编辑
+export const AccountListGetAllAccount = "AccountList_getAllAccount"; // 列表
+export const AccountListDelAccount = "AccountList_delAccount"; // 删除
+export const AccountListUpdateAccountStatus = "AccountList_updateAccountStatus"; // 启用/禁用
+export const AccountListGetAccountInfo = "AccountList_getAccountInfo"; // 详情
+// 账户明细查询
+export const AccountDetails = "cashierManagement_AccountDetails"; // 账户明细查询
+export const AccountDetailsGetAllAccountDetail =
+	"AccountDetails_getAllAccountDetail"; // 添加
+
+// 财务类型
+export const FinanceType = "finance_financialManagement"; // 账户管理
+export const FinanceTypeAddFinanceType = "FinanceType_addFinanceType"; // 添加
+export const FinanceTypeEditFinanceType = "FinanceType_editFinanceType"; // 编辑
+export const FinanceTypeGetAllFinanceType = "FinanceType_getAllFinanceType"; // 列表
+export const FinanceTypeDelFinanceType = "FinanceType_delFinanceType"; // 删除
+export const FinanceTypeUpdateFinanceTypeStatus =
+	"FinanceType_updateFinanceTypeStatus"; // 启用/禁用
+export const FinanceTypeGetFinanceTypeInfo = "FinanceType_getFinanceTypeInfo"; // 详情
+export const FinanceTypeUpdateFinanceTypeDefaultStatus =
+	"FinanceType_updateFinanceTypeDefaultStatus"; // 默认
+
+// 公告管理
+export const Announcement = "mall_Announcement"; // 公告管理
+export const AnnouncementAddAnnouncement = "Announcement_addAnnouncement"; // 添加
+export const AnnouncementDelAnnouncement = "Announcement_delAnnouncement"; // 删除
+export const AnnouncementEditAnnouncement = "Announcement_editAnnouncement"; // 公告编辑
+export const AnnouncementOnAnnouncement = "Announcement_onAnnouncement"; // 公告启用/禁用
+export const AnnouncementGetAllAnnouncement = "Announcement_getAllAnnouncement"; // 公告列表
+export const AnnouncementGetAnnouncementInfo =
+	"Announcement_getAnnouncementInfo"; // 公告详情
+
+
+//日清对账
+export const getTodayStatistics = "Application_getTodayStatistics";
+export const getTodayStatistics_statisticsGetAllOrderData =
+	"getTodayStatistics_statisticsGetAllOrderData"; //销售日对账
+
+export const getTodayStatistics_statisticsInventoryStatistics =
+	"getTodayStatistics_statisticsInventoryStatistics"; //库存日对账
+
+export const getTodayStatistics_statisticsGetTodayStatistics =
+	"getTodayStatistics_statisticsGetTodayStatistics"; //财务日对账
+export const showSaleBillMoney = "amountShow_showSaleBillMoney"; // 钱货日清对账金额
+export const stockBillMoney = "amountShow_stockBillMoney"; //销售毛利总金额
+export const fianceBillMoney = "amountShow_fianceBillMoney"; //财务毛利总金额
+
+// 报表
+// 商品销售报表
+export const goodsFormMerchandiseSalesStatement =
+	"goodsForm_MerchandiseSalesStatement";
+// 客户商品报表
+export const goodsFormCustomerMerchandiseReport =
+	"goodsForm_CustomerMerchandiseReport";
+// 客户订单报表
+export const orderFormCustomerOrderReport = "orderForm_CustomerOrderReport";
+// 业务员订单表
+export const orderFormSalesOrderReport = "orderForm_SalesOrderReport";
+// 订单数据报表
+export const orderFormOrderDataReport = "orderForm_OrderDataReport";
+// 地区订单报表
+export const orderFormRegionalOrderReport = "orderForm_RegionalOrderReport";
+
+// 收款申请单
+export const ApplyReceipt = "shouldReceiveManage_ApplyReceipt";
+// 新增
+export const addApplyReceipt = "ApplyReceipt_addApplyReceipt";
+// 编辑
+export const editApplyReceipt = "ApplyReceipt_editApplyReceipt";
+// 审核
+export const auditApplyReceipt = "ApplyReceipt_auditApplyReceipt";
+
+// 费用类型
+export const CostTypes = "financialManagement_CostTypes";
+// 新增
+export const CostTypesaddCostType = "CostTypes_addCostType";
+// 编辑
+export const CostTypeseditCostType = "CostTypes_editCostType";
+// 删除
+export const CostTypesdeleteCostType = "CostTypes_deleteCostType";
+// 余额提现
+export const WithdrawAsh = "financialManagement_WithdrawAsh";
+// 审核
+export const WithdrawAshupdateReflectDetail = "WithdrawAsh_updateReflectDetail";
+// 打款
+export const WithdrawAshmakeMoney = "WithdrawAsh_makeMoney";
+// 拒绝
+export const WithdrawAshupdaterefuseMoney = "WithdrawAsh_refuseMoney";
+// 费用单
+export const CostSheet = "cashierManagement_CostSheet";
+export const CostSheetaddCostSheet = "CostSheet_addCostSheet"; //新增
+export const CostSheetdeleteCostSheet = "CostSheet_deleteCostSheet"; // 删除
+export const CostSheeteditCostSheet = "CostSheet_editCostSheet"; // 编辑
+export const CostSheetaudtCostSheet = "CostSheet_audtCostSheet"; // 审核
+// 销售排行
+export const SalesRanking = "statement_salesRanking";
+//商户采购单
+export const Merchant = "SupplyManageGroup_Merchant";
+//新增
+export const MerchantAddMerchant = "Merchant_AddMerchant";
+//导出
+export const MerchantAllPurchase = "Merchant_getAllPurchaseWerahouse";
+// 审核
+export const MerchantupdatePurchaseStatus = "Merchant_updatePurchaseStatus";
+// 编辑
+export const MerchantPurchaseOrderEdit = "Merchant_PurchaseOrderEdit";
+// 删除
+export const MerchantdelPurchase = "Merchant_delPurchaseWerahouse";
+// 退单
+export const MerchantPurchaseReturnOrderAdd = "Merchant_PurchaseReturnOrderAdd";
+
+// 退款单
+export const RefundForm = "cashierManagement_RefundForm";
+// 审核
+export const RefundFormupdateRefundStatus = "RefundForm_updateRefundStatus";
+// 编辑
+export const RefundFormEditRefundForm = "RefundForm_EditRefundForm";
+export const RefundForm_AddRefundForm = "RefundForm_AddRefundForm"; //新增
+// 仓库库存
+export const warehouseInventory = "kucunManage_warehouseInventory";
+// 司机设置
+export const Driver = "system_Driver";
+// 新增
+export const DriveraddDriver = "Driver_DriveraddDriver";
+// 编辑
+export const DrivereditDriver = "Driver_DrivereditDriver";
+// 删除
+export const DriverdelDriver = "Driver_DriverdelDriver";
+//禁用
+export const DriverstatusSet = "Driver_DriverstatusSet";
+// 线路列表
+export const line = "system_line";
+export const lineAddLine = "line_addLine"; //新增线路
+export const lineEditLine = "line_editLine"; //编辑线路
+export const lineDelLine = "line_delLine"; //删除线路
+export const lineUpdateLine = "line_updateLine"; //启用禁用
+export const lineLookLine = "line_lookLine"; //查看客户

+ 172 - 0
common/qiniuUploader.js

@@ -0,0 +1,172 @@
+// created by gpake
+(function() {
+
+var config = {
+    qiniuRegion: '',
+    qiniuImageURLPrefix: '',
+    qiniuUploadToken: '',
+    qiniuUploadTokenURL: '',
+    qiniuUploadTokenFunction: null,
+    qiniuShouldUseQiniuFileName: false
+}
+
+module.exports = {
+    init: init,
+    upload: upload,
+}
+
+// 在整个程序生命周期中,只需要 init 一次即可
+// 如果需要变更参数,再调用 init 即可
+function init(options) {
+    config = {
+        qiniuRegion: '',
+        qiniuImageURLPrefix: '',
+        qiniuUploadToken: '',
+        qiniuUploadTokenURL: '',
+        qiniuUploadTokenFunction: null,
+        qiniuShouldUseQiniuFileName: false
+    };
+    updateConfigWithOptions(options);
+}
+
+function updateConfigWithOptions(options) {
+    if (options.region) {
+        config.qiniuRegion = options.region;
+    } else {
+        console.error('qiniu uploader need your bucket region');
+    }
+    if (options.uptoken) {
+        config.qiniuUploadToken = options.uptoken;
+    } else if (options.uptokenURL) {
+        config.qiniuUploadTokenURL = options.uptokenURL;
+    } else if(options.uptokenFunc) {
+        config.qiniuUploadTokenFunction = options.uptokenFunc;
+    }
+    if (options.domain) {
+        config.qiniuImageURLPrefix = options.domain;
+    }
+    config.qiniuShouldUseQiniuFileName = options.shouldUseQiniuFileName
+}
+
+function upload(filePath, success, fail, options, progress, cancelTask) {
+    if (null == filePath) {
+        console.error('qiniu uploader need filePath to upload');
+        return;
+    }
+    if (options) {
+      updateConfigWithOptions(options);
+    }
+    if (config.qiniuUploadToken) {
+        doUpload(filePath, success, fail, options, progress, cancelTask);
+    } else if (config.qiniuUploadTokenURL) {
+        getQiniuToken(function() {
+            doUpload(filePath, success, fail, options, progress, cancelTask);
+        });
+    } else if (config.qiniuUploadTokenFunction) {
+        config.qiniuUploadToken = config.qiniuUploadTokenFunction();
+        if (null == config.qiniuUploadToken && config.qiniuUploadToken.length > 0) {
+            console.error('qiniu UploadTokenFunction result is null, please check the return value');
+            return
+        }
+        doUpload(filePath, success, fail, options, progress, cancelTask);
+    } else {
+        console.error('qiniu uploader need one of [uptoken, uptokenURL, uptokenFunc]');
+        return;
+    }
+}
+
+function doUpload(filePath, success, fail, options, progress, cancelTask) {
+    if (null == config.qiniuUploadToken && config.qiniuUploadToken.length > 0) {
+        console.error('qiniu UploadToken is null, please check the init config or networking');
+        return
+    }
+    var url = uploadURLFromRegionCode(config.qiniuRegion);
+    var fileName = filePath.split('//')[1];
+    if (options && options.key) {
+        fileName = options.key;
+    }
+    var formData = {
+        'token': config.qiniuUploadToken
+    };
+    if (!config.qiniuShouldUseQiniuFileName) {
+      formData['key'] = fileName
+    }
+    var uploadTask = wx.uploadFile({
+        url: url,
+        filePath: filePath,
+        name: 'file',
+        formData: formData,
+        success: function (res) {
+          var dataString = res.data
+        //   // this if case is a compatibility with wechat server returned a charcode, but was fixed
+        //   if(res.data.hasOwnProperty('type') && res.data.type === 'Buffer'){
+        //     dataString = String.fromCharCode.apply(null, res.data.data)
+        //   }
+          try {
+            var dataObject = JSON.parse(dataString);
+            //do something
+            var fileUrl = config.qiniuImageURLPrefix + '/' + dataObject.key;
+            dataObject.fileUrl = fileUrl
+            dataObject.imageURL = fileUrl;
+            // console.log(dataObject);
+            if (success) {
+              success(dataObject);
+            }
+          } catch(e) {
+            console.log('parse JSON failed, origin String is: ' + dataString)
+            if (fail) {
+              fail(e);
+            }
+          }
+        },
+        fail: function (error) {
+            console.error(error);
+            if (fail) {
+                fail(error);
+            }
+        }
+    })
+
+    uploadTask.onProgressUpdate((res) => {
+        progress && progress(res)
+    })
+
+    cancelTask && cancelTask(() => {
+        uploadTask.abort()
+    })
+}
+
+function getQiniuToken(callback) {
+  wx.request({
+    url: config.qiniuUploadTokenURL,
+    success: function (res) {
+      var token = res.data.uptoken;
+      if (token && token.length > 0) {
+        config.qiniuUploadToken = token;
+        if (callback) {
+            callback();
+        }
+      } else {
+        console.error('qiniuUploader cannot get your token, please check the uptokenURL or server')
+      }
+    },
+    fail: function (error) {
+      console.error('qiniu UploadToken is null, please check the init config or networking: ' + error);
+    }
+  })
+}
+
+function uploadURLFromRegionCode(code) {
+    var uploadURL = null;
+    switch(code) {
+        case 'ECN': uploadURL = 'https://up.qiniup.com'; break;
+        case 'NCN': uploadURL = 'https://up-z1.qiniup.com'; break;
+        case 'SCN': uploadURL = 'https://upload-z2.qiniup.com'; break;
+        case 'NA': uploadURL = 'https://up-na0.qiniup.com'; break;
+        case 'ASG': uploadURL = 'https://up-as0.qiniup.com'; break;
+        default: console.error('please make the region is with one of [ECN, SCN, NCN, NA, ASG]');
+    }
+    return uploadURL;
+}
+
+})();

+ 213 - 0
common/utils.js

@@ -0,0 +1,213 @@
+/**
+ * 格式化数字,数字每隔三位加个逗号
+ * params: num 需要处理的数字
+ * params: len 需要保留的小数点位数
+ */
+export function formattedNumber(num, len = 2) {
+	let result = "",
+		counter = 0;
+	let formatNum;
+	if (num < 0) {
+		formatNum = formatNub(Math.abs(num) || 0, len);
+	} else {
+		formatNum = formatNub(num || 0, len);
+	}
+	let stringNum = formatNum.toString().split(".");
+	for (let i = stringNum[0].length - 1; i >= 0; i--) {
+		counter++;
+		result = stringNum[0].charAt(i) + result;
+		if (!(counter % 3) && i != 0) {
+			result = "," + result;
+		}
+	}
+	result = num < 0 ? "-" + result : result;
+	if (stringNum[1]) {
+		return "¥" + result + "." + stringNum[1];
+	} else {
+		return "¥" + result;
+	}
+};
+/**
+ * 不四舍五入保留n位小数
+ * params: val 需要处理的数字
+ * params: len 需要保留的小数点位数
+ */
+export function formatNub(num, n = 2) {
+	if (typeof num != "number" && !Number(num)) {
+		return "0.00";
+	}
+
+	num = Number(num).toString();
+	let result = "";
+	let zeroResult = function(n) {
+		let zero = "";
+		for (let i = 0; i < n; i++) {
+			zero += "0";
+		}
+		return zero;
+	};
+	if (num % 1 == 0) {
+		//整数
+		result = num + "." + zeroResult(n);
+	} else {
+		//小数
+		let num1 = num.split(".");
+		if (num1[1].length < n) {
+			result = num1[0] + "." + num1[1] + zeroResult(n - num1[1].length);
+		} else {
+			result = num1[0] + "." + num1[1].substring(0, n);
+		}
+	}
+	return result;
+};
+// 获取【加载更多】组件状态
+export function loadStatus(page, pageSize, total) {
+	if (total / pageSize > page) {
+		return 'loadmore';
+	} else {
+		return 'nomore';
+	}
+}
+
+/**
+ * 获取zhi日期前后N天的日期
+ * n 获取自定天 负数指定前n天,正数,指定后n天
+ * */
+export function funDate(n) {
+	let date1 = new Date();
+	let time1 =
+		date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate(); // time1表示当前时间
+	let date2 = new Date(date1);
+	date2.setDate(date1.getDate() + n);
+	let time2 =
+		date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate();
+	return time2;
+}
+// 指定月最后一天
+export function getCurrentMonthLast(time) {
+	// console.log(time)
+	let date = ''
+	if (!time) {
+		date = new Date();
+	} else {
+		date = new Date(time + '-01');
+	}
+
+	let currentMonth = date.getMonth();
+	let nextMonth = ++currentMonth;
+	let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1);
+	let oneDay = 1000 * 60 * 60 * 24;
+	let lastTime = new Date(nextMonthFirstDay - oneDay);
+	let month = parseInt(lastTime.getMonth() + 1);
+	let day = lastTime.getDate();
+	if (month < 10) {
+		month = '0' + month
+	}
+	if (day < 10) {
+		day = '0' + day
+	}
+	return date.getFullYear() + '-' + month + '-' + day;
+}
+/**
+ * 时间转换为10位时间戳
+ * */
+export function timeByTimestamp(time) {
+	let date1 = new Date(time).getTime() / 1000;
+	return date1;
+}
+/**
+ * 本月第一天
+ * */
+export function showMonthFirstDay() {
+  var Nowdate = new Date();
+  var MonthFirstDay = new Date(Nowdate.getFullYear(), Nowdate.getMonth(), 1);
+  const M = Number(MonthFirstDay.getMonth()) + 1;
+  return (
+    MonthFirstDay.getFullYear() +
+    "-" +
+    M +
+    "-" +
+    MonthFirstDay.getDate() +
+    " 00:00:00"
+  );
+}
+/**
+ * 判断当前页面,是使用搜索引擎接口还是使用列表接口
+ */
+export const isSerch = (obj) => {
+	let isKey = false;
+	for (let i in obj) {
+		let item = obj[i];
+		if (Array.isArray(item)) {
+			if (item.length > 0) {
+				isKey = true;
+				break;
+			}
+		} else if (
+			typeof item === "string" ||
+			typeof item === "number" ||
+			typeof item === "boolean"
+		) {
+			if (item) {
+				isKey = true;
+				break;
+			}
+		} else if (typeof item === "object") {
+			if (item && JSON.stringify(item) !== "{}") {
+				isKey = true;
+				break;
+			}
+		}
+	}
+	return isKey;
+};
+
+/**
+ * 数组去重
+ * 按数组对象的某一个属性或两个或三个属性去重
+ * params: arr 数组
+ * params: property 对象属性
+ */
+export const unique = (arr = [], property = []) => {
+	for (let i = 0, len = arr.length; i < len; i++) {
+		for (let j = i + 1; j < len; j++) {
+			if (property.length === 1) {
+				if (arr[i][property[0]] === arr[j][property[0]]) {
+					arr.splice(j, 1);
+					// splice 会改变数组长度,所以要将数组长度 len 和下标 j 减一
+					len--;
+					j--;
+				}
+			} else if (property.length === 2) {
+				if (
+					arr[i][property[0]] === arr[j][property[0]] &&
+					arr[i][property[1]] === arr[j][property[1]]
+				) {
+					arr.splice(j, 1);
+					// splice 会改变数组长度,所以要将数组长度 len 和下标 j 减一
+					len--;
+					j--;
+				}
+			} else if (property.length === 3) {
+				if (
+					arr[i][property[0]] === arr[j][property[0]] &&
+					arr[i][property[1]] === arr[j][property[1]] &&
+					arr[i][property[2]] === arr[j][property[2]]
+				) {
+					arr.splice(j, 1);
+					// splice 会改变数组长度,所以要将数组长度 len 和下标 j 减一
+					len--;
+					j--;
+				}
+			} else {
+				if (arr[i] === arr[j]) {
+					arr.splice(j, 1);
+					// splice 会改变数组长度,所以要将数组长度 len 和下标 j 减一
+					len--;
+					j--;
+				}
+			}
+		}
+	}
+	return arr;
+};

+ 54 - 0
components/AddData.vue

@@ -0,0 +1,54 @@
+<template>
+	<view class="add-view" @click="addPage(url, type)" v-if="access"><text class="custom-icon custom-icon-xinzeng"></text></view>
+</template>
+
+<script>
+export default {
+	props: {
+		url: {
+			type: String,
+			default: ''
+		},
+		type: {
+			type: String,
+			default: ''
+		},
+		access: {
+			type: Boolean,
+			default: true
+		}
+	},
+	data() {
+		return {};
+	},
+	methods: {
+		addPage(url, type) {
+			if (url) {
+				this.goPage(url, type);
+			} else {
+				this.$emit('click');
+			}
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.add-view {
+	background: $uni-color-primary;
+	width: 64upx;
+	height: 64upx;
+	text-align: center;
+	line-height: 64upx;
+	position: fixed;
+	bottom: 150upx;
+	right: 30upx;
+	z-index: 99;
+	color: #ffffff;
+	border-radius: 100%;
+	box-shadow: 0px 9rpx 76rpx 0px rgba(3, 122, 255, 0.55);
+	.custom-icon-xinzeng {
+		font-size: 32upx;
+	}
+}
+</style>

+ 35 - 0
components/CateTree.vue

@@ -0,0 +1,35 @@
+<template>
+	<block><u-select :value="value" mode="mutil-column-auto" :list="list" @confirm="confirm" @cancel="cancel"></u-select></block>
+</template>
+
+<script>
+export default {
+	model: {
+		prop: 'value',
+		event: 'change'
+	},
+	props: {
+		value: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			list: []
+		};
+	},
+	created() {},
+	methods: {
+		confirm(val) {
+			this.cancel();
+			this.$emit('confirm', val);
+		},
+		cancel(val) {
+			this.$emit('cancel', val);
+		}
+	}
+};
+</script>
+
+<style></style>

+ 66 - 0
components/SelDepartment.vue

@@ -0,0 +1,66 @@
+<template>
+	<block v-if="!!list">
+		<u-select
+			:value="value"
+			value-name="id"
+			label-name="departmentName"
+			child-name="children"
+			mode="mutil-column-auto"
+			:list="list"
+			@confirm="confirm"
+			@cancel="cancel"
+		></u-select>
+	</block>
+</template>
+
+<script>
+export default {
+	model: {
+		prop: 'value',
+		event: 'change'
+	},
+	props: {
+		value: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			list: ''
+		};
+	},
+	created() {
+		this.getAllDepartment();
+	},
+	methods: {
+		confirm(val) {
+			this.cancel()
+			this.$emit('confirm', val);
+		},
+		cancel(val) {
+			this.$emit('cancel', val);
+		},
+		getAllDepartment() {
+			this.$u.api.getAllDepartment().then(res => {
+				// this.list = this.reduceList(res.data);
+				this.list = res.data;
+			});
+		},
+		reduceList(list) {
+			list.unshift({
+				id: 0,
+				departmentName: '全部'
+			});
+			list.forEach(item => {
+				if (item.children) {
+					item.children = this.reduceList(item.children);
+				}
+			});
+			return list;
+		}
+	}
+};
+</script>
+
+<style></style>

+ 74 - 0
components/Tabbar/index.vue

@@ -0,0 +1,74 @@
+<template>
+	<u-tabbar :value="value" :list="tabbar_list" active-color="#4076D6" inactive-color="#B8C0C8" :border-top="false"></u-tabbar>
+</template>
+
+<script>
+import indexIcon from '../../static/Tar_bar_slices/index.png'
+import indexIconFill from '../../static/Tar_bar_slices/index-fill.png'
+import orderIcon from '../../static/Tar_bar_slices/order.png'
+import orderIconFill from '../../static/Tar_bar_slices/order-fill.png'
+import goodsIcon from '../../static/Tar_bar_slices/goods.png'
+import goodsIconFill from '../../static/Tar_bar_slices/goods-fill.png'
+import userIcon from '../../static/Tar_bar_slices/user.png'
+import userIconFill from '../../static/Tar_bar_slices/user-fill.png'
+import myIcon from '../../static/Tar_bar_slices/my.png'
+import myIconFill from '../../static/Tar_bar_slices/my-fill.png'
+export default {
+	model: {
+		props: 'value'
+	},
+	props: {
+		value: {
+			type: Number,
+			default: 0
+		}
+	},
+	computed: {
+		tabbar_list() {
+			return [
+				{
+					iconPath: indexIcon,
+					selectedIconPath: indexIconFill,
+					text: '工作台',
+					customIcon: false,
+					pagePath: '/pages/index/index'
+				},
+				{
+					iconPath: orderIcon,
+					selectedIconPath: orderIconFill,
+					text: '订单',
+					customIcon: false,
+					pagePath: '/pages/order/index'
+				},
+				{
+					iconPath: goodsIcon,
+					selectedIconPath: goodsIconFill,
+					text: '商品',
+					customIcon: false,
+					pagePath: '/pages/goods/index'
+				},
+				{
+					iconPath: userIcon,
+					selectedIconPath: userIconFill,
+					text: '客户',
+					customIcon: false,
+					pagePath: '/pages/customer/CustomerList'
+				},
+				{
+					iconPath: myIcon,
+					selectedIconPath: myIconFill,
+					text: '我的',
+					customIcon: false,
+					pagePath: '/pages/user/index'
+				}
+			];
+		}
+	}
+};
+</script>
+
+<style>
+	.u-tabbar__content__item__text .u-line-1{
+		font-size: 20rpx !important;
+	}
+</style>

+ 236 - 0
components/editor/editor-icon.css

@@ -0,0 +1,236 @@
+@font-face {
+	font-family: "iconfont";
+	src: url('./editor-icon.ttf') format('truetype');
+}
+
+.iconfont {
+  font-family: "iconfont" !important;
+  font-size: 16px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+}
+
+.icon-redo:before {
+  content: "\e627";
+}
+
+.icon-undo:before {
+  content: "\e633";
+}
+
+.icon-indent:before {
+  content: "\eb28";
+}
+
+.icon-outdent:before {
+  content: "\e6e8";
+}
+
+.icon-fontsize:before {
+  content: "\e6fd";
+}
+
+.icon-format-header-1:before {
+  content: "\e860";
+}
+
+.icon-format-header-4:before {
+  content: "\e863";
+}
+
+.icon-format-header-5:before {
+  content: "\e864";
+}
+
+.icon-format-header-6:before {
+  content: "\e865";
+}
+
+.icon-clearup:before {
+  content: "\e64d";
+}
+
+.icon-preview:before {
+  content: "\e631";
+}
+
+.icon-date:before {
+  content: "\e63e";
+}
+
+.icon-fontbgcolor:before {
+  content: "\e678";
+}
+
+.icon-clearedformat:before {
+  content: "\e67e";
+}
+
+.icon-font:before {
+  content: "\e684";
+}
+
+.icon-723bianjiqi_duanhouju:before {
+  content: "\e65f";
+}
+
+.icon-722bianjiqi_duanqianju:before {
+  content: "\e660";
+}
+
+.icon-text_color:before {
+  content: "\e72c";
+}
+
+.icon-format-header-2:before {
+  content: "\e75c";
+}
+
+.icon-format-header-3:before {
+  content: "\e75d";
+}
+
+.icon--checklist:before {
+  content: "\e664";
+}
+
+.icon-baocun:before {
+  content: "\ec09";
+}
+
+.icon-line-height:before {
+  content: "\e7f8";
+}
+
+.icon-quanping:before {
+  content: "\ec13";
+}
+
+.icon-direction-rtl:before {
+  content: "\e66e";
+}
+
+.icon-direction-ltr:before {
+  content: "\e66d";
+}
+
+.icon-selectall:before {
+  content: "\e62b";
+}
+
+.icon-fuzhi:before {
+  content: "\ec7a";
+}
+
+.icon-shanchu:before {
+  content: "\ec7b";
+}
+
+.icon-bianjisekuai:before {
+  content: "\ec7c";
+}
+
+.icon-fengexian:before {
+  content: "\ec7f";
+}
+
+.icon-dianzan:before {
+  content: "\ec80";
+}
+
+.icon-charulianjie:before {
+  content: "\ec81";
+}
+
+.icon-charutupian:before {
+  content: "\ec82";
+}
+
+.icon-wuxupailie:before {
+  content: "\ec83";
+}
+
+.icon-juzhongduiqi:before {
+  content: "\ec84";
+}
+
+.icon-yinyong:before {
+  content: "\ec85";
+}
+
+.icon-youxupailie:before {
+  content: "\ec86";
+}
+
+.icon-youduiqi:before {
+  content: "\ec87";
+}
+
+.icon-zitidaima:before {
+  content: "\ec88";
+}
+
+.icon-xiaolian:before {
+  content: "\ec89";
+}
+
+.icon-zitijiacu:before {
+  content: "\ec8a";
+}
+
+.icon-zitishanchuxian:before {
+  content: "\ec8b";
+}
+
+.icon-zitishangbiao:before {
+  content: "\ec8c";
+}
+
+.icon-zitibiaoti:before {
+  content: "\ec8d";
+}
+
+.icon-zitixiahuaxian:before {
+  content: "\ec8e";
+}
+
+.icon-zitixieti:before {
+  content: "\ec8f";
+}
+
+.icon-zitiyanse:before {
+  content: "\ec90";
+}
+
+.icon-zuoduiqi:before {
+  content: "\ec91";
+}
+
+.icon-zitiyulan:before {
+  content: "\ec92";
+}
+
+.icon-zitixiabiao:before {
+  content: "\ec93";
+}
+
+.icon-zuoyouduiqi:before {
+  content: "\ec94";
+}
+
+.icon-duigoux:before {
+  content: "\ec9e";
+}
+
+.icon-guanbi:before {
+  content: "\eca0";
+}
+
+.icon-shengyin_shiti:before {
+  content: "\eca5";
+}
+
+.icon-Character-Spacing:before {
+  content: "\e964";
+}

BIN
components/editor/editor-icon.ttf


+ 278 - 0
components/editor/editor.vue

@@ -0,0 +1,278 @@
+<template>
+	<view class="container">
+		<view class="page-body">
+			<view class="wrapper">
+				<view class="toolbar" @tap="format">
+					<view :class="formats.bold ? 'ql-active' : ''" class="iconfont icon-zitijiacu" data-name="bold"></view>
+					<view :class="formats.italic ? 'ql-active' : ''" class="iconfont icon-zitixieti" data-name="italic"></view>
+					<view :class="formats.underline ? 'ql-active' : ''" class="iconfont icon-zitixiahuaxian" data-name="underline"></view>
+					<view :class="formats.strike ? 'ql-active' : ''" class="iconfont icon-zitishanchuxian" data-name="strike"></view>
+					<view :class="formats.align === 'left' ? 'ql-active' : ''" class="iconfont icon-zuoduiqi" data-name="align" data-value="left"></view>
+					<view :class="formats.align === 'center' ? 'ql-active' : ''" class="iconfont icon-juzhongduiqi" data-name="align" data-value="center"></view>
+					<view :class="formats.align === 'right' ? 'ql-active' : ''" class="iconfont icon-youduiqi" data-name="align" data-value="right"></view>
+					<view :class="formats.align === 'justify' ? 'ql-active' : ''" class="iconfont icon-zuoyouduiqi" data-name="align" data-value="justify"></view>
+					<view :class="formats.lineHeight ? 'ql-active' : ''" class="iconfont icon-line-height" data-name="lineHeight" data-value="2"></view>
+					<view :class="formats.letterSpacing ? 'ql-active' : ''" class="iconfont icon-Character-Spacing" data-name="letterSpacing" data-value="2em"></view>
+					<view :class="formats.marginTop ? 'ql-active' : ''" class="iconfont icon-722bianjiqi_duanqianju" data-name="marginTop" data-value="20px"></view>
+					<view :class="formats.previewarginBottom ? 'ql-active' : ''" class="iconfont icon-723bianjiqi_duanhouju" data-name="marginBottom" data-value="20px"></view>
+					<view class="iconfont icon-clearedformat" @tap="removeFormat"></view>
+					<view :class="formats.fontFamily ? 'ql-active' : ''" class="iconfont icon-font" data-name="fontFamily" data-value="Pacifico"></view>
+					<view :class="formats.fontSize === '24px' ? 'ql-active' : ''" class="iconfont icon-fontsize" data-name="fontSize" data-value="24px"></view>
+
+					<view :class="formats.color === '#0000ff' ? 'ql-active' : ''" class="iconfont icon-text_color" data-name="color" data-value="#0000ff"></view>
+					<view
+						:class="formats.backgroundColor === '#00ff00' ? 'ql-active' : ''"
+						class="iconfont icon-fontbgcolor"
+						data-name="backgroundColor"
+						data-value="#00ff00"
+					></view>
+
+					<view class="iconfont icon-date" @tap="insertDate"></view>
+					<view class="iconfont icon--checklist" data-name="list" data-value="check"></view>
+					<view :class="formats.list === 'ordered' ? 'ql-active' : ''" class="iconfont icon-youxupailie" data-name="list" data-value="ordered"></view>
+					<view :class="formats.list === 'bullet' ? 'ql-active' : ''" class="iconfont icon-wuxupailie" data-name="list" data-value="bullet"></view>
+					<view class="iconfont icon-undo" @tap="undo"></view>
+					<view class="iconfont icon-redo" @tap="redo"></view>
+
+					<view class="iconfont icon-outdent" data-name="indent" data-value="-1"></view>
+					<view class="iconfont icon-indent" data-name="indent" data-value="+1"></view>
+					<view class="iconfont icon-fengexian" @tap="insertDivider"></view>
+					<view class="iconfont icon-charutupian" @tap="insertImage"></view>
+					<view :class="formats.header === 1 ? 'ql-active' : ''" class="iconfont icon-format-header-1" data-name="header" :data-value="1"></view>
+					<view :class="formats.script === 'sub' ? 'ql-active' : ''" class="iconfont icon-zitixiabiao" data-name="script" data-value="sub"></view>
+					<view :class="formats.script === 'super' ? 'ql-active' : ''" class="iconfont icon-zitishangbiao" data-name="script" data-value="super"></view>
+					<view class="iconfont icon-shanchu" @tap="clear"></view>
+					<view :class="formats.direction === 'rtl' ? 'ql-active' : ''" class="iconfont icon-direction-rtl" data-name="direction" data-value="rtl"></view>
+				</view>
+
+				<editor
+					ref="dialogInput"
+					id="editor"
+					class="ql-container"
+					placeholder="开始输入..."
+					@blur="editInput"
+					showImgSize
+					showImgToolbar
+					showImgResize
+					@statuschange="onStatusChange"
+					:read-only="readOnly"
+					@ready="onEditorReady"
+				></editor>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import webUrl from '@/common/config.js';
+import qiniuUploader from '@/common/qiniuUploader.js';
+// import { getEnToken } from '@/access/common.js';
+export default {
+	data() {
+		return {
+			qn_token: '',
+			readOnly: false,
+			formats: {},
+			goods_detail: '',
+			uploadtoken: '',
+			goodsDescription: ''
+		};
+	},
+	props: {
+		html: {
+			type: String,
+			default: ''
+		}
+	},
+	watch: {
+		html(val) {
+			if (val) {
+				this.editorCtx.setContents({
+					html: this.html
+				});
+			}
+		}
+	},
+	created(options) {
+		this.getQiniuToken();
+	},
+	methods: {
+		getQiniuToken() {
+			this.$u.api
+				.uploadToken({
+					bucket: webUrl.QINIU_KEY,
+					key: 0
+				})
+				.then(res => {
+					this.qn_token = res.data;
+				});
+		},
+		editInput(e) {
+			this.editorCtx.getContents({
+				success:(res)=>{
+					this.$emit('editInput', res.html);
+				}
+			})
+		},
+		readOnlyChange() {
+			this.readOnly = !this.readOnly;
+		},
+		onEditorReady() {
+			uni.createSelectorQuery()
+				.in(this)
+				.select('#editor')
+				.context(res => {
+					if (!res) return;
+					this.editorCtx = res.context;
+					if (this.html) {
+						this.editorCtx.setContents({
+							html: this.html,
+							success: () => {
+								uni.hideKeyboard();
+								this.$refs.dialogInput.quill.blur();
+							}
+						});
+					}
+				})
+				.exec();
+		},
+		undo() {
+			this.editorCtx.undo();
+		},
+		redo() {
+			this.editorCtx.redo();
+		},
+		format(e) {
+			let { name, value } = e.target.dataset;
+			if (!name) return;
+			// console.log('format', name, value)
+			this.editorCtx.format(name, value);
+		},
+		onStatusChange(e) {
+			const formats = e.detail;
+			this.formats = formats;
+		},
+		insertDivider() {
+			this.editorCtx.insertDivider({
+				success: function() {
+					console.log('insert divider success');
+				}
+			});
+		},
+		clear() {
+			this.editorCtx.clear({
+				success: function(res) {
+					console.log('clear success');
+				}
+			});
+		},
+		removeFormat() {
+			this.editorCtx.removeFormat();
+		},
+		insertDate() {
+			const date = new Date();
+			const formatDate = `${date.getFullYear()}/${date.getMonth() + 1}/${date.getDate()}`;
+			this.editorCtx.insertText({
+				text: formatDate
+			});
+		},
+		// 上传图片
+		insertImage() {
+			uni.chooseImage({
+				count: 9,
+				success: async res => {
+					res.tempFilePaths.forEach(imgPath => {
+						this.upImg(imgPath);
+					});
+				}
+			});
+		},
+		async upImg(imgPath) {
+			// const imgPath = res.tempFilePaths[0]; //选择图片的路径
+			const imgName = imgPath.split('/')[imgPath.split('/').length - 1];
+			const key = `${this.$store.state.enToken}/${imgName}`; //图片和企业token拼接 为自定义文件名
+
+			let domain = webUrl.QN_UP; //文件上传地址
+			let token = this.qn_token; //token为七牛云的token一般由后台接口提供
+			let filePath = imgPath; //为需要上传的文件
+			uni.showLoading();
+			qiniuUploader.upload(
+				filePath,
+				res => {
+					//图片上传完成后返回值
+					// 压缩图片
+					uni.hideLoading();
+					const uploadPicUrl = `${webUrl.QINIU_URL}/${res.key}?imageView2/2/w/750/h/750`;
+					// console.log(uploadPicUrl);
+					this.editorCtx.insertImage({
+						src: uploadPicUrl,
+						width:'100%',
+						alt: '图像',
+						success: function() {
+							console.log('图像上传成功');
+						}
+					});
+					// this.$emit('uploadSuccess', imgData);
+				},
+				error => {
+					uni.hideLoading();
+					// resolve(error)
+				},
+				{
+					region: 'SCN', // (必须填写正确)ECN, SCN, NCN, NA, ASG,分别对应七牛的:华东,华南,华北,北美,新加坡 5 个区域
+					domain: domain, // // bucket 域名,下载资源时用到。如果设置,会在 success callback 的 res 参数加上可以直接使用的 ImageURL                                         字  段。否则需要自己拼接
+					key: key, // [非必须]自定义文件 key。如果不设置,默认为使用微信小程序 API 的临时文件名
+					// 以下方法三选一即可,优先级为:uptoken > uptokenURL > uptokenFunc
+					uptoken: token // 由其他程序生成七牛 uptoken
+				},
+				res => {
+					uni.hideLoading();
+					//上传进度
+					if (res.progress === 100) {
+						// resolve(keys);
+					}
+				}
+			);
+		}
+	}
+};
+</script>
+
+<style>
+@import './editor-icon.css';
+
+.wrapper {
+	padding: 5px;
+}
+
+.iconfont {
+	display: inline-block;
+	padding: 22rpx;
+	/* width: 24px; */
+	/* height: 24px; */
+	cursor: pointer;
+	font-size: 20px;
+}
+
+.toolbar {
+	box-sizing: border-box;
+	border-bottom: 0;
+	font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
+}
+
+.ql-container {
+	box-sizing: border-box;
+	padding: 12px 15px;
+	width: 100%;
+	min-height: 30vh;
+	height: auto;
+	background: #fff;
+	font-size: 16px;
+	line-height: 1.5;
+	border: 1px solid #eee;
+}
+
+.ql-active {
+	color: #06c;
+}
+</style>

+ 42 - 0
components/empty/index.vue

@@ -0,0 +1,42 @@
+<template>
+	<view class="empty-view" :style="{ left: left }">
+		<image :src="src" mode="aspectFit" class="empty-img"></image>
+		<view class="empty-text">{{ text }}</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		left: {
+			type: String,
+			default: '0'
+		},
+		text: {
+			type: String,
+			default: '没有数据哦~~'
+		},
+		src: {
+			type: String,
+			default: '../../static/empty/data.png'
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.empty-view {
+	width: 100%;
+	text-align: center;
+	margin-top: 200upx;
+	.empty-img {
+		width: 200rpx;
+		height: 200rpx;
+	}
+	.empty-text {
+		font-size: 26upx;
+		color: #999999;
+		padding-top: 10rpx;
+	}
+}
+</style>

+ 200 - 0
components/ly-tree/components/ly-checkbox.vue

@@ -0,0 +1,200 @@
+<template>
+	<text :class="classObj.wrapper" @click.stop="handleClick">
+		<text :class="[classObj.input, {'is-indeterminate': indeterminate, 'is-checked': checked, 'is-disabled': disabled}]">
+			<text :class="classObj.inner"></text>
+		</text>
+	</text>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				classObj: {}
+			}
+		},
+		
+		props: {
+			type: {
+				type: String,
+				validator(t) {
+					return t === 'radio' || t === 'checkbox'
+				}
+			},
+			checked: Boolean,
+			disabled: Boolean,
+			indeterminate: Boolean
+		},
+		
+		created() {
+			this.classObj = {
+				wrapper: `ly-${this.type}`,
+				input: `ly-${this.type}__input`,
+				inner: `ly-${this.type}__inner`
+			}
+		},
+		
+		methods: {
+			handleClick() {
+				this.$emit('check', this.checked);
+			}
+		}
+	}
+</script>
+
+<style>
+	/* lyRadio/lyCheckbox-start */
+	.ly-checkbox,
+	.ly-radio {
+		color: #606266;
+		font-weight: 500;
+		font-size: 28rpx;
+		cursor: pointer;
+		user-select: none;
+		padding-right: 16rpx
+	}
+	
+	.ly-checkbox__input,
+	.ly-radio__input {
+		cursor: pointer;
+		outline: 0;
+		line-height: 1;
+		vertical-align: middle
+	}
+	
+	.ly-checkbox__input.is-disabled .ly-checkbox__inner,
+	.ly-radio__input.is-disabled .ly-radio__inner {
+		background-color: #edf2fc;
+		border-color: #DCDFE6;
+		cursor: not-allowed
+	}
+	
+	.ly-checkbox__input.is-disabled .ly-checkbox__inner::after,
+	.ly-radio__input.is-disabled .ly-radio__inner::after {
+		cursor: not-allowed;
+		border-color: #C0C4CC
+	}
+	
+	.ly-checkbox__input.is-disabled .ly-checkbox__inner+.ly-checkbox__label,
+	.ly-radio__input.is-disabled .ly-radio__inner+.ly-radio__label {
+		cursor: not-allowed
+	}
+	
+	.ly-checkbox__input.is-disabled.is-checked .ly-checkbox__inner,
+	.ly-radio__input.is-disabled.is-checked .ly-radio__inner {
+		background-color: #F2F6FC;
+		border-color: #DCDFE6
+	}
+	
+	.ly-checkbox__input.is-disabled.is-checked .ly-checkbox__inner::after,
+	.ly-radio__input.is-disabled.is-checked .ly-radio__inner::after {
+		border-color: #C0C4CC
+	}
+	
+	.ly-checkbox__input.is-disabled.is-indeterminate .ly-checkbox__inner {
+		background-color: #F2F6FC;
+		border-color: #DCDFE6
+	}
+	
+	.ly-checkbox__input.is-disabled.is-indeterminate .ly-checkbox__inner::before {
+		background-color: #C0C4CC;
+		border-color: #C0C4CC
+	}
+	
+	.ly-checkbox__input.is-checked .ly-checkbox__inner,
+	.ly-radio__input.is-checked .ly-radio__inner,
+	.ly-checkbox__input.is-indeterminate .ly-checkbox__inner {
+		background-color: #409EFF;
+		border-color: #409EFF
+	}
+	
+	.ly-checkbox__input.is-disabled+text.ly-checkbox__label,
+	.ly-radio__input.is-disabled+text.ly-radio__label {
+		color: #C0C4CC;
+		cursor: not-allowed
+	}
+	
+	.ly-checkbox__input.is-checked .ly-checkbox__inner::after,
+	.ly-radio__input.is-checked .ly-radio__inner::after {
+		-webkit-transform: rotate(45deg) scaleY(1);
+		transform: rotate(45deg) scaleY(1)
+	}
+	
+	.ly-checkbox__input.is-checked+.ly-checkbox__label,
+	.ly-radio__input.is-checked+.ly-radio__label {
+		color: #409EFF
+	}
+	
+	.ly-checkbox__input.is-focus .ly-checkbox__inner,
+	.ly-radio__input.is-focus .ly-radio__inner {
+		border-color: #409EFF
+	}
+	
+	.ly-checkbox__input.is-indeterminate .ly-checkbox__inner::before {
+		content: '';
+		position: absolute;
+		display: block;
+		background-color: #FFF;
+		height: 6rpx;
+		-webkit-transform: scale(.5);
+		transform: scale(.5);
+		left: 0;
+		right: 0;
+		top: 10rpx
+	}
+	
+	.ly-checkbox__input.is-indeterminate .ly-checkbox__inner::after {
+		display: none
+	}
+	
+	.ly-checkbox__inner,
+	.ly-radio__inner {
+		display: inline-block;
+		position: relative;
+		border: 2rpx solid #DCDFE6;
+		border-radius: 4rpx;
+		-webkit-box-sizing: border-box;
+		box-sizing: border-box;
+		width: 28rpx;
+		height: 28rpx;
+		background-color: #FFF;
+		z-index: 1;
+		-webkit-transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46);
+		transition: border-color .25s cubic-bezier(.71, -.46, .29, 1.46), background-color .25s cubic-bezier(.71, -.46, .29, 1.46)
+	}
+	
+	.ly-radio__inner {
+		border-radius: 50%;
+		width: 34rpx !important;
+		height: 34rpx !important;
+	}
+	
+	.ly-checkbox__inner::after,
+	.ly-radio__inner::after {
+		-webkit-box-sizing: content-box;
+		box-sizing: content-box;
+		content: "";
+		border: 2rpx solid #FFF;
+		border-left: 0;
+		border-top: 0;
+		height: 14rpx;
+		left: 10rpx;
+		position: absolute;
+		top: 2rpx;
+		-webkit-transform: rotate(45deg) scaleY(0);
+		transform: rotate(45deg) scaleY(0);
+		width: 6rpx;
+		-webkit-transition: -webkit-transform .15s ease-in .05s;
+		transition: -webkit-transform .15s ease-in .05s;
+		transition: transform .15s ease-in .05s;
+		transition: transform .15s ease-in .05s, -webkit-transform .15s ease-in .05s;
+		-webkit-transform-origin: center;
+		transform-origin: center
+	}
+	
+	.ly-radio__inner::after {
+		left: 12rpx !important;
+		top: 6rpx !important;
+	}
+	/* lyRadio/lyCheckbox-end */
+</style>

+ 435 - 0
components/ly-tree/ly-tree-node.vue

@@ -0,0 +1,435 @@
+<template>
+	<view
+		ref="node"
+		name="LyTreeNode"
+		v-show="node.visible"
+		class="ly-tree-node"
+		:class="{
+			'is-expanded': expanded,
+			'is-hidden': !node.visible,
+			'is-checked': !node.disabled && node.checked
+		}"
+		role="treeitem"
+		@tap.stop="handleClick"
+	>
+		<view
+			class="ly-tree-node__content"
+			:class="{
+				'is-current': node.isCurrent && highlightCurrent
+			}"
+			:style="{
+				'padding-left': (node.level - 1) * indent + 'px'
+			}"
+		>
+			<text
+				@tap.stop="handleExpandIconClick"
+				:class="[
+					{
+						'is-leaf': node.isLeaf,
+						expanded: !node.isLeaf && node.expanded
+					},
+					'ly-tree-node__expand-icon',
+					iconClass ? iconClass : 'ly-iconfont ly-icon-caret-right'
+				]"
+			></text>
+
+			<ly-checkbox
+				v-if="checkboxVisible || radioVisible"
+				:type="checkboxVisible ? 'checkbox' : 'radio'"
+				:checked="node.checked"
+				:indeterminate="node.indeterminate"
+				:disabled="!!node.disabled"
+				@check="handleCheckChange(!node.checked)"
+			/>
+
+			<text v-if="node.loading" class="ly-tree-node__loading-icon ly-iconfont ly-icon-loading"></text>
+
+			<template v-if="node.icon && node.icon.length > 0">
+				<image v-if="node.icon.indexOf('/') !== -1" class="ly-tree-node__icon" mode="widthFix" :src="node.icon" @error="handleImageError"></image>
+				<text v-else class="ly-tree-node__icon" :class="node.icon"></text>
+			</template>
+
+			<text class="ly-tree-node__label">{{ node.label }}</text>
+
+			<view class="btn-view">
+				<u-icon @click="edit(node)" name="edit-pen-fill" color="#2979ff" size="32" style="margin-right: 30rpx;"></u-icon>
+				<u-icon @click="deldata(node)" name="trash" color="#fa3534" size="32"></u-icon>
+			</view>
+		</view>
+
+		<view v-if="!renderAfterExpand || childNodeRendered" v-show="expanded" class="ly-tree-node__children" role="group">
+			<ly-tree-node
+				v-for="cNodeId in node.childNodesId"
+				:nodeId="cNodeId"
+				:render-after-expand="renderAfterExpand"
+				:show-checkbox="showCheckbox"
+				:show-radio="showRadio"
+				:check-only-leaf="checkOnlyLeaf"
+				:key="getNodeKey(cNodeId)"
+				:indent="indent"
+				:icon-class="iconClass"
+			></ly-tree-node>
+		</view>
+	</view>
+</template>
+
+<script>
+import { getNodeKey } from './tool/util.js';
+import lyCheckbox from './components/ly-checkbox.vue';
+
+export default {
+	name: 'LyTreeNode',
+
+	componentName: 'LyTreeNode',
+
+	components: {
+		lyCheckbox
+	},
+
+	props: {
+		nodeId: [Number, String],
+		renderAfterExpand: {
+			type: Boolean,
+			default: true
+		},
+		checkOnlyLeaf: {
+			type: Boolean,
+			default: false
+		},
+		showCheckbox: {
+			type: Boolean,
+			default: false
+		},
+		showRadio: {
+			type: Boolean,
+			default: false
+		},
+		indent: Number,
+		iconClass: String
+	},
+
+	data() {
+		return {
+			node: {
+				indeterminate: false,
+				checked: false,
+				expanded: false
+			},
+			expanded: false,
+			childNodeRendered: false,
+			oldChecked: null,
+			oldIndeterminate: null,
+			highlightCurrent: false
+		};
+	},
+
+	inject: ['tree'],
+
+	computed: {
+		checkboxVisible() {
+			if (this.checkOnlyLeaf) {
+				return this.showCheckbox && this.node.isLeaf;
+			}
+
+			return this.showCheckbox;
+		},
+		radioVisible() {
+			if (this.checkOnlyLeaf) {
+				return this.showRadio && this.node.isLeaf;
+			}
+
+			return this.showRadio;
+		}
+	},
+
+	watch: {
+		'node.indeterminate'(val) {
+			this.handleSelectChange(this.node.checked, val);
+		},
+		'node.checked'(val) {
+			this.handleSelectChange(val, this.node.indeterminate);
+		},
+		'node.expanded'(val) {
+			this.$nextTick(() => (this.expanded = val));
+			if (val) {
+				this.childNodeRendered = true;
+			}
+		}
+	},
+
+	methods: {
+		getNodeKey(nodeId) {
+			let node = this.tree.store.root.getChildNodes([nodeId])[0];
+			return getNodeKey(this.tree.nodeKey, node.data);
+		},
+
+		handleSelectChange(checked, indeterminate) {
+			if (this.oldChecked !== checked && this.oldIndeterminate !== indeterminate) {
+				if (this.checkOnlyLeaf && !this.node.isLeaf) return;
+
+				if (this.checkboxVisible) {
+					const allNodes = this.tree.store._getAllNodes();
+					this.tree.$emit('check-change', {
+						checked,
+						indeterminate,
+						node: this.node,
+						data: this.node.data,
+						checkedall: allNodes.every(item => item.checked)
+					});
+				} else {
+					this.tree.$emit('radio-change', {
+						checked,
+						node: this.node,
+						data: this.node.data,
+						checkedall: false
+					});
+				}
+			}
+
+			if (!this.expanded && this.tree.expandOnCheckNode && checked) {
+				this.handleExpandIconClick();
+			}
+
+			this.oldChecked = checked;
+			this.indeterminate = indeterminate;
+		},
+
+		handleClick() {
+			this.tree.store.setCurrentNode(this.node);
+			this.tree.$emit('current-change', {
+				node: this.node,
+				data: this.tree.store.currentNode ? this.tree.store.currentNode.data : null,
+				currentNode: this.tree.store.currentNode
+			});
+			this.tree.currentNode = this.node;
+
+			if (this.tree.expandOnClickNode) {
+				this.handleExpandIconClick();
+			}
+
+			if (this.tree.checkOnClickNode && !this.node.disabled) {
+				(this.checkboxVisible || this.radioVisible) && this.handleCheckChange(!this.node.checked);
+			}
+
+			this.tree.$emit('node-click', this.node);
+		},
+
+		handleExpandIconClick() {
+			if (this.node.isLeaf) return;
+
+			if (this.expanded) {
+				this.tree.$emit('node-collapse', this.node);
+				this.node.collapse();
+			} else {
+				this.node.expand();
+				this.tree.$emit('node-expand', this.node);
+
+				if (this.tree.accordion) {
+					uni.$emit(`${this.tree.elId}-tree-node-expand`, this.node);
+				}
+			}
+		},
+
+		handleCheckChange(checked) {
+			if (this.node.disabled) return;
+
+			if (this.checkboxVisible) {
+				this.node.setChecked(checked, !(this.tree.checkStrictly || this.checkOnlyLeaf));
+			} else {
+				this.node.setRadioChecked(checked);
+			}
+
+			this.$nextTick(() => {
+				this.tree.$emit('check', {
+					node: this.node,
+					data: this.node.data,
+					checkedNodes: this.tree.store.getCheckedNodes(),
+					checkedKeys: this.tree.store.getCheckedKeys(),
+					halfCheckedNodes: this.tree.store.getHalfCheckedNodes(),
+					halfCheckedKeys: this.tree.store.getHalfCheckedKeys()
+				});
+			});
+		},
+
+		handleImageError() {
+			this.node.icon = this.tree.defaultNodeIcon;
+		},
+		edit(node){
+			this.tree.$emit('edit',node)
+		},
+		deldata(node){
+			this.tree.$emit('deldata',node)
+		}
+	},
+
+	created() {
+		if (!this.tree) {
+			throw new Error("Can not find node's tree.");
+		}
+
+		this.node = this.tree.store.nodesMap[this.nodeId];
+		this.highlightCurrent = this.tree.highlightCurrent;
+
+		if (this.node.expanded) {
+			this.expanded = true;
+			this.childNodeRendered = true;
+		}
+
+		const props = this.tree.props || {};
+		const childrenKey = props['children'] || 'children';
+		this.$watch(`node.data.${childrenKey}`, () => {
+			this.node.updateChildren();
+		});
+
+		if (this.tree.accordion) {
+			uni.$on(`${this.tree.elId}-tree-node-expand`, node => {
+				if (this.node.id !== node.id && this.node.level === node.level) {
+					this.node.collapse();
+				}
+			});
+		}
+	},
+
+	beforeDestroy() {
+		this.$parent = null;
+	},
+	
+};
+</script>
+
+<style lang="scss" scoped>
+.ly-tree-node {
+	white-space: nowrap;
+	outline: 0;
+}
+
+.ly-tree-node__content {
+	display: flex;
+	align-items: center;
+	height: 70rpx;
+	position: relative;
+	.btn-view {
+		position: absolute;
+		top: 50%;
+		transform: translateY(-50%);
+		right: 0;
+	}
+}
+
+.ly-tree-node__content.is-current {
+	background-color: #f5f7fa;
+}
+
+.ly-tree-node__content > .ly-tree-node__expand-icon {
+	padding: 12rpx;
+}
+
+.ly-tree-node__checkbox {
+	display: flex;
+	margin-right: 16rpx;
+	width: 40rpx;
+	height: 40rpx;
+}
+
+.ly-tree-node__checkbox > image {
+	width: 40rpx;
+	height: 40rpx;
+}
+
+.ly-tree-node__expand-icon {
+	color: #c0c4cc;
+	font-size: 28rpx;
+	-webkit-transform: rotate(0);
+	transform: rotate(0);
+	-webkit-transition: -webkit-transform 0.3s ease-in-out;
+	transition: -webkit-transform 0.3s ease-in-out;
+	transition: transform 0.3s ease-in-out;
+	transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
+}
+
+.ly-tree-node__expand-icon.expanded {
+	-webkit-transform: rotate(90deg);
+	transform: rotate(90deg);
+}
+
+.ly-tree-node__expand-icon.is-leaf {
+	color: transparent;
+}
+
+.ly-tree-node__icon {
+	width: 34rpx;
+	height: 34rpx;
+	overflow: hidden;
+	margin-right: 16rpx;
+}
+
+.ly-tree-node__label {
+	font-size: 28rpx;
+}
+
+.ly-tree-node__loading-icon {
+	margin-right: 16rpx;
+	font-size: 28rpx;
+	color: #c0c4cc;
+	-webkit-animation: rotating 2s linear infinite;
+	animation: rotating 2s linear infinite;
+}
+
+.ly-tree-node > .ly-tree-node__children {
+	overflow: hidden;
+	background-color: transparent;
+}
+
+.ly-tree-node > .ly-tree-node__children.collapse-transition {
+	transition: height 0.3s ease-in-out;
+}
+
+.ly-tree-node.is-expanded > .ly-tree-node__children {
+	display: block;
+}
+
+.ly-tree-node_collapse {
+	overflow: hidden;
+	padding-top: 0;
+	padding-bottom: 0;
+}
+/* lyTree-end */
+
+/* iconfont-start */
+@font-face {
+	font-family: 'ly-iconfont';
+	src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAPsAAsAAAAACKwAAAOeAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCDBgqFDIQPATYCJAMMCwgABCAFhG0HQBtfB8gekiSCdAwUAKgCFMA5Hj7H0PeTlABUr57PVyGqugqzSWJnNwWoWJjx/9rUr4TPL1ZSQpU2mycqwoRwIN3p+MkqMqyEW+OtMBLPSUBb8v//XtWMKTavxYIUsT/Wy1qbQzkBDOYEKGB7dVpPyVqgCnJNwvMvhZl10nMCtQbFoPVhY8ZDncJfF4grbqpQ13AqE52hWqgcOFrEQ6hWnW5VfMCD7Pfjn4WoI6nI/K0bl0MNGPBz0qcflVqYnvCA4vNDPUXGPFCIw8HgtsqiOK9SrW2smm6sVITElWlpISMdVBn8wyMJopLfXg+myZ48KCrSkvj9g37U1ItbXYke4APwXxK3N4TuehyBfmM0I3zbNdt7uk3VnjPtzX0rnIl7z7bZvb/thHohsu9QuykKo+Cws4nL7LsPmI3n2qN9B9upZEIKd4hu0NCKi0rt7fNtdl+I1N25hOJMDQK6odS123tROR7Pg8toEhDaF+kR0TYjxW6M58F5+ZNQOxmZHtE2g+IYjxjlNy/yIRQpCmrgq5R4/3jx8PvT8Ha8d3/xiLnt4EGyaDnznzRv8vpyZ+9TFHf/ntX9e59A+b6+fPHd5+dy0wYHVvHOroWbnWe879O9DnL53bN/gUHuwm28b/n8i/V3ry4E3IoXNqS6Rvs0LhJxeNVjoUkM3LKosU+0a6rh45FVvLt+2oz7Zd53b4QOy7/9snDXHbqVu+A+f8r7PnM2H8kXrWm5c8/vLu7LqRee7HW637mz3kHc5U/RCXf25d7G8tkdgEfwIpzpkknGpaMw3ww55q9Mn9OQNyua/wB/49OOWydn4eL/6roCfjx6FMmcxfJStYRKfd3UwoHiML4rF4uMSK+SvYTuNxMHrpl8yd3Q6v32cAeo/KFaowBJlQHIqo3zi3geKtRZhErVlqDWnOGn67QRKkWpwaw1AkKza5A0egFZszf8In4HFTp9h0rNUQm1NqP1lXUmgyuDBVUlNYi2gHA98FnokUreOZaac1xV1JlMMZGKEs+QdCLVrgynPhUcO0pzzYyUjDAReGSYeBl13YCEIrCpLhOWlGE+mWRD35TQAw8UawRKJVEGQrMAwekCPpaMlpTOz49FmeZwqcREX1t3Ikoo4dMTaQmpBfzhRn9R30uZXTKXKUOSmLSKEQIeYhjqKZcrcIzhMLLRrJMSrA35UF4yGMaWGhPHm733dwJq+Z/NkSJHUXemCirjgpuWrHMD1eC+mQUAAAA=')
+		format('woff2');
+}
+
+.ly-iconfont {
+	font-family: 'ly-iconfont' !important;
+	font-size: 30rpx;
+	font-style: normal;
+	-webkit-font-smoothing: antialiased;
+	-moz-osx-font-smoothing: grayscale;
+}
+
+.ly-icon-caret-right:before {
+	content: '\e8ee';
+}
+
+.ly-icon-loading:before {
+	content: '\e657';
+}
+/* iconfont-end */
+
+/* animate-start */
+@keyframes rotating {
+	0% {
+		-webkit-transform: rotateZ(0);
+		transform: rotateZ(0);
+	}
+
+	100% {
+		-webkit-transform: rotateZ(360deg);
+		transform: rotateZ(360deg);
+	}
+}
+/* animate-end */
+</style>

+ 611 - 0
components/ly-tree/ly-tree.vue

@@ -0,0 +1,611 @@
+<template>
+	<view>
+		<template v-if="showLoading">
+			<view class="ly-loader ly-flex-center">
+				<view class="ly-loader-inner">加载中...</view>
+			</view>
+		</template>
+		
+		<template v-else>
+			<view v-if="isEmpty || !visible" 
+				class="ly-empty">
+				{{emptyText}}
+			</view>
+			<view :key="updateKey"
+				class="ly-tree" 
+				:class="{'is-empty': isEmpty || !visible}" 
+				role="tree" 
+				name="LyTreeExpand">
+				<ly-tree-node v-for="nodeId in childNodesId" 
+					:nodeId="nodeId" 
+					:render-after-expand="renderAfterExpand"
+					:show-checkbox="showCheckbox" 
+					:show-radio="showRadio" 
+					:check-only-leaf="checkOnlyLeaf"
+					:key="getNodeKey(nodeId)" 
+					:indent="indent" 
+					:icon-class="iconClass">
+				</ly-tree-node>
+			</view>
+		</template>
+	</view>
+</template>
+
+<script>
+	import Vue from 'vue'
+	import TreeStore from './model/tree-store.js';
+	import {getNodeKey} from './tool/util.js';
+	import LyTreeNode from './ly-tree-node.vue';
+
+	export default {
+		name: 'LyTree',
+		
+		componentName: 'LyTree',
+		
+		components: {
+			LyTreeNode
+		},
+		
+		data() {
+			return {
+				updateKey: new Date().getTime(), // 数据更新的时候,重新渲染树
+				elId: `ly_${Math.ceil(Math.random() * 10e5).toString(36)}`,
+				visible: true,
+				store: {
+					ready: false
+				},
+				currentNode: null,
+				childNodesId: []
+			};
+		},
+		
+		provide() {
+		    return {
+		       tree: this
+		    }
+		},
+		
+		props: {
+			// 展示数据
+			treeData: Array,
+			
+			// 自主控制loading加载,避免数据还没获取到的空档出现“暂无数据”字样
+			ready: {
+				type: Boolean,
+				default: true
+			},
+			
+			// 内容为空的时候展示的文本
+			emptyText: {
+				type: String,
+				default: '暂无数据'
+			},
+			
+			// 是否在第一次展开某个树节点后才渲染其子节点
+			renderAfterExpand: {
+				type: Boolean,
+				default: true
+			},
+			
+			// 每个树节点用来作为唯一标识的属性,整棵树应该是唯一的
+			nodeKey: String,
+			
+			// 在显示复选框的情况下,是否严格的遵循父子不互相关联的做法,默认为 false
+			checkStrictly: Boolean,
+			
+			// 是否默认展开所有节点
+			defaultExpandAll: Boolean,
+			
+			// 切换全部展开、全部折叠
+			toggleExpendAll: Boolean,
+			
+			// 是否在点击节点的时候展开或者收缩节点, 默认值为 true,如果为 false,则只有点箭头图标的时候才会展开或者收缩节点
+			expandOnClickNode: {
+				type: Boolean,
+				default: true
+			},
+			
+			// 选中的时候展开节点
+			expandOnCheckNode: {
+				type: Boolean,
+				default: true
+			},
+			
+			// 是否在点击节点的时候选中节点,默认值为 false,即只有在点击复选框时才会选中节点
+			checkOnClickNode: Boolean,
+			checkDescendants: {
+				type: Boolean,
+				default: false
+			},
+			
+			// 展开子节点的时候是否自动展开父节点
+			autoExpandParent: {
+				type: Boolean,
+				default: true
+			},
+			
+			// 默认勾选的节点的 key 的数组
+			defaultCheckedKeys: Array,
+			
+			// 默认展开的节点的 key 的数组
+			defaultExpandedKeys: Array,
+			
+			// 是否展开当前节点的父节点
+			expandCurrentNodeParent: Boolean,
+			
+			// 当前选中的节点
+			currentNodeKey: [String, Number],
+			
+			// 是否最后一层叶子节点才显示单选/多选框
+			checkOnlyLeaf: {
+				type: Boolean,
+				default: false
+			},
+			
+			// 节点是否可被选择
+			showCheckbox: {
+				type: Boolean,
+				default: false
+			},
+			
+			// 节点单选
+			showRadio: {
+				type: Boolean,
+				default: false
+			},
+			
+			// 配置选项
+			props: {
+				type: [Object, Function],
+				default () {
+					return {
+						children: 'children', // 指定子树为节点对象的某个属性值
+						label: 'label', // 指定节点标签为节点对象的某个属性值
+						disabled: 'disabled' //	指定节点选择框是否禁用为节点对象的某个属性值
+					};
+				}
+			},
+			
+			// 是否懒加载子节点,需与 load 方法结合使用
+			lazy: {
+				type: Boolean,
+				default: false
+			},
+			
+			// 是否高亮当前选中节点,默认值是 false
+			highlightCurrent: Boolean,
+			
+			// 加载子树数据的方法,仅当 lazy 属性为true 时生效
+			load: Function,
+			
+			// 对树节点进行筛选时执行的方法,返回 true 表示这个节点可以显示,返回 false 则表示这个节点会被隐藏
+			filterNodeMethod: Function,
+			
+			// 搜索时是否展示匹配项的所有子节点
+			childVisibleForFilterNode: {
+				type: Boolean,
+				default: false
+			},
+			
+			// 是否每次只打开一个同级树节点展开
+			accordion: Boolean,
+			
+			// 相邻级节点间的水平缩进,单位为像素
+			indent: {
+				type: Number,
+				default: 18
+			},
+			
+			// 自定义树节点的展开图标
+			iconClass: String,
+			
+			// 是否显示节点图标,如果配置为true,需要配置props中对应的图标属性名称
+			showNodeIcon: {
+				type: Boolean,
+				default: false
+			},
+			
+			// 当节点图标显示出错时,显示的默认图标
+			defaultNodeIcon: {
+				type: String,
+				default: 'https://img-cdn-qiniu.dcloud.net.cn/uniapp/doc/github.svg'
+			},
+			
+			// 如果数据量较大,建议不要在node节点中添加parent属性,会造成性能损耗
+			isInjectParentInNode: {
+				type: Boolean,
+				default: false
+			}
+		},
+		
+		computed: {
+			isEmpty() {
+				if (this.store.root) {
+					const childNodes = this.store.root.getChildNodes(this.childNodesId);
+					
+					return !childNodes || childNodes.length === 0 || childNodes.every(({visible}) => !visible);
+				}
+				
+				return true;
+			},
+			showLoading() {
+				return !(this.store.ready && this.ready);
+			}
+		},
+		
+		watch: {
+			toggleExpendAll(newVal) {
+				this.store.toggleExpendAll(newVal);
+			},
+			defaultCheckedKeys(newVal) {
+				this.store.setDefaultCheckedKey(newVal);
+			},
+			defaultExpandedKeys(newVal) {
+				this.store.defaultExpandedKeys = newVal;
+				this.store.setDefaultExpandedKeys(newVal);
+			},
+			checkStrictly(newVal) {
+				this.store.checkStrictly = newVal || this.checkOnlyLeaf;
+			},
+			'store.root.childNodesId'(newVal) {
+				this.childNodesId = newVal;
+			},
+			'store.root.visible'(newVal) {
+				this.visible = newVal;
+			},
+			childNodesId(){
+				this.$nextTick(() => {
+					this.$emit('ly-tree-render-completed');
+				});
+			},
+			treeData: {
+				handler(newVal) {
+					this.updateKey = new Date().getTime();
+					this.store.setData(newVal);
+				},
+				deep: true
+			}
+		},
+		
+		methods: {
+			/*
+			 * @description 对树节点进行筛选操作
+			 * @method filter
+			 * @param {all} value 在 filter-node-method 中作为第一个参数
+			 * @param {Object} data 搜索指定节点的节点数据,不传代表搜索所有节点,假如要搜索A节点下面的数据,那么nodeData代表treeData中A节点的数据
+			*/
+			filter(value, data) {
+				if (!this.filterNodeMethod) throw new Error('[Tree] filterNodeMethod is required when filter');
+				this.store.filter(value, data);
+			},
+			
+			/*
+			 * @description 获取节点的唯一标识符
+			 * @method getNodeKey
+			 * @param {String, Number} nodeId
+			 * @return {String, Number} 匹配到的数据中的某一项数据
+			*/
+			getNodeKey(nodeId) {
+				let node = this.store.root.getChildNodes([nodeId])[0];
+				return getNodeKey(this.nodeKey, node.data);
+			},
+			
+		   /*
+		    * @description 获取节点路径
+		    * @method getNodePath
+		    * @param {Object} data 节点数据
+		    * @return {Array} 路径数组
+		   */
+			getNodePath(data) {
+				return this.store.getNodePath(data);
+			},
+			
+			/*
+			 * @description 若节点可被选择(即 show-checkbox 为 true),则返回目前被选中的节点所组成的数组
+			 * @method getCheckedNodes
+			 * @param {Boolean} leafOnly 是否只是叶子节点,默认false
+			 * @param {Boolean} includeHalfChecked 是否包含半选节点,默认false
+			 * @return {Array} 目前被选中的节点所组成的数组
+			*/
+			getCheckedNodes(leafOnly, includeHalfChecked) {
+				return this.store.getCheckedNodes(leafOnly, includeHalfChecked);
+			},
+			
+			/*
+			 * @description 若节点可被选择(即 show-checkbox 为 true),则返回目前被选中的节点的 key 所组成的数组
+			 * @method getCheckedKeys
+			 * @param {Boolean} leafOnly 是否只是叶子节点,默认false,若为 true 则仅返回被选中的叶子节点的 keys
+			 * @param {Boolean} includeHalfChecked 是否返回indeterminate为true的节点,默认false
+			 * @return {Array} 目前被选中的节点所组成的数组
+			*/
+			getCheckedKeys(leafOnly, includeHalfChecked) {
+				return this.store.getCheckedKeys(leafOnly, includeHalfChecked);
+			},
+			
+			/*
+			 * @description 获取当前被选中节点的 data,若没有节点被选中则返回 null
+			 * @method getCurrentNode
+			 * @return {Object} 当前被选中节点的 data,若没有节点被选中则返回 null
+			*/
+			getCurrentNode() {
+				const currentNode = this.store.getCurrentNode();
+				return currentNode ? currentNode.data : null;
+			},
+			
+			/*
+			 * @description 获取当前被选中节点的 key,若没有节点被选中则返回 null
+			 * @method getCurrentKey
+			 * @return {all} 当前被选中节点的 key, 若没有节点被选中则返回 null
+			*/
+			getCurrentKey() {
+				const currentNode = this.getCurrentNode();
+				return currentNode ? currentNode[this.nodeKey] : null;
+			},
+			
+			/*
+			 * @description 设置全选/取消全选
+			 * @method setCheckAll
+			 * @param {Boolean} isCheckAll 选中状态,默认为true
+			*/
+			setCheckAll(isCheckAll = true) {
+				if (this.showRadio) throw new Error('You set the "show-radio" property, so you cannot select all nodes');
+				
+				if (!this.showCheckbox) console.warn('You have not set the property "show-checkbox". Please check your settings');
+				
+				this.store.setCheckAll(isCheckAll);
+			},
+			
+			/*
+			 * @description 设置目前勾选的节点
+			 * @method setCheckedNodes
+			 * @param {Array} nodes 接收勾选节点数据的数组
+			 * @param {Boolean} leafOnly 是否只是叶子节点, 若为 true 则仅设置叶子节点的选中状态,默认值为 false
+			*/
+			setCheckedNodes(nodes, leafOnly) {
+				this.store.setCheckedNodes(nodes, leafOnly);
+			},
+			
+			/*
+			 * @description 通过 keys 设置目前勾选的节点
+			 * @method setCheckedKeys
+			 * @param {Array} keys 勾选节点的 key 的数组 
+			 * @param {Boolean} leafOnly 是否只是叶子节点, 若为 true 则仅设置叶子节点的选中状态,默认值为 false
+			*/
+			setCheckedKeys(keys, leafOnly) {
+				if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCheckedKeys');
+				this.store.setCheckedKeys(keys, leafOnly);
+			},
+			
+			/*
+			 * @description 通过 key / data 设置某个节点的勾选状态
+			 * @method setChecked
+			 * @param {all} data 勾选节点的 key 或者 data 
+			 * @param {Boolean} checked 节点是否选中
+			 * @param {Boolean} deep 是否设置子节点 ,默认为 false
+			*/
+			setChecked(data, checked, deep) {
+				this.store.setChecked(data, checked, deep);
+			},
+			
+			/*
+			 * @description 若节点可被选择(即 show-checkbox 为 true),则返回目前半选中的节点所组成的数组
+			 * @method getHalfCheckedNodes
+			 * @return {Array} 目前半选中的节点所组成的数组
+			*/
+			getHalfCheckedNodes() {
+				return this.store.getHalfCheckedNodes();
+			},
+			
+			/*
+			 * @description 若节点可被选择(即 show-checkbox 为 true),则返回目前半选中的节点的 key 所组成的数组
+			 * @method getHalfCheckedKeys
+			 * @return {Array} 目前半选中的节点的 key 所组成的数组
+			*/
+			getHalfCheckedKeys() {
+				return this.store.getHalfCheckedKeys();
+			},
+			
+			/*
+			 * @description 通过 node 设置某个节点的当前选中状态
+			 * @method setCurrentNode
+			 * @param {Object} node 待被选节点的 node
+			*/
+			setCurrentNode(node) {
+				if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentNode');
+				this.store.setUserCurrentNode(node);
+			},
+			
+			/*
+			 * @description 通过 key 设置某个节点的当前选中状态
+			 * @method setCurrentKey
+			 * @param {all} key 待被选节点的 key,若为 null 则取消当前高亮的节点
+			*/
+			setCurrentKey(key) {
+				if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in setCurrentKey');
+				this.store.setCurrentNodeKey(key);
+			},
+			
+			/*
+			 * @description 根据 data 或者 key 拿到 Tree 组件中的 node
+			 * @method getNode
+			 * @param {all} data 要获得 node 的 key 或者 data
+			*/
+			getNode(data) {
+				return this.store.getNode(data);
+			},
+			
+			/*
+			 * @description 删除 Tree 中的一个节点
+			 * @method remove
+			 * @param {all} data 要删除的节点的 data 或者 node
+			*/
+			remove(data) {
+				this.store.remove(data);
+			},
+			
+			/*
+			 * @description 为 Tree 中的一个节点追加一个子节点
+			 * @method append
+			 * @param {Object} data 要追加的子节点的 data 
+			 * @param {Object} parentNode 子节点的 parent 的 data、key 或者 node
+			*/
+			append(data, parentNode) {
+				this.store.append(data, parentNode);
+			},
+			
+			/*
+			 * @description 为 Tree 的一个节点的前面增加一个节点
+			 * @method insertBefore
+			 * @param {Object} data 要增加的节点的 data 
+			 * @param {all} refNode 要增加的节点的后一个节点的 data、key 或者 node
+			*/
+			insertBefore(data, refNode) {
+				this.store.insertBefore(data, refNode);
+			},
+			
+			/*
+			 * @description 为 Tree 的一个节点的后面增加一个节点
+			 * @method insertAfter
+			 * @param {Object} data 要增加的节点的 data 
+			 * @param {all} refNode 要增加的节点的前一个节点的 data、key 或者 node
+			*/
+			insertAfter(data, refNode) {
+				this.store.insertAfter(data, refNode);
+			},
+			
+			/*
+			 * @description 通过 keys 设置节点子元素
+			 * @method updateKeyChildren
+			 * @param {String, Number} key 节点 key 
+			 * @param {Object} data 节点数据的数组
+			*/
+			updateKeyChildren(key, data) {
+				if (!this.nodeKey) throw new Error('[Tree] nodeKey is required in updateKeyChild');
+				this.store.updateChildren(key, data);
+			}
+		},
+		
+		created() {
+			this.isTree = true;
+			
+			let props = this.props;
+			if (typeof this.props === 'function') props = this.props();
+			if (typeof props !== 'object') throw new Error('props must be of object type.');
+			
+			this.store = new TreeStore({
+				key: this.nodeKey,
+				data: this.treeData,
+				lazy: this.lazy,
+				props: props,
+				load: this.load,
+				showCheckbox: this.showCheckbox,
+				showRadio: this.showRadio,
+				currentNodeKey: this.currentNodeKey,
+				checkStrictly: this.checkStrictly || this.checkOnlyLeaf,
+				checkDescendants: this.checkDescendants,
+				expandOnCheckNode: this.expandOnCheckNode,
+				defaultCheckedKeys: this.defaultCheckedKeys,
+				defaultExpandedKeys: this.defaultExpandedKeys,
+				expandCurrentNodeParent: this.expandCurrentNodeParent,
+				autoExpandParent: this.autoExpandParent,
+				defaultExpandAll: this.defaultExpandAll,
+				filterNodeMethod: this.filterNodeMethod,
+				childVisibleForFilterNode: this.childVisibleForFilterNode,
+				showNodeIcon: this.showNodeIcon,
+				isInjectParentInNode: this.isInjectParentInNode
+			});
+
+			this.childNodesId = this.store.root.childNodesId;
+		},
+		
+		beforeDestroy() {
+			if (this.accordion) {
+				uni.$off(`${this.elId}-tree-node-expand`)
+			}
+		},
+		edit(node){
+			this.$emit('edit',node)
+		},
+		deldata(node){
+			this.$emit('deldata',node)
+		}
+	};
+</script>
+
+<style>
+	.ly-tree {
+		position: relative;
+		cursor: default;
+		background: #FFF;
+		color: #606266;
+		padding: 30rpx;
+	}
+	
+	.ly-tree.is-empty {
+		background: transparent;
+	}
+	
+	/* lyEmpty-start */
+	.ly-empty {
+		width: 100%;
+		display: flex;
+		justify-content: center;
+		margin-top: 100rpx;
+	}
+	/* lyEmpty-end */
+	
+	/* lyLoader-start */
+	.ly-loader {
+		margin-top: 100rpx;
+		display: flex;
+		align-items: center;
+		justify-content: center;
+	}
+	
+	.ly-loader-inner,
+	.ly-loader-inner:before,
+	.ly-loader-inner:after {
+		background: #efefef;
+		animation: load 1s infinite ease-in-out;
+		width: .5em;
+		height: 1em;
+	}
+	
+	.ly-loader-inner:before,
+	.ly-loader-inner:after {
+		position: absolute;
+		top: 0;
+		content: '';
+	}
+	
+	.ly-loader-inner:before {
+		left: -1em;
+	}
+	
+	.ly-loader-inner {
+		text-indent: -9999em;
+		position: relative;
+		font-size: 22rpx;
+		animation-delay: 0.16s;
+	}
+	
+	.ly-loader-inner:after {
+		left: 1em;
+		animation-delay: 0.32s;
+	}
+	/* lyLoader-end */
+	
+	@keyframes load {
+		0%,
+		80%,
+		100% {
+			box-shadow: 0 0 #efefef;
+			height: 1em;
+		}
+	
+		40% {
+			box-shadow: 0 -1.5em #efefef;
+			height: 1.5em;
+		}
+	}
+</style>

+ 538 - 0
components/ly-tree/model/node.js

@@ -0,0 +1,538 @@
+import {
+	markNodeData,
+	objectAssign,
+	arrayFindIndex,
+	getChildState,
+	reInitChecked,
+	getPropertyFromData,
+	isNull,
+	NODE_KEY
+} from '../tool/util';
+
+const getStore = function(store) {
+	let thisStore = store;
+	
+	return function() {
+		return thisStore;
+	}
+}
+
+let nodeIdSeed = 0;
+
+export default class Node {
+	constructor(options) {
+		this.time = new Date().getTime();
+		this.id = nodeIdSeed++;
+		this.text = null;
+		this.checked = false;
+		this.indeterminate = false;
+		this.data = null;
+		this.expanded = false;
+		this.parentId = null;
+		this.visible = true;
+		this.isCurrent = false;
+
+		for (let name in options) {
+			if (options.hasOwnProperty(name)) {
+				if (name === 'store') {
+					this.store = getStore(options[name]);
+				} else {
+					this[name] = options[name];
+				}
+			}
+		}
+		
+		if (!this.store()) {
+			throw new Error('[Node]store is required!');
+		}
+
+		// internal
+		this.level = 0;
+		this.loaded = false;
+		this.childNodesId = [];
+		this.loading = false;
+		this.label = getPropertyFromData(this, 'label');
+		this.key = this._getKey();
+		this.disabled = getPropertyFromData(this, 'disabled');
+		this.nextSibling = null;
+		this.previousSibling = null;
+		this.icon = '';
+		
+		this._handleParentAndLevel();
+		this._handleProps();
+		this._handleExpand();
+		this._handleCurrent();
+		
+		if (this.store().lazy) {
+			this.store()._initDefaultCheckedNode(this);
+		}
+
+		this.updateLeafState();
+	}
+	
+	_getKey() {
+		if (!this.data || Array.isArray(this.data)) return null;
+		
+		if (typeof this.data === 'object') {
+			const nodeKey = this.store().key;
+			const key = this.data[nodeKey];
+			
+			if (typeof key === 'undefined') {
+				throw new Error(`您配置的node-key为"${nodeKey}",但数据中并未找到对应"${nodeKey}"属性的值,请检查node-key的配置是否合理`)
+			}
+			
+			return key;
+		}
+		
+		throw new Error('不合法的data数据');
+	}
+	
+	_handleParentAndLevel() {
+		if (this.parentId !== null) {
+			let parent = this.getParent(this.parentId);
+			
+			if (this.store().isInjectParentInNode) {
+				this.parent = parent;
+			}
+			
+			// 由于这里做了修改,默认第一个对象不会被注册到nodesMap中,所以找不到parent会报错,所以默认parent的level是0
+			if (!parent) {
+				parent = {
+					level: 0
+				}
+			} else {
+				const parentChildNodes = parent.getChildNodes(parent.childNodesId);
+				const index = parent.childNodesId.indexOf(this.key);
+				this.nextSibling = index > -1 ? parentChildNodes[index + 1] : null;
+				this.previousSibling = index > 0 ? parentChildNodes[index - 1] : null;
+			}
+			this.level = parent.level + 1;
+		}
+	}
+	
+	_handleProps() {
+		const props = this.store().props;
+		
+		if (this.store().showNodeIcon) {
+			if (props && typeof props.icon !== 'undefined') {
+				this.icon = getPropertyFromData(this, 'icon');
+			} else {
+				console.warn('请配置props属性中的"icon"字段')
+			}
+		}
+		
+		this.store().registerNode(this);
+		
+		if (props && typeof props.isLeaf !== 'undefined') {
+			const isLeaf = getPropertyFromData(this, 'isLeaf');
+			if (typeof isLeaf === 'boolean') {
+				this.isLeafByUser = isLeaf;
+			}
+		}
+	}
+	
+	_handleExpand() {
+		if (this.store().lazy !== true && this.data) {
+			this.setData(this.data);
+		
+			if (this.store().defaultExpandAll) {
+				this.expanded = true;
+			}
+		} else if (this.level > 0 && this.store().lazy && this.store().defaultExpandAll) {
+			this.expand();
+		}
+		
+		if (!Array.isArray(this.data)) {
+			markNodeData(this, this.data);
+		}
+		
+		if (!this.data) return;
+		
+		const defaultExpandedKeys = this.store().defaultExpandedKeys;
+		const key = this.store().key;
+		if (key && defaultExpandedKeys && defaultExpandedKeys.indexOf(this.key) !== -1) {
+			this.expand(null, this.store().autoExpandparent);
+		}
+	}
+	
+	_handleCurrent() {
+		const key = this.store().key;
+		
+		if (key && this.store().currentNodeKey !== undefined && this.key === this.store().currentNodeKey) {
+			this.store().currentNode = this;
+			this.store().currentNode.isCurrent = true;
+		}
+	}
+	
+	destroyStore() {
+		getStore(null)
+	}
+
+	setData(data) {
+		if (!Array.isArray(data)) {
+			markNodeData(this, data);
+		}
+
+		this.data = data;
+		this.childNodesId = [];
+
+		let children;
+		if (this.level === 0 && Array.isArray(this.data)) {
+			children = this.data;
+		} else {
+			children = getPropertyFromData(this, 'children') || [];
+		}
+
+		for (let i = 0, j = children.length; i < j; i++) {
+			this.insertChild({
+				data: children[i]
+			});
+		}
+	}
+
+	contains(target, deep = true) {
+		const walk = function(parent) {
+			const children = parent.getChildNodes(parent.childNodesId) || [];
+			let result = false;
+			for (let i = 0, j = children.length; i < j; i++) {
+				const child = children[i];
+				if (child === target || (deep && walk(child))) {
+					result = true;
+					break;
+				}
+			}
+			return result;
+		};
+
+		return walk(this);
+	}
+
+	remove() {
+		if (this.parentId !== null) {
+			const parent = this.getParent(this.parentId);
+			parent.removeChild(this);
+		}
+	}
+
+	insertChild(child, index, batch) {
+		if (!child) throw new Error('insertChild error: child is required.');
+
+		if (!(child instanceof Node)) {
+			if (!batch) {
+				const children = this.getChildren(true);
+				if (children.indexOf(child.data) === -1) {
+					if (typeof index === 'undefined' || index < 0) {
+						children.push(child.data);
+					} else {
+						children.splice(index, 0, child.data);
+					}
+				}
+			}
+			
+			objectAssign(child, {
+				parentId: isNull(this.key) ? '' : this.key,
+				store: this.store()
+			});
+			child = new Node(child);
+		}
+
+		child.level = this.level + 1;
+
+		if (typeof index === 'undefined' || index < 0) {
+			this.childNodesId.push(child.key);
+		} else {
+			this.childNodesId.splice(index, 0, child.key);
+		}
+
+		this.updateLeafState();
+	}
+
+	insertBefore(child, ref) {
+		let index;
+		if (ref) {
+			index = this.childNodesId.indexOf(ref.id);
+		}
+		this.insertChild(child, index);
+	}
+
+	insertAfter(child, ref) {
+		let index;
+		if (ref) {
+			index = this.childNodesId.indexOf(ref.id);
+			if (index !== -1) index += 1;
+		}
+		this.insertChild(child, index);
+	}
+
+	removeChild(child) {
+		const children = this.getChildren() || [];
+		const dataIndex = children.indexOf(child.data);
+		if (dataIndex > -1) {
+			children.splice(dataIndex, 1);
+		}
+		
+		const index = this.childNodesId.indexOf(child.key);
+		
+		if (index > -1) {
+			this.store() && this.store().deregisterNode(child);
+			child.parentId = null;
+			this.childNodesId.splice(index, 1);
+		}
+		
+		this.updateLeafState();
+	}
+
+	removeChildByData(data) {
+		let targetNode = null;
+
+		for (let i = 0; i < this.childNodesId.length; i++) {
+			let node = this.getChildNodes(this.childNodesId);
+			if (node[i].data === data) {
+				targetNode = node[i];
+				break;
+			}
+		}
+
+		if (targetNode) {
+			this.removeChild(targetNode);
+		}
+	}
+
+	// 为了避免APP端parent嵌套结构导致报错,这里parent需要从nodesMap中获取
+	getParent(parentId) {
+		try {
+			if (!parentId.toString()) return null;
+			return this.store().nodesMap[parentId];
+		} catch (error) {
+			return null;
+		}
+	}
+
+	// 为了避免APP端childNodes嵌套结构导致报错,这里childNodes需要从nodesMap中获取
+	getChildNodes(childNodesId) {
+		let childNodes = [];
+		if (childNodesId.length === 0) return childNodes;
+		childNodesId.forEach((key) => {
+			childNodes.push(this.store().nodesMap[key]);
+		})
+		return childNodes;
+	}
+
+	expand(callback, expandparent) {
+		const done = () => {
+			if (expandparent) {
+				let parent = this.getParent(this.parentId);
+				while (parent && parent.level > 0) {
+					parent.expanded = true;
+					parent = this.getParent(parent.parentId);
+				}
+			}
+			this.expanded = true;
+			if (callback) callback();
+		};
+
+		if (this.shouldLoadData()) {
+			this.loadData(function(data) {
+				if (Array.isArray(data)) {
+					if (this.checked) {
+						this.setChecked(true, true);
+					} else if (!this.store().checkStrictly) {
+						reInitChecked(this);
+					}
+					done();
+				}
+			});
+		} else {
+			done();
+		}
+	}
+
+	doCreateChildren(array, defaultProps = {}) {
+		array.forEach((item) => {
+			this.insertChild(objectAssign({
+				data: item
+			}, defaultProps), undefined, true);
+		});
+	}
+
+	collapse() {
+		this.expanded = false;
+	}
+
+	shouldLoadData() {
+		return this.store().lazy === true && this.store().load && !this.loaded;
+	}
+
+	updateLeafState() {
+		if (this.store().lazy === true && this.loaded !== true && typeof this.isLeafByUser !== 'undefined') {
+			this.isLeaf = this.isLeafByUser;
+			return;
+		}
+		const childNodesId = this.childNodesId;
+		if (!this.store().lazy || (this.store().lazy === true && this.loaded === true)) {
+			this.isLeaf = !childNodesId || childNodesId.length === 0;
+			return;
+		}
+		this.isLeaf = false;
+	}
+
+	setChecked(value, deep, recursion, passValue) {
+		this.indeterminate = value === 'half';
+		this.checked = value === true;
+		
+		if (this.checked && this.store().expandOnCheckNode) {
+			this.expand(null, true)
+		}
+		
+		if (this.store().checkStrictly) return;
+		if (this.store().showRadio) return;
+
+		if (!(this.shouldLoadData() && !this.store().checkDescendants)) {
+			let childNodes = this.getChildNodes(this.childNodesId);
+			let {
+				all,
+				allWithoutDisable
+			} = getChildState(childNodes);
+
+			if (!this.isLeaf && (!all && allWithoutDisable)) {
+				this.checked = false;
+				value = false;
+			}
+
+			const handleDescendants = () => {
+				if (deep) {
+					let childNodes = this.getChildNodes(this.childNodesId)
+					for (let i = 0, j = childNodes.length; i < j; i++) {
+						const child = childNodes[i];
+						passValue = passValue || value !== false;
+						const isCheck = child.disabled ? child.checked : passValue;
+						child.setChecked(isCheck, deep, true, passValue);
+					}
+					const {
+						half,
+						all
+					} = getChildState(childNodes);
+					
+					if (!all) {
+						this.checked = all;
+						this.indeterminate = half;
+					}
+				}
+			};
+
+			if (this.shouldLoadData()) {
+				this.loadData(() => {
+					handleDescendants();
+					reInitChecked(this);
+				}, {
+					checked: value !== false
+				});
+				return;
+			} else {
+				handleDescendants();
+			}
+		}
+
+		if (!this.parentId) return;
+
+		let parent = this.getParent(this.parentId);
+		if (parent && parent.level === 0) return;
+
+		if (!recursion) {
+			reInitChecked(parent);
+		}
+	}
+
+	setRadioChecked(value) {
+		const allNodes = this.store()._getAllNodes().sort((a, b) => b.level - a.level);
+		allNodes.forEach(node => node.setChecked(false, false));
+		this.checked = value === true;
+	}
+
+	getChildren(forceInit = false) {
+		if (this.level === 0) return this.data;
+		const data = this.data;
+		if (!data) return null;
+
+		const props = this.store().props;
+		let children = 'children';
+		if (props) {
+			children = props.children || 'children';
+		}
+
+		if (data[children] === undefined) {
+			data[children] = null;
+		}
+
+		if (forceInit && !data[children]) {
+			data[children] = [];
+		}
+
+		return data[children];
+	}
+
+	updateChildren() {
+		let childNodes = this.getChildNodes(this.childNodesId);
+		const newData = this.getChildren() || [];
+		const oldData = childNodes.map((node) => node.data);
+
+		const newDataMap = {};
+		const newNodes = [];
+
+		newData.forEach((item, index) => {
+			const key = item[NODE_KEY];
+			const isNodeExists = !!key && arrayFindIndex(oldData, data => data[NODE_KEY] === key) >= 0;
+			if (isNodeExists) {
+				newDataMap[key] = {
+					index,
+					data: item
+				};
+			} else {
+				newNodes.push({
+					index,
+					data: item
+				});
+			}
+		});
+
+		if (!this.store().lazy) {
+			oldData.forEach((item) => {
+				if (!newDataMap[item[NODE_KEY]]) this.removeChildByData(item);
+			});
+		}
+
+		newNodes.forEach(({
+			index,
+			data
+		}) => {
+			this.insertChild({
+				data
+			}, index);
+		});
+
+		this.updateLeafState();
+	}
+
+	loadData(callback, defaultProps = {}) {
+		if (this.store().lazy === true && 
+			this.store().load && !this.loaded && 
+			(!this.loading || Object.keys(defaultProps).length)
+		) {
+			this.loading = true;
+
+			const resolve = (children) => {
+				this.loaded = true;
+				this.loading = false;
+				this.childNodesId = [];
+				this.doCreateChildren(children, defaultProps);
+				this.updateLeafState();
+				
+				callback && callback.call(this,children);
+			};
+
+			this.store().load(this, resolve);
+		} else {
+			callback && callback.call(this);
+		}
+	}
+}

+ 419 - 0
components/ly-tree/model/tree-store.js

@@ -0,0 +1,419 @@
+import Node from './node';
+import {
+	getNodeKey,
+	getPropertyFromData
+} from '../tool/util';
+
+export default class TreeStore {
+	constructor(options) {
+		this.ready = false;
+		this.currentNode = null;
+		this.currentNodeKey = null;
+
+		Object.assign(this, options);
+
+		if (!this.key) {
+			throw new Error('[Tree] nodeKey is required');
+		}
+
+		this.nodesMap = {};
+		this.root = new Node({
+			data: this.data,
+			store: this
+		});
+
+		if (this.lazy && this.load) {
+			const loadFn = this.load;
+			loadFn(this.root, (data) => {
+				this.root.doCreateChildren(data);
+				this._initDefaultCheckedNodes();
+				this.ready = true;
+			});
+		} else {
+			this._initDefaultCheckedNodes();
+			this.ready = true;
+		}
+	}
+
+	filter(value, data) {
+		const filterNodeMethod = this.filterNodeMethod;
+		const lazy = this.lazy;
+		const _self = this;
+		const traverse = function(node) {
+			const childNodes = node.root ? node.root.getChildNodes(node.root.childNodesId) : node.getChildNodes(node.childNodesId);
+
+			childNodes.forEach((child) => {
+				if (data && typeof data === 'object') {
+					let nodePath = _self.getNodePath(child.data);
+					if (!nodePath.some(pathItem => pathItem[_self.key] === data[_self.key])) {
+						child.visible = false;
+						traverse(child);
+						return;
+					}
+				}
+				
+				if (_self.childVisibleForFilterNode) {
+					let parent = child.getParent(child.parentId);
+					child.visible = filterNodeMethod.call(child, value, child.data, child) || (parent && parent.visible);
+				} else {
+					child.visible = filterNodeMethod.call(child, value, child.data, child);
+				}
+				
+				traverse(child);
+			});
+
+			if (!node.visible && childNodes.length) {
+				let allHidden = true;
+				allHidden = !childNodes.some(child => child.visible);
+
+				if (node.root) {
+					node.root.visible = allHidden === false;
+				} else {
+					node.visible = allHidden === false;
+				}
+			}
+			
+			if (!value) return;
+
+			if (node.visible && !node.isLeaf && !lazy) node.expand();
+		};
+
+		traverse(this);
+	}
+
+	setData(newVal) {
+		const instanceChanged = newVal !== this.root.data;
+		if (instanceChanged) {
+			this.root.setData(newVal);
+			this._initDefaultCheckedNodes();
+		} else {
+			this.root.updateChildren();
+		}
+	}
+
+	getNode(data) {
+		if (data instanceof Node) return data;
+		const key = typeof data !== 'object' ? data : getNodeKey(this.key, data);
+		if (!key) return null;
+		return this.nodesMap[key] || null;
+	}
+
+	insertBefore(data, refData) {
+		const refNode = this.getNode(refData);
+		let parent = refNode.getParent(refNode.parentId);
+		parent.insertBefore({
+			data
+		}, refNode);
+	}
+
+	insertAfter(data, refData) {
+		const refNode = this.getNode(refData);
+		let parent = refNode.getParent(refNode.parentId);
+		parent.insertAfter({
+			data
+		}, refNode);
+	}
+
+	remove(data) {
+		const node = this.getNode(data);
+
+		if (node && node.parentId !== null) {
+			let parent = node.getParent(node.parentId);
+			if (node === this.currentNode) {
+				this.currentNode = null;
+			}
+			parent.removeChild(node);
+		}
+	}
+
+	append(data, parentData) {
+		const parentNode = parentData ? this.getNode(parentData) : this.root;
+
+		if (parentNode) {
+			parentNode.insertChild({
+				data
+			});
+		}
+	}
+
+	_initDefaultCheckedNodes() {
+		const defaultCheckedKeys = this.defaultCheckedKeys || [];
+		const nodesMap = this.nodesMap;
+		let checkedKeyfromData = [];
+		let totalCheckedKeys = []
+		
+		for (let key in nodesMap) {
+			let checked = getPropertyFromData(nodesMap[key], 'checked') || false;
+			checked && checkedKeyfromData.push(key);
+		}
+		
+		totalCheckedKeys = Array.from(new Set([...defaultCheckedKeys, ...checkedKeyfromData]));
+		totalCheckedKeys.forEach((checkedKey) => {
+			const node = nodesMap[checkedKey];
+			
+			if (node) {
+				node.setChecked(true, !this.checkStrictly);
+			}
+		});
+	}
+
+	_initDefaultCheckedNode(node) {
+		const defaultCheckedKeys = this.defaultCheckedKeys || [];
+
+		if (defaultCheckedKeys.indexOf(node.key) !== -1) {
+			node.setChecked(true, !this.checkStrictly);
+		}
+	}
+	
+	toggleExpendAll(isExpandAll) {
+		const allNodes = this._getAllNodes();
+		
+		allNodes.forEach(item => {
+			const node = this.getNode(item.key); 
+			
+			if (node) isExpandAll ? node.expand() : node.collapse();
+		});
+	}
+	
+	setCheckAll(isCkeckAll) {
+		const allNodes = this._getAllNodes();
+		
+		allNodes.forEach(item => {
+			item.setChecked(isCkeckAll, false);
+		}); 
+	}
+
+	setDefaultCheckedKey(newVal) {
+		if (newVal !== this.defaultCheckedKeys) {
+			this.defaultCheckedKeys = newVal;
+			this._initDefaultCheckedNodes();
+		}
+	}
+
+	registerNode(node) {
+
+		const key = this.key;
+		if (!key || !node || !node.data) return;
+
+		const nodeKey = node.key;
+		if (nodeKey !== undefined) this.nodesMap[node.key] = node;
+	}
+
+	deregisterNode(node) {
+		const key = this.key;
+		if (!key || !node || !node.data) return;
+
+		let childNodes = node.getChildNodes(node.childNodesId);
+		childNodes.forEach(child => {
+			this.deregisterNode(child);
+		});
+
+		delete this.nodesMap[node.key];
+	}
+	
+	getNodePath(data) {
+		if (!this.key) throw new Error('[Tree] nodeKey is required in getNodePath');
+		const node = this.getNode(data);
+		if (!node) return [];
+		
+		const path = [node.data];
+		let parent = node.getParent(node.parentId);
+		while (parent && parent !== this.root) {
+			path.push(parent.data);
+			parent = parent.getParent(parent.parentId);
+		}
+		return path.reverse();
+	}
+
+	getCheckedNodes(leafOnly = false, includeHalfChecked = false) {
+		const checkedNodes = [];
+		const traverse = function(node) {
+			const childNodes = node.root ? node.root.getChildNodes(node.root.childNodesId) : node.getChildNodes(node.childNodesId);
+
+			childNodes.forEach((child) => {
+				if ((child.checked || (includeHalfChecked && child.indeterminate)) && (!leafOnly || (leafOnly && child.isLeaf))) {
+					checkedNodes.push(child.data);
+				}
+
+				traverse(child);
+			});
+		};
+
+		traverse(this);
+
+		return checkedNodes;
+	}
+
+	getCheckedKeys(leafOnly = false, includeHalfChecked = false) {
+		return this.getCheckedNodes(leafOnly, includeHalfChecked).map((data) => (data || {})[this.key]);
+	}
+
+	getHalfCheckedNodes() {
+		const nodes = [];
+		const traverse = function(node) {
+			const childNodes = node.root ? node.root.getChildNodes(node.root.childNodesId) : node.getChildNodes(node.childNodesId);
+
+			childNodes.forEach((child) => {
+				if (child.indeterminate) {
+					nodes.push(child.data);
+				}
+
+				traverse(child);
+			});
+		};
+
+		traverse(this);
+
+		return nodes;
+	}
+
+	getHalfCheckedKeys() {
+		return this.getHalfCheckedNodes().map((data) => (data || {})[this.key]);
+	}
+
+	_getAllNodes() {
+		const allNodes = [];
+		const nodesMap = this.nodesMap;
+		for (let nodeKey in nodesMap) {
+			if (nodesMap.hasOwnProperty(nodeKey)) {
+				allNodes.push(nodesMap[nodeKey]);
+			}
+		}
+
+		return allNodes;
+	}
+
+	updateChildren(key, data) {
+		const node = this.nodesMap[key];
+		if (!node) return;
+		const childNodes = node.getChildNodes(node.childNodesId);
+		for (let i = childNodes.length - 1; i >= 0; i--) {
+			const child = childNodes[i];
+			this.remove(child.data);
+		}
+		for (let i = 0, j = data.length; i < j; i++) {
+			const child = data[i];
+			this.append(child, node.data);
+		}
+	}
+
+	_setCheckedKeys(key, leafOnly = false, checkedKeys) {
+		const allNodes = this._getAllNodes().sort((a, b) => b.level - a.level);
+		const cache = Object.create(null);
+		const keys = Object.keys(checkedKeys);
+		allNodes.forEach(node => node.setChecked(false, false));
+		for (let i = 0, j = allNodes.length; i < j; i++) {
+			const node = allNodes[i];
+			let nodeKey = node.data[key];
+			
+			if (typeof nodeKey === 'undefined') continue;
+			
+			nodeKey = nodeKey.toString();
+			let checked = keys.indexOf(nodeKey) > -1;
+			if (!checked) {
+				if (node.checked && !cache[nodeKey]) {
+					node.setChecked(false, false);
+				}
+				continue;
+			}
+
+			let parent = node.getParent(node.parentId);
+			while (parent && parent.level > 0) {
+				cache[parent.data[key]] = true;
+				parent = parent.getParent(parent.parentId);
+			}
+
+			if (node.isLeaf || this.checkStrictly) {
+				node.setChecked(true, false);
+				continue;
+			}
+			node.setChecked(true, true);
+
+			if (leafOnly) {
+				node.setChecked(false, false);
+				const traverse = function(node) {
+					const childNodes = node.getChildNodes(node.childNodesId);
+					childNodes.forEach((child) => {
+						if (!child.isLeaf) {
+							child.setChecked(false, false);
+						}
+						traverse(child);
+					});
+				};
+				traverse(node);
+			}
+		}
+	}
+
+	setCheckedNodes(array, leafOnly = false) {
+		const key = this.key;
+		const checkedKeys = {};
+		array.forEach((item) => {
+			checkedKeys[(item || {})[key]] = true;
+		});
+
+		this._setCheckedKeys(key, leafOnly, checkedKeys);
+	}
+
+	setCheckedKeys(keys, leafOnly = false) {
+		this.defaultCheckedKeys = keys;
+		const key = this.key;
+		const checkedKeys = {};
+		keys.forEach((key) => {
+			checkedKeys[key] = true;
+		});
+
+		this._setCheckedKeys(key, leafOnly, checkedKeys);
+	}
+
+	setDefaultExpandedKeys(keys) {
+		keys = keys || [];
+		this.defaultExpandedKeys = keys;
+
+		keys.forEach((key) => {
+			const node = this.getNode(key);
+			if (node) node.expand(null, this.autoExpandParent);
+		});
+	}
+
+	setChecked(data, checked, deep) {
+		const node = this.getNode(data);
+
+		if (node) {
+			node.setChecked(!!checked, deep);
+		}
+	}
+
+	getCurrentNode() {
+		return this.currentNode;
+	}
+
+	setCurrentNode(currentNode) {
+		const prevCurrentNode = this.currentNode;
+		if (prevCurrentNode) {
+			prevCurrentNode.isCurrent = false;
+		}
+		this.currentNode = currentNode;
+		this.currentNode.isCurrent = true;
+		
+		this.expandCurrentNodeParent && this.currentNode.expand(null, true)
+	}
+
+	setUserCurrentNode(node) {
+		const key = node[this.key];
+		const currNode = this.nodesMap[key];
+		this.setCurrentNode(currNode);
+	}
+
+	setCurrentNodeKey(key) {
+		if (key === null || key === undefined) {
+			this.currentNode && (this.currentNode.isCurrent = false);
+			this.currentNode = null;
+			return;
+		}
+		const node = this.getNode(key);
+		if (node) {
+			this.setCurrentNode(node);
+		}
+	}
+};

+ 115 - 0
components/ly-tree/tool/util.js

@@ -0,0 +1,115 @@
+export const NODE_KEY = '$treeNodeId';
+
+export const markNodeData = function(node, data) {
+	if (!data || data[NODE_KEY]) return;
+	Object.defineProperty(data, NODE_KEY, {
+		value: node.id,
+		enumerable: false,
+		configurable: false,
+		writable: false
+	});
+};
+
+export const getNodeKey = function(key, data) {
+	if (!data) return null;
+	if (!key) return data[NODE_KEY];
+	return data[key];
+};
+
+export const objectAssign = function(target) {
+	for (let i = 1, j = arguments.length; i < j; i++) {
+		let source = arguments[i] || {};
+		for (let prop in source) {
+			if (source.hasOwnProperty(prop)) {
+				let value = source[prop];
+				if (value !== undefined) {
+					target[prop] = value;
+				}
+			}
+		}
+	}
+
+	return target;
+};
+
+// TODO: use native Array.find, Array.findIndex when IE support is dropped
+export const arrayFindIndex = function(arr, pred) {
+	for (let i = 0; i !== arr.length; ++i) {
+		if (pred(arr[i])) {
+			return i;
+		}
+	}
+	return -1;
+};
+
+export const getChildState = function(node) {
+	let all = true;
+	let none = true;
+	let allWithoutDisable = true;
+	for (let i = 0, j = node.length; i < j; i++) {
+		const n = node[i];
+		if (n.checked !== true || n.indeterminate) {
+			all = false;
+			if (!n.disabled) {
+				allWithoutDisable = false;
+			}
+		}
+		if (n.checked !== false || n.indeterminate) {
+			none = false;
+		}
+	}
+
+	return {
+		all,
+		none,
+		allWithoutDisable,
+		half: !all && !none
+	};
+};
+
+export const reInitChecked = function(node) {
+	if (!node || node.childNodesId.length === 0) return;
+
+	let childNodes = node.getChildNodes(node.childNodesId);
+	const {
+		all,
+		none,
+		half
+	} = getChildState(childNodes);
+	if (all) {
+		node.checked = true;
+		node.indeterminate = false;
+	} else if (half) {
+		node.checked = false;
+		node.indeterminate = true;
+	} else if (none) {
+		node.checked = false;
+		node.indeterminate = false;
+	}
+
+	let parent = node.getParent(node.parentId);
+	if (!parent || parent.level === 0) return;
+
+	if (!node.store().checkStrictly) {
+		reInitChecked(parent);
+	}
+};
+
+export const getPropertyFromData = function(node, prop) {
+	const props = node.store().props;
+	const data = node.data || {};
+	const config = props[prop];
+
+	if (typeof config === 'function') {
+		return config(data, node);
+	} else if (typeof config === 'string') {
+		return data[config];
+	} else if (typeof config === 'undefined') {
+		const dataProp = data[prop];
+		return dataProp === undefined ? '' : dataProp;
+	}
+};
+
+export const isNull = function(v) {
+	return v === undefined || v === null || v === '';
+}

+ 191 - 0
components/qiniu/QiniuUpload.vue

@@ -0,0 +1,191 @@
+<template>
+	<div class="clearfix up-box">
+		<div class="up-img-view" v-for="(item, index) in Fimages" :key="index">
+			<block v-if="item">
+				<image class="cata-img" :src="item" mode="aspectFill"></image>
+				<text class="custom-icon custom-icon-ic_searchclosed del-icon" @click="handleRemove(item, index)"></text>
+			</block>
+		</div>
+		<div @click="uploadAva" class="upload-btn"><text class="custom-icon custom-icon-xinzeng"></text></div>
+	</div>
+</template>
+
+<script>
+import webUrl from '@/common/config.js';
+import qiniuUploader from './qiniuUploader.js';
+export default {
+	data() {
+		return {
+			Fimages: [],
+			qn_token: ''
+		};
+	},
+	computed: {
+		enToken() {
+			return this.$store.state.enToken;
+		}
+	},
+	props: {
+		images: {
+			type: Array,
+			default: () => {
+				return [];
+			}
+		},
+		//最多可以选择的图片张数,默认9
+		count: {
+			type: Number,
+			default: 9
+		},
+		// album 从相册选图,camera 使用相机,默认二者都有。如需直接开相机或直接选相册,请只使用一个选项
+		sourceType: {
+			type: Array,
+			default: () => {
+				return ['album', 'camera'];
+			}
+		}
+	},
+	watch: {
+		images(val) {
+			this.Fimages = val;
+		}
+	},
+	created() {
+		this.Fimages = this.images;
+		// 上来获取七牛token
+		this.getQiniuToken();
+	},
+	methods: {
+		getQiniuToken() {
+			this.$u.api
+				.uploadToken({
+					bucket: webUrl.QINIU_KEY,
+					key: 0
+				})
+				.then(res => {
+					this.qn_token = res.data;
+				});
+		},
+		// 移除图片 请求七牛云接口
+		async handleRemove(url, index) {
+			this.Fimages.splice(index, 1);
+			this.$emit('handleRemove', this.Fimages);
+			return;
+			const urlArr = url.split('/');
+			const nameSlice = urlArr[urlArr.length - 6];
+
+			let name = '';
+			if (urlArr[urlArr.length - 1] === '750') {
+				name = nameSlice.slice(0, nameSlice.indexOf('?'));
+			} else {
+				name = urlArr[urlArr.length - 1];
+			}
+			let key = `${this.enToken}/${name}`;
+			this.$u.api
+				.UploadDel({
+					bucket: webUrl.QINIU_KEY,
+					key: key
+				})
+				.then(res => {});
+		},
+		// 上传头像
+		uploadAva() {
+			uni.chooseImage({
+				count: this.count,
+				sourceType: this.sourceType, //从相册选择
+				success: async res => {
+					res.tempFilePaths.forEach(imgPath => {
+						this.upImg(imgPath);
+					});
+				}
+			});
+		},
+		// 请求上传图片接口
+		async upImg(imgPath) {
+			// const imgPath = res.tempFilePaths[0]; //选择图片的路径
+			const imgName = imgPath.split('/')[imgPath.split('/').length - 1];
+			const key = `${this.enToken}/${imgName}`; //图片和企业token拼接 为自定义文件名
+
+			let domain = webUrl.QN_UP; //文件上传地址
+			let token = this.qn_token; //token为七牛云的token一般由后台接口提供
+			let filePath = imgPath; //为需要上传的文件
+			uni.showLoading();
+			qiniuUploader.upload(
+				filePath,
+				res => {
+					//图片上传完成后返回值
+					// 压缩图片
+					uni.hideLoading();
+					// const imgData = {
+					// 	...res,
+					// 	key: res.key + '?imageView2/2/w/750/h/750'
+					// };
+					this.$emit('uploadSuccess', `${webUrl.QINIU_URL}/${res.key}`);
+				},
+				error => {
+					uni.hideLoading();
+					// resolve(error)
+				},
+				{
+					region: 'SCN', // (必须填写正确)ECN, SCN, NCN, NA, ASG,分别对应七牛的:华东,华南,华北,北美,新加坡 5 个区域
+					domain: domain, // // bucket 域名,下载资源时用到。如果设置,会在 success callback 的 res 参数加上可以直接使用的 ImageURL                                         字  段。否则需要自己拼接
+					key: key, // [非必须]自定义文件 key。如果不设置,默认为使用微信小程序 API 的临时文件名
+					// 以下方法三选一即可,优先级为:uptoken > uptokenURL > uptokenFunc
+					uptoken: token // 由其他程序生成七牛 uptoken
+				},
+				res => {
+					uni.hideLoading();
+					//上传进度
+					if (res.progress === 100) {
+						// resolve(keys);
+					}
+				}
+			);
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.up-box {
+	display: inline-block;
+	.cata-img {
+		width: 120rpx;
+		height: 120rpx;
+		border-radius: 8rpx;
+		margin-right: 20rpx;
+		display: block;
+	}
+	.upload-btn {
+		width: 120rpx;
+		height: 120rpx;
+		text-align: center;
+		line-height: 120rpx;
+		background-color: #f4f5f6;
+		border-radius: 8rpx;
+		color: #606266;
+		display: inline-block;
+		vertical-align: middle;
+		.custom-icon-xinzeng {
+			font-size: 44rpx;
+		}
+	}
+	.up-img-view {
+		position: relative;
+		display: inline-block;
+		vertical-align: middle;
+		.del-icon {
+			position: absolute;
+			color: $uni-color-error;
+			right: 0;
+			top: -20upx;
+			font-size: 40rpx;
+			background-color: #ffffff;
+			width: 40rpx;
+			height: 40rpx;
+			border-radius: 100%;
+			line-height: 40rpx;
+		}
+	}
+}
+</style>

+ 172 - 0
components/qiniu/qiniuUploader.js

@@ -0,0 +1,172 @@
+// created by gpake
+(function() {
+
+var config = {
+    qiniuRegion: '',
+    qiniuImageURLPrefix: '',
+    qiniuUploadToken: '',
+    qiniuUploadTokenURL: '',
+    qiniuUploadTokenFunction: null,
+    qiniuShouldUseQiniuFileName: false
+}
+
+module.exports = {
+    init: init,
+    upload: upload,
+}
+
+// 在整个程序生命周期中,只需要 init 一次即可
+// 如果需要变更参数,再调用 init 即可
+function init(options) {
+    config = {
+        qiniuRegion: '',
+        qiniuImageURLPrefix: '',
+        qiniuUploadToken: '',
+        qiniuUploadTokenURL: '',
+        qiniuUploadTokenFunction: null,
+        qiniuShouldUseQiniuFileName: false
+    };
+    updateConfigWithOptions(options);
+}
+
+function updateConfigWithOptions(options) {
+    if (options.region) {
+        config.qiniuRegion = options.region;
+    } else {
+        console.error('qiniu uploader need your bucket region');
+    }
+    if (options.uptoken) {
+        config.qiniuUploadToken = options.uptoken;
+    } else if (options.uptokenURL) {
+        config.qiniuUploadTokenURL = options.uptokenURL;
+    } else if(options.uptokenFunc) {
+        config.qiniuUploadTokenFunction = options.uptokenFunc;
+    }
+    if (options.domain) {
+        config.qiniuImageURLPrefix = options.domain;
+    }
+    config.qiniuShouldUseQiniuFileName = options.shouldUseQiniuFileName
+}
+
+function upload(filePath, success, fail, options, progress, cancelTask) {
+    if (null == filePath) {
+        console.error('qiniu uploader need filePath to upload');
+        return;
+    }
+    if (options) {
+      updateConfigWithOptions(options);
+    }
+    if (config.qiniuUploadToken) {
+        doUpload(filePath, success, fail, options, progress, cancelTask);
+    } else if (config.qiniuUploadTokenURL) {
+        getQiniuToken(function() {
+            doUpload(filePath, success, fail, options, progress, cancelTask);
+        });
+    } else if (config.qiniuUploadTokenFunction) {
+        config.qiniuUploadToken = config.qiniuUploadTokenFunction();
+        if (null == config.qiniuUploadToken && config.qiniuUploadToken.length > 0) {
+            console.error('qiniu UploadTokenFunction result is null, please check the return value');
+            return
+        }
+        doUpload(filePath, success, fail, options, progress, cancelTask);
+    } else {
+        console.error('qiniu uploader need one of [uptoken, uptokenURL, uptokenFunc]');
+        return;
+    }
+}
+
+function doUpload(filePath, success, fail, options, progress, cancelTask) {
+    if (null == config.qiniuUploadToken && config.qiniuUploadToken.length > 0) {
+        console.error('qiniu UploadToken is null, please check the init config or networking');
+        return
+    }
+    var url = uploadURLFromRegionCode(config.qiniuRegion);
+    var fileName = filePath.split('//')[1];
+    if (options && options.key) {
+        fileName = options.key;
+    }
+    var formData = {
+        'token': config.qiniuUploadToken
+    };
+    if (!config.qiniuShouldUseQiniuFileName) {
+      formData['key'] = fileName
+    }
+    var uploadTask = wx.uploadFile({
+        url: url,
+        filePath: filePath,
+        name: 'file',
+        formData: formData,
+        success: function (res) {
+          var dataString = res.data
+        //   // this if case is a compatibility with wechat server returned a charcode, but was fixed
+        //   if(res.data.hasOwnProperty('type') && res.data.type === 'Buffer'){
+        //     dataString = String.fromCharCode.apply(null, res.data.data)
+        //   }
+          try {
+            var dataObject = JSON.parse(dataString);
+            //do something
+            var fileUrl = config.qiniuImageURLPrefix + '/' + dataObject.key;
+            dataObject.fileUrl = fileUrl
+            dataObject.imageURL = fileUrl;
+            // console.log(dataObject);
+            if (success) {
+              success(dataObject);
+            }
+          } catch(e) {
+            console.log('parse JSON failed, origin String is: ' + dataString)
+            if (fail) {
+              fail(e);
+            }
+          }
+        },
+        fail: function (error) {
+            console.error(error);
+            if (fail) {
+                fail(error);
+            }
+        }
+    })
+
+    uploadTask.onProgressUpdate((res) => {
+        progress && progress(res)
+    })
+
+    cancelTask && cancelTask(() => {
+        uploadTask.abort()
+    })
+}
+
+function getQiniuToken(callback) {
+  wx.request({
+    url: config.qiniuUploadTokenURL,
+    success: function (res) {
+      var token = res.data.uptoken;
+      if (token && token.length > 0) {
+        config.qiniuUploadToken = token;
+        if (callback) {
+            callback();
+        }
+      } else {
+        console.error('qiniuUploader cannot get your token, please check the uptokenURL or server')
+      }
+    },
+    fail: function (error) {
+      console.error('qiniu UploadToken is null, please check the init config or networking: ' + error);
+    }
+  })
+}
+
+function uploadURLFromRegionCode(code) {
+    var uploadURL = null;
+    switch(code) {
+        case 'ECN': uploadURL = 'https://up.qiniup.com'; break;
+        case 'NCN': uploadURL = 'https://up-z1.qiniup.com'; break;
+        case 'SCN': uploadURL = 'https://upload-z2.qiniup.com'; break;
+        case 'NA': uploadURL = 'https://up-na0.qiniup.com'; break;
+        case 'ASG': uploadURL = 'https://up-as0.qiniup.com'; break;
+        default: console.error('please make the region is with one of [ECN, SCN, NCN, NA, ASG]');
+    }
+    return uploadURL;
+}
+
+})();

+ 36 - 0
components/region/RegionSel.vue

@@ -0,0 +1,36 @@
+<template>
+	<block><u-select :value="value" mode="mutil-column-auto" :list="list" @confirm="confirm" @cancel="cancel"></u-select></block>
+</template>
+
+<script>
+import area from './area.json';
+export default {
+	model: {
+		prop: 'value',
+		event: 'change'
+	},
+	props: {
+		value: {
+			type: Boolean,
+			default: false
+		}
+	},
+	data() {
+		return {
+			list: area
+		};
+	},
+	created() {},
+	methods: {
+		confirm(val) {
+			this.cancel();
+			this.$emit('confirm', val);
+		},
+		cancel(val) {
+			this.$emit('cancel', val);
+		}
+	}
+};
+</script>
+
+<style></style>

+ 14010 - 0
components/region/area.json

@@ -0,0 +1,14010 @@
+[{
+		"id": 1,
+		"children": [{
+			"id": 2,
+			"value": 110100,
+			"label": "北京市",
+			"children": [{
+					"value": 110101,
+					"label": "东城区"
+				},
+				{
+					"value": 110102,
+					"label": "西城区"
+				},
+				{
+					"value": 110105,
+					"label": "朝阳区"
+				},
+				{
+					"value": 110106,
+					"label": "丰台区"
+				},
+				{
+					"value": 110107,
+					"label": "石景山区"
+				},
+				{
+					"value": 110108,
+					"label": "海淀区"
+				},
+				{
+					"value": 110109,
+					"label": "门头沟区"
+				},
+				{
+					"value": 110111,
+					"label": "房山区"
+				},
+				{
+					"value": 110112,
+					"label": "通州区"
+				},
+				{
+					"value": 110113,
+					"label": "顺义区"
+				},
+				{
+					"value": 110114,
+					"label": "昌平区"
+				},
+				{
+					"value": 110115,
+					"label": "大兴区"
+				},
+				{
+					"value": 110116,
+					"label": "怀柔区"
+				},
+				{
+					"value": 110117,
+					"label": "平谷区"
+				},
+				{
+					"value": 110118,
+					"label": "密云区"
+				},
+				{
+					"value": 110119,
+					"label": "延庆区"
+				}
+			],
+			"expand": "true"
+		}],
+		"value": 110000,
+		"label": "北京",
+		"expand": "true"
+	},
+	{
+		"id": 19,
+		"children": [{
+			"id": 20,
+			"value": 120100,
+			"label": "天津市",
+			"children": [{
+					"value": 120103,
+					"label": "河西区"
+				},
+				{
+					"value": 120101,
+					"label": "和平区"
+				},
+				{
+					"value": 120102,
+					"label": "河东区"
+				},
+				{
+					"value": 120104,
+					"label": "南开区"
+				},
+				{
+					"value": 120105,
+					"label": "河北区"
+				},
+				{
+					"value": 120106,
+					"label": "红桥区"
+				},
+				{
+					"value": 120110,
+					"label": "东丽区"
+				},
+				{
+					"value": 120111,
+					"label": "西青区"
+				},
+				{
+					"value": 120112,
+					"label": "津南区"
+				},
+				{
+					"value": 120113,
+					"label": "北辰区"
+				},
+				{
+					"value": 120114,
+					"label": "武清区"
+				},
+				{
+					"value": 120115,
+					"label": "宝坻区"
+				},
+				{
+					"value": 120116,
+					"label": "滨海新区"
+				},
+				{
+					"value": 120117,
+					"label": "宁河区"
+				},
+				{
+					"value": 120118,
+					"label": "静海区"
+				},
+				{
+					"value": 120119,
+					"label": "蓟州区"
+				}
+			],
+			"expand": "true"
+		}],
+		"value": 120000,
+		"label": "天津市",
+		"expand": "true"
+	},
+	{
+		"id": 37,
+		"children": [{
+				"id": 38,
+				"value": 130100,
+				"label": "石家庄市",
+				"children": [{
+						"value": 130102,
+						"label": "长安区"
+					},
+					{
+						"value": 130104,
+						"label": "桥西区"
+					},
+					{
+						"value": 130105,
+						"label": "新华区"
+					},
+					{
+						"value": 130107,
+						"label": "井陉矿区"
+					},
+					{
+						"value": 130108,
+						"label": "裕华区"
+					},
+					{
+						"value": 130109,
+						"label": "藁城区"
+					},
+					{
+						"value": 130110,
+						"label": "鹿泉区"
+					},
+					{
+						"value": 130111,
+						"label": "栾城区"
+					},
+					{
+						"value": 130181,
+						"label": "辛集市"
+					},
+					{
+						"value": 130183,
+						"label": "晋州市"
+					},
+					{
+						"value": 130184,
+						"label": "新乐市"
+					},
+					{
+						"value": 130121,
+						"label": "井陉县"
+					},
+					{
+						"value": 130123,
+						"label": "正定县"
+					},
+					{
+						"value": 130125,
+						"label": "行唐县"
+					},
+					{
+						"value": 130126,
+						"label": "灵寿县"
+					},
+					{
+						"value": 130127,
+						"label": "高邑县"
+					},
+					{
+						"value": 130128,
+						"label": "深泽县"
+					},
+					{
+						"value": 130129,
+						"label": "赞皇县"
+					},
+					{
+						"value": 130130,
+						"label": "无极县"
+					},
+					{
+						"value": 130131,
+						"label": "平山县"
+					},
+					{
+						"value": 130132,
+						"label": "元氏县"
+					},
+					{
+						"value": 130133,
+						"label": "赵县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 61,
+				"value": 130200,
+				"label": "唐山市",
+				"children": [{
+						"value": 130203,
+						"label": "路北区"
+					},
+					{
+						"value": 130202,
+						"label": "路南区"
+					},
+					{
+						"value": 130204,
+						"label": "古冶区"
+					},
+					{
+						"value": 130205,
+						"label": "开平区"
+					},
+					{
+						"value": 130207,
+						"label": "丰南区"
+					},
+					{
+						"value": 130208,
+						"label": "丰润区"
+					},
+					{
+						"value": 130209,
+						"label": "曹妃甸区"
+					},
+					{
+						"value": 130281,
+						"label": "遵化市"
+					},
+					{
+						"value": 130283,
+						"label": "迁安市"
+					},
+					{
+						"value": 130223,
+						"label": "滦县"
+					},
+					{
+						"value": 130224,
+						"label": "滦南县"
+					},
+					{
+						"value": 130225,
+						"label": "乐亭县"
+					},
+					{
+						"value": 130227,
+						"label": "迁西县"
+					},
+					{
+						"value": 130229,
+						"label": "玉田县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 76,
+				"value": 130300,
+				"label": "秦皇岛市",
+				"children": [{
+						"value": 130302,
+						"label": "海港区"
+					},
+					{
+						"value": 130303,
+						"label": "山海关区"
+					},
+					{
+						"value": 130304,
+						"label": "北戴河区"
+					},
+					{
+						"value": 130306,
+						"label": "抚宁区"
+					},
+					{
+						"value": 130322,
+						"label": "昌黎县"
+					},
+					{
+						"value": 130324,
+						"label": "卢龙县"
+					},
+					{
+						"value": 130321,
+						"label": "青龙满族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 84,
+				"value": 130400,
+				"label": "邯郸市",
+				"children": [{
+						"value": 130403,
+						"label": "丛台区"
+					},
+					{
+						"value": 130402,
+						"label": "邯山区"
+					},
+					{
+						"value": 130404,
+						"label": "复兴区"
+					},
+					{
+						"value": 130406,
+						"label": "峰峰矿区"
+					},
+					{
+						"value": 130407,
+						"label": "肥乡区"
+					},
+					{
+						"value": 130408,
+						"label": "永年区"
+					},
+					{
+						"value": 130481,
+						"label": "武安市"
+					},
+					{
+						"value": 130423,
+						"label": "临漳县"
+					},
+					{
+						"value": 130424,
+						"label": "成安县"
+					},
+					{
+						"value": 130425,
+						"label": "大名县"
+					},
+					{
+						"value": 130426,
+						"label": "涉县"
+					},
+					{
+						"value": 130427,
+						"label": "磁县"
+					},
+					{
+						"value": 130430,
+						"label": "邱县"
+					},
+					{
+						"value": 130431,
+						"label": "鸡泽县"
+					},
+					{
+						"value": 130432,
+						"label": "广平县"
+					},
+					{
+						"value": 130433,
+						"label": "馆陶县"
+					},
+					{
+						"value": 130434,
+						"label": "魏县"
+					},
+					{
+						"value": 130435,
+						"label": "曲周县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 103,
+				"value": 130500,
+				"label": "邢台市",
+				"children": [{
+						"value": 130502,
+						"label": "桥东区"
+					},
+					{
+						"value": 130503,
+						"label": "桥西区"
+					},
+					{
+						"value": 130581,
+						"label": "南宫市"
+					},
+					{
+						"value": 130582,
+						"label": "沙河市"
+					},
+					{
+						"value": 130521,
+						"label": "邢台县"
+					},
+					{
+						"value": 130522,
+						"label": "临城县"
+					},
+					{
+						"value": 130523,
+						"label": "内丘县"
+					},
+					{
+						"value": 130524,
+						"label": "柏乡县"
+					},
+					{
+						"value": 130525,
+						"label": "隆尧县"
+					},
+					{
+						"value": 130526,
+						"label": "任县"
+					},
+					{
+						"value": 130527,
+						"label": "南和县"
+					},
+					{
+						"value": 130528,
+						"label": "宁晋县"
+					},
+					{
+						"value": 130529,
+						"label": "巨鹿县"
+					},
+					{
+						"value": 130530,
+						"label": "新河县"
+					},
+					{
+						"value": 130531,
+						"label": "广宗县"
+					},
+					{
+						"value": 130532,
+						"label": "平乡县"
+					},
+					{
+						"value": 130533,
+						"label": "威县"
+					},
+					{
+						"value": 130534,
+						"label": "清河县"
+					},
+					{
+						"value": 130535,
+						"label": "临西县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 123,
+				"value": 130600,
+				"label": "保定市",
+				"children": [{
+						"value": 130602,
+						"label": "竞秀区"
+					},
+					{
+						"value": 130606,
+						"label": "莲池区"
+					},
+					{
+						"value": 130607,
+						"label": "满城区"
+					},
+					{
+						"value": 130608,
+						"label": "清苑区"
+					},
+					{
+						"value": 130609,
+						"label": "徐水区"
+					},
+					{
+						"value": 130681,
+						"label": "涿州市"
+					},
+					{
+						"value": 130682,
+						"label": "定州市"
+					},
+					{
+						"value": 130683,
+						"label": "安国市"
+					},
+					{
+						"value": 130684,
+						"label": "高碑店市"
+					},
+					{
+						"value": 130623,
+						"label": "涞水县"
+					},
+					{
+						"value": 130624,
+						"label": "阜平县"
+					},
+					{
+						"value": 130626,
+						"label": "定兴县"
+					},
+					{
+						"value": 130627,
+						"label": "唐县"
+					},
+					{
+						"value": 130628,
+						"label": "高阳县"
+					},
+					{
+						"value": 130629,
+						"label": "容城县"
+					},
+					{
+						"value": 130630,
+						"label": "涞源县"
+					},
+					{
+						"value": 130631,
+						"label": "望都县"
+					},
+					{
+						"value": 130632,
+						"label": "安新县"
+					},
+					{
+						"value": 130633,
+						"label": "易县"
+					},
+					{
+						"value": 130634,
+						"label": "曲阳县"
+					},
+					{
+						"value": 130635,
+						"label": "蠡县"
+					},
+					{
+						"value": 130636,
+						"label": "顺平县"
+					},
+					{
+						"value": 130637,
+						"label": "博野县"
+					},
+					{
+						"value": 130638,
+						"label": "雄县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 148,
+				"value": 130700,
+				"label": "张家口市",
+				"children": [{
+						"value": 130703,
+						"label": "桥西区"
+					},
+					{
+						"value": 130702,
+						"label": "桥东区"
+					},
+					{
+						"value": 130705,
+						"label": "宣化区"
+					},
+					{
+						"value": 130706,
+						"label": "下花园区"
+					},
+					{
+						"value": 130708,
+						"label": "万全区"
+					},
+					{
+						"value": 130709,
+						"label": "崇礼区"
+					},
+					{
+						"value": 130722,
+						"label": "张北县"
+					},
+					{
+						"value": 130723,
+						"label": "康保县"
+					},
+					{
+						"value": 130724,
+						"label": "沽源县"
+					},
+					{
+						"value": 130725,
+						"label": "尚义县"
+					},
+					{
+						"value": 130726,
+						"label": "蔚县"
+					},
+					{
+						"value": 130727,
+						"label": "阳原县"
+					},
+					{
+						"value": 130728,
+						"label": "怀安县"
+					},
+					{
+						"value": 130730,
+						"label": "怀来县"
+					},
+					{
+						"value": 130731,
+						"label": "涿鹿县"
+					},
+					{
+						"value": 130732,
+						"label": "赤城县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 165,
+				"value": 130800,
+				"label": "承德市",
+				"children": [{
+						"value": 130802,
+						"label": "双桥区"
+					},
+					{
+						"value": 130803,
+						"label": "双滦区"
+					},
+					{
+						"value": 130804,
+						"label": "鹰手营子矿区"
+					},
+					{
+						"value": 130881,
+						"label": "平泉市"
+					},
+					{
+						"value": 130821,
+						"label": "承德县"
+					},
+					{
+						"value": 130822,
+						"label": "兴隆县"
+					},
+					{
+						"value": 130824,
+						"label": "滦平县"
+					},
+					{
+						"value": 130825,
+						"label": "隆化县"
+					},
+					{
+						"value": 130826,
+						"label": "丰宁满族自治县"
+					},
+					{
+						"value": 130827,
+						"label": "宽城满族自治县"
+					},
+					{
+						"value": 130828,
+						"label": "围场满族蒙古族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 177,
+				"value": 130900,
+				"label": "沧州市",
+				"children": [{
+						"value": 130903,
+						"label": "运河区"
+					},
+					{
+						"value": 130902,
+						"label": "新华区"
+					},
+					{
+						"value": 130981,
+						"label": "泊头市"
+					},
+					{
+						"value": 130982,
+						"label": "任丘市"
+					},
+					{
+						"value": 130983,
+						"label": "黄骅市"
+					},
+					{
+						"value": 130984,
+						"label": "河间市"
+					},
+					{
+						"value": 130921,
+						"label": "沧县"
+					},
+					{
+						"value": 130922,
+						"label": "青县"
+					},
+					{
+						"value": 130923,
+						"label": "东光县"
+					},
+					{
+						"value": 130924,
+						"label": "海兴县"
+					},
+					{
+						"value": 130925,
+						"label": "盐山县"
+					},
+					{
+						"value": 130926,
+						"label": "肃宁县"
+					},
+					{
+						"value": 130927,
+						"label": "南皮县"
+					},
+					{
+						"value": 130928,
+						"label": "吴桥县"
+					},
+					{
+						"value": 130929,
+						"label": "献县"
+					},
+					{
+						"value": 130930,
+						"label": "孟村回族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 194,
+				"value": 131000,
+				"label": "廊坊市",
+				"children": [{
+						"value": 131003,
+						"label": "广阳区"
+					},
+					{
+						"value": 131002,
+						"label": "安次区"
+					},
+					{
+						"value": 131081,
+						"label": "霸州市"
+					},
+					{
+						"value": 131082,
+						"label": "三河市"
+					},
+					{
+						"value": 131022,
+						"label": "固安县"
+					},
+					{
+						"value": 131023,
+						"label": "永清县"
+					},
+					{
+						"value": 131024,
+						"label": "香河县"
+					},
+					{
+						"value": 131025,
+						"label": "大城县"
+					},
+					{
+						"value": 131026,
+						"label": "文安县"
+					},
+					{
+						"value": 131028,
+						"label": "大厂回族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 205,
+				"value": 131100,
+				"label": "衡水市",
+				"children": [{
+						"value": 131102,
+						"label": "桃城区"
+					},
+					{
+						"value": 131103,
+						"label": "冀州区"
+					},
+					{
+						"value": 131182,
+						"label": "深州市"
+					},
+					{
+						"value": 131121,
+						"label": "枣强县"
+					},
+					{
+						"value": 131122,
+						"label": "武邑县"
+					},
+					{
+						"value": 131123,
+						"label": "武强县"
+					},
+					{
+						"value": 131124,
+						"label": "饶阳县"
+					},
+					{
+						"value": 131125,
+						"label": "安平县"
+					},
+					{
+						"value": 131126,
+						"label": "故城县"
+					},
+					{
+						"value": 131127,
+						"label": "景县"
+					},
+					{
+						"value": 131128,
+						"label": "阜城县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 130000,
+		"label": "河北省",
+		"expand": "true"
+	},
+	{
+		"id": 217,
+		"children": [{
+				"id": 218,
+				"value": 140100,
+				"label": "太原市",
+				"children": [{
+						"value": 140107,
+						"label": "杏花岭区"
+					},
+					{
+						"value": 140105,
+						"label": "小店区"
+					},
+					{
+						"value": 140106,
+						"label": "迎泽区"
+					},
+					{
+						"value": 140108,
+						"label": "尖草坪区"
+					},
+					{
+						"value": 140109,
+						"label": "万柏林区"
+					},
+					{
+						"value": 140110,
+						"label": "晋源区"
+					},
+					{
+						"value": 140181,
+						"label": "古交市"
+					},
+					{
+						"value": 140121,
+						"label": "清徐县"
+					},
+					{
+						"value": 140122,
+						"label": "阳曲县"
+					},
+					{
+						"value": 140123,
+						"label": "娄烦县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 229,
+				"value": 140200,
+				"label": "大同市",
+				"children": [{
+						"value": 140202,
+						"label": "城区"
+					},
+					{
+						"value": 140203,
+						"label": "矿区"
+					},
+					{
+						"value": 140211,
+						"label": "南郊区"
+					},
+					{
+						"value": 140212,
+						"label": "新荣区"
+					},
+					{
+						"value": 140221,
+						"label": "阳高县"
+					},
+					{
+						"value": 140222,
+						"label": "天镇县"
+					},
+					{
+						"value": 140223,
+						"label": "广灵县"
+					},
+					{
+						"value": 140224,
+						"label": "灵丘县"
+					},
+					{
+						"value": 140225,
+						"label": "浑源县"
+					},
+					{
+						"value": 140226,
+						"label": "左云县"
+					},
+					{
+						"value": 140227,
+						"label": "大同县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 241,
+				"value": 140300,
+				"label": "阳泉市",
+				"children": [{
+						"value": 140302,
+						"label": "城区"
+					},
+					{
+						"value": 140303,
+						"label": "矿区"
+					},
+					{
+						"value": 140311,
+						"label": "郊区"
+					},
+					{
+						"value": 140321,
+						"label": "平定县"
+					},
+					{
+						"value": 140322,
+						"label": "盂县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 247,
+				"value": 140400,
+				"label": "长治市",
+				"children": [{
+						"value": 140402,
+						"label": "城区"
+					},
+					{
+						"value": 140411,
+						"label": "郊区"
+					},
+					{
+						"value": 140481,
+						"label": "潞城市"
+					},
+					{
+						"value": 140421,
+						"label": "长治县"
+					},
+					{
+						"value": 140423,
+						"label": "襄垣县"
+					},
+					{
+						"value": 140424,
+						"label": "屯留县"
+					},
+					{
+						"value": 140425,
+						"label": "平顺县"
+					},
+					{
+						"value": 140426,
+						"label": "黎城县"
+					},
+					{
+						"value": 140427,
+						"label": "壶关县"
+					},
+					{
+						"value": 140428,
+						"label": "长子县"
+					},
+					{
+						"value": 140429,
+						"label": "武乡县"
+					},
+					{
+						"value": 140430,
+						"label": "沁县"
+					},
+					{
+						"value": 140431,
+						"label": "沁源县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 261,
+				"value": 140500,
+				"label": "晋城市",
+				"children": [{
+						"value": 140502,
+						"label": "城区"
+					},
+					{
+						"value": 140581,
+						"label": "高平市"
+					},
+					{
+						"value": 140521,
+						"label": "沁水县"
+					},
+					{
+						"value": 140522,
+						"label": "阳城县"
+					},
+					{
+						"value": 140524,
+						"label": "陵川县"
+					},
+					{
+						"value": 140525,
+						"label": "泽州县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 268,
+				"value": 140600,
+				"label": "朔州市",
+				"children": [{
+						"value": 140602,
+						"label": "朔城区"
+					},
+					{
+						"value": 140603,
+						"label": "平鲁区"
+					},
+					{
+						"value": 140621,
+						"label": "山阴县"
+					},
+					{
+						"value": 140622,
+						"label": "应县"
+					},
+					{
+						"value": 140623,
+						"label": "右玉县"
+					},
+					{
+						"value": 140624,
+						"label": "怀仁县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 275,
+				"value": 140700,
+				"label": "晋中市",
+				"children": [{
+						"value": 140702,
+						"label": "榆次区"
+					},
+					{
+						"value": 140781,
+						"label": "介休市"
+					},
+					{
+						"value": 140721,
+						"label": "榆社县"
+					},
+					{
+						"value": 140722,
+						"label": "左权县"
+					},
+					{
+						"value": 140723,
+						"label": "和顺县"
+					},
+					{
+						"value": 140724,
+						"label": "昔阳县"
+					},
+					{
+						"value": 140725,
+						"label": "寿阳县"
+					},
+					{
+						"value": 140726,
+						"label": "太谷县"
+					},
+					{
+						"value": 140727,
+						"label": "祁县"
+					},
+					{
+						"value": 140728,
+						"label": "平遥县"
+					},
+					{
+						"value": 140729,
+						"label": "灵石县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 287,
+				"value": 140800,
+				"label": "运城市",
+				"children": [{
+						"value": 140802,
+						"label": "盐湖区"
+					},
+					{
+						"value": 140881,
+						"label": "永济市"
+					},
+					{
+						"value": 140882,
+						"label": "河津市"
+					},
+					{
+						"value": 140821,
+						"label": "临猗县"
+					},
+					{
+						"value": 140822,
+						"label": "万荣县"
+					},
+					{
+						"value": 140823,
+						"label": "闻喜县"
+					},
+					{
+						"value": 140824,
+						"label": "稷山县"
+					},
+					{
+						"value": 140825,
+						"label": "新绛县"
+					},
+					{
+						"value": 140826,
+						"label": "绛县"
+					},
+					{
+						"value": 140827,
+						"label": "垣曲县"
+					},
+					{
+						"value": 140828,
+						"label": "夏县"
+					},
+					{
+						"value": 140829,
+						"label": "平陆县"
+					},
+					{
+						"value": 140830,
+						"label": "芮城县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 301,
+				"value": 140900,
+				"label": "忻州市",
+				"children": [{
+						"value": 140902,
+						"label": "忻府区"
+					},
+					{
+						"value": 140981,
+						"label": "原平市"
+					},
+					{
+						"value": 140921,
+						"label": "定襄县"
+					},
+					{
+						"value": 140922,
+						"label": "五台县"
+					},
+					{
+						"value": 140923,
+						"label": "代县"
+					},
+					{
+						"value": 140924,
+						"label": "繁峙县"
+					},
+					{
+						"value": 140925,
+						"label": "宁武县"
+					},
+					{
+						"value": 140926,
+						"label": "静乐县"
+					},
+					{
+						"value": 140927,
+						"label": "神池县"
+					},
+					{
+						"value": 140928,
+						"label": "五寨县"
+					},
+					{
+						"value": 140929,
+						"label": "岢岚县"
+					},
+					{
+						"value": 140930,
+						"label": "河曲县"
+					},
+					{
+						"value": 140931,
+						"label": "保德县"
+					},
+					{
+						"value": 140932,
+						"label": "偏关县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 316,
+				"value": 141000,
+				"label": "临汾市",
+				"children": [{
+						"value": 141002,
+						"label": "尧都区"
+					},
+					{
+						"value": 141081,
+						"label": "侯马市"
+					},
+					{
+						"value": 141082,
+						"label": "霍州市"
+					},
+					{
+						"value": 141021,
+						"label": "曲沃县"
+					},
+					{
+						"value": 141022,
+						"label": "翼城县"
+					},
+					{
+						"value": 141023,
+						"label": "襄汾县"
+					},
+					{
+						"value": 141024,
+						"label": "洪洞县"
+					},
+					{
+						"value": 141025,
+						"label": "古县"
+					},
+					{
+						"value": 141026,
+						"label": "安泽县"
+					},
+					{
+						"value": 141027,
+						"label": "浮山县"
+					},
+					{
+						"value": 141028,
+						"label": "吉县"
+					},
+					{
+						"value": 141029,
+						"label": "乡宁县"
+					},
+					{
+						"value": 141030,
+						"label": "大宁县"
+					},
+					{
+						"value": 141031,
+						"label": "隰县"
+					},
+					{
+						"value": 141032,
+						"label": "永和县"
+					},
+					{
+						"value": 141033,
+						"label": "蒲县"
+					},
+					{
+						"value": 141034,
+						"label": "汾西县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 334,
+				"value": 141100,
+				"label": "吕梁市",
+				"children": [{
+						"value": 141102,
+						"label": "离石区"
+					},
+					{
+						"value": 141181,
+						"label": "孝义市"
+					},
+					{
+						"value": 141182,
+						"label": "汾阳市"
+					},
+					{
+						"value": 141121,
+						"label": "文水县"
+					},
+					{
+						"value": 141122,
+						"label": "交城县"
+					},
+					{
+						"value": 141123,
+						"label": "兴县"
+					},
+					{
+						"value": 141124,
+						"label": "临县"
+					},
+					{
+						"value": 141125,
+						"label": "柳林县"
+					},
+					{
+						"value": 141126,
+						"label": "石楼县"
+					},
+					{
+						"value": 141127,
+						"label": "岚县"
+					},
+					{
+						"value": 141128,
+						"label": "方山县"
+					},
+					{
+						"value": 141129,
+						"label": "中阳县"
+					},
+					{
+						"value": 141130,
+						"label": "交口县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 140000,
+		"label": "山西省",
+		"expand": "true"
+	},
+	{
+		"id": 348,
+		"children": [{
+				"id": 349,
+				"value": 150100,
+				"label": "呼和浩特市",
+				"children": [{
+						"value": 150102,
+						"label": "新城区"
+					},
+					{
+						"value": 150103,
+						"label": "回民区"
+					},
+					{
+						"value": 150104,
+						"label": "玉泉区"
+					},
+					{
+						"value": 150105,
+						"label": "赛罕区"
+					},
+					{
+						"value": 150122,
+						"label": "托克托县"
+					},
+					{
+						"value": 150123,
+						"label": "和林格尔县"
+					},
+					{
+						"value": 150124,
+						"label": "清水河县"
+					},
+					{
+						"value": 150125,
+						"label": "武川县"
+					},
+					{
+						"value": 150121,
+						"label": "土默特左旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 359,
+				"value": 150200,
+				"label": "包头市",
+				"children": [{
+						"value": 150203,
+						"label": "昆都仑区"
+					},
+					{
+						"value": 150202,
+						"label": "东河区"
+					},
+					{
+						"value": 150204,
+						"label": "青山区"
+					},
+					{
+						"value": 150205,
+						"label": "石拐区"
+					},
+					{
+						"value": 150206,
+						"label": "白云鄂博矿区"
+					},
+					{
+						"value": 150207,
+						"label": "九原区"
+					},
+					{
+						"value": 150222,
+						"label": "固阳县"
+					},
+					{
+						"value": 150221,
+						"label": "土默特右旗"
+					},
+					{
+						"value": 150223,
+						"label": "达尔罕茂明安联合旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 369,
+				"value": 150300,
+				"label": "乌海市",
+				"children": [{
+						"value": 150302,
+						"label": "海勃湾区"
+					},
+					{
+						"value": 150303,
+						"label": "海南区"
+					},
+					{
+						"value": 150304,
+						"label": "乌达区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 373,
+				"value": 150400,
+				"label": "赤峰市",
+				"children": [{
+						"value": 150402,
+						"label": "红山区"
+					},
+					{
+						"value": 150403,
+						"label": "元宝山区"
+					},
+					{
+						"value": 150404,
+						"label": "松山区"
+					},
+					{
+						"value": 150424,
+						"label": "林西县"
+					},
+					{
+						"value": 150429,
+						"label": "宁城县"
+					},
+					{
+						"value": 150421,
+						"label": "阿鲁科尔沁旗"
+					},
+					{
+						"value": 150422,
+						"label": "巴林左旗"
+					},
+					{
+						"value": 150423,
+						"label": "巴林右旗"
+					},
+					{
+						"value": 150425,
+						"label": "克什克腾旗"
+					},
+					{
+						"value": 150426,
+						"label": "翁牛特旗"
+					},
+					{
+						"value": 150428,
+						"label": "喀喇沁旗"
+					},
+					{
+						"value": 150430,
+						"label": "敖汉旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 386,
+				"value": 150500,
+				"label": "通辽市",
+				"children": [{
+						"value": 150502,
+						"label": "科尔沁区"
+					},
+					{
+						"value": 150581,
+						"label": "霍林郭勒市"
+					},
+					{
+						"value": 150523,
+						"label": "开鲁县"
+					},
+					{
+						"value": 150524,
+						"label": "库伦旗"
+					},
+					{
+						"value": 150525,
+						"label": "奈曼旗"
+					},
+					{
+						"value": 150526,
+						"label": "扎鲁特旗"
+					},
+					{
+						"value": 150521,
+						"label": "科尔沁左翼中旗"
+					},
+					{
+						"value": 150522,
+						"label": "科尔沁左翼后旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 395,
+				"value": 150600,
+				"label": "鄂尔多斯市",
+				"children": [{
+						"value": 150602,
+						"label": "东胜区"
+					},
+					{
+						"value": 150603,
+						"label": "康巴什区"
+					},
+					{
+						"value": 150621,
+						"label": "达拉特旗"
+					},
+					{
+						"value": 150622,
+						"label": "准格尔旗"
+					},
+					{
+						"value": 150623,
+						"label": "鄂托克前旗"
+					},
+					{
+						"value": 150624,
+						"label": "鄂托克旗"
+					},
+					{
+						"value": 150625,
+						"label": "杭锦旗"
+					},
+					{
+						"value": 150626,
+						"label": "乌审旗"
+					},
+					{
+						"value": 150627,
+						"label": "伊金霍洛旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 405,
+				"value": 150700,
+				"label": "呼伦贝尔市",
+				"children": [{
+						"value": 150702,
+						"label": "海拉尔区"
+					},
+					{
+						"value": 150703,
+						"label": "扎赉诺尔区"
+					},
+					{
+						"value": 150781,
+						"label": "满洲里市"
+					},
+					{
+						"value": 150782,
+						"label": "牙克石市"
+					},
+					{
+						"value": 150783,
+						"label": "扎兰屯市"
+					},
+					{
+						"value": 150784,
+						"label": "额尔古纳市"
+					},
+					{
+						"value": 150785,
+						"label": "根河市"
+					},
+					{
+						"value": 150721,
+						"label": "阿荣旗"
+					},
+					{
+						"value": 150725,
+						"label": "陈巴尔虎旗"
+					},
+					{
+						"value": 150726,
+						"label": "新巴尔虎左旗"
+					},
+					{
+						"value": 150727,
+						"label": "新巴尔虎右旗"
+					},
+					{
+						"value": 150722,
+						"label": "莫力达瓦达斡尔族自治旗"
+					},
+					{
+						"value": 150723,
+						"label": "鄂伦春自治旗"
+					},
+					{
+						"value": 150724,
+						"label": "鄂温克族自治旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 420,
+				"value": 150800,
+				"label": "巴彦淖尔市",
+				"children": [{
+						"value": 150802,
+						"label": "临河区"
+					},
+					{
+						"value": 150821,
+						"label": "五原县"
+					},
+					{
+						"value": 150822,
+						"label": "磴口县"
+					},
+					{
+						"value": 150823,
+						"label": "乌拉特前旗"
+					},
+					{
+						"value": 150824,
+						"label": "乌拉特中旗"
+					},
+					{
+						"value": 150825,
+						"label": "乌拉特后旗"
+					},
+					{
+						"value": 150826,
+						"label": "杭锦后旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 428,
+				"value": 150900,
+				"label": "乌兰察布市",
+				"children": [{
+						"value": 150902,
+						"label": "集宁区"
+					},
+					{
+						"value": 150981,
+						"label": "丰镇市"
+					},
+					{
+						"value": 150921,
+						"label": "卓资县"
+					},
+					{
+						"value": 150922,
+						"label": "化德县"
+					},
+					{
+						"value": 150923,
+						"label": "商都县"
+					},
+					{
+						"value": 150924,
+						"label": "兴和县"
+					},
+					{
+						"value": 150925,
+						"label": "凉城县"
+					},
+					{
+						"value": 150926,
+						"label": "察哈尔右翼前旗"
+					},
+					{
+						"value": 150927,
+						"label": "察哈尔右翼中旗"
+					},
+					{
+						"value": 150928,
+						"label": "察哈尔右翼后旗"
+					},
+					{
+						"value": 150929,
+						"label": "四子王旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 440,
+				"value": 152200,
+				"label": "兴安盟",
+				"children": [{
+						"value": 152201,
+						"label": "乌兰浩特市"
+					},
+					{
+						"value": 152202,
+						"label": "阿尔山市"
+					},
+					{
+						"value": 152224,
+						"label": "突泉县"
+					},
+					{
+						"value": 152221,
+						"label": "科尔沁右翼前旗"
+					},
+					{
+						"value": 152222,
+						"label": "科尔沁右翼中旗"
+					},
+					{
+						"value": 152223,
+						"label": "扎赉特旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 447,
+				"value": 152500,
+				"label": "锡林郭勒盟",
+				"children": [{
+						"value": 152502,
+						"label": "锡林浩特市"
+					},
+					{
+						"value": 152501,
+						"label": "二连浩特市"
+					},
+					{
+						"value": 152531,
+						"label": "多伦县"
+					},
+					{
+						"value": 152522,
+						"label": "阿巴嘎旗"
+					},
+					{
+						"value": 152523,
+						"label": "苏尼特左旗"
+					},
+					{
+						"value": 152524,
+						"label": "苏尼特右旗"
+					},
+					{
+						"value": 152525,
+						"label": "东乌珠穆沁旗"
+					},
+					{
+						"value": 152526,
+						"label": "西乌珠穆沁旗"
+					},
+					{
+						"value": 152527,
+						"label": "太仆寺旗"
+					},
+					{
+						"value": 152528,
+						"label": "镶黄旗"
+					},
+					{
+						"value": 152529,
+						"label": "正镶白旗"
+					},
+					{
+						"value": 152530,
+						"label": "正蓝旗"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 460,
+				"value": 152900,
+				"label": "阿拉善盟",
+				"children": [{
+						"value": 152921,
+						"label": "阿拉善左旗"
+					},
+					{
+						"value": 152922,
+						"label": "阿拉善右旗"
+					},
+					{
+						"value": 152923,
+						"label": "额济纳旗"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 150000,
+		"label": "内蒙古自治区",
+		"expand": "true"
+	},
+	{
+		"id": 464,
+		"children": [{
+				"id": 465,
+				"value": 210100,
+				"label": "沈阳市",
+				"children": [{
+						"value": 210103,
+						"label": "沈河区"
+					},
+					{
+						"value": 210102,
+						"label": "和平区"
+					},
+					{
+						"value": 210104,
+						"label": "大东区"
+					},
+					{
+						"value": 210105,
+						"label": "皇姑区"
+					},
+					{
+						"value": 210106,
+						"label": "铁西区"
+					},
+					{
+						"value": 210111,
+						"label": "苏家屯区"
+					},
+					{
+						"value": 210112,
+						"label": "浑南区"
+					},
+					{
+						"value": 210113,
+						"label": "沈北新区"
+					},
+					{
+						"value": 210114,
+						"label": "于洪区"
+					},
+					{
+						"value": 210115,
+						"label": "辽中区"
+					},
+					{
+						"value": 210181,
+						"label": "新民市"
+					},
+					{
+						"value": 210123,
+						"label": "康平县"
+					},
+					{
+						"value": 210124,
+						"label": "法库县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 479,
+				"value": 210200,
+				"label": "大连市",
+				"children": [{
+						"value": 210203,
+						"label": "西岗区"
+					},
+					{
+						"value": 210202,
+						"label": "中山区"
+					},
+					{
+						"value": 210204,
+						"label": "沙河口区"
+					},
+					{
+						"value": 210211,
+						"label": "甘井子区"
+					},
+					{
+						"value": 210212,
+						"label": "旅顺口区"
+					},
+					{
+						"value": 210213,
+						"label": "金州区"
+					},
+					{
+						"value": 210281,
+						"label": "瓦房店市"
+					},
+					{
+						"value": 210214,
+						"label": "普兰店区"
+					},
+					{
+						"value": 210283,
+						"label": "庄河市"
+					},
+					{
+						"value": 210224,
+						"label": "长海县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 490,
+				"value": 210300,
+				"label": "鞍山市",
+				"children": [{
+						"value": 210302,
+						"label": "铁东区"
+					},
+					{
+						"value": 210303,
+						"label": "铁西区"
+					},
+					{
+						"value": 210304,
+						"label": "立山区"
+					},
+					{
+						"value": 210311,
+						"label": "千山区"
+					},
+					{
+						"value": 210381,
+						"label": "海城市"
+					},
+					{
+						"value": 210321,
+						"label": "台安县"
+					},
+					{
+						"value": 210323,
+						"label": "岫岩满族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 498,
+				"value": 210400,
+				"label": "抚顺市",
+				"children": [{
+						"value": 210411,
+						"label": "顺城区"
+					},
+					{
+						"value": 210402,
+						"label": "新抚区"
+					},
+					{
+						"value": 210403,
+						"label": "东洲区"
+					},
+					{
+						"value": 210404,
+						"label": "望花区"
+					},
+					{
+						"value": 210421,
+						"label": "抚顺县"
+					},
+					{
+						"value": 210422,
+						"label": "新宾满族自治县"
+					},
+					{
+						"value": 210423,
+						"label": "清原满族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 506,
+				"value": 210500,
+				"label": "本溪市",
+				"children": [{
+						"value": 210502,
+						"label": "平山区"
+					},
+					{
+						"value": 210503,
+						"label": "溪湖区"
+					},
+					{
+						"value": 210504,
+						"label": "明山区"
+					},
+					{
+						"value": 210505,
+						"label": "南芬区"
+					},
+					{
+						"value": 210521,
+						"label": "本溪满族自治县"
+					},
+					{
+						"value": 210522,
+						"label": "桓仁满族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 513,
+				"value": 210600,
+				"label": "丹东市",
+				"children": [{
+						"value": 210603,
+						"label": "振兴区"
+					},
+					{
+						"value": 210602,
+						"label": "元宝区"
+					},
+					{
+						"value": 210604,
+						"label": "振安区"
+					},
+					{
+						"value": 210681,
+						"label": "东港市"
+					},
+					{
+						"value": 210682,
+						"label": "凤城市"
+					},
+					{
+						"value": 210624,
+						"label": "宽甸满族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 520,
+				"value": 210700,
+				"label": "锦州市",
+				"children": [{
+						"value": 210711,
+						"label": "太和区"
+					},
+					{
+						"value": 210702,
+						"label": "古塔区"
+					},
+					{
+						"value": 210703,
+						"label": "凌河区"
+					},
+					{
+						"value": 210781,
+						"label": "凌海市"
+					},
+					{
+						"value": 210782,
+						"label": "北镇市"
+					},
+					{
+						"value": 210726,
+						"label": "黑山县"
+					},
+					{
+						"value": 210727,
+						"label": "义县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 528,
+				"value": 210800,
+				"label": "营口市",
+				"children": [{
+						"value": 210802,
+						"label": "站前区"
+					},
+					{
+						"value": 210803,
+						"label": "西市区"
+					},
+					{
+						"value": 210804,
+						"label": "鲅鱼圈区"
+					},
+					{
+						"value": 210811,
+						"label": "老边区"
+					},
+					{
+						"value": 210881,
+						"label": "盖州市"
+					},
+					{
+						"value": 210882,
+						"label": "大石桥市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 535,
+				"value": 210900,
+				"label": "阜新市",
+				"children": [{
+						"value": 210911,
+						"label": "细河区"
+					},
+					{
+						"value": 210902,
+						"label": "海州区"
+					},
+					{
+						"value": 210903,
+						"label": "新邱区"
+					},
+					{
+						"value": 210904,
+						"label": "太平区"
+					},
+					{
+						"value": 210905,
+						"label": "清河门区"
+					},
+					{
+						"value": 210922,
+						"label": "彰武县"
+					},
+					{
+						"value": 210921,
+						"label": "阜新蒙古族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 543,
+				"value": 211000,
+				"label": "辽阳市",
+				"children": [{
+						"value": 211002,
+						"label": "白塔区"
+					},
+					{
+						"value": 211003,
+						"label": "文圣区"
+					},
+					{
+						"value": 211004,
+						"label": "宏伟区"
+					},
+					{
+						"value": 211005,
+						"label": "弓长岭区"
+					},
+					{
+						"value": 211011,
+						"label": "太子河区"
+					},
+					{
+						"value": 211081,
+						"label": "灯塔市"
+					},
+					{
+						"value": 211021,
+						"label": "辽阳县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 551,
+				"value": 211100,
+				"label": "盘锦市",
+				"children": [{
+						"value": 211103,
+						"label": "兴隆台区"
+					},
+					{
+						"value": 211102,
+						"label": "双台子区"
+					},
+					{
+						"value": 211104,
+						"label": "大洼区"
+					},
+					{
+						"value": 211122,
+						"label": "盘山县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 556,
+				"value": 211200,
+				"label": "铁岭市",
+				"children": [{
+						"value": 211202,
+						"label": "银州区"
+					},
+					{
+						"value": 211204,
+						"label": "清河区"
+					},
+					{
+						"value": 211281,
+						"label": "调兵山市"
+					},
+					{
+						"value": 211282,
+						"label": "开原市"
+					},
+					{
+						"value": 211221,
+						"label": "铁岭县"
+					},
+					{
+						"value": 211223,
+						"label": "西丰县"
+					},
+					{
+						"value": 211224,
+						"label": "昌图县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 564,
+				"value": 211300,
+				"label": "朝阳市",
+				"children": [{
+						"value": 211302,
+						"label": "双塔区"
+					},
+					{
+						"value": 211303,
+						"label": "龙城区"
+					},
+					{
+						"value": 211381,
+						"label": "北票市"
+					},
+					{
+						"value": 211382,
+						"label": "凌源市"
+					},
+					{
+						"value": 211321,
+						"label": "朝阳县"
+					},
+					{
+						"value": 211322,
+						"label": "建平县"
+					},
+					{
+						"value": 211324,
+						"label": "喀喇沁左翼蒙古族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 572,
+				"value": 211400,
+				"label": "葫芦岛市",
+				"children": [{
+						"value": 211403,
+						"label": "龙港区"
+					},
+					{
+						"value": 211402,
+						"label": "连山区"
+					},
+					{
+						"value": 211404,
+						"label": "南票区"
+					},
+					{
+						"value": 211481,
+						"label": "兴城市"
+					},
+					{
+						"value": 211421,
+						"label": "绥中县"
+					},
+					{
+						"value": 211422,
+						"label": "建昌县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 210000,
+		"label": "辽宁省",
+		"expand": "true"
+	},
+	{
+		"id": 579,
+		"children": [{
+				"id": 580,
+				"value": 220100,
+				"label": "长春市",
+				"children": [{
+						"value": 220102,
+						"label": "南关区"
+					},
+					{
+						"value": 220103,
+						"label": "宽城区"
+					},
+					{
+						"value": 220104,
+						"label": "朝阳区"
+					},
+					{
+						"value": 220105,
+						"label": "二道区"
+					},
+					{
+						"value": 220106,
+						"label": "绿园区"
+					},
+					{
+						"value": 220112,
+						"label": "双阳区"
+					},
+					{
+						"value": 220113,
+						"label": "九台区"
+					},
+					{
+						"value": 220182,
+						"label": "榆树市"
+					},
+					{
+						"value": 220183,
+						"label": "德惠市"
+					},
+					{
+						"value": 220122,
+						"label": "农安县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 591,
+				"value": 220200,
+				"label": "吉林市",
+				"children": [{
+						"value": 220204,
+						"label": "船营区"
+					},
+					{
+						"value": 220202,
+						"label": "昌邑区"
+					},
+					{
+						"value": 220203,
+						"label": "龙潭区"
+					},
+					{
+						"value": 220211,
+						"label": "丰满区"
+					},
+					{
+						"value": 220281,
+						"label": "蛟河市"
+					},
+					{
+						"value": 220282,
+						"label": "桦甸市"
+					},
+					{
+						"value": 220283,
+						"label": "舒兰市"
+					},
+					{
+						"value": 220284,
+						"label": "磐石市"
+					},
+					{
+						"value": 220221,
+						"label": "永吉县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 601,
+				"value": 220300,
+				"label": "四平市",
+				"children": [{
+						"value": 220302,
+						"label": "铁西区"
+					},
+					{
+						"value": 220303,
+						"label": "铁东区"
+					},
+					{
+						"value": 220381,
+						"label": "公主岭市"
+					},
+					{
+						"value": 220382,
+						"label": "双辽市"
+					},
+					{
+						"value": 220322,
+						"label": "梨树县"
+					},
+					{
+						"value": 220323,
+						"label": "伊通满族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 608,
+				"value": 220400,
+				"label": "辽源市",
+				"children": [{
+						"value": 220402,
+						"label": "龙山区"
+					},
+					{
+						"value": 220403,
+						"label": "西安区"
+					},
+					{
+						"value": 220421,
+						"label": "东丰县"
+					},
+					{
+						"value": 220422,
+						"label": "东辽县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 613,
+				"value": 220500,
+				"label": "通化市",
+				"children": [{
+						"value": 220502,
+						"label": "东昌区"
+					},
+					{
+						"value": 220503,
+						"label": "二道江区"
+					},
+					{
+						"value": 220581,
+						"label": "梅河口市"
+					},
+					{
+						"value": 220582,
+						"label": "集安市"
+					},
+					{
+						"value": 220521,
+						"label": "通化县"
+					},
+					{
+						"value": 220523,
+						"label": "辉南县"
+					},
+					{
+						"value": 220524,
+						"label": "柳河县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 621,
+				"value": 220600,
+				"label": "白山市",
+				"children": [{
+						"value": 220602,
+						"label": "浑江区"
+					},
+					{
+						"value": 220605,
+						"label": "江源区"
+					},
+					{
+						"value": 220681,
+						"label": "临江市"
+					},
+					{
+						"value": 220621,
+						"label": "抚松县"
+					},
+					{
+						"value": 220622,
+						"label": "靖宇县"
+					},
+					{
+						"value": 220623,
+						"label": "长白朝鲜族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 628,
+				"value": 220700,
+				"label": "松原市",
+				"children": [{
+						"value": 220702,
+						"label": "宁江区"
+					},
+					{
+						"value": 220781,
+						"label": "扶余市"
+					},
+					{
+						"value": 220722,
+						"label": "长岭县"
+					},
+					{
+						"value": 220723,
+						"label": "乾安县"
+					},
+					{
+						"value": 220721,
+						"label": "前郭尔罗斯蒙古族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 634,
+				"value": 220800,
+				"label": "白城市",
+				"children": [{
+						"value": 220802,
+						"label": "洮北区"
+					},
+					{
+						"value": 220881,
+						"label": "洮南市"
+					},
+					{
+						"value": 220882,
+						"label": "大安市"
+					},
+					{
+						"value": 220821,
+						"label": "镇赉县"
+					},
+					{
+						"value": 220822,
+						"label": "通榆县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 640,
+				"value": 222400,
+				"label": "延边朝鲜族自治州",
+				"children": [{
+						"value": 222401,
+						"label": "延吉市"
+					},
+					{
+						"value": 222402,
+						"label": "图们市"
+					},
+					{
+						"value": 222403,
+						"label": "敦化市"
+					},
+					{
+						"value": 222404,
+						"label": "珲春市"
+					},
+					{
+						"value": 222405,
+						"label": "龙井市"
+					},
+					{
+						"value": 222406,
+						"label": "和龙市"
+					},
+					{
+						"value": 222424,
+						"label": "汪清县"
+					},
+					{
+						"value": 222426,
+						"label": "安图县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 220000,
+		"label": "吉林省",
+		"expand": "true"
+	},
+	{
+		"id": 649,
+		"children": [{
+				"id": 650,
+				"value": 230100,
+				"label": "哈尔滨市",
+				"children": [{
+						"value": 230109,
+						"label": "松北区"
+					},
+					{
+						"value": 230102,
+						"label": "道里区"
+					},
+					{
+						"value": 230103,
+						"label": "南岗区"
+					},
+					{
+						"value": 230104,
+						"label": "道外区"
+					},
+					{
+						"value": 230108,
+						"label": "平房区"
+					},
+					{
+						"value": 230110,
+						"label": "香坊区"
+					},
+					{
+						"value": 230111,
+						"label": "呼兰区"
+					},
+					{
+						"value": 230112,
+						"label": "阿城区"
+					},
+					{
+						"value": 230113,
+						"label": "双城区"
+					},
+					{
+						"value": 230183,
+						"label": "尚志市"
+					},
+					{
+						"value": 230184,
+						"label": "五常市"
+					},
+					{
+						"value": 230123,
+						"label": "依兰县"
+					},
+					{
+						"value": 230124,
+						"label": "方正县"
+					},
+					{
+						"value": 230125,
+						"label": "宾县"
+					},
+					{
+						"value": 230126,
+						"label": "巴彦县"
+					},
+					{
+						"value": 230127,
+						"label": "木兰县"
+					},
+					{
+						"value": 230128,
+						"label": "通河县"
+					},
+					{
+						"value": 230129,
+						"label": "延寿县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 669,
+				"value": 230200,
+				"label": "齐齐哈尔市",
+				"children": [{
+						"value": 230203,
+						"label": "建华区"
+					},
+					{
+						"value": 230202,
+						"label": "龙沙区"
+					},
+					{
+						"value": 230204,
+						"label": "铁锋区"
+					},
+					{
+						"value": 230205,
+						"label": "昂昂溪区"
+					},
+					{
+						"value": 230206,
+						"label": "富拉尔基区"
+					},
+					{
+						"value": 230207,
+						"label": "碾子山区"
+					},
+					{
+						"value": 230208,
+						"label": "梅里斯达斡尔族区"
+					},
+					{
+						"value": 230281,
+						"label": "讷河市"
+					},
+					{
+						"value": 230221,
+						"label": "龙江县"
+					},
+					{
+						"value": 230223,
+						"label": "依安县"
+					},
+					{
+						"value": 230224,
+						"label": "泰来县"
+					},
+					{
+						"value": 230225,
+						"label": "甘南县"
+					},
+					{
+						"value": 230227,
+						"label": "富裕县"
+					},
+					{
+						"value": 230229,
+						"label": "克山县"
+					},
+					{
+						"value": 230230,
+						"label": "克东县"
+					},
+					{
+						"value": 230231,
+						"label": "拜泉县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 686,
+				"value": 230300,
+				"label": "鸡西市",
+				"children": [{
+						"value": 230302,
+						"label": "鸡冠区"
+					},
+					{
+						"value": 230303,
+						"label": "恒山区"
+					},
+					{
+						"value": 230304,
+						"label": "滴道区"
+					},
+					{
+						"value": 230305,
+						"label": "梨树区"
+					},
+					{
+						"value": 230306,
+						"label": "城子河区"
+					},
+					{
+						"value": 230307,
+						"label": "麻山区"
+					},
+					{
+						"value": 230381,
+						"label": "虎林市"
+					},
+					{
+						"value": 230382,
+						"label": "密山市"
+					},
+					{
+						"value": 230321,
+						"label": "鸡东县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 696,
+				"value": 230400,
+				"label": "鹤岗市",
+				"children": [{
+						"value": 230402,
+						"label": "向阳区"
+					},
+					{
+						"value": 230403,
+						"label": "工农区"
+					},
+					{
+						"value": 230404,
+						"label": "南山区"
+					},
+					{
+						"value": 230405,
+						"label": "兴安区"
+					},
+					{
+						"value": 230406,
+						"label": "东山区"
+					},
+					{
+						"value": 230407,
+						"label": "兴山区"
+					},
+					{
+						"value": 230421,
+						"label": "萝北县"
+					},
+					{
+						"value": 230422,
+						"label": "绥滨县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 705,
+				"value": 230500,
+				"label": "双鸭山市",
+				"children": [{
+						"value": 230502,
+						"label": "尖山区"
+					},
+					{
+						"value": 230503,
+						"label": "岭东区"
+					},
+					{
+						"value": 230505,
+						"label": "四方台区"
+					},
+					{
+						"value": 230506,
+						"label": "宝山区"
+					},
+					{
+						"value": 230521,
+						"label": "集贤县"
+					},
+					{
+						"value": 230522,
+						"label": "友谊县"
+					},
+					{
+						"value": 230523,
+						"label": "宝清县"
+					},
+					{
+						"value": 230524,
+						"label": "饶河县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 714,
+				"value": 230600,
+				"label": "大庆市",
+				"children": [{
+						"value": 230602,
+						"label": "萨尔图区"
+					},
+					{
+						"value": 230603,
+						"label": "龙凤区"
+					},
+					{
+						"value": 230604,
+						"label": "让胡路区"
+					},
+					{
+						"value": 230605,
+						"label": "红岗区"
+					},
+					{
+						"value": 230606,
+						"label": "大同区"
+					},
+					{
+						"value": 230621,
+						"label": "肇州县"
+					},
+					{
+						"value": 230622,
+						"label": "肇源县"
+					},
+					{
+						"value": 230623,
+						"label": "林甸县"
+					},
+					{
+						"value": 230624,
+						"label": "杜尔伯特蒙古族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 724,
+				"value": 230700,
+				"label": "伊春市",
+				"children": [{
+						"value": 230702,
+						"label": "伊春区"
+					},
+					{
+						"value": 230703,
+						"label": "南岔区"
+					},
+					{
+						"value": 230704,
+						"label": "友好区"
+					},
+					{
+						"value": 230705,
+						"label": "西林区"
+					},
+					{
+						"value": 230706,
+						"label": "翠峦区"
+					},
+					{
+						"value": 230707,
+						"label": "新青区"
+					},
+					{
+						"value": 230708,
+						"label": "美溪区"
+					},
+					{
+						"value": 230709,
+						"label": "金山屯区"
+					},
+					{
+						"value": 230710,
+						"label": "五营区"
+					},
+					{
+						"value": 230711,
+						"label": "乌马河区"
+					},
+					{
+						"value": 230712,
+						"label": "汤旺河区"
+					},
+					{
+						"value": 230713,
+						"label": "带岭区"
+					},
+					{
+						"value": 230714,
+						"label": "乌伊岭区"
+					},
+					{
+						"value": 230715,
+						"label": "红星区"
+					},
+					{
+						"value": 230716,
+						"label": "上甘岭区"
+					},
+					{
+						"value": 230781,
+						"label": "铁力市"
+					},
+					{
+						"value": 230722,
+						"label": "嘉荫县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 742,
+				"value": 230800,
+				"label": "佳木斯市",
+				"children": [{
+						"value": 230804,
+						"label": "前进区"
+					},
+					{
+						"value": 230803,
+						"label": "向阳区"
+					},
+					{
+						"value": 230805,
+						"label": "东风区"
+					},
+					{
+						"value": 230811,
+						"label": "郊区"
+					},
+					{
+						"value": 230881,
+						"label": "同江市"
+					},
+					{
+						"value": 230882,
+						"label": "富锦市"
+					},
+					{
+						"value": 230883,
+						"label": "抚远市"
+					},
+					{
+						"value": 230822,
+						"label": "桦南县"
+					},
+					{
+						"value": 230826,
+						"label": "桦川县"
+					},
+					{
+						"value": 230828,
+						"label": "汤原县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 753,
+				"value": 230900,
+				"label": "七台河市",
+				"children": [{
+						"value": 230903,
+						"label": "桃山区"
+					},
+					{
+						"value": 230902,
+						"label": "新兴区"
+					},
+					{
+						"value": 230904,
+						"label": "茄子河区"
+					},
+					{
+						"value": 230921,
+						"label": "勃利县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 758,
+				"value": 231000,
+				"label": "牡丹江市",
+				"children": [{
+						"value": 231002,
+						"label": "东安区"
+					},
+					{
+						"value": 231003,
+						"label": "阳明区"
+					},
+					{
+						"value": 231004,
+						"label": "爱民区"
+					},
+					{
+						"value": 231005,
+						"label": "西安区"
+					},
+					{
+						"value": 231081,
+						"label": "绥芬河市"
+					},
+					{
+						"value": 231083,
+						"label": "海林市"
+					},
+					{
+						"value": 231084,
+						"label": "宁安市"
+					},
+					{
+						"value": 231085,
+						"label": "穆棱市"
+					},
+					{
+						"value": 231086,
+						"label": "东宁市"
+					},
+					{
+						"value": 231025,
+						"label": "林口县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 769,
+				"value": 231100,
+				"label": "黑河市",
+				"children": [{
+						"value": 231102,
+						"label": "爱辉区"
+					},
+					{
+						"value": 231181,
+						"label": "北安市"
+					},
+					{
+						"value": 231182,
+						"label": "五大连池市"
+					},
+					{
+						"value": 231121,
+						"label": "嫩江县"
+					},
+					{
+						"value": 231123,
+						"label": "逊克县"
+					},
+					{
+						"value": 231124,
+						"label": "孙吴县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 776,
+				"value": 231200,
+				"label": "绥化市",
+				"children": [{
+						"value": 231202,
+						"label": "北林区"
+					},
+					{
+						"value": 231281,
+						"label": "安达市"
+					},
+					{
+						"value": 231282,
+						"label": "肇东市"
+					},
+					{
+						"value": 231283,
+						"label": "海伦市"
+					},
+					{
+						"value": 231221,
+						"label": "望奎县"
+					},
+					{
+						"value": 231222,
+						"label": "兰西县"
+					},
+					{
+						"value": 231223,
+						"label": "青冈县"
+					},
+					{
+						"value": 231224,
+						"label": "庆安县"
+					},
+					{
+						"value": 231225,
+						"label": "明水县"
+					},
+					{
+						"value": 231226,
+						"label": "绥棱县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 787,
+				"value": 232700,
+				"label": "大兴安岭地区",
+				"children": [{
+						"value": 232721,
+						"label": "呼玛县"
+					},
+					{
+						"value": 232722,
+						"label": "塔河县"
+					},
+					{
+						"value": 232723,
+						"label": "漠河县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 230000,
+		"label": "黑龙江省",
+		"expand": "true"
+	},
+	{
+		"id": 791,
+		"children": [{
+			"id": 792,
+			"value": 310100,
+			"label": "上海市",
+			"children": [{
+					"value": 310101,
+					"label": "黄浦区"
+				},
+				{
+					"value": 310104,
+					"label": "徐汇区"
+				},
+				{
+					"value": 310105,
+					"label": "长宁区"
+				},
+				{
+					"value": 310106,
+					"label": "静安区"
+				},
+				{
+					"value": 310107,
+					"label": "普陀区"
+				},
+				{
+					"value": 310109,
+					"label": "虹口区"
+				},
+				{
+					"value": 310110,
+					"label": "杨浦区"
+				},
+				{
+					"value": 310112,
+					"label": "闵行区"
+				},
+				{
+					"value": 310113,
+					"label": "宝山区"
+				},
+				{
+					"value": 310114,
+					"label": "嘉定区"
+				},
+				{
+					"value": 310115,
+					"label": "浦东新区"
+				},
+				{
+					"value": 310116,
+					"label": "金山区"
+				},
+				{
+					"value": 310117,
+					"label": "松江区"
+				},
+				{
+					"value": 310118,
+					"label": "青浦区"
+				},
+				{
+					"value": 310120,
+					"label": "奉贤区"
+				},
+				{
+					"value": 310151,
+					"label": "崇明区"
+				}
+			],
+			"expand": "true"
+		}],
+		"value": 310000,
+		"label": "上海市",
+		"expand": "true"
+	},
+	{
+		"id": 809,
+		"children": [{
+				"id": 810,
+				"value": 320100,
+				"label": "南京市",
+				"children": [{
+						"value": 320102,
+						"label": "玄武区"
+					},
+					{
+						"value": 320104,
+						"label": "秦淮区"
+					},
+					{
+						"value": 320105,
+						"label": "建邺区"
+					},
+					{
+						"value": 320106,
+						"label": "鼓楼区"
+					},
+					{
+						"value": 320111,
+						"label": "浦口区"
+					},
+					{
+						"value": 320113,
+						"label": "栖霞区"
+					},
+					{
+						"value": 320114,
+						"label": "雨花台区"
+					},
+					{
+						"value": 320115,
+						"label": "江宁区"
+					},
+					{
+						"value": 320116,
+						"label": "六合区"
+					},
+					{
+						"value": 320117,
+						"label": "溧水区"
+					},
+					{
+						"value": 320118,
+						"label": "高淳区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 822,
+				"value": 320200,
+				"label": "无锡市",
+				"children": [{
+						"value": 320205,
+						"label": "锡山区"
+					},
+					{
+						"value": 320206,
+						"label": "惠山区"
+					},
+					{
+						"value": 320211,
+						"label": "滨湖区"
+					},
+					{
+						"value": 320213,
+						"label": "梁溪区"
+					},
+					{
+						"value": 320214,
+						"label": "新吴区"
+					},
+					{
+						"value": 320281,
+						"label": "江阴市"
+					},
+					{
+						"value": 320282,
+						"label": "宜兴市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 830,
+				"value": 320300,
+				"label": "徐州市",
+				"children": [{
+						"value": 320303,
+						"label": "云龙区"
+					},
+					{
+						"value": 320302,
+						"label": "鼓楼区"
+					},
+					{
+						"value": 320305,
+						"label": "贾汪区"
+					},
+					{
+						"value": 320311,
+						"label": "泉山区"
+					},
+					{
+						"value": 320312,
+						"label": "铜山区"
+					},
+					{
+						"value": 320381,
+						"label": "新沂市"
+					},
+					{
+						"value": 320382,
+						"label": "邳州市"
+					},
+					{
+						"value": 320321,
+						"label": "丰县"
+					},
+					{
+						"value": 320322,
+						"label": "沛县"
+					},
+					{
+						"value": 320324,
+						"label": "睢宁县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 841,
+				"value": 320400,
+				"label": "常州市",
+				"children": [{
+						"value": 320411,
+						"label": "新北区"
+					},
+					{
+						"value": 320402,
+						"label": "天宁区"
+					},
+					{
+						"value": 320404,
+						"label": "钟楼区"
+					},
+					{
+						"value": 320412,
+						"label": "武进区"
+					},
+					{
+						"value": 320413,
+						"label": "金坛区"
+					},
+					{
+						"value": 320481,
+						"label": "溧阳市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 848,
+				"value": 320500,
+				"label": "苏州市",
+				"children": [{
+						"value": 320508,
+						"label": "姑苏区"
+					},
+					{
+						"value": 320505,
+						"label": "虎丘区"
+					},
+					{
+						"value": 320506,
+						"label": "吴中区"
+					},
+					{
+						"value": 320507,
+						"label": "相城区"
+					},
+					{
+						"value": 320509,
+						"label": "吴江区"
+					},
+					{
+						"value": 320581,
+						"label": "常熟市"
+					},
+					{
+						"value": 320582,
+						"label": "张家港市"
+					},
+					{
+						"value": 320583,
+						"label": "昆山市"
+					},
+					{
+						"value": 320585,
+						"label": "太仓市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 858,
+				"value": 320600,
+				"label": "南通市",
+				"children": [{
+						"value": 320602,
+						"label": "崇川区"
+					},
+					{
+						"value": 320611,
+						"label": "港闸区"
+					},
+					{
+						"value": 320612,
+						"label": "通州区"
+					},
+					{
+						"value": 320681,
+						"label": "启东市"
+					},
+					{
+						"value": 320682,
+						"label": "如皋市"
+					},
+					{
+						"value": 320684,
+						"label": "海门市"
+					},
+					{
+						"value": 320621,
+						"label": "海安县"
+					},
+					{
+						"value": 320623,
+						"label": "如东县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 867,
+				"value": 320700,
+				"label": "连云港市",
+				"children": [{
+						"value": 320706,
+						"label": "海州区"
+					},
+					{
+						"value": 320703,
+						"label": "连云区"
+					},
+					{
+						"value": 320707,
+						"label": "赣榆区"
+					},
+					{
+						"value": 320722,
+						"label": "东海县"
+					},
+					{
+						"value": 320723,
+						"label": "灌云县"
+					},
+					{
+						"value": 320724,
+						"label": "灌南县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 874,
+				"value": 320800,
+				"label": "淮安市",
+				"children": [{
+						"value": 320803,
+						"label": "淮安区"
+					},
+					{
+						"value": 320804,
+						"label": "淮阴区"
+					},
+					{
+						"value": 320812,
+						"label": "清江浦区"
+					},
+					{
+						"value": 320813,
+						"label": "洪泽区"
+					},
+					{
+						"value": 320826,
+						"label": "涟水县"
+					},
+					{
+						"value": 320830,
+						"label": "盱眙县"
+					},
+					{
+						"value": 320831,
+						"label": "金湖县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 882,
+				"value": 320900,
+				"label": "盐城市",
+				"children": [{
+						"value": 320902,
+						"label": "亭湖区"
+					},
+					{
+						"value": 320903,
+						"label": "盐都区"
+					},
+					{
+						"value": 320904,
+						"label": "大丰区"
+					},
+					{
+						"value": 320981,
+						"label": "东台市"
+					},
+					{
+						"value": 320921,
+						"label": "响水县"
+					},
+					{
+						"value": 320922,
+						"label": "滨海县"
+					},
+					{
+						"value": 320923,
+						"label": "阜宁县"
+					},
+					{
+						"value": 320924,
+						"label": "射阳县"
+					},
+					{
+						"value": 320925,
+						"label": "建湖县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 892,
+				"value": 321000,
+				"label": "扬州市",
+				"children": [{
+						"value": 321003,
+						"label": "邗江区"
+					},
+					{
+						"value": 321002,
+						"label": "广陵区"
+					},
+					{
+						"value": 321012,
+						"label": "江都区"
+					},
+					{
+						"value": 321081,
+						"label": "仪征市"
+					},
+					{
+						"value": 321084,
+						"label": "高邮市"
+					},
+					{
+						"value": 321023,
+						"label": "宝应县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 899,
+				"value": 321100,
+				"label": "镇江市",
+				"children": [{
+						"value": 321102,
+						"label": "京口区"
+					},
+					{
+						"value": 321111,
+						"label": "润州区"
+					},
+					{
+						"value": 321112,
+						"label": "丹徒区"
+					},
+					{
+						"value": 321181,
+						"label": "丹阳市"
+					},
+					{
+						"value": 321182,
+						"label": "扬中市"
+					},
+					{
+						"value": 321183,
+						"label": "句容市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 906,
+				"value": 321200,
+				"label": "泰州市",
+				"children": [{
+						"value": 321202,
+						"label": "海陵区"
+					},
+					{
+						"value": 321203,
+						"label": "高港区"
+					},
+					{
+						"value": 321204,
+						"label": "姜堰区"
+					},
+					{
+						"value": 321281,
+						"label": "兴化市"
+					},
+					{
+						"value": 321282,
+						"label": "靖江市"
+					},
+					{
+						"value": 321283,
+						"label": "泰兴市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 913,
+				"value": 321300,
+				"label": "宿迁市",
+				"children": [{
+						"value": 321302,
+						"label": "宿城区"
+					},
+					{
+						"value": 321311,
+						"label": "宿豫区"
+					},
+					{
+						"value": 321322,
+						"label": "沭阳县"
+					},
+					{
+						"value": 321323,
+						"label": "泗阳县"
+					},
+					{
+						"value": 321324,
+						"label": "泗洪县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 320000,
+		"label": "江苏省",
+		"expand": "true"
+	},
+	{
+		"id": 919,
+		"children": [{
+				"id": 920,
+				"value": 330100,
+				"label": "杭州市",
+				"children": [{
+						"value": 330105,
+						"label": "拱墅区"
+					},
+					{
+						"value": 330102,
+						"label": "上城区"
+					},
+					{
+						"value": 330103,
+						"label": "下城区"
+					},
+					{
+						"value": 330104,
+						"label": "江干区"
+					},
+					{
+						"value": 330106,
+						"label": "西湖区"
+					},
+					{
+						"value": 330108,
+						"label": "滨江区"
+					},
+					{
+						"value": 330109,
+						"label": "萧山区"
+					},
+					{
+						"value": 330110,
+						"label": "余杭区"
+					},
+					{
+						"value": 330111,
+						"label": "富阳区"
+					},
+					{
+						"value": 330182,
+						"label": "建德市"
+					},
+					{
+						"value": 330185,
+						"label": "临安市"
+					},
+					{
+						"value": 330122,
+						"label": "桐庐县"
+					},
+					{
+						"value": 330127,
+						"label": "淳安县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 934,
+				"value": 330200,
+				"label": "宁波市",
+				"children": [{
+						"value": 330203,
+						"label": "海曙区"
+					},
+					{
+						"value": 330205,
+						"label": "江北区"
+					},
+					{
+						"value": 330206,
+						"label": "北仑区"
+					},
+					{
+						"value": 330211,
+						"label": "镇海区"
+					},
+					{
+						"value": 330212,
+						"label": "鄞州区"
+					},
+					{
+						"value": 330213,
+						"label": "奉化区"
+					},
+					{
+						"value": 330281,
+						"label": "余姚市"
+					},
+					{
+						"value": 330282,
+						"label": "慈溪市"
+					},
+					{
+						"value": 330225,
+						"label": "象山县"
+					},
+					{
+						"value": 330226,
+						"label": "宁海县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 945,
+				"value": 330300,
+				"label": "温州市",
+				"children": [{
+						"value": 330302,
+						"label": "鹿城区"
+					},
+					{
+						"value": 330303,
+						"label": "龙湾区"
+					},
+					{
+						"value": 330304,
+						"label": "瓯海区"
+					},
+					{
+						"value": 330305,
+						"label": "洞头区"
+					},
+					{
+						"value": 330381,
+						"label": "瑞安市"
+					},
+					{
+						"value": 330382,
+						"label": "乐清市"
+					},
+					{
+						"value": 330324,
+						"label": "永嘉县"
+					},
+					{
+						"value": 330326,
+						"label": "平阳县"
+					},
+					{
+						"value": 330327,
+						"label": "苍南县"
+					},
+					{
+						"value": 330328,
+						"label": "文成县"
+					},
+					{
+						"value": 330329,
+						"label": "泰顺县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 957,
+				"value": 330400,
+				"label": "嘉兴市",
+				"children": [{
+						"value": 330402,
+						"label": "南湖区"
+					},
+					{
+						"value": 330411,
+						"label": "秀洲区"
+					},
+					{
+						"value": 330481,
+						"label": "海宁市"
+					},
+					{
+						"value": 330482,
+						"label": "平湖市"
+					},
+					{
+						"value": 330483,
+						"label": "桐乡市"
+					},
+					{
+						"value": 330421,
+						"label": "嘉善县"
+					},
+					{
+						"value": 330424,
+						"label": "海盐县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 965,
+				"value": 330500,
+				"label": "湖州市",
+				"children": [{
+						"value": 330502,
+						"label": "吴兴区"
+					},
+					{
+						"value": 330503,
+						"label": "南浔区"
+					},
+					{
+						"value": 330521,
+						"label": "德清县"
+					},
+					{
+						"value": 330522,
+						"label": "长兴县"
+					},
+					{
+						"value": 330523,
+						"label": "安吉县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 971,
+				"value": 330600,
+				"label": "绍兴市",
+				"children": [{
+						"value": 330602,
+						"label": "越城区"
+					},
+					{
+						"value": 330603,
+						"label": "柯桥区"
+					},
+					{
+						"value": 330604,
+						"label": "上虞区"
+					},
+					{
+						"value": 330681,
+						"label": "诸暨市"
+					},
+					{
+						"value": 330683,
+						"label": "嵊州市"
+					},
+					{
+						"value": 330624,
+						"label": "新昌县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 978,
+				"value": 330700,
+				"label": "金华市",
+				"children": [{
+						"value": 330702,
+						"label": "婺城区"
+					},
+					{
+						"value": 330703,
+						"label": "金东区"
+					},
+					{
+						"value": 330781,
+						"label": "兰溪市"
+					},
+					{
+						"value": 330782,
+						"label": "义乌市"
+					},
+					{
+						"value": 330783,
+						"label": "东阳市"
+					},
+					{
+						"value": 330784,
+						"label": "永康市"
+					},
+					{
+						"value": 330723,
+						"label": "武义县"
+					},
+					{
+						"value": 330726,
+						"label": "浦江县"
+					},
+					{
+						"value": 330727,
+						"label": "磐安县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 988,
+				"value": 330800,
+				"label": "衢州市",
+				"children": [{
+						"value": 330802,
+						"label": "柯城区"
+					},
+					{
+						"value": 330803,
+						"label": "衢江区"
+					},
+					{
+						"value": 330881,
+						"label": "江山市"
+					},
+					{
+						"value": 330822,
+						"label": "常山县"
+					},
+					{
+						"value": 330824,
+						"label": "开化县"
+					},
+					{
+						"value": 330825,
+						"label": "龙游县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 995,
+				"value": 330900,
+				"label": "舟山市",
+				"children": [{
+						"value": 330902,
+						"label": "定海区"
+					},
+					{
+						"value": 330903,
+						"label": "普陀区"
+					},
+					{
+						"value": 330921,
+						"label": "岱山县"
+					},
+					{
+						"value": 330922,
+						"label": "嵊泗县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1000,
+				"value": 331000,
+				"label": "台州市",
+				"children": [{
+						"value": 331002,
+						"label": "椒江区"
+					},
+					{
+						"value": 331003,
+						"label": "黄岩区"
+					},
+					{
+						"value": 331004,
+						"label": "路桥区"
+					},
+					{
+						"value": 331081,
+						"label": "温岭市"
+					},
+					{
+						"value": 331082,
+						"label": "临海市"
+					},
+					{
+						"value": 331083,
+						"label": "玉环市"
+					},
+					{
+						"value": 331022,
+						"label": "三门县"
+					},
+					{
+						"value": 331023,
+						"label": "天台县"
+					},
+					{
+						"value": 331024,
+						"label": "仙居县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1010,
+				"value": 331100,
+				"label": "丽水市",
+				"children": [{
+						"value": 331102,
+						"label": "莲都区"
+					},
+					{
+						"value": 331181,
+						"label": "龙泉市"
+					},
+					{
+						"value": 331121,
+						"label": "青田县"
+					},
+					{
+						"value": 331122,
+						"label": "缙云县"
+					},
+					{
+						"value": 331123,
+						"label": "遂昌县"
+					},
+					{
+						"value": 331124,
+						"label": "松阳县"
+					},
+					{
+						"value": 331125,
+						"label": "云和县"
+					},
+					{
+						"value": 331126,
+						"label": "庆元县"
+					},
+					{
+						"value": 331127,
+						"label": "景宁畲族自治县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 330000,
+		"label": "浙江省",
+		"expand": "true"
+	},
+	{
+		"id": 1020,
+		"children": [{
+				"id": 1021,
+				"value": 340100,
+				"label": "合肥市",
+				"children": [{
+						"value": 340104,
+						"label": "蜀山区"
+					},
+					{
+						"value": 340102,
+						"label": "瑶海区"
+					},
+					{
+						"value": 340103,
+						"label": "庐阳区"
+					},
+					{
+						"value": 340111,
+						"label": "包河区"
+					},
+					{
+						"value": 340181,
+						"label": "巢湖市"
+					},
+					{
+						"value": 340121,
+						"label": "长丰县"
+					},
+					{
+						"value": 340122,
+						"label": "肥东县"
+					},
+					{
+						"value": 340123,
+						"label": "肥西县"
+					},
+					{
+						"value": 340124,
+						"label": "庐江县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1031,
+				"value": 340200,
+				"label": "芜湖市",
+				"children": [{
+						"value": 340207,
+						"label": "鸠江区"
+					},
+					{
+						"value": 340202,
+						"label": "镜湖区"
+					},
+					{
+						"value": 340203,
+						"label": "弋江区"
+					},
+					{
+						"value": 340208,
+						"label": "三山区"
+					},
+					{
+						"value": 340221,
+						"label": "芜湖县"
+					},
+					{
+						"value": 340222,
+						"label": "繁昌县"
+					},
+					{
+						"value": 340223,
+						"label": "南陵县"
+					},
+					{
+						"value": 340225,
+						"label": "无为县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1040,
+				"value": 340300,
+				"label": "蚌埠市",
+				"children": [{
+						"value": 340303,
+						"label": "蚌山区"
+					},
+					{
+						"value": 340302,
+						"label": "龙子湖区"
+					},
+					{
+						"value": 340304,
+						"label": "禹会区"
+					},
+					{
+						"value": 340311,
+						"label": "淮上区"
+					},
+					{
+						"value": 340321,
+						"label": "怀远县"
+					},
+					{
+						"value": 340322,
+						"label": "五河县"
+					},
+					{
+						"value": 340323,
+						"label": "固镇县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1048,
+				"value": 340400,
+				"label": "淮南市",
+				"children": [{
+						"value": 340403,
+						"label": "田家庵区"
+					},
+					{
+						"value": 340402,
+						"label": "大通区"
+					},
+					{
+						"value": 340404,
+						"label": "谢家集区"
+					},
+					{
+						"value": 340405,
+						"label": "八公山区"
+					},
+					{
+						"value": 340406,
+						"label": "潘集区"
+					},
+					{
+						"value": 340421,
+						"label": "凤台县"
+					},
+					{
+						"value": 340422,
+						"label": "寿县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1056,
+				"value": 340500,
+				"label": "马鞍山市",
+				"children": [{
+						"value": 340504,
+						"label": "雨山区"
+					},
+					{
+						"value": 340503,
+						"label": "花山区"
+					},
+					{
+						"value": 340506,
+						"label": "博望区"
+					},
+					{
+						"value": 340521,
+						"label": "当涂县"
+					},
+					{
+						"value": 340522,
+						"label": "含山县"
+					},
+					{
+						"value": 340523,
+						"label": "和县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1063,
+				"value": 340600,
+				"label": "淮北市",
+				"children": [{
+						"value": 340603,
+						"label": "相山区"
+					},
+					{
+						"value": 340602,
+						"label": "杜集区"
+					},
+					{
+						"value": 340604,
+						"label": "烈山区"
+					},
+					{
+						"value": 340621,
+						"label": "濉溪县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1068,
+				"value": 340700,
+				"label": "铜陵市",
+				"children": [{
+						"value": 340705,
+						"label": "铜官区"
+					},
+					{
+						"value": 340706,
+						"label": "义安区"
+					},
+					{
+						"value": 340711,
+						"label": "郊区"
+					},
+					{
+						"value": 340722,
+						"label": "枞阳县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1073,
+				"value": 340800,
+				"label": "安庆市",
+				"children": [{
+						"value": 340803,
+						"label": "大观区"
+					},
+					{
+						"value": 340802,
+						"label": "迎江区"
+					},
+					{
+						"value": 340811,
+						"label": "宜秀区"
+					},
+					{
+						"value": 340881,
+						"label": "桐城市"
+					},
+					{
+						"value": 340822,
+						"label": "怀宁县"
+					},
+					{
+						"value": 340824,
+						"label": "潜山县"
+					},
+					{
+						"value": 340825,
+						"label": "太湖县"
+					},
+					{
+						"value": 340826,
+						"label": "宿松县"
+					},
+					{
+						"value": 340827,
+						"label": "望江县"
+					},
+					{
+						"value": 340828,
+						"label": "岳西县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1084,
+				"value": 341000,
+				"label": "黄山市",
+				"children": [{
+						"value": 341002,
+						"label": "屯溪区"
+					},
+					{
+						"value": 341003,
+						"label": "黄山区"
+					},
+					{
+						"value": 341004,
+						"label": "徽州区"
+					},
+					{
+						"value": 341021,
+						"label": "歙县"
+					},
+					{
+						"value": 341022,
+						"label": "休宁县"
+					},
+					{
+						"value": 341023,
+						"label": "黟县"
+					},
+					{
+						"value": 341024,
+						"label": "祁门县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1092,
+				"value": 341100,
+				"label": "滁州市",
+				"children": [{
+						"value": 341102,
+						"label": "琅琊区"
+					},
+					{
+						"value": 341103,
+						"label": "南谯区"
+					},
+					{
+						"value": 341181,
+						"label": "天长市"
+					},
+					{
+						"value": 341182,
+						"label": "明光市"
+					},
+					{
+						"value": 341122,
+						"label": "来安县"
+					},
+					{
+						"value": 341124,
+						"label": "全椒县"
+					},
+					{
+						"value": 341125,
+						"label": "定远县"
+					},
+					{
+						"value": 341126,
+						"label": "凤阳县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1101,
+				"value": 341200,
+				"label": "阜阳市",
+				"children": [{
+						"value": 341202,
+						"label": "颍州区"
+					},
+					{
+						"value": 341203,
+						"label": "颍东区"
+					},
+					{
+						"value": 341204,
+						"label": "颍泉区"
+					},
+					{
+						"value": 341282,
+						"label": "界首市"
+					},
+					{
+						"value": 341221,
+						"label": "临泉县"
+					},
+					{
+						"value": 341222,
+						"label": "太和县"
+					},
+					{
+						"value": 341225,
+						"label": "阜南县"
+					},
+					{
+						"value": 341226,
+						"label": "颍上县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1110,
+				"value": 341300,
+				"label": "宿州市",
+				"children": [{
+						"value": 341302,
+						"label": "埇桥区"
+					},
+					{
+						"value": 341321,
+						"label": "砀山县"
+					},
+					{
+						"value": 341322,
+						"label": "萧县"
+					},
+					{
+						"value": 341323,
+						"label": "灵璧县"
+					},
+					{
+						"value": 341324,
+						"label": "泗县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1116,
+				"value": 341500,
+				"label": "六安市",
+				"children": [{
+						"value": 341502,
+						"label": "金安区"
+					},
+					{
+						"value": 341503,
+						"label": "裕安区"
+					},
+					{
+						"value": 341504,
+						"label": "叶集区"
+					},
+					{
+						"value": 341522,
+						"label": "霍邱县"
+					},
+					{
+						"value": 341523,
+						"label": "舒城县"
+					},
+					{
+						"value": 341524,
+						"label": "金寨县"
+					},
+					{
+						"value": 341525,
+						"label": "霍山县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1124,
+				"value": 341600,
+				"label": "亳州市",
+				"children": [{
+						"value": 341602,
+						"label": "谯城区"
+					},
+					{
+						"value": 341621,
+						"label": "涡阳县"
+					},
+					{
+						"value": 341622,
+						"label": "蒙城县"
+					},
+					{
+						"value": 341623,
+						"label": "利辛县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1129,
+				"value": 341700,
+				"label": "池州市",
+				"children": [{
+						"value": 341702,
+						"label": "贵池区"
+					},
+					{
+						"value": 341721,
+						"label": "东至县"
+					},
+					{
+						"value": 341722,
+						"label": "石台县"
+					},
+					{
+						"value": 341723,
+						"label": "青阳县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1134,
+				"value": 341800,
+				"label": "宣城市",
+				"children": [{
+						"value": 341802,
+						"label": "宣州区"
+					},
+					{
+						"value": 341881,
+						"label": "宁国市"
+					},
+					{
+						"value": 341821,
+						"label": "郎溪县"
+					},
+					{
+						"value": 341822,
+						"label": "广德县"
+					},
+					{
+						"value": 341823,
+						"label": "泾县"
+					},
+					{
+						"value": 341824,
+						"label": "绩溪县"
+					},
+					{
+						"value": 341825,
+						"label": "旌德县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 340000,
+		"label": "安徽省",
+		"expand": "true"
+	},
+	{
+		"id": 1142,
+		"children": [{
+				"id": 1143,
+				"value": 350100,
+				"label": "福州市",
+				"children": [{
+						"value": 350102,
+						"label": "鼓楼区"
+					},
+					{
+						"value": 350103,
+						"label": "台江区"
+					},
+					{
+						"value": 350104,
+						"label": "仓山区"
+					},
+					{
+						"value": 350105,
+						"label": "马尾区"
+					},
+					{
+						"value": 350111,
+						"label": "晋安区"
+					},
+					{
+						"value": 350181,
+						"label": "福清市"
+					},
+					{
+						"value": 350182,
+						"label": "长乐市"
+					},
+					{
+						"value": 350121,
+						"label": "闽侯县"
+					},
+					{
+						"value": 350122,
+						"label": "连江县"
+					},
+					{
+						"value": 350123,
+						"label": "罗源县"
+					},
+					{
+						"value": 350124,
+						"label": "闽清县"
+					},
+					{
+						"value": 350125,
+						"label": "永泰县"
+					},
+					{
+						"value": 350128,
+						"label": "平潭县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1157,
+				"value": 350200,
+				"label": "厦门市",
+				"children": [{
+						"value": 350203,
+						"label": "思明区"
+					},
+					{
+						"value": 350205,
+						"label": "海沧区"
+					},
+					{
+						"value": 350206,
+						"label": "湖里区"
+					},
+					{
+						"value": 350211,
+						"label": "集美区"
+					},
+					{
+						"value": 350212,
+						"label": "同安区"
+					},
+					{
+						"value": 350213,
+						"label": "翔安区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1164,
+				"value": 350300,
+				"label": "莆田市",
+				"children": [{
+						"value": 350302,
+						"label": "城厢区"
+					},
+					{
+						"value": 350303,
+						"label": "涵江区"
+					},
+					{
+						"value": 350304,
+						"label": "荔城区"
+					},
+					{
+						"value": 350305,
+						"label": "秀屿区"
+					},
+					{
+						"value": 350322,
+						"label": "仙游县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1170,
+				"value": 350400,
+				"label": "三明市",
+				"children": [{
+						"value": 350402,
+						"label": "梅列区"
+					},
+					{
+						"value": 350403,
+						"label": "三元区"
+					},
+					{
+						"value": 350481,
+						"label": "永安市"
+					},
+					{
+						"value": 350421,
+						"label": "明溪县"
+					},
+					{
+						"value": 350423,
+						"label": "清流县"
+					},
+					{
+						"value": 350424,
+						"label": "宁化县"
+					},
+					{
+						"value": 350425,
+						"label": "大田县"
+					},
+					{
+						"value": 350426,
+						"label": "尤溪县"
+					},
+					{
+						"value": 350427,
+						"label": "沙县"
+					},
+					{
+						"value": 350428,
+						"label": "将乐县"
+					},
+					{
+						"value": 350429,
+						"label": "泰宁县"
+					},
+					{
+						"value": 350430,
+						"label": "建宁县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1183,
+				"value": 350500,
+				"label": "泉州市",
+				"children": [{
+						"value": 350503,
+						"label": "丰泽区"
+					},
+					{
+						"value": 350502,
+						"label": "鲤城区"
+					},
+					{
+						"value": 350504,
+						"label": "洛江区"
+					},
+					{
+						"value": 350505,
+						"label": "泉港区"
+					},
+					{
+						"value": 350581,
+						"label": "石狮市"
+					},
+					{
+						"value": 350582,
+						"label": "晋江市"
+					},
+					{
+						"value": 350583,
+						"label": "南安市"
+					},
+					{
+						"value": 350521,
+						"label": "惠安县"
+					},
+					{
+						"value": 350524,
+						"label": "安溪县"
+					},
+					{
+						"value": 350525,
+						"label": "永春县"
+					},
+					{
+						"value": 350526,
+						"label": "德化县"
+					},
+					{
+						"value": 350527,
+						"label": "金门县☆"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1196,
+				"value": 350600,
+				"label": "漳州市",
+				"children": [{
+						"value": 350603,
+						"label": "龙文区"
+					},
+					{
+						"value": 350602,
+						"label": "芗城区"
+					},
+					{
+						"value": 350681,
+						"label": "龙海市"
+					},
+					{
+						"value": 350622,
+						"label": "云霄县"
+					},
+					{
+						"value": 350623,
+						"label": "漳浦县"
+					},
+					{
+						"value": 350624,
+						"label": "诏安县"
+					},
+					{
+						"value": 350625,
+						"label": "长泰县"
+					},
+					{
+						"value": 350626,
+						"label": "东山县"
+					},
+					{
+						"value": 350627,
+						"label": "南靖县"
+					},
+					{
+						"value": 350628,
+						"label": "平和县"
+					},
+					{
+						"value": 350629,
+						"label": "华安县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1208,
+				"value": 350700,
+				"label": "南平市",
+				"children": [{
+						"value": 350703,
+						"label": "建阳区"
+					},
+					{
+						"value": 350702,
+						"label": "延平区"
+					},
+					{
+						"value": 350781,
+						"label": "邵武市"
+					},
+					{
+						"value": 350782,
+						"label": "武夷山市"
+					},
+					{
+						"value": 350783,
+						"label": "建瓯市"
+					},
+					{
+						"value": 350721,
+						"label": "顺昌县"
+					},
+					{
+						"value": 350722,
+						"label": "浦城县"
+					},
+					{
+						"value": 350723,
+						"label": "光泽县"
+					},
+					{
+						"value": 350724,
+						"label": "松溪县"
+					},
+					{
+						"value": 350725,
+						"label": "政和县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1219,
+				"value": 350800,
+				"label": "龙岩市",
+				"children": [{
+						"value": 350802,
+						"label": "新罗区"
+					},
+					{
+						"value": 350803,
+						"label": "永定区"
+					},
+					{
+						"value": 350881,
+						"label": "漳平市"
+					},
+					{
+						"value": 350821,
+						"label": "长汀县"
+					},
+					{
+						"value": 350823,
+						"label": "上杭县"
+					},
+					{
+						"value": 350824,
+						"label": "武平县"
+					},
+					{
+						"value": 350825,
+						"label": "连城县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1227,
+				"value": 350900,
+				"label": "宁德市",
+				"children": [{
+						"value": 350902,
+						"label": "蕉城区"
+					},
+					{
+						"value": 350981,
+						"label": "福安市"
+					},
+					{
+						"value": 350982,
+						"label": "福鼎市"
+					},
+					{
+						"value": 350921,
+						"label": "霞浦县"
+					},
+					{
+						"value": 350922,
+						"label": "古田县"
+					},
+					{
+						"value": 350923,
+						"label": "屏南县"
+					},
+					{
+						"value": 350924,
+						"label": "寿宁县"
+					},
+					{
+						"value": 350925,
+						"label": "周宁县"
+					},
+					{
+						"value": 350926,
+						"label": "柘荣县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 350000,
+		"label": "福建省",
+		"expand": "true"
+	},
+	{
+		"id": 1237,
+		"children": [{
+				"id": 1238,
+				"value": 360100,
+				"label": "南昌市",
+				"children": [{
+						"value": 360102,
+						"label": "东湖区"
+					},
+					{
+						"value": 360103,
+						"label": "西湖区"
+					},
+					{
+						"value": 360104,
+						"label": "青云谱区"
+					},
+					{
+						"value": 360105,
+						"label": "湾里区"
+					},
+					{
+						"value": 360111,
+						"label": "青山湖区"
+					},
+					{
+						"value": 360112,
+						"label": "新建区"
+					},
+					{
+						"value": 360121,
+						"label": "南昌县"
+					},
+					{
+						"value": 360123,
+						"label": "安义县"
+					},
+					{
+						"value": 360124,
+						"label": "进贤县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1248,
+				"value": 360200,
+				"label": "景德镇市",
+				"children": [{
+						"value": 360202,
+						"label": "昌江区"
+					},
+					{
+						"value": 360203,
+						"label": "珠山区"
+					},
+					{
+						"value": 360281,
+						"label": "乐平市"
+					},
+					{
+						"value": 360222,
+						"label": "浮梁县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1253,
+				"value": 360300,
+				"label": "萍乡市",
+				"children": [{
+						"value": 360302,
+						"label": "安源区"
+					},
+					{
+						"value": 360313,
+						"label": "湘东区"
+					},
+					{
+						"value": 360321,
+						"label": "莲花县"
+					},
+					{
+						"value": 360322,
+						"label": "上栗县"
+					},
+					{
+						"value": 360323,
+						"label": "芦溪县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1259,
+				"value": 360400,
+				"label": "九江市",
+				"children": [{
+						"value": 360403,
+						"label": "浔阳区"
+					},
+					{
+						"value": 360402,
+						"label": "濂溪区"
+					},
+					{
+						"value": 360481,
+						"label": "瑞昌市"
+					},
+					{
+						"value": 360482,
+						"label": "共青城市"
+					},
+					{
+						"value": 360483,
+						"label": "庐山市"
+					},
+					{
+						"value": 360421,
+						"label": "九江县"
+					},
+					{
+						"value": 360423,
+						"label": "武宁县"
+					},
+					{
+						"value": 360424,
+						"label": "修水县"
+					},
+					{
+						"value": 360425,
+						"label": "永修县"
+					},
+					{
+						"value": 360426,
+						"label": "德安县"
+					},
+					{
+						"value": 360428,
+						"label": "都昌县"
+					},
+					{
+						"value": 360429,
+						"label": "湖口县"
+					},
+					{
+						"value": 360430,
+						"label": "彭泽县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1273,
+				"value": 360500,
+				"label": "新余市",
+				"children": [{
+						"value": 360502,
+						"label": "渝水区"
+					},
+					{
+						"value": 360521,
+						"label": "分宜县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1276,
+				"value": 360600,
+				"label": "鹰潭市",
+				"children": [{
+						"value": 360602,
+						"label": "月湖区"
+					},
+					{
+						"value": 360681,
+						"label": "贵溪市"
+					},
+					{
+						"value": 360622,
+						"label": "余江县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1280,
+				"value": 360700,
+				"label": "赣州市",
+				"children": [{
+						"value": 360702,
+						"label": "章贡区"
+					},
+					{
+						"value": 360703,
+						"label": "南康区"
+					},
+					{
+						"value": 360704,
+						"label": "赣县区"
+					},
+					{
+						"value": 360781,
+						"label": "瑞金市"
+					},
+					{
+						"value": 360722,
+						"label": "信丰县"
+					},
+					{
+						"value": 360723,
+						"label": "大余县"
+					},
+					{
+						"value": 360724,
+						"label": "上犹县"
+					},
+					{
+						"value": 360725,
+						"label": "崇义县"
+					},
+					{
+						"value": 360726,
+						"label": "安远县"
+					},
+					{
+						"value": 360727,
+						"label": "龙南县"
+					},
+					{
+						"value": 360728,
+						"label": "定南县"
+					},
+					{
+						"value": 360729,
+						"label": "全南县"
+					},
+					{
+						"value": 360730,
+						"label": "宁都县"
+					},
+					{
+						"value": 360731,
+						"label": "于都县"
+					},
+					{
+						"value": 360732,
+						"label": "兴国县"
+					},
+					{
+						"value": 360733,
+						"label": "会昌县"
+					},
+					{
+						"value": 360734,
+						"label": "寻乌县"
+					},
+					{
+						"value": 360735,
+						"label": "石城县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1299,
+				"value": 360800,
+				"label": "吉安市",
+				"children": [{
+						"value": 360802,
+						"label": "吉州区"
+					},
+					{
+						"value": 360803,
+						"label": "青原区"
+					},
+					{
+						"value": 360881,
+						"label": "井冈山市"
+					},
+					{
+						"value": 360821,
+						"label": "吉安县"
+					},
+					{
+						"value": 360822,
+						"label": "吉水县"
+					},
+					{
+						"value": 360823,
+						"label": "峡江县"
+					},
+					{
+						"value": 360824,
+						"label": "新干县"
+					},
+					{
+						"value": 360825,
+						"label": "永丰县"
+					},
+					{
+						"value": 360826,
+						"label": "泰和县"
+					},
+					{
+						"value": 360827,
+						"label": "遂川县"
+					},
+					{
+						"value": 360828,
+						"label": "万安县"
+					},
+					{
+						"value": 360829,
+						"label": "安福县"
+					},
+					{
+						"value": 360830,
+						"label": "永新县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1313,
+				"value": 360900,
+				"label": "宜春市",
+				"children": [{
+						"value": 360902,
+						"label": "袁州区"
+					},
+					{
+						"value": 360981,
+						"label": "丰城市"
+					},
+					{
+						"value": 360982,
+						"label": "樟树市"
+					},
+					{
+						"value": 360983,
+						"label": "高安市"
+					},
+					{
+						"value": 360921,
+						"label": "奉新县"
+					},
+					{
+						"value": 360922,
+						"label": "万载县"
+					},
+					{
+						"value": 360923,
+						"label": "上高县"
+					},
+					{
+						"value": 360924,
+						"label": "宜丰县"
+					},
+					{
+						"value": 360925,
+						"label": "靖安县"
+					},
+					{
+						"value": 360926,
+						"label": "铜鼓县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1324,
+				"value": 361000,
+				"label": "抚州市",
+				"children": [{
+						"value": 361002,
+						"label": "临川区"
+					},
+					{
+						"value": 361003,
+						"label": "东乡区"
+					},
+					{
+						"value": 361021,
+						"label": "南城县"
+					},
+					{
+						"value": 361022,
+						"label": "黎川县"
+					},
+					{
+						"value": 361023,
+						"label": "南丰县"
+					},
+					{
+						"value": 361024,
+						"label": "崇仁县"
+					},
+					{
+						"value": 361025,
+						"label": "乐安县"
+					},
+					{
+						"value": 361026,
+						"label": "宜黄县"
+					},
+					{
+						"value": 361027,
+						"label": "金溪县"
+					},
+					{
+						"value": 361028,
+						"label": "资溪县"
+					},
+					{
+						"value": 361030,
+						"label": "广昌县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1336,
+				"value": 361100,
+				"label": "上饶市",
+				"children": [{
+						"value": 361102,
+						"label": "信州区"
+					},
+					{
+						"value": 361103,
+						"label": "广丰区"
+					},
+					{
+						"value": 361181,
+						"label": "德兴市"
+					},
+					{
+						"value": 361121,
+						"label": "上饶县"
+					},
+					{
+						"value": 361123,
+						"label": "玉山县"
+					},
+					{
+						"value": 361124,
+						"label": "铅山县"
+					},
+					{
+						"value": 361125,
+						"label": "横峰县"
+					},
+					{
+						"value": 361126,
+						"label": "弋阳县"
+					},
+					{
+						"value": 361127,
+						"label": "余干县"
+					},
+					{
+						"value": 361128,
+						"label": "鄱阳县"
+					},
+					{
+						"value": 361129,
+						"label": "万年县"
+					},
+					{
+						"value": 361130,
+						"label": "婺源县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 360000,
+		"label": "江西省",
+		"expand": "true"
+	},
+	{
+		"id": 1349,
+		"children": [{
+				"id": 1350,
+				"value": 370100,
+				"label": "济南市",
+				"children": [{
+						"value": 370103,
+						"label": "市中区"
+					},
+					{
+						"value": 370102,
+						"label": "历下区"
+					},
+					{
+						"value": 370104,
+						"label": "槐荫区"
+					},
+					{
+						"value": 370105,
+						"label": "天桥区"
+					},
+					{
+						"value": 370112,
+						"label": "历城区"
+					},
+					{
+						"value": 370113,
+						"label": "长清区"
+					},
+					{
+						"value": 370114,
+						"label": "章丘区"
+					},
+					{
+						"value": 370124,
+						"label": "平阴县"
+					},
+					{
+						"value": 370125,
+						"label": "济阳县"
+					},
+					{
+						"value": 370126,
+						"label": "商河县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1361,
+				"value": 370200,
+				"label": "青岛市",
+				"children": [{
+						"value": 370202,
+						"label": "市南区"
+					},
+					{
+						"value": 370203,
+						"label": "市北区"
+					},
+					{
+						"value": 370211,
+						"label": "黄岛区"
+					},
+					{
+						"value": 370212,
+						"label": "崂山区"
+					},
+					{
+						"value": 370213,
+						"label": "李沧区"
+					},
+					{
+						"value": 370214,
+						"label": "城阳区"
+					},
+					{
+						"value": 370281,
+						"label": "胶州市"
+					},
+					{
+						"value": 370282,
+						"label": "即墨市"
+					},
+					{
+						"value": 370283,
+						"label": "平度市"
+					},
+					{
+						"value": 370285,
+						"label": "莱西市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1372,
+				"value": 370300,
+				"label": "淄博市",
+				"children": [{
+						"value": 370303,
+						"label": "张店区"
+					},
+					{
+						"value": 370302,
+						"label": "淄川区"
+					},
+					{
+						"value": 370304,
+						"label": "博山区"
+					},
+					{
+						"value": 370305,
+						"label": "临淄区"
+					},
+					{
+						"value": 370306,
+						"label": "周村区"
+					},
+					{
+						"value": 370321,
+						"label": "桓台县"
+					},
+					{
+						"value": 370322,
+						"label": "高青县"
+					},
+					{
+						"value": 370323,
+						"label": "沂源县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1381,
+				"value": 370400,
+				"label": "枣庄市",
+				"children": [{
+						"value": 370403,
+						"label": "薛城区"
+					},
+					{
+						"value": 370402,
+						"label": "市中区"
+					},
+					{
+						"value": 370404,
+						"label": "峄城区"
+					},
+					{
+						"value": 370405,
+						"label": "台儿庄区"
+					},
+					{
+						"value": 370406,
+						"label": "山亭区"
+					},
+					{
+						"value": 370481,
+						"label": "滕州市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1388,
+				"value": 370500,
+				"label": "东营市",
+				"children": [{
+						"value": 370502,
+						"label": "东营区"
+					},
+					{
+						"value": 370503,
+						"label": "河口区"
+					},
+					{
+						"value": 370505,
+						"label": "垦利区"
+					},
+					{
+						"value": 370522,
+						"label": "利津县"
+					},
+					{
+						"value": 370523,
+						"label": "广饶县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1394,
+				"value": 370600,
+				"label": "烟台市",
+				"children": [{
+						"value": 370613,
+						"label": "莱山区"
+					},
+					{
+						"value": 370602,
+						"label": "芝罘区"
+					},
+					{
+						"value": 370611,
+						"label": "福山区"
+					},
+					{
+						"value": 370612,
+						"label": "牟平区"
+					},
+					{
+						"value": 370681,
+						"label": "龙口市"
+					},
+					{
+						"value": 370682,
+						"label": "莱阳市"
+					},
+					{
+						"value": 370683,
+						"label": "莱州市"
+					},
+					{
+						"value": 370684,
+						"label": "蓬莱市"
+					},
+					{
+						"value": 370685,
+						"label": "招远市"
+					},
+					{
+						"value": 370686,
+						"label": "栖霞市"
+					},
+					{
+						"value": 370687,
+						"label": "海阳市"
+					},
+					{
+						"value": 370634,
+						"label": "长岛县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1407,
+				"value": 370700,
+				"label": "潍坊市",
+				"children": [{
+						"value": 370705,
+						"label": "奎文区"
+					},
+					{
+						"value": 370702,
+						"label": "潍城区"
+					},
+					{
+						"value": 370703,
+						"label": "寒亭区"
+					},
+					{
+						"value": 370704,
+						"label": "坊子区"
+					},
+					{
+						"value": 370781,
+						"label": "青州市"
+					},
+					{
+						"value": 370782,
+						"label": "诸城市"
+					},
+					{
+						"value": 370783,
+						"label": "寿光市"
+					},
+					{
+						"value": 370784,
+						"label": "安丘市"
+					},
+					{
+						"value": 370785,
+						"label": "高密市"
+					},
+					{
+						"value": 370786,
+						"label": "昌邑市"
+					},
+					{
+						"value": 370724,
+						"label": "临朐县"
+					},
+					{
+						"value": 370725,
+						"label": "昌乐县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1420,
+				"value": 370800,
+				"label": "济宁市",
+				"children": [{
+						"value": 370811,
+						"label": "任城区"
+					},
+					{
+						"value": 370812,
+						"label": "兖州区"
+					},
+					{
+						"value": 370881,
+						"label": "曲阜市"
+					},
+					{
+						"value": 370883,
+						"label": "邹城市"
+					},
+					{
+						"value": 370826,
+						"label": "微山县"
+					},
+					{
+						"value": 370827,
+						"label": "鱼台县"
+					},
+					{
+						"value": 370828,
+						"label": "金乡县"
+					},
+					{
+						"value": 370829,
+						"label": "嘉祥县"
+					},
+					{
+						"value": 370830,
+						"label": "汶上县"
+					},
+					{
+						"value": 370831,
+						"label": "泗水县"
+					},
+					{
+						"value": 370832,
+						"label": "梁山县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1432,
+				"value": 370900,
+				"label": "泰安市",
+				"children": [{
+						"value": 370902,
+						"label": "泰山区"
+					},
+					{
+						"value": 370911,
+						"label": "岱岳区"
+					},
+					{
+						"value": 370982,
+						"label": "新泰市"
+					},
+					{
+						"value": 370983,
+						"label": "肥城市"
+					},
+					{
+						"value": 370921,
+						"label": "宁阳县"
+					},
+					{
+						"value": 370923,
+						"label": "东平县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1439,
+				"value": 371000,
+				"label": "威海市",
+				"children": [{
+						"value": 371002,
+						"label": "环翠区"
+					},
+					{
+						"value": 371003,
+						"label": "文登区"
+					},
+					{
+						"value": 371082,
+						"label": "荣成市"
+					},
+					{
+						"value": 371083,
+						"label": "乳山市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1444,
+				"value": 371100,
+				"label": "日照市",
+				"children": [{
+						"value": 371102,
+						"label": "东港区"
+					},
+					{
+						"value": 371103,
+						"label": "岚山区"
+					},
+					{
+						"value": 371121,
+						"label": "五莲县"
+					},
+					{
+						"value": 371122,
+						"label": "莒县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1449,
+				"value": 371200,
+				"label": "莱芜市",
+				"children": [{
+						"value": 371202,
+						"label": "莱城区"
+					},
+					{
+						"value": 371203,
+						"label": "钢城区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1452,
+				"value": 371300,
+				"label": "临沂市",
+				"children": [{
+						"value": 371302,
+						"label": "兰山区"
+					},
+					{
+						"value": 371311,
+						"label": "罗庄区"
+					},
+					{
+						"value": 371312,
+						"label": "河东区"
+					},
+					{
+						"value": 371321,
+						"label": "沂南县"
+					},
+					{
+						"value": 371322,
+						"label": "郯城县"
+					},
+					{
+						"value": 371323,
+						"label": "沂水县"
+					},
+					{
+						"value": 371324,
+						"label": "兰陵县"
+					},
+					{
+						"value": 371325,
+						"label": "费县"
+					},
+					{
+						"value": 371326,
+						"label": "平邑县"
+					},
+					{
+						"value": 371327,
+						"label": "莒南县"
+					},
+					{
+						"value": 371328,
+						"label": "蒙阴县"
+					},
+					{
+						"value": 371329,
+						"label": "临沭县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1465,
+				"value": 371400,
+				"label": "德州市",
+				"children": [{
+						"value": 371402,
+						"label": "德城区"
+					},
+					{
+						"value": 371403,
+						"label": "陵城区"
+					},
+					{
+						"value": 371481,
+						"label": "乐陵市"
+					},
+					{
+						"value": 371482,
+						"label": "禹城市"
+					},
+					{
+						"value": 371422,
+						"label": "宁津县"
+					},
+					{
+						"value": 371423,
+						"label": "庆云县"
+					},
+					{
+						"value": 371424,
+						"label": "临邑县"
+					},
+					{
+						"value": 371425,
+						"label": "齐河县"
+					},
+					{
+						"value": 371426,
+						"label": "平原县"
+					},
+					{
+						"value": 371427,
+						"label": "夏津县"
+					},
+					{
+						"value": 371428,
+						"label": "武城县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1477,
+				"value": 371500,
+				"label": "聊城市",
+				"children": [{
+						"value": 371502,
+						"label": "东昌府区"
+					},
+					{
+						"value": 371581,
+						"label": "临清市"
+					},
+					{
+						"value": 371521,
+						"label": "阳谷县"
+					},
+					{
+						"value": 371522,
+						"label": "莘县"
+					},
+					{
+						"value": 371523,
+						"label": "茌平县"
+					},
+					{
+						"value": 371524,
+						"label": "东阿县"
+					},
+					{
+						"value": 371525,
+						"label": "冠县"
+					},
+					{
+						"value": 371526,
+						"label": "高唐县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1486,
+				"value": 371600,
+				"label": "滨州市",
+				"children": [{
+						"value": 371602,
+						"label": "滨城区"
+					},
+					{
+						"value": 371603,
+						"label": "沾化区"
+					},
+					{
+						"value": 371621,
+						"label": "惠民县"
+					},
+					{
+						"value": 371622,
+						"label": "阳信县"
+					},
+					{
+						"value": 371623,
+						"label": "无棣县"
+					},
+					{
+						"value": 371625,
+						"label": "博兴县"
+					},
+					{
+						"value": 371626,
+						"label": "邹平县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1494,
+				"value": 371700,
+				"label": "菏泽市",
+				"children": [{
+						"value": 371702,
+						"label": "牡丹区"
+					},
+					{
+						"value": 371703,
+						"label": "定陶区"
+					},
+					{
+						"value": 371721,
+						"label": "曹县"
+					},
+					{
+						"value": 371722,
+						"label": "单县"
+					},
+					{
+						"value": 371723,
+						"label": "成武县"
+					},
+					{
+						"value": 371724,
+						"label": "巨野县"
+					},
+					{
+						"value": 371725,
+						"label": "郓城县"
+					},
+					{
+						"value": 371726,
+						"label": "鄄城县"
+					},
+					{
+						"value": 371728,
+						"label": "东明县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 370000,
+		"label": "山东省",
+		"expand": "true"
+	},
+	{
+		"id": 1504,
+		"children": [{
+				"id": 1505,
+				"value": 410100,
+				"label": "郑州市",
+				"children": [{
+						"value": 410102,
+						"label": "中原区"
+					},
+					{
+						"value": 410103,
+						"label": "二七区"
+					},
+					{
+						"value": 410104,
+						"label": "管城回族区"
+					},
+					{
+						"value": 410105,
+						"label": "金水区"
+					},
+					{
+						"value": 410106,
+						"label": "上街区"
+					},
+					{
+						"value": 410108,
+						"label": "惠济区"
+					},
+					{
+						"value": 410181,
+						"label": "巩义市"
+					},
+					{
+						"value": 410182,
+						"label": "荥阳市"
+					},
+					{
+						"value": 410183,
+						"label": "新密市"
+					},
+					{
+						"value": 410184,
+						"label": "新郑市"
+					},
+					{
+						"value": 410185,
+						"label": "登封市"
+					},
+					{
+						"value": 410122,
+						"label": "中牟县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1518,
+				"value": 410200,
+				"label": "开封市",
+				"children": [{
+						"value": 410204,
+						"label": "鼓楼区"
+					},
+					{
+						"value": 410202,
+						"label": "龙亭区"
+					},
+					{
+						"value": 410203,
+						"label": "顺河回族区"
+					},
+					{
+						"value": 410205,
+						"label": "禹王台区"
+					},
+					{
+						"value": 410212,
+						"label": "祥符区"
+					},
+					{
+						"value": 410221,
+						"label": "杞县"
+					},
+					{
+						"value": 410222,
+						"label": "通许县"
+					},
+					{
+						"value": 410223,
+						"label": "尉氏县"
+					},
+					{
+						"value": 410225,
+						"label": "兰考县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1528,
+				"value": 410300,
+				"label": "洛阳市",
+				"children": [{
+						"value": 410303,
+						"label": "西工区"
+					},
+					{
+						"value": 410302,
+						"label": "老城区"
+					},
+					{
+						"value": 410304,
+						"label": "瀍河回族区"
+					},
+					{
+						"value": 410305,
+						"label": "涧西区"
+					},
+					{
+						"value": 410306,
+						"label": "吉利区"
+					},
+					{
+						"value": 410311,
+						"label": "洛龙区"
+					},
+					{
+						"value": 410381,
+						"label": "偃师市"
+					},
+					{
+						"value": 410322,
+						"label": "孟津县"
+					},
+					{
+						"value": 410323,
+						"label": "新安县"
+					},
+					{
+						"value": 410324,
+						"label": "栾川县"
+					},
+					{
+						"value": 410325,
+						"label": "嵩县"
+					},
+					{
+						"value": 410326,
+						"label": "汝阳县"
+					},
+					{
+						"value": 410327,
+						"label": "宜阳县"
+					},
+					{
+						"value": 410328,
+						"label": "洛宁县"
+					},
+					{
+						"value": 410329,
+						"label": "伊川县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1544,
+				"value": 410400,
+				"label": "平顶山市",
+				"children": [{
+						"value": 410402,
+						"label": "新华区"
+					},
+					{
+						"value": 410403,
+						"label": "卫东区"
+					},
+					{
+						"value": 410404,
+						"label": "石龙区"
+					},
+					{
+						"value": 410411,
+						"label": "湛河区"
+					},
+					{
+						"value": 410481,
+						"label": "舞钢市"
+					},
+					{
+						"value": 410482,
+						"label": "汝州市"
+					},
+					{
+						"value": 410421,
+						"label": "宝丰县"
+					},
+					{
+						"value": 410422,
+						"label": "叶县"
+					},
+					{
+						"value": 410423,
+						"label": "鲁山县"
+					},
+					{
+						"value": 410425,
+						"label": "郏县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1555,
+				"value": 410500,
+				"label": "安阳市",
+				"children": [{
+						"value": 410503,
+						"label": "北关区"
+					},
+					{
+						"value": 410502,
+						"label": "文峰区"
+					},
+					{
+						"value": 410505,
+						"label": "殷都区"
+					},
+					{
+						"value": 410506,
+						"label": "龙安区"
+					},
+					{
+						"value": 410581,
+						"label": "林州市"
+					},
+					{
+						"value": 410522,
+						"label": "安阳县"
+					},
+					{
+						"value": 410523,
+						"label": "汤阴县"
+					},
+					{
+						"value": 410526,
+						"label": "滑县"
+					},
+					{
+						"value": 410527,
+						"label": "内黄县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1565,
+				"value": 410600,
+				"label": "鹤壁市",
+				"children": [{
+						"value": 410611,
+						"label": "淇滨区"
+					},
+					{
+						"value": 410602,
+						"label": "鹤山区"
+					},
+					{
+						"value": 410603,
+						"label": "山城区"
+					},
+					{
+						"value": 410621,
+						"label": "浚县"
+					},
+					{
+						"value": 410622,
+						"label": "淇县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1571,
+				"value": 410700,
+				"label": "新乡市",
+				"children": [{
+						"value": 410703,
+						"label": "卫滨区"
+					},
+					{
+						"value": 410702,
+						"label": "红旗区"
+					},
+					{
+						"value": 410704,
+						"label": "凤泉区"
+					},
+					{
+						"value": 410711,
+						"label": "牧野区"
+					},
+					{
+						"value": 410781,
+						"label": "卫辉市"
+					},
+					{
+						"value": 410782,
+						"label": "辉县市"
+					},
+					{
+						"value": 410721,
+						"label": "新乡县"
+					},
+					{
+						"value": 410724,
+						"label": "获嘉县"
+					},
+					{
+						"value": 410725,
+						"label": "原阳县"
+					},
+					{
+						"value": 410726,
+						"label": "延津县"
+					},
+					{
+						"value": 410727,
+						"label": "封丘县"
+					},
+					{
+						"value": 410728,
+						"label": "长垣县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1584,
+				"value": 410800,
+				"label": "焦作市",
+				"children": [{
+						"value": 410802,
+						"label": "解放区"
+					},
+					{
+						"value": 410803,
+						"label": "中站区"
+					},
+					{
+						"value": 410804,
+						"label": "马村区"
+					},
+					{
+						"value": 410811,
+						"label": "山阳区"
+					},
+					{
+						"value": 410882,
+						"label": "沁阳市"
+					},
+					{
+						"value": 410883,
+						"label": "孟州市"
+					},
+					{
+						"value": 410821,
+						"label": "修武县"
+					},
+					{
+						"value": 410822,
+						"label": "博爱县"
+					},
+					{
+						"value": 410823,
+						"label": "武陟县"
+					},
+					{
+						"value": 410825,
+						"label": "温县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1595,
+				"value": 410900,
+				"label": "濮阳市",
+				"children": [{
+						"value": 410902,
+						"label": "华龙区"
+					},
+					{
+						"value": 410922,
+						"label": "清丰县"
+					},
+					{
+						"value": 410923,
+						"label": "南乐县"
+					},
+					{
+						"value": 410926,
+						"label": "范县"
+					},
+					{
+						"value": 410927,
+						"label": "台前县"
+					},
+					{
+						"value": 410928,
+						"label": "濮阳县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1602,
+				"value": 411000,
+				"label": "许昌市",
+				"children": [{
+						"value": 411002,
+						"label": "魏都区"
+					},
+					{
+						"value": 411003,
+						"label": "建安区"
+					},
+					{
+						"value": 411081,
+						"label": "禹州市"
+					},
+					{
+						"value": 411082,
+						"label": "长葛市"
+					},
+					{
+						"value": 411024,
+						"label": "鄢陵县"
+					},
+					{
+						"value": 411025,
+						"label": "襄城县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1609,
+				"value": 411100,
+				"label": "漯河市",
+				"children": [{
+						"value": 411103,
+						"label": "郾城区"
+					},
+					{
+						"value": 411102,
+						"label": "源汇区"
+					},
+					{
+						"value": 411104,
+						"label": "召陵区"
+					},
+					{
+						"value": 411121,
+						"label": "舞阳县"
+					},
+					{
+						"value": 411122,
+						"label": "临颍县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1615,
+				"value": 411200,
+				"label": "三门峡市",
+				"children": [{
+						"value": 411202,
+						"label": "湖滨区"
+					},
+					{
+						"value": 411203,
+						"label": "陕州区"
+					},
+					{
+						"value": 411281,
+						"label": "义马市"
+					},
+					{
+						"value": 411282,
+						"label": "灵宝市"
+					},
+					{
+						"value": 411221,
+						"label": "渑池县"
+					},
+					{
+						"value": 411224,
+						"label": "卢氏县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1622,
+				"value": 411300,
+				"label": "南阳市",
+				"children": [{
+						"value": 411303,
+						"label": "卧龙区"
+					},
+					{
+						"value": 411302,
+						"label": "宛城区"
+					},
+					{
+						"value": 411381,
+						"label": "邓州市"
+					},
+					{
+						"value": 411321,
+						"label": "南召县"
+					},
+					{
+						"value": 411322,
+						"label": "方城县"
+					},
+					{
+						"value": 411323,
+						"label": "西峡县"
+					},
+					{
+						"value": 411324,
+						"label": "镇平县"
+					},
+					{
+						"value": 411325,
+						"label": "内乡县"
+					},
+					{
+						"value": 411326,
+						"label": "淅川县"
+					},
+					{
+						"value": 411327,
+						"label": "社旗县"
+					},
+					{
+						"value": 411328,
+						"label": "唐河县"
+					},
+					{
+						"value": 411329,
+						"label": "新野县"
+					},
+					{
+						"value": 411330,
+						"label": "桐柏县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1636,
+				"value": 411400,
+				"label": "商丘市",
+				"children": [{
+						"value": 411402,
+						"label": "梁园区"
+					},
+					{
+						"value": 411403,
+						"label": "睢阳区"
+					},
+					{
+						"value": 411481,
+						"label": "永城市"
+					},
+					{
+						"value": 411421,
+						"label": "民权县"
+					},
+					{
+						"value": 411422,
+						"label": "睢县"
+					},
+					{
+						"value": 411423,
+						"label": "宁陵县"
+					},
+					{
+						"value": 411424,
+						"label": "柘城县"
+					},
+					{
+						"value": 411425,
+						"label": "虞城县"
+					},
+					{
+						"value": 411426,
+						"label": "夏邑县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1646,
+				"value": 411500,
+				"label": "信阳市",
+				"children": [{
+						"value": 411502,
+						"label": "浉河区"
+					},
+					{
+						"value": 411503,
+						"label": "平桥区"
+					},
+					{
+						"value": 411521,
+						"label": "罗山县"
+					},
+					{
+						"value": 411522,
+						"label": "光山县"
+					},
+					{
+						"value": 411523,
+						"label": "新县"
+					},
+					{
+						"value": 411524,
+						"label": "商城县"
+					},
+					{
+						"value": 411525,
+						"label": "固始县"
+					},
+					{
+						"value": 411526,
+						"label": "潢川县"
+					},
+					{
+						"value": 411527,
+						"label": "淮滨县"
+					},
+					{
+						"value": 411528,
+						"label": "息县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1657,
+				"value": 411600,
+				"label": "周口市",
+				"children": [{
+						"value": 411602,
+						"label": "川汇区"
+					},
+					{
+						"value": 411681,
+						"label": "项城市"
+					},
+					{
+						"value": 411621,
+						"label": "扶沟县"
+					},
+					{
+						"value": 411622,
+						"label": "西华县"
+					},
+					{
+						"value": 411623,
+						"label": "商水县"
+					},
+					{
+						"value": 411624,
+						"label": "沈丘县"
+					},
+					{
+						"value": 411625,
+						"label": "郸城县"
+					},
+					{
+						"value": 411626,
+						"label": "淮阳县"
+					},
+					{
+						"value": 411627,
+						"label": "太康县"
+					},
+					{
+						"value": 411628,
+						"label": "鹿邑县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1668,
+				"value": 411700,
+				"label": "驻马店市",
+				"children": [{
+						"value": 411702,
+						"label": "驿城区"
+					},
+					{
+						"value": 411721,
+						"label": "西平县"
+					},
+					{
+						"value": 411722,
+						"label": "上蔡县"
+					},
+					{
+						"value": 411723,
+						"label": "平舆县"
+					},
+					{
+						"value": 411724,
+						"label": "正阳县"
+					},
+					{
+						"value": 411725,
+						"label": "确山县"
+					},
+					{
+						"value": 411726,
+						"label": "泌阳县"
+					},
+					{
+						"value": 411727,
+						"label": "汝南县"
+					},
+					{
+						"value": 411728,
+						"label": "遂平县"
+					},
+					{
+						"value": 411729,
+						"label": "新蔡县"
+					},
+					{
+						"value": 419001,
+						"label": "济源市"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 410000,
+		"label": "河南省",
+		"expand": "true"
+	},
+	{
+		"id": 1680,
+		"children": [{
+				"id": 1681,
+				"value": 420100,
+				"label": "武汉市",
+				"children": [{
+						"value": 420102,
+						"label": "江岸区"
+					},
+					{
+						"value": 420103,
+						"label": "江汉区"
+					},
+					{
+						"value": 420104,
+						"label": "硚口区"
+					},
+					{
+						"value": 420105,
+						"label": "汉阳区"
+					},
+					{
+						"value": 420106,
+						"label": "武昌区"
+					},
+					{
+						"value": 420107,
+						"label": "青山区"
+					},
+					{
+						"value": 420111,
+						"label": "洪山区"
+					},
+					{
+						"value": 420112,
+						"label": "东西湖区"
+					},
+					{
+						"value": 420113,
+						"label": "汉南区"
+					},
+					{
+						"value": 420114,
+						"label": "蔡甸区"
+					},
+					{
+						"value": 420115,
+						"label": "江夏区"
+					},
+					{
+						"value": 420116,
+						"label": "黄陂区"
+					},
+					{
+						"value": 420117,
+						"label": "新洲区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1695,
+				"value": 420200,
+				"label": "黄石市",
+				"children": [{
+						"value": 420204,
+						"label": "下陆区"
+					},
+					{
+						"value": 420202,
+						"label": "黄石港区"
+					},
+					{
+						"value": 420203,
+						"label": "西塞山区"
+					},
+					{
+						"value": 420205,
+						"label": "铁山区"
+					},
+					{
+						"value": 420281,
+						"label": "大冶市"
+					},
+					{
+						"value": 420222,
+						"label": "阳新县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1702,
+				"value": 420300,
+				"label": "十堰市",
+				"children": [{
+						"value": 420302,
+						"label": "茅箭区"
+					},
+					{
+						"value": 420303,
+						"label": "张湾区"
+					},
+					{
+						"value": 420304,
+						"label": "郧阳区"
+					},
+					{
+						"value": 420381,
+						"label": "丹江口市"
+					},
+					{
+						"value": 420322,
+						"label": "郧西县"
+					},
+					{
+						"value": 420323,
+						"label": "竹山县"
+					},
+					{
+						"value": 420324,
+						"label": "竹溪县"
+					},
+					{
+						"value": 420325,
+						"label": "房县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1711,
+				"value": 420500,
+				"label": "宜昌市",
+				"children": [{
+						"value": 420502,
+						"label": "西陵区"
+					},
+					{
+						"value": 420503,
+						"label": "伍家岗区"
+					},
+					{
+						"value": 420504,
+						"label": "点军区"
+					},
+					{
+						"value": 420505,
+						"label": "猇亭区"
+					},
+					{
+						"value": 420506,
+						"label": "夷陵区"
+					},
+					{
+						"value": 420581,
+						"label": "宜都市"
+					},
+					{
+						"value": 420582,
+						"label": "当阳市"
+					},
+					{
+						"value": 420583,
+						"label": "枝江市"
+					},
+					{
+						"value": 420525,
+						"label": "远安县"
+					},
+					{
+						"value": 420526,
+						"label": "兴山县"
+					},
+					{
+						"value": 420527,
+						"label": "秭归县"
+					},
+					{
+						"value": 420528,
+						"label": "长阳土家族自治县"
+					},
+					{
+						"value": 420529,
+						"label": "五峰土家族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1725,
+				"value": 420600,
+				"label": "襄阳市",
+				"children": [{
+						"value": 420602,
+						"label": "襄城区"
+					},
+					{
+						"value": 420606,
+						"label": "樊城区"
+					},
+					{
+						"value": 420607,
+						"label": "襄州区"
+					},
+					{
+						"value": 420682,
+						"label": "老河口市"
+					},
+					{
+						"value": 420683,
+						"label": "枣阳市"
+					},
+					{
+						"value": 420684,
+						"label": "宜城市"
+					},
+					{
+						"value": 420624,
+						"label": "南漳县"
+					},
+					{
+						"value": 420625,
+						"label": "谷城县"
+					},
+					{
+						"value": 420626,
+						"label": "保康县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1735,
+				"value": 420700,
+				"label": "鄂州市",
+				"children": [{
+						"value": 420704,
+						"label": "鄂城区"
+					},
+					{
+						"value": 420702,
+						"label": "梁子湖区"
+					},
+					{
+						"value": 420703,
+						"label": "华容区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1739,
+				"value": 420800,
+				"label": "荆门市",
+				"children": [{
+						"value": 420802,
+						"label": "东宝区"
+					},
+					{
+						"value": 420804,
+						"label": "掇刀区"
+					},
+					{
+						"value": 420881,
+						"label": "钟祥市"
+					},
+					{
+						"value": 420821,
+						"label": "京山县"
+					},
+					{
+						"value": 420822,
+						"label": "沙洋县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1745,
+				"value": 420900,
+				"label": "孝感市",
+				"children": [{
+						"value": 420902,
+						"label": "孝南区"
+					},
+					{
+						"value": 420981,
+						"label": "应城市"
+					},
+					{
+						"value": 420982,
+						"label": "安陆市"
+					},
+					{
+						"value": 420984,
+						"label": "汉川市"
+					},
+					{
+						"value": 420921,
+						"label": "孝昌县"
+					},
+					{
+						"value": 420922,
+						"label": "大悟县"
+					},
+					{
+						"value": 420923,
+						"label": "云梦县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1753,
+				"value": 421000,
+				"label": "荆州市",
+				"children": [{
+						"value": 421002,
+						"label": "沙市区"
+					},
+					{
+						"value": 421003,
+						"label": "荆州区"
+					},
+					{
+						"value": 421081,
+						"label": "石首市"
+					},
+					{
+						"value": 421083,
+						"label": "洪湖市"
+					},
+					{
+						"value": 421087,
+						"label": "松滋市"
+					},
+					{
+						"value": 421022,
+						"label": "公安县"
+					},
+					{
+						"value": 421023,
+						"label": "监利县"
+					},
+					{
+						"value": 421024,
+						"label": "江陵县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1762,
+				"value": 421100,
+				"label": "黄冈市",
+				"children": [{
+						"value": 421102,
+						"label": "黄州区"
+					},
+					{
+						"value": 421181,
+						"label": "麻城市"
+					},
+					{
+						"value": 421182,
+						"label": "武穴市"
+					},
+					{
+						"value": 421121,
+						"label": "团风县"
+					},
+					{
+						"value": 421122,
+						"label": "红安县"
+					},
+					{
+						"value": 421123,
+						"label": "罗田县"
+					},
+					{
+						"value": 421124,
+						"label": "英山县"
+					},
+					{
+						"value": 421125,
+						"label": "浠水县"
+					},
+					{
+						"value": 421126,
+						"label": "蕲春县"
+					},
+					{
+						"value": 421127,
+						"label": "黄梅县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1773,
+				"value": 421200,
+				"label": "咸宁市",
+				"children": [{
+						"value": 421202,
+						"label": "咸安区"
+					},
+					{
+						"value": 421281,
+						"label": "赤壁市"
+					},
+					{
+						"value": 421221,
+						"label": "嘉鱼县"
+					},
+					{
+						"value": 421222,
+						"label": "通城县"
+					},
+					{
+						"value": 421223,
+						"label": "崇阳县"
+					},
+					{
+						"value": 421224,
+						"label": "通山县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1780,
+				"value": 421300,
+				"label": "随州市",
+				"children": [{
+						"value": 421303,
+						"label": "曾都区"
+					},
+					{
+						"value": 421381,
+						"label": "广水市"
+					},
+					{
+						"value": 421321,
+						"label": "随县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1784,
+				"value": 422800,
+				"label": "恩施土家族苗族自治州",
+				"children": [{
+						"value": 422801,
+						"label": "恩施市"
+					},
+					{
+						"value": 422802,
+						"label": "利川市"
+					},
+					{
+						"value": 422822,
+						"label": "建始县"
+					},
+					{
+						"value": 422823,
+						"label": "巴东县"
+					},
+					{
+						"value": 422825,
+						"label": "宣恩县"
+					},
+					{
+						"value": 422826,
+						"label": "咸丰县"
+					},
+					{
+						"value": 422827,
+						"label": "来凤县"
+					},
+					{
+						"value": 422828,
+						"label": "鹤峰县"
+					},
+					{
+						"value": 429004,
+						"label": "仙桃市"
+					},
+					{
+						"value": 429005,
+						"label": "潜江市"
+					},
+					{
+						"value": 429006,
+						"label": "天门市"
+					},
+					{
+						"value": 429021,
+						"label": "神农架林区"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 420000,
+		"label": "湖北省",
+		"expand": "true"
+	},
+	{
+		"id": 1797,
+		"children": [{
+				"id": 1798,
+				"value": 430100,
+				"label": "长沙市",
+				"children": [{
+						"value": 430104,
+						"label": "岳麓区"
+					},
+					{
+						"value": 430102,
+						"label": "芙蓉区"
+					},
+					{
+						"value": 430103,
+						"label": "天心区"
+					},
+					{
+						"value": 430105,
+						"label": "开福区"
+					},
+					{
+						"value": 430111,
+						"label": "雨花区"
+					},
+					{
+						"value": 430112,
+						"label": "望城区"
+					},
+					{
+						"value": 430181,
+						"label": "浏阳市"
+					},
+					{
+						"value": 430182,
+						"label": "宁乡市"
+					},
+					{
+						"value": 430121,
+						"label": "长沙县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1808,
+				"value": 430200,
+				"label": "株洲市",
+				"children": [{
+						"value": 430211,
+						"label": "天元区"
+					},
+					{
+						"value": 430202,
+						"label": "荷塘区"
+					},
+					{
+						"value": 430203,
+						"label": "芦淞区"
+					},
+					{
+						"value": 430204,
+						"label": "石峰区"
+					},
+					{
+						"value": 430281,
+						"label": "醴陵市"
+					},
+					{
+						"value": 430221,
+						"label": "株洲县"
+					},
+					{
+						"value": 430223,
+						"label": "攸县"
+					},
+					{
+						"value": 430224,
+						"label": "茶陵县"
+					},
+					{
+						"value": 430225,
+						"label": "炎陵县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1818,
+				"value": 430300,
+				"label": "湘潭市",
+				"children": [{
+						"value": 430304,
+						"label": "岳塘区"
+					},
+					{
+						"value": 430302,
+						"label": "雨湖区"
+					},
+					{
+						"value": 430381,
+						"label": "湘乡市"
+					},
+					{
+						"value": 430382,
+						"label": "韶山市"
+					},
+					{
+						"value": 430321,
+						"label": "湘潭县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1824,
+				"value": 430400,
+				"label": "衡阳市",
+				"children": [{
+						"value": 430408,
+						"label": "蒸湘区"
+					},
+					{
+						"value": 430405,
+						"label": "珠晖区"
+					},
+					{
+						"value": 430406,
+						"label": "雁峰区"
+					},
+					{
+						"value": 430407,
+						"label": "石鼓区"
+					},
+					{
+						"value": 430412,
+						"label": "南岳区"
+					},
+					{
+						"value": 430481,
+						"label": "耒阳市"
+					},
+					{
+						"value": 430482,
+						"label": "常宁市"
+					},
+					{
+						"value": 430421,
+						"label": "衡阳县"
+					},
+					{
+						"value": 430422,
+						"label": "衡南县"
+					},
+					{
+						"value": 430423,
+						"label": "衡山县"
+					},
+					{
+						"value": 430424,
+						"label": "衡东县"
+					},
+					{
+						"value": 430426,
+						"label": "祁东县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1837,
+				"value": 430500,
+				"label": "邵阳市",
+				"children": [{
+						"value": 430503,
+						"label": "大祥区"
+					},
+					{
+						"value": 430502,
+						"label": "双清区"
+					},
+					{
+						"value": 430511,
+						"label": "北塔区"
+					},
+					{
+						"value": 430581,
+						"label": "武冈市"
+					},
+					{
+						"value": 430521,
+						"label": "邵东县"
+					},
+					{
+						"value": 430522,
+						"label": "新邵县"
+					},
+					{
+						"value": 430523,
+						"label": "邵阳县"
+					},
+					{
+						"value": 430524,
+						"label": "隆回县"
+					},
+					{
+						"value": 430525,
+						"label": "洞口县"
+					},
+					{
+						"value": 430527,
+						"label": "绥宁县"
+					},
+					{
+						"value": 430528,
+						"label": "新宁县"
+					},
+					{
+						"value": 430529,
+						"label": "城步苗族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1850,
+				"value": 430600,
+				"label": "岳阳市",
+				"children": [{
+						"value": 430602,
+						"label": "岳阳楼区"
+					},
+					{
+						"value": 430603,
+						"label": "云溪区"
+					},
+					{
+						"value": 430611,
+						"label": "君山区"
+					},
+					{
+						"value": 430681,
+						"label": "汨罗市"
+					},
+					{
+						"value": 430682,
+						"label": "临湘市"
+					},
+					{
+						"value": 430621,
+						"label": "岳阳县"
+					},
+					{
+						"value": 430623,
+						"label": "华容县"
+					},
+					{
+						"value": 430624,
+						"label": "湘阴县"
+					},
+					{
+						"value": 430626,
+						"label": "平江县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1860,
+				"value": 430700,
+				"label": "常德市",
+				"children": [{
+						"value": 430702,
+						"label": "武陵区"
+					},
+					{
+						"value": 430703,
+						"label": "鼎城区"
+					},
+					{
+						"value": 430781,
+						"label": "津市市"
+					},
+					{
+						"value": 430721,
+						"label": "安乡县"
+					},
+					{
+						"value": 430722,
+						"label": "汉寿县"
+					},
+					{
+						"value": 430723,
+						"label": "澧县"
+					},
+					{
+						"value": 430724,
+						"label": "临澧县"
+					},
+					{
+						"value": 430725,
+						"label": "桃源县"
+					},
+					{
+						"value": 430726,
+						"label": "石门县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1870,
+				"value": 430800,
+				"label": "张家界市",
+				"children": [{
+						"value": 430802,
+						"label": "永定区"
+					},
+					{
+						"value": 430811,
+						"label": "武陵源区"
+					},
+					{
+						"value": 430821,
+						"label": "慈利县"
+					},
+					{
+						"value": 430822,
+						"label": "桑植县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1875,
+				"value": 430900,
+				"label": "益阳市",
+				"children": [{
+						"value": 430903,
+						"label": "赫山区"
+					},
+					{
+						"value": 430902,
+						"label": "资阳区"
+					},
+					{
+						"value": 430981,
+						"label": "沅江市"
+					},
+					{
+						"value": 430921,
+						"label": "南县"
+					},
+					{
+						"value": 430922,
+						"label": "桃江县"
+					},
+					{
+						"value": 430923,
+						"label": "安化县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1882,
+				"value": 431000,
+				"label": "郴州市",
+				"children": [{
+						"value": 431002,
+						"label": "北湖区"
+					},
+					{
+						"value": 431003,
+						"label": "苏仙区"
+					},
+					{
+						"value": 431081,
+						"label": "资兴市"
+					},
+					{
+						"value": 431021,
+						"label": "桂阳县"
+					},
+					{
+						"value": 431022,
+						"label": "宜章县"
+					},
+					{
+						"value": 431023,
+						"label": "永兴县"
+					},
+					{
+						"value": 431024,
+						"label": "嘉禾县"
+					},
+					{
+						"value": 431025,
+						"label": "临武县"
+					},
+					{
+						"value": 431026,
+						"label": "汝城县"
+					},
+					{
+						"value": 431027,
+						"label": "桂东县"
+					},
+					{
+						"value": 431028,
+						"label": "安仁县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1894,
+				"value": 431100,
+				"label": "永州市",
+				"children": [{
+						"value": 431103,
+						"label": "冷水滩区"
+					},
+					{
+						"value": 431102,
+						"label": "零陵区"
+					},
+					{
+						"value": 431121,
+						"label": "祁阳县"
+					},
+					{
+						"value": 431122,
+						"label": "东安县"
+					},
+					{
+						"value": 431123,
+						"label": "双牌县"
+					},
+					{
+						"value": 431124,
+						"label": "道县"
+					},
+					{
+						"value": 431125,
+						"label": "江永县"
+					},
+					{
+						"value": 431126,
+						"label": "宁远县"
+					},
+					{
+						"value": 431127,
+						"label": "蓝山县"
+					},
+					{
+						"value": 431128,
+						"label": "新田县"
+					},
+					{
+						"value": 431129,
+						"label": "江华瑶族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1906,
+				"value": 431200,
+				"label": "怀化市",
+				"children": [{
+						"value": 431202,
+						"label": "鹤城区"
+					},
+					{
+						"value": 431281,
+						"label": "洪江市"
+					},
+					{
+						"value": 431221,
+						"label": "中方县"
+					},
+					{
+						"value": 431222,
+						"label": "沅陵县"
+					},
+					{
+						"value": 431223,
+						"label": "辰溪县"
+					},
+					{
+						"value": 431224,
+						"label": "溆浦县"
+					},
+					{
+						"value": 431225,
+						"label": "会同县"
+					},
+					{
+						"value": 431226,
+						"label": "麻阳苗族自治县"
+					},
+					{
+						"value": 431227,
+						"label": "新晃侗族自治县"
+					},
+					{
+						"value": 431228,
+						"label": "芷江侗族自治县"
+					},
+					{
+						"value": 431229,
+						"label": "靖州苗族侗族自治县"
+					},
+					{
+						"value": 431230,
+						"label": "通道侗族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1919,
+				"value": 431300,
+				"label": "娄底市",
+				"children": [{
+						"value": 431302,
+						"label": "娄星区"
+					},
+					{
+						"value": 431381,
+						"label": "冷水江市"
+					},
+					{
+						"value": 431382,
+						"label": "涟源市"
+					},
+					{
+						"value": 431321,
+						"label": "双峰县"
+					},
+					{
+						"value": 431322,
+						"label": "新化县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1925,
+				"value": 433100,
+				"label": "湘西土家族苗族自治州",
+				"children": [{
+						"value": 433101,
+						"label": "吉首市"
+					},
+					{
+						"value": 433122,
+						"label": "泸溪县"
+					},
+					{
+						"value": 433123,
+						"label": "凤凰县"
+					},
+					{
+						"value": 433124,
+						"label": "花垣县"
+					},
+					{
+						"value": 433125,
+						"label": "保靖县"
+					},
+					{
+						"value": 433126,
+						"label": "古丈县"
+					},
+					{
+						"value": 433127,
+						"label": "永顺县"
+					},
+					{
+						"value": 433130,
+						"label": "龙山县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 430000,
+		"label": "湖南省",
+		"expand": "true"
+	},
+	{
+		"id": 1934,
+		"children": [{
+				"id": 1935,
+				"value": 440100,
+				"label": "广州市",
+				"children": [{
+						"value": 440104,
+						"label": "越秀区"
+					},
+					{
+						"value": 440103,
+						"label": "荔湾区"
+					},
+					{
+						"value": 440105,
+						"label": "海珠区"
+					},
+					{
+						"value": 440106,
+						"label": "天河区"
+					},
+					{
+						"value": 440111,
+						"label": "白云区"
+					},
+					{
+						"value": 440112,
+						"label": "黄埔区"
+					},
+					{
+						"value": 440113,
+						"label": "番禺区"
+					},
+					{
+						"value": 440114,
+						"label": "花都区"
+					},
+					{
+						"value": 440115,
+						"label": "南沙区"
+					},
+					{
+						"value": 440118,
+						"label": "增城区"
+					},
+					{
+						"value": 440117,
+						"label": "从化区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1947,
+				"value": 440200,
+				"label": "韶关市",
+				"children": [{
+						"value": 440204,
+						"label": "浈江区"
+					},
+					{
+						"value": 440203,
+						"label": "武江区"
+					},
+					{
+						"value": 440205,
+						"label": "曲江区"
+					},
+					{
+						"value": 440281,
+						"label": "乐昌市"
+					},
+					{
+						"value": 440282,
+						"label": "南雄市"
+					},
+					{
+						"value": 440222,
+						"label": "始兴县"
+					},
+					{
+						"value": 440224,
+						"label": "仁化县"
+					},
+					{
+						"value": 440229,
+						"label": "翁源县"
+					},
+					{
+						"value": 440233,
+						"label": "新丰县"
+					},
+					{
+						"value": 440232,
+						"label": "乳源瑶族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1958,
+				"value": 440300,
+				"label": "深圳市",
+				"children": [{
+						"value": 440304,
+						"label": "福田区"
+					},
+					{
+						"value": 440303,
+						"label": "罗湖区"
+					},
+					{
+						"value": 440305,
+						"label": "南山区"
+					},
+					{
+						"value": 440306,
+						"label": "宝安区"
+					},
+					{
+						"value": 440307,
+						"label": "龙岗区"
+					},
+					{
+						"value": 440308,
+						"label": "盐田区"
+					},
+					{
+						"value": 440309,
+						"label": "龙华区"
+					},
+					{
+						"value": 440310,
+						"label": "坪山区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1967,
+				"value": 440400,
+				"label": "珠海市",
+				"children": [{
+						"value": 440402,
+						"label": "香洲区"
+					},
+					{
+						"value": 440403,
+						"label": "斗门区"
+					},
+					{
+						"value": 440404,
+						"label": "金湾区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1971,
+				"value": 440500,
+				"label": "汕头市",
+				"children": [{
+						"value": 440511,
+						"label": "金平区"
+					},
+					{
+						"value": 440507,
+						"label": "龙湖区"
+					},
+					{
+						"value": 440512,
+						"label": "濠江区"
+					},
+					{
+						"value": 440513,
+						"label": "潮阳区"
+					},
+					{
+						"value": 440514,
+						"label": "潮南区"
+					},
+					{
+						"value": 440515,
+						"label": "澄海区"
+					},
+					{
+						"value": 440523,
+						"label": "南澳县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1979,
+				"value": 440600,
+				"label": "佛山市",
+				"children": [{
+						"value": 440604,
+						"label": "禅城区"
+					},
+					{
+						"value": 440605,
+						"label": "南海区"
+					},
+					{
+						"value": 440606,
+						"label": "顺德区"
+					},
+					{
+						"value": 440607,
+						"label": "三水区"
+					},
+					{
+						"value": 440608,
+						"label": "高明区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1985,
+				"value": 440700,
+				"label": "江门市",
+				"children": [{
+						"value": 440703,
+						"label": "蓬江区"
+					},
+					{
+						"value": 440704,
+						"label": "江海区"
+					},
+					{
+						"value": 440705,
+						"label": "新会区"
+					},
+					{
+						"value": 440781,
+						"label": "台山市"
+					},
+					{
+						"value": 440783,
+						"label": "开平市"
+					},
+					{
+						"value": 440784,
+						"label": "鹤山市"
+					},
+					{
+						"value": 440785,
+						"label": "恩平市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 1993,
+				"value": 440800,
+				"label": "湛江市",
+				"children": [{
+						"value": 440802,
+						"label": "赤坎区"
+					},
+					{
+						"value": 440803,
+						"label": "霞山区"
+					},
+					{
+						"value": 440804,
+						"label": "坡头区"
+					},
+					{
+						"value": 440811,
+						"label": "麻章区"
+					},
+					{
+						"value": 440881,
+						"label": "廉江市"
+					},
+					{
+						"value": 440882,
+						"label": "雷州市"
+					},
+					{
+						"value": 440883,
+						"label": "吴川市"
+					},
+					{
+						"value": 440823,
+						"label": "遂溪县"
+					},
+					{
+						"value": 440825,
+						"label": "徐闻县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2003,
+				"value": 440900,
+				"label": "茂名市",
+				"children": [{
+						"value": 440902,
+						"label": "茂南区"
+					},
+					{
+						"value": 440904,
+						"label": "电白区"
+					},
+					{
+						"value": 440981,
+						"label": "高州市"
+					},
+					{
+						"value": 440982,
+						"label": "化州市"
+					},
+					{
+						"value": 440983,
+						"label": "信宜市"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2009,
+				"value": 441200,
+				"label": "肇庆市",
+				"children": [{
+						"value": 441202,
+						"label": "端州区"
+					},
+					{
+						"value": 441203,
+						"label": "鼎湖区"
+					},
+					{
+						"value": 441204,
+						"label": "高要区"
+					},
+					{
+						"value": 441284,
+						"label": "四会市"
+					},
+					{
+						"value": 441223,
+						"label": "广宁县"
+					},
+					{
+						"value": 441224,
+						"label": "怀集县"
+					},
+					{
+						"value": 441225,
+						"label": "封开县"
+					},
+					{
+						"value": 441226,
+						"label": "德庆县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2018,
+				"value": 441300,
+				"label": "惠州市",
+				"children": [{
+						"value": 441302,
+						"label": "惠城区"
+					},
+					{
+						"value": 441303,
+						"label": "惠阳区"
+					},
+					{
+						"value": 441322,
+						"label": "博罗县"
+					},
+					{
+						"value": 441323,
+						"label": "惠东县"
+					},
+					{
+						"value": 441324,
+						"label": "龙门县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2024,
+				"value": 441400,
+				"label": "梅州市",
+				"children": [{
+						"value": 441402,
+						"label": "梅江区"
+					},
+					{
+						"value": 441403,
+						"label": "梅县区"
+					},
+					{
+						"value": 441481,
+						"label": "兴宁市"
+					},
+					{
+						"value": 441422,
+						"label": "大埔县"
+					},
+					{
+						"value": 441423,
+						"label": "丰顺县"
+					},
+					{
+						"value": 441424,
+						"label": "五华县"
+					},
+					{
+						"value": 441426,
+						"label": "平远县"
+					},
+					{
+						"value": 441427,
+						"label": "蕉岭县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2033,
+				"value": 441500,
+				"label": "汕尾市",
+				"children": [{
+						"value": 441502,
+						"label": "城区"
+					},
+					{
+						"value": 441581,
+						"label": "陆丰市"
+					},
+					{
+						"value": 441521,
+						"label": "海丰县"
+					},
+					{
+						"value": 441523,
+						"label": "陆河县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2038,
+				"value": 441600,
+				"label": "河源市",
+				"children": [{
+						"value": 441602,
+						"label": "源城区"
+					},
+					{
+						"value": 441621,
+						"label": "紫金县"
+					},
+					{
+						"value": 441622,
+						"label": "龙川县"
+					},
+					{
+						"value": 441623,
+						"label": "连平县"
+					},
+					{
+						"value": 441624,
+						"label": "和平县"
+					},
+					{
+						"value": 441625,
+						"label": "东源县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2045,
+				"value": 441700,
+				"label": "阳江市",
+				"children": [{
+						"value": 441702,
+						"label": "江城区"
+					},
+					{
+						"value": 441704,
+						"label": "阳东区"
+					},
+					{
+						"value": 441781,
+						"label": "阳春市"
+					},
+					{
+						"value": 441721,
+						"label": "阳西县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2050,
+				"value": 441800,
+				"label": "清远市",
+				"children": [{
+						"value": 441802,
+						"label": "清城区"
+					},
+					{
+						"value": 441803,
+						"label": "清新区"
+					},
+					{
+						"value": 441881,
+						"label": "英德市"
+					},
+					{
+						"value": 441882,
+						"label": "连州市"
+					},
+					{
+						"value": 441821,
+						"label": "佛冈县"
+					},
+					{
+						"value": 441823,
+						"label": "阳山县"
+					},
+					{
+						"value": 441825,
+						"label": "连山壮族瑶族自治县"
+					},
+					{
+						"value": 441826,
+						"label": "连南瑶族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2059,
+				"value": 441900,
+				"label": "东莞市",
+				"children": []
+			},
+			{
+				"id": 2060,
+				"value": 442000,
+				"label": "中山市",
+				"children": []
+			},
+			{
+				"id": 2061,
+				"value": 445100,
+				"label": "潮州市",
+				"children": [{
+						"value": 445102,
+						"label": "湘桥区"
+					},
+					{
+						"value": 445103,
+						"label": "潮安区"
+					},
+					{
+						"value": 445122,
+						"label": "饶平县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2065,
+				"value": 445200,
+				"label": "揭阳市",
+				"children": [{
+						"value": 445202,
+						"label": "榕城区"
+					},
+					{
+						"value": 445203,
+						"label": "揭东区"
+					},
+					{
+						"value": 445281,
+						"label": "普宁市"
+					},
+					{
+						"value": 445222,
+						"label": "揭西县"
+					},
+					{
+						"value": 445224,
+						"label": "惠来县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2071,
+				"value": 445300,
+				"label": "云浮市",
+				"children": [{
+						"value": 445302,
+						"label": "云城区"
+					},
+					{
+						"value": 445303,
+						"label": "云安区"
+					},
+					{
+						"value": 445381,
+						"label": "罗定市"
+					},
+					{
+						"value": 445321,
+						"label": "新兴县"
+					},
+					{
+						"value": 445322,
+						"label": "郁南县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 440000,
+		"label": "广东省",
+		"expand": "true"
+	},
+	{
+		"id": 2077,
+		"children": [{
+				"id": 2078,
+				"value": 450100,
+				"label": "南宁市",
+				"children": [{
+						"value": 450103,
+						"label": "青秀区"
+					},
+					{
+						"value": 450102,
+						"label": "兴宁区"
+					},
+					{
+						"value": 450105,
+						"label": "江南区"
+					},
+					{
+						"value": 450107,
+						"label": "西乡塘区"
+					},
+					{
+						"value": 450108,
+						"label": "良庆区"
+					},
+					{
+						"value": 450109,
+						"label": "邕宁区"
+					},
+					{
+						"value": 450110,
+						"label": "武鸣区"
+					},
+					{
+						"value": 450123,
+						"label": "隆安县"
+					},
+					{
+						"value": 450124,
+						"label": "马山县"
+					},
+					{
+						"value": 450125,
+						"label": "上林县"
+					},
+					{
+						"value": 450126,
+						"label": "宾阳县"
+					},
+					{
+						"value": 450127,
+						"label": "横县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2091,
+				"value": 450200,
+				"label": "柳州市",
+				"children": [{
+						"value": 450205,
+						"label": "柳北区"
+					},
+					{
+						"value": 450202,
+						"label": "城中区"
+					},
+					{
+						"value": 450203,
+						"label": "鱼峰区"
+					},
+					{
+						"value": 450204,
+						"label": "柳南区"
+					},
+					{
+						"value": 450206,
+						"label": "柳江区"
+					},
+					{
+						"value": 450222,
+						"label": "柳城县"
+					},
+					{
+						"value": 450223,
+						"label": "鹿寨县"
+					},
+					{
+						"value": 450224,
+						"label": "融安县"
+					},
+					{
+						"value": 450225,
+						"label": "融水苗族自治县"
+					},
+					{
+						"value": 450226,
+						"label": "三江侗族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2102,
+				"value": 450300,
+				"label": "桂林市",
+				"children": [{
+						"value": 450312,
+						"label": "临桂区"
+					},
+					{
+						"value": 450302,
+						"label": "秀峰区"
+					},
+					{
+						"value": 450303,
+						"label": "叠彩区"
+					},
+					{
+						"value": 450304,
+						"label": "象山区"
+					},
+					{
+						"value": 450305,
+						"label": "七星区"
+					},
+					{
+						"value": 450311,
+						"label": "雁山区"
+					},
+					{
+						"value": 450321,
+						"label": "阳朔县"
+					},
+					{
+						"value": 450323,
+						"label": "灵川县"
+					},
+					{
+						"value": 450324,
+						"label": "全州县"
+					},
+					{
+						"value": 450325,
+						"label": "兴安县"
+					},
+					{
+						"value": 450326,
+						"label": "永福县"
+					},
+					{
+						"value": 450327,
+						"label": "灌阳县"
+					},
+					{
+						"value": 450329,
+						"label": "资源县"
+					},
+					{
+						"value": 450330,
+						"label": "平乐县"
+					},
+					{
+						"value": 450331,
+						"label": "荔浦县"
+					},
+					{
+						"value": 450328,
+						"label": "龙胜各族自治县"
+					},
+					{
+						"value": 450332,
+						"label": "恭城瑶族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2120,
+				"value": 450400,
+				"label": "梧州市",
+				"children": [{
+						"value": 450405,
+						"label": "长洲区"
+					},
+					{
+						"value": 450403,
+						"label": "万秀区"
+					},
+					{
+						"value": 450406,
+						"label": "龙圩区"
+					},
+					{
+						"value": 450481,
+						"label": "岑溪市"
+					},
+					{
+						"value": 450421,
+						"label": "苍梧县"
+					},
+					{
+						"value": 450422,
+						"label": "藤县"
+					},
+					{
+						"value": 450423,
+						"label": "蒙山县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2128,
+				"value": 450500,
+				"label": "北海市",
+				"children": [{
+						"value": 450502,
+						"label": "海城区"
+					},
+					{
+						"value": 450503,
+						"label": "银海区"
+					},
+					{
+						"value": 450512,
+						"label": "铁山港区"
+					},
+					{
+						"value": 450521,
+						"label": "合浦县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2133,
+				"value": 450600,
+				"label": "防城港市",
+				"children": [{
+						"value": 450602,
+						"label": "港口区"
+					},
+					{
+						"value": 450603,
+						"label": "防城区"
+					},
+					{
+						"value": 450681,
+						"label": "东兴市"
+					},
+					{
+						"value": 450621,
+						"label": "上思县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2138,
+				"value": 450700,
+				"label": "钦州市",
+				"children": [{
+						"value": 450702,
+						"label": "钦南区"
+					},
+					{
+						"value": 450703,
+						"label": "钦北区"
+					},
+					{
+						"value": 450721,
+						"label": "灵山县"
+					},
+					{
+						"value": 450722,
+						"label": "浦北县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2143,
+				"value": 450800,
+				"label": "贵港市",
+				"children": [{
+						"value": 450802,
+						"label": "港北区"
+					},
+					{
+						"value": 450803,
+						"label": "港南区"
+					},
+					{
+						"value": 450804,
+						"label": "覃塘区"
+					},
+					{
+						"value": 450881,
+						"label": "桂平市"
+					},
+					{
+						"value": 450821,
+						"label": "平南县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2149,
+				"value": 450900,
+				"label": "玉林市",
+				"children": [{
+						"value": 450902,
+						"label": "玉州区"
+					},
+					{
+						"value": 450903,
+						"label": "福绵区"
+					},
+					{
+						"value": 450981,
+						"label": "北流市"
+					},
+					{
+						"value": 450921,
+						"label": "容县"
+					},
+					{
+						"value": 450922,
+						"label": "陆川县"
+					},
+					{
+						"value": 450923,
+						"label": "博白县"
+					},
+					{
+						"value": 450924,
+						"label": "兴业县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2157,
+				"value": 451000,
+				"label": "百色市",
+				"children": [{
+						"value": 451002,
+						"label": "右江区"
+					},
+					{
+						"value": 451081,
+						"label": "靖西市"
+					},
+					{
+						"value": 451021,
+						"label": "田阳县"
+					},
+					{
+						"value": 451022,
+						"label": "田东县"
+					},
+					{
+						"value": 451023,
+						"label": "平果县"
+					},
+					{
+						"value": 451024,
+						"label": "德保县"
+					},
+					{
+						"value": 451026,
+						"label": "那坡县"
+					},
+					{
+						"value": 451027,
+						"label": "凌云县"
+					},
+					{
+						"value": 451028,
+						"label": "乐业县"
+					},
+					{
+						"value": 451029,
+						"label": "田林县"
+					},
+					{
+						"value": 451030,
+						"label": "西林县"
+					},
+					{
+						"value": 451031,
+						"label": "隆林各族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2170,
+				"value": 451100,
+				"label": "贺州市",
+				"children": [{
+						"value": 451102,
+						"label": "八步区"
+					},
+					{
+						"value": 451103,
+						"label": "平桂区"
+					},
+					{
+						"value": 451121,
+						"label": "昭平县"
+					},
+					{
+						"value": 451122,
+						"label": "钟山县"
+					},
+					{
+						"value": 451123,
+						"label": "富川瑶族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2176,
+				"value": 451200,
+				"label": "河池市",
+				"children": [{
+						"value": 451202,
+						"label": "金城江区"
+					},
+					{
+						"value": 451203,
+						"label": "宜州区"
+					},
+					{
+						"value": 451221,
+						"label": "南丹县"
+					},
+					{
+						"value": 451222,
+						"label": "天峨县"
+					},
+					{
+						"value": 451223,
+						"label": "凤山县"
+					},
+					{
+						"value": 451224,
+						"label": "东兰县"
+					},
+					{
+						"value": 451225,
+						"label": "罗城仫佬族自治县"
+					},
+					{
+						"value": 451226,
+						"label": "环江毛南族自治县"
+					},
+					{
+						"value": 451227,
+						"label": "巴马瑶族自治县"
+					},
+					{
+						"value": 451228,
+						"label": "都安瑶族自治县"
+					},
+					{
+						"value": 451229,
+						"label": "大化瑶族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2188,
+				"value": 451300,
+				"label": "来宾市",
+				"children": [{
+						"value": 451302,
+						"label": "兴宾区"
+					},
+					{
+						"value": 451381,
+						"label": "合山市"
+					},
+					{
+						"value": 451321,
+						"label": "忻城县"
+					},
+					{
+						"value": 451322,
+						"label": "象州县"
+					},
+					{
+						"value": 451323,
+						"label": "武宣县"
+					},
+					{
+						"value": 451324,
+						"label": "金秀瑶族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2195,
+				"value": 451400,
+				"label": "崇左市",
+				"children": [{
+						"value": 451402,
+						"label": "江州区"
+					},
+					{
+						"value": 451481,
+						"label": "凭祥市"
+					},
+					{
+						"value": 451421,
+						"label": "扶绥县"
+					},
+					{
+						"value": 451422,
+						"label": "宁明县"
+					},
+					{
+						"value": 451423,
+						"label": "龙州县"
+					},
+					{
+						"value": 451424,
+						"label": "大新县"
+					},
+					{
+						"value": 451425,
+						"label": "天等县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 450000,
+		"label": "广西壮族自治区",
+		"expand": "true"
+	},
+	{
+		"id": 2203,
+		"children": [{
+				"id": 2204,
+				"value": 460100,
+				"label": "海口市",
+				"children": [{
+						"value": 460106,
+						"label": "龙华区"
+					},
+					{
+						"value": 460105,
+						"label": "秀英区"
+					},
+					{
+						"value": 460107,
+						"label": "琼山区"
+					},
+					{
+						"value": 460108,
+						"label": "美兰区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2209,
+				"value": 460200,
+				"label": "三亚市",
+				"children": [{
+						"value": 460203,
+						"label": "吉阳区"
+					},
+					{
+						"value": 460202,
+						"label": "海棠区"
+					},
+					{
+						"value": 460204,
+						"label": "天涯区"
+					},
+					{
+						"value": 460205,
+						"label": "崖州区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2214,
+				"value": 460300,
+				"label": "三沙市",
+				"children": []
+			},
+			{
+				"id": 2215,
+				"value": 460400,
+				"label": "儋州市",
+				"children": [{
+						"value": 469001,
+						"label": "五指山市"
+					},
+					{
+						"value": 469002,
+						"label": "琼海市"
+					},
+					{
+						"value": 469005,
+						"label": "文昌市"
+					},
+					{
+						"value": 469006,
+						"label": "万宁市"
+					},
+					{
+						"value": 469007,
+						"label": "东方市"
+					},
+					{
+						"value": 469021,
+						"label": "定安县"
+					},
+					{
+						"value": 469022,
+						"label": "屯昌县"
+					},
+					{
+						"value": 469023,
+						"label": "澄迈县"
+					},
+					{
+						"value": 469024,
+						"label": "临高县"
+					},
+					{
+						"value": 469025,
+						"label": "白沙黎族自治县"
+					},
+					{
+						"value": 469026,
+						"label": "昌江黎族自治县"
+					},
+					{
+						"value": 469027,
+						"label": "乐东黎族自治县"
+					},
+					{
+						"value": 469028,
+						"label": "陵水黎族自治县"
+					},
+					{
+						"value": 469029,
+						"label": "保亭黎族苗族自治县"
+					},
+					{
+						"value": 469030,
+						"label": "琼中黎族苗族自治县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 460000,
+		"label": "海南省",
+		"expand": "true"
+	},
+	{
+		"id": 2231,
+		"children": [{
+			"id": 2232,
+			"value": 500100,
+			"label": "重庆市",
+			"children": [{
+					"value": 500103,
+					"label": "渝中区"
+				},
+				{
+					"value": 500101,
+					"label": "万州区"
+				},
+				{
+					"value": 500102,
+					"label": "涪陵区"
+				},
+				{
+					"value": 500104,
+					"label": "大渡口区"
+				},
+				{
+					"value": 500105,
+					"label": "江北区"
+				},
+				{
+					"value": 500106,
+					"label": "沙坪坝区"
+				},
+				{
+					"value": 500107,
+					"label": "九龙坡区"
+				},
+				{
+					"value": 500108,
+					"label": "南岸区"
+				},
+				{
+					"value": 500109,
+					"label": "北碚区"
+				},
+				{
+					"value": 500110,
+					"label": "綦江区"
+				},
+				{
+					"value": 500111,
+					"label": "大足区"
+				},
+				{
+					"value": 500112,
+					"label": "渝北区"
+				},
+				{
+					"value": 500113,
+					"label": "巴南区"
+				},
+				{
+					"value": 500114,
+					"label": "黔江区"
+				},
+				{
+					"value": 500115,
+					"label": "长寿区"
+				},
+				{
+					"value": 500116,
+					"label": "江津区"
+				},
+				{
+					"value": 500117,
+					"label": "合川区"
+				},
+				{
+					"value": 500118,
+					"label": "永川区"
+				},
+				{
+					"value": 500119,
+					"label": "南川区"
+				},
+				{
+					"value": 500120,
+					"label": "璧山区"
+				},
+				{
+					"value": 500151,
+					"label": "铜梁区"
+				},
+				{
+					"value": 500152,
+					"label": "潼南区"
+				},
+				{
+					"value": 500153,
+					"label": "荣昌区"
+				},
+				{
+					"value": 500154,
+					"label": "开州区"
+				},
+				{
+					"value": 500155,
+					"label": "梁平区"
+				},
+				{
+					"value": 500156,
+					"label": "武隆区"
+				},
+				{
+					"value": 500229,
+					"label": "城口县"
+				},
+				{
+					"value": 500230,
+					"label": "丰都县"
+				},
+				{
+					"value": 500231,
+					"label": "垫江县"
+				},
+				{
+					"value": 500233,
+					"label": "忠县"
+				},
+				{
+					"value": 500235,
+					"label": "云阳县"
+				},
+				{
+					"value": 500236,
+					"label": "奉节县"
+				},
+				{
+					"value": 500237,
+					"label": "巫山县"
+				},
+				{
+					"value": 500238,
+					"label": "巫溪县"
+				},
+				{
+					"value": 500240,
+					"label": "石柱土家族自治县"
+				},
+				{
+					"value": 500241,
+					"label": "秀山土家族苗族自治县"
+				},
+				{
+					"value": 500242,
+					"label": "酉阳土家族苗族自治县"
+				},
+				{
+					"value": 500243,
+					"label": "彭水苗族土家族自治县"
+				}
+			],
+			"expand": "true"
+		}],
+		"value": 500000,
+		"label": "重庆市",
+		"expand": "true"
+	},
+	{
+		"id": 2271,
+		"children": [{
+				"id": 2272,
+				"value": 510100,
+				"label": "成都市",
+				"children": [{
+						"value": 510107,
+						"label": "武侯区"
+					},
+					{
+						"value": 510104,
+						"label": "锦江区"
+					},
+					{
+						"value": 510105,
+						"label": "青羊区"
+					},
+					{
+						"value": 510106,
+						"label": "金牛区"
+					},
+					{
+						"value": 510108,
+						"label": "成华区"
+					},
+					{
+						"value": 510112,
+						"label": "龙泉驿区"
+					},
+					{
+						"value": 510113,
+						"label": "青白江区"
+					},
+					{
+						"value": 510114,
+						"label": "新都区"
+					},
+					{
+						"value": 510115,
+						"label": "温江区"
+					},
+					{
+						"value": 510116,
+						"label": "双流区"
+					},
+					{
+						"value": 510117,
+						"label": "郫都区"
+					},
+					{
+						"value": 510181,
+						"label": "都江堰市"
+					},
+					{
+						"value": 510182,
+						"label": "彭州市"
+					},
+					{
+						"value": 510183,
+						"label": "邛崃市"
+					},
+					{
+						"value": 510184,
+						"label": "崇州市"
+					},
+					{
+						"value": 510185,
+						"label": "简阳市"
+					},
+					{
+						"value": 510121,
+						"label": "金堂县"
+					},
+					{
+						"value": 510129,
+						"label": "大邑县"
+					},
+					{
+						"value": 510131,
+						"label": "蒲江县"
+					},
+					{
+						"value": 510132,
+						"label": "新津县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2293,
+				"value": 510300,
+				"label": "自贡市",
+				"children": [{
+						"value": 510302,
+						"label": "自流井区"
+					},
+					{
+						"value": 510303,
+						"label": "贡井区"
+					},
+					{
+						"value": 510304,
+						"label": "大安区"
+					},
+					{
+						"value": 510311,
+						"label": "沿滩区"
+					},
+					{
+						"value": 510321,
+						"label": "荣县"
+					},
+					{
+						"value": 510322,
+						"label": "富顺县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2300,
+				"value": 510400,
+				"label": "攀枝花市",
+				"children": [{
+						"value": 510402,
+						"label": "东区"
+					},
+					{
+						"value": 510403,
+						"label": "西区"
+					},
+					{
+						"value": 510411,
+						"label": "仁和区"
+					},
+					{
+						"value": 510421,
+						"label": "米易县"
+					},
+					{
+						"value": 510422,
+						"label": "盐边县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2306,
+				"value": 510500,
+				"label": "泸州市",
+				"children": [{
+						"value": 510502,
+						"label": "江阳区"
+					},
+					{
+						"value": 510503,
+						"label": "纳溪区"
+					},
+					{
+						"value": 510504,
+						"label": "龙马潭区"
+					},
+					{
+						"value": 510521,
+						"label": "泸县"
+					},
+					{
+						"value": 510522,
+						"label": "合江县"
+					},
+					{
+						"value": 510524,
+						"label": "叙永县"
+					},
+					{
+						"value": 510525,
+						"label": "古蔺县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2314,
+				"value": 510600,
+				"label": "德阳市",
+				"children": [{
+						"value": 510603,
+						"label": "旌阳区"
+					},
+					{
+						"value": 510681,
+						"label": "广汉市"
+					},
+					{
+						"value": 510682,
+						"label": "什邡市"
+					},
+					{
+						"value": 510683,
+						"label": "绵竹市"
+					},
+					{
+						"value": 510626,
+						"label": "罗江县"
+					},
+					{
+						"value": 510623,
+						"label": "中江县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2321,
+				"value": 510700,
+				"label": "绵阳市",
+				"children": [{
+						"value": 510703,
+						"label": "涪城区"
+					},
+					{
+						"value": 510704,
+						"label": "游仙区"
+					},
+					{
+						"value": 510705,
+						"label": "安州区"
+					},
+					{
+						"value": 510781,
+						"label": "江油市"
+					},
+					{
+						"value": 510722,
+						"label": "三台县"
+					},
+					{
+						"value": 510723,
+						"label": "盐亭县"
+					},
+					{
+						"value": 510725,
+						"label": "梓潼县"
+					},
+					{
+						"value": 510727,
+						"label": "平武县"
+					},
+					{
+						"value": 510726,
+						"label": "北川羌族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2331,
+				"value": 510800,
+				"label": "广元市",
+				"children": [{
+						"value": 510802,
+						"label": "利州区"
+					},
+					{
+						"value": 510811,
+						"label": "昭化区"
+					},
+					{
+						"value": 510812,
+						"label": "朝天区"
+					},
+					{
+						"value": 510821,
+						"label": "旺苍县"
+					},
+					{
+						"value": 510822,
+						"label": "青川县"
+					},
+					{
+						"value": 510823,
+						"label": "剑阁县"
+					},
+					{
+						"value": 510824,
+						"label": "苍溪县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2339,
+				"value": 510900,
+				"label": "遂宁市",
+				"children": [{
+						"value": 510903,
+						"label": "船山区"
+					},
+					{
+						"value": 510904,
+						"label": "安居区"
+					},
+					{
+						"value": 510921,
+						"label": "蓬溪县"
+					},
+					{
+						"value": 510922,
+						"label": "射洪县"
+					},
+					{
+						"value": 510923,
+						"label": "大英县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2345,
+				"value": 511000,
+				"label": "内江市",
+				"children": [{
+						"value": 511002,
+						"label": "市中区"
+					},
+					{
+						"value": 511011,
+						"label": "东兴区"
+					},
+					{
+						"value": 511083,
+						"label": "隆昌市"
+					},
+					{
+						"value": 511024,
+						"label": "威远县"
+					},
+					{
+						"value": 511025,
+						"label": "资中县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2351,
+				"value": 511100,
+				"label": "乐山市",
+				"children": [{
+						"value": 511102,
+						"label": "市中区"
+					},
+					{
+						"value": 511111,
+						"label": "沙湾区"
+					},
+					{
+						"value": 511112,
+						"label": "五通桥区"
+					},
+					{
+						"value": 511113,
+						"label": "金口河区"
+					},
+					{
+						"value": 511181,
+						"label": "峨眉山市"
+					},
+					{
+						"value": 511123,
+						"label": "犍为县"
+					},
+					{
+						"value": 511124,
+						"label": "井研县"
+					},
+					{
+						"value": 511126,
+						"label": "夹江县"
+					},
+					{
+						"value": 511129,
+						"label": "沐川县"
+					},
+					{
+						"value": 511132,
+						"label": "峨边彝族自治县"
+					},
+					{
+						"value": 511133,
+						"label": "马边彝族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2363,
+				"value": 511300,
+				"label": "南充市",
+				"children": [{
+						"value": 511302,
+						"label": "顺庆区"
+					},
+					{
+						"value": 511303,
+						"label": "高坪区"
+					},
+					{
+						"value": 511304,
+						"label": "嘉陵区"
+					},
+					{
+						"value": 511381,
+						"label": "阆中市"
+					},
+					{
+						"value": 511321,
+						"label": "南部县"
+					},
+					{
+						"value": 511322,
+						"label": "营山县"
+					},
+					{
+						"value": 511323,
+						"label": "蓬安县"
+					},
+					{
+						"value": 511324,
+						"label": "仪陇县"
+					},
+					{
+						"value": 511325,
+						"label": "西充县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2373,
+				"value": 511400,
+				"label": "眉山市",
+				"children": [{
+						"value": 511402,
+						"label": "东坡区"
+					},
+					{
+						"value": 511403,
+						"label": "彭山区"
+					},
+					{
+						"value": 511421,
+						"label": "仁寿县"
+					},
+					{
+						"value": 511423,
+						"label": "洪雅县"
+					},
+					{
+						"value": 511424,
+						"label": "丹棱县"
+					},
+					{
+						"value": 511425,
+						"label": "青神县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2380,
+				"value": 511500,
+				"label": "宜宾市",
+				"children": [{
+						"value": 511502,
+						"label": "翠屏区"
+					},
+					{
+						"value": 511503,
+						"label": "南溪区"
+					},
+					{
+						"value": 511521,
+						"label": "宜宾县"
+					},
+					{
+						"value": 511523,
+						"label": "江安县"
+					},
+					{
+						"value": 511524,
+						"label": "长宁县"
+					},
+					{
+						"value": 511525,
+						"label": "高县"
+					},
+					{
+						"value": 511526,
+						"label": "珙县"
+					},
+					{
+						"value": 511527,
+						"label": "筠连县"
+					},
+					{
+						"value": 511528,
+						"label": "兴文县"
+					},
+					{
+						"value": 511529,
+						"label": "屏山县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2391,
+				"value": 511600,
+				"label": "广安市",
+				"children": [{
+						"value": 511602,
+						"label": "广安区"
+					},
+					{
+						"value": 511603,
+						"label": "前锋区"
+					},
+					{
+						"value": 511681,
+						"label": "华蓥市"
+					},
+					{
+						"value": 511621,
+						"label": "岳池县"
+					},
+					{
+						"value": 511622,
+						"label": "武胜县"
+					},
+					{
+						"value": 511623,
+						"label": "邻水县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2398,
+				"value": 511700,
+				"label": "达州市",
+				"children": [{
+						"value": 511702,
+						"label": "通川区"
+					},
+					{
+						"value": 511703,
+						"label": "达川区"
+					},
+					{
+						"value": 511781,
+						"label": "万源市"
+					},
+					{
+						"value": 511722,
+						"label": "宣汉县"
+					},
+					{
+						"value": 511723,
+						"label": "开江县"
+					},
+					{
+						"value": 511724,
+						"label": "大竹县"
+					},
+					{
+						"value": 511725,
+						"label": "渠县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2406,
+				"value": 511800,
+				"label": "雅安市",
+				"children": [{
+						"value": 511802,
+						"label": "雨城区"
+					},
+					{
+						"value": 511803,
+						"label": "名山区"
+					},
+					{
+						"value": 511822,
+						"label": "荥经县"
+					},
+					{
+						"value": 511823,
+						"label": "汉源县"
+					},
+					{
+						"value": 511824,
+						"label": "石棉县"
+					},
+					{
+						"value": 511825,
+						"label": "天全县"
+					},
+					{
+						"value": 511826,
+						"label": "芦山县"
+					},
+					{
+						"value": 511827,
+						"label": "宝兴县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2415,
+				"value": 511900,
+				"label": "巴中市",
+				"children": [{
+						"value": 511902,
+						"label": "巴州区"
+					},
+					{
+						"value": 511903,
+						"label": "恩阳区"
+					},
+					{
+						"value": 511921,
+						"label": "通江县"
+					},
+					{
+						"value": 511922,
+						"label": "南江县"
+					},
+					{
+						"value": 511923,
+						"label": "平昌县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2421,
+				"value": 512000,
+				"label": "资阳市",
+				"children": [{
+						"value": 512002,
+						"label": "雁江区"
+					},
+					{
+						"value": 512022,
+						"label": "乐至县"
+					},
+					{
+						"value": 512021,
+						"label": "安岳县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2425,
+				"value": 513200,
+				"label": "阿坝藏族羌族自治州",
+				"children": [{
+						"value": 513201,
+						"label": "马尔康市"
+					},
+					{
+						"value": 513221,
+						"label": "汶川县"
+					},
+					{
+						"value": 513222,
+						"label": "理县"
+					},
+					{
+						"value": 513223,
+						"label": "茂县"
+					},
+					{
+						"value": 513224,
+						"label": "松潘县"
+					},
+					{
+						"value": 513225,
+						"label": "九寨沟县"
+					},
+					{
+						"value": 513226,
+						"label": "金川县"
+					},
+					{
+						"value": 513227,
+						"label": "小金县"
+					},
+					{
+						"value": 513228,
+						"label": "黑水县"
+					},
+					{
+						"value": 513230,
+						"label": "壤塘县"
+					},
+					{
+						"value": 513231,
+						"label": "阿坝县"
+					},
+					{
+						"value": 513232,
+						"label": "若尔盖县"
+					},
+					{
+						"value": 513233,
+						"label": "红原县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2439,
+				"value": 513300,
+				"label": "甘孜藏族自治州",
+				"children": [{
+						"value": 513301,
+						"label": "康定市"
+					},
+					{
+						"value": 513322,
+						"label": "泸定县"
+					},
+					{
+						"value": 513323,
+						"label": "丹巴县"
+					},
+					{
+						"value": 513324,
+						"label": "九龙县"
+					},
+					{
+						"value": 513325,
+						"label": "雅江县"
+					},
+					{
+						"value": 513326,
+						"label": "道孚县"
+					},
+					{
+						"value": 513327,
+						"label": "炉霍县"
+					},
+					{
+						"value": 513328,
+						"label": "甘孜县"
+					},
+					{
+						"value": 513329,
+						"label": "新龙县"
+					},
+					{
+						"value": 513330,
+						"label": "德格县"
+					},
+					{
+						"value": 513331,
+						"label": "白玉县"
+					},
+					{
+						"value": 513332,
+						"label": "石渠县"
+					},
+					{
+						"value": 513333,
+						"label": "色达县"
+					},
+					{
+						"value": 513334,
+						"label": "理塘县"
+					},
+					{
+						"value": 513335,
+						"label": "巴塘县"
+					},
+					{
+						"value": 513336,
+						"label": "乡城县"
+					},
+					{
+						"value": 513337,
+						"label": "稻城县"
+					},
+					{
+						"value": 513338,
+						"label": "得荣县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2458,
+				"value": 513400,
+				"label": "凉山彝族自治州",
+				"children": [{
+						"value": 513401,
+						"label": "西昌市"
+					},
+					{
+						"value": 513423,
+						"label": "盐源县"
+					},
+					{
+						"value": 513424,
+						"label": "德昌县"
+					},
+					{
+						"value": 513425,
+						"label": "会理县"
+					},
+					{
+						"value": 513426,
+						"label": "会东县"
+					},
+					{
+						"value": 513427,
+						"label": "宁南县"
+					},
+					{
+						"value": 513428,
+						"label": "普格县"
+					},
+					{
+						"value": 513429,
+						"label": "布拖县"
+					},
+					{
+						"value": 513430,
+						"label": "金阳县"
+					},
+					{
+						"value": 513431,
+						"label": "昭觉县"
+					},
+					{
+						"value": 513432,
+						"label": "喜德县"
+					},
+					{
+						"value": 513433,
+						"label": "冕宁县"
+					},
+					{
+						"value": 513434,
+						"label": "越西县"
+					},
+					{
+						"value": 513435,
+						"label": "甘洛县"
+					},
+					{
+						"value": 513436,
+						"label": "美姑县"
+					},
+					{
+						"value": 513437,
+						"label": "雷波县"
+					},
+					{
+						"value": 513422,
+						"label": "木里藏族自治县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 510000,
+		"label": "四川省",
+		"expand": "true"
+	},
+	{
+		"id": 2476,
+		"children": [{
+				"id": 2477,
+				"value": 520100,
+				"label": "贵阳市",
+				"children": [{
+						"value": 520112,
+						"label": "乌当区"
+					},
+					{
+						"value": 520102,
+						"label": "南明区"
+					},
+					{
+						"value": 520103,
+						"label": "云岩区"
+					},
+					{
+						"value": 520111,
+						"label": "花溪区"
+					},
+					{
+						"value": 520113,
+						"label": "白云区"
+					},
+					{
+						"value": 520115,
+						"label": "观山湖区"
+					},
+					{
+						"value": 520181,
+						"label": "清镇市"
+					},
+					{
+						"value": 520121,
+						"label": "开阳县"
+					},
+					{
+						"value": 520122,
+						"label": "息烽县"
+					},
+					{
+						"value": 520123,
+						"label": "修文县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2488,
+				"value": 520200,
+				"label": "六盘水市",
+				"children": [{
+						"value": 520201,
+						"label": "钟山区"
+					},
+					{
+						"value": 520281,
+						"label": "盘州市"
+					},
+					{
+						"value": 520221,
+						"label": "水城县"
+					},
+					{
+						"value": 520203,
+						"label": "六枝特区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2493,
+				"value": 520300,
+				"label": "遵义市",
+				"children": [{
+						"value": 520303,
+						"label": "汇川区"
+					},
+					{
+						"value": 520302,
+						"label": "红花岗区"
+					},
+					{
+						"value": 520304,
+						"label": "播州区"
+					},
+					{
+						"value": 520381,
+						"label": "赤水市"
+					},
+					{
+						"value": 520382,
+						"label": "仁怀市"
+					},
+					{
+						"value": 520322,
+						"label": "桐梓县"
+					},
+					{
+						"value": 520323,
+						"label": "绥阳县"
+					},
+					{
+						"value": 520324,
+						"label": "正安县"
+					},
+					{
+						"value": 520327,
+						"label": "凤冈县"
+					},
+					{
+						"value": 520328,
+						"label": "湄潭县"
+					},
+					{
+						"value": 520329,
+						"label": "余庆县"
+					},
+					{
+						"value": 520330,
+						"label": "习水县"
+					},
+					{
+						"value": 520325,
+						"label": "道真仡佬族苗族自治县"
+					},
+					{
+						"value": 520326,
+						"label": "务川仡佬族苗族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2508,
+				"value": 520400,
+				"label": "安顺市",
+				"children": [{
+						"value": 520402,
+						"label": "西秀区"
+					},
+					{
+						"value": 520403,
+						"label": "平坝区"
+					},
+					{
+						"value": 520422,
+						"label": "普定县"
+					},
+					{
+						"value": 520423,
+						"label": "镇宁布依族苗族自治县"
+					},
+					{
+						"value": 520424,
+						"label": "关岭布依族苗族自治县"
+					},
+					{
+						"value": 520425,
+						"label": "紫云苗族布依族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2515,
+				"value": 520500,
+				"label": "毕节市",
+				"children": [{
+						"value": 520502,
+						"label": "七星关区"
+					},
+					{
+						"value": 520521,
+						"label": "大方县"
+					},
+					{
+						"value": 520522,
+						"label": "黔西县"
+					},
+					{
+						"value": 520523,
+						"label": "金沙县"
+					},
+					{
+						"value": 520524,
+						"label": "织金县"
+					},
+					{
+						"value": 520525,
+						"label": "纳雍县"
+					},
+					{
+						"value": 520527,
+						"label": "赫章县"
+					},
+					{
+						"value": 520526,
+						"label": "威宁彝族回族苗族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2524,
+				"value": 520600,
+				"label": "铜仁市",
+				"children": [{
+						"value": 520602,
+						"label": "碧江区"
+					},
+					{
+						"value": 520603,
+						"label": "万山区"
+					},
+					{
+						"value": 520621,
+						"label": "江口县"
+					},
+					{
+						"value": 520623,
+						"label": "石阡县"
+					},
+					{
+						"value": 520624,
+						"label": "思南县"
+					},
+					{
+						"value": 520626,
+						"label": "德江县"
+					},
+					{
+						"value": 520622,
+						"label": "玉屏侗族自治县"
+					},
+					{
+						"value": 520625,
+						"label": "印江土家族苗族自治县"
+					},
+					{
+						"value": 520627,
+						"label": "沿河土家族自治县"
+					},
+					{
+						"value": 520628,
+						"label": "松桃苗族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2535,
+				"value": 522300,
+				"label": "黔西南布依族苗族自治州",
+				"children": [{
+						"value": 522301,
+						"label": "兴义市"
+					},
+					{
+						"value": 522322,
+						"label": "兴仁县"
+					},
+					{
+						"value": 522323,
+						"label": "普安县"
+					},
+					{
+						"value": 522324,
+						"label": "晴隆县"
+					},
+					{
+						"value": 522325,
+						"label": "贞丰县"
+					},
+					{
+						"value": 522326,
+						"label": "望谟县"
+					},
+					{
+						"value": 522327,
+						"label": "册亨县"
+					},
+					{
+						"value": 522328,
+						"label": "安龙县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2544,
+				"value": 522600,
+				"label": "黔东南苗族侗族自治州",
+				"children": [{
+						"value": 522601,
+						"label": "凯里市"
+					},
+					{
+						"value": 522622,
+						"label": "黄平县"
+					},
+					{
+						"value": 522623,
+						"label": "施秉县"
+					},
+					{
+						"value": 522624,
+						"label": "三穗县"
+					},
+					{
+						"value": 522625,
+						"label": "镇远县"
+					},
+					{
+						"value": 522626,
+						"label": "岑巩县"
+					},
+					{
+						"value": 522627,
+						"label": "天柱县"
+					},
+					{
+						"value": 522628,
+						"label": "锦屏县"
+					},
+					{
+						"value": 522629,
+						"label": "剑河县"
+					},
+					{
+						"value": 522630,
+						"label": "台江县"
+					},
+					{
+						"value": 522631,
+						"label": "黎平县"
+					},
+					{
+						"value": 522632,
+						"label": "榕江县"
+					},
+					{
+						"value": 522633,
+						"label": "从江县"
+					},
+					{
+						"value": 522634,
+						"label": "雷山县"
+					},
+					{
+						"value": 522635,
+						"label": "麻江县"
+					},
+					{
+						"value": 522636,
+						"label": "丹寨县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2561,
+				"value": 522700,
+				"label": "黔南布依族苗族自治州",
+				"children": [{
+						"value": 522701,
+						"label": "都匀市"
+					},
+					{
+						"value": 522702,
+						"label": "福泉市"
+					},
+					{
+						"value": 522722,
+						"label": "荔波县"
+					},
+					{
+						"value": 522723,
+						"label": "贵定县"
+					},
+					{
+						"value": 522725,
+						"label": "瓮安县"
+					},
+					{
+						"value": 522726,
+						"label": "独山县"
+					},
+					{
+						"value": 522727,
+						"label": "平塘县"
+					},
+					{
+						"value": 522728,
+						"label": "罗甸县"
+					},
+					{
+						"value": 522729,
+						"label": "长顺县"
+					},
+					{
+						"value": 522730,
+						"label": "龙里县"
+					},
+					{
+						"value": 522731,
+						"label": "惠水县"
+					},
+					{
+						"value": 522732,
+						"label": "三都水族自治县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 520000,
+		"label": "贵州省",
+		"expand": "true"
+	},
+	{
+		"id": 2574,
+		"children": [{
+				"id": 2575,
+				"value": 530100,
+				"label": "昆明市",
+				"children": [{
+						"value": 530114,
+						"label": "呈贡区"
+					},
+					{
+						"value": 530102,
+						"label": "五华区"
+					},
+					{
+						"value": 530103,
+						"label": "盘龙区"
+					},
+					{
+						"value": 530111,
+						"label": "官渡区"
+					},
+					{
+						"value": 530112,
+						"label": "西山区"
+					},
+					{
+						"value": 530113,
+						"label": "东川区"
+					},
+					{
+						"value": 530115,
+						"label": "晋宁区"
+					},
+					{
+						"value": 530181,
+						"label": "安宁市"
+					},
+					{
+						"value": 530124,
+						"label": "富民县"
+					},
+					{
+						"value": 530125,
+						"label": "宜良县"
+					},
+					{
+						"value": 530127,
+						"label": "嵩明县"
+					},
+					{
+						"value": 530126,
+						"label": "石林彝族自治县"
+					},
+					{
+						"value": 530128,
+						"label": "禄劝彝族苗族自治县"
+					},
+					{
+						"value": 530129,
+						"label": "寻甸回族彝族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2590,
+				"value": 530300,
+				"label": "曲靖市",
+				"children": [{
+						"value": 530302,
+						"label": "麒麟区"
+					},
+					{
+						"value": 530303,
+						"label": "沾益区"
+					},
+					{
+						"value": 530381,
+						"label": "宣威市"
+					},
+					{
+						"value": 530321,
+						"label": "马龙县"
+					},
+					{
+						"value": 530322,
+						"label": "陆良县"
+					},
+					{
+						"value": 530323,
+						"label": "师宗县"
+					},
+					{
+						"value": 530324,
+						"label": "罗平县"
+					},
+					{
+						"value": 530325,
+						"label": "富源县"
+					},
+					{
+						"value": 530326,
+						"label": "会泽县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2600,
+				"value": 530400,
+				"label": "玉溪市",
+				"children": [{
+						"value": 530402,
+						"label": "红塔区"
+					},
+					{
+						"value": 530403,
+						"label": "江川区"
+					},
+					{
+						"value": 530422,
+						"label": "澄江县"
+					},
+					{
+						"value": 530423,
+						"label": "通海县"
+					},
+					{
+						"value": 530424,
+						"label": "华宁县"
+					},
+					{
+						"value": 530425,
+						"label": "易门县"
+					},
+					{
+						"value": 530426,
+						"label": "峨山彝族自治县"
+					},
+					{
+						"value": 530427,
+						"label": "新平彝族傣族自治县"
+					},
+					{
+						"value": 530428,
+						"label": "元江哈尼族彝族傣族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2610,
+				"value": 530500,
+				"label": "保山市",
+				"children": [{
+						"value": 530502,
+						"label": "隆阳区"
+					},
+					{
+						"value": 530581,
+						"label": "腾冲市"
+					},
+					{
+						"value": 530521,
+						"label": "施甸县"
+					},
+					{
+						"value": 530523,
+						"label": "龙陵县"
+					},
+					{
+						"value": 530524,
+						"label": "昌宁县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2616,
+				"value": 530600,
+				"label": "昭通市",
+				"children": [{
+						"value": 530602,
+						"label": "昭阳区"
+					},
+					{
+						"value": 530621,
+						"label": "鲁甸县"
+					},
+					{
+						"value": 530622,
+						"label": "巧家县"
+					},
+					{
+						"value": 530623,
+						"label": "盐津�����"
+					},
+					{
+						"value": 530624,
+						"label": "���关县"
+					},
+					{
+						"value": 530625,
+						"label": "永善县"
+					},
+					{
+						"value": 530626,
+						"label": "绥江县"
+					},
+					{
+						"value": 530627,
+						"label": "镇雄县"
+					},
+					{
+						"value": 530628,
+						"label": "彝良县"
+					},
+					{
+						"value": 530629,
+						"label": "威信县"
+					},
+					{
+						"value": 530630,
+						"label": "水富县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2628,
+				"value": 530700,
+				"label": "丽江市",
+				"children": [{
+						"value": 530702,
+						"label": "古城区"
+					},
+					{
+						"value": 530722,
+						"label": "永胜县"
+					},
+					{
+						"value": 530723,
+						"label": "华坪县"
+					},
+					{
+						"value": 530721,
+						"label": "玉龙纳西族自治县"
+					},
+					{
+						"value": 530724,
+						"label": "宁蒗彝族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2634,
+				"value": 530800,
+				"label": "普洱市",
+				"children": [{
+						"value": 530802,
+						"label": "思茅区"
+					},
+					{
+						"value": 530821,
+						"label": "宁洱哈尼族彝族自治县"
+					},
+					{
+						"value": 530822,
+						"label": "墨江哈尼族自治县"
+					},
+					{
+						"value": 530823,
+						"label": "景东彝族自治县"
+					},
+					{
+						"value": 530824,
+						"label": "景谷傣族彝族自治县"
+					},
+					{
+						"value": 530825,
+						"label": "镇沅彝族哈尼族拉祜族自治县"
+					},
+					{
+						"value": 530826,
+						"label": "江城哈尼族彝族自治县"
+					},
+					{
+						"value": 530827,
+						"label": "孟连傣族拉祜族佤族自治县"
+					},
+					{
+						"value": 530828,
+						"label": "澜沧拉祜族自治县"
+					},
+					{
+						"value": 530829,
+						"label": "西盟佤族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2645,
+				"value": 530900,
+				"label": "临沧市",
+				"children": [{
+						"value": 530902,
+						"label": "临翔区"
+					},
+					{
+						"value": 530921,
+						"label": "凤庆县"
+					},
+					{
+						"value": 530922,
+						"label": "云县"
+					},
+					{
+						"value": 530923,
+						"label": "永德县"
+					},
+					{
+						"value": 530924,
+						"label": "镇康县"
+					},
+					{
+						"value": 530925,
+						"label": "双江拉祜族佤族布朗族傣族自治县"
+					},
+					{
+						"value": 530926,
+						"label": "耿马傣族佤族自治县"
+					},
+					{
+						"value": 530927,
+						"label": "沧源佤族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2654,
+				"value": 532300,
+				"label": "楚雄彝族自治州",
+				"children": [{
+						"value": 532301,
+						"label": "楚雄市"
+					},
+					{
+						"value": 532322,
+						"label": "双柏县"
+					},
+					{
+						"value": 532323,
+						"label": "牟定县"
+					},
+					{
+						"value": 532324,
+						"label": "南华县"
+					},
+					{
+						"value": 532325,
+						"label": "姚安县"
+					},
+					{
+						"value": 532326,
+						"label": "大姚县"
+					},
+					{
+						"value": 532327,
+						"label": "永仁县"
+					},
+					{
+						"value": 532328,
+						"label": "元谋县"
+					},
+					{
+						"value": 532329,
+						"label": "武定县"
+					},
+					{
+						"value": 532331,
+						"label": "禄丰县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2665,
+				"value": 532500,
+				"label": "红河哈尼族彝族自治州",
+				"children": [{
+						"value": 532503,
+						"label": "蒙自市"
+					},
+					{
+						"value": 532501,
+						"label": "个旧市"
+					},
+					{
+						"value": 532502,
+						"label": "开远市"
+					},
+					{
+						"value": 532504,
+						"label": "弥勒市"
+					},
+					{
+						"value": 532524,
+						"label": "建水县"
+					},
+					{
+						"value": 532525,
+						"label": "石屏县"
+					},
+					{
+						"value": 532527,
+						"label": "泸西县"
+					},
+					{
+						"value": 532528,
+						"label": "元阳县"
+					},
+					{
+						"value": 532529,
+						"label": "红河县"
+					},
+					{
+						"value": 532531,
+						"label": "绿春县"
+					},
+					{
+						"value": 532523,
+						"label": "屏边苗族自治县"
+					},
+					{
+						"value": 532530,
+						"label": "金平苗族瑶族傣族自治县"
+					},
+					{
+						"value": 532532,
+						"label": "河口瑶族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2679,
+				"value": 532600,
+				"label": "文山壮族苗族自治州",
+				"children": [{
+						"value": 532601,
+						"label": "文山市"
+					},
+					{
+						"value": 532622,
+						"label": "砚山县"
+					},
+					{
+						"value": 532623,
+						"label": "西畴县"
+					},
+					{
+						"value": 532624,
+						"label": "麻栗坡县"
+					},
+					{
+						"value": 532625,
+						"label": "马关县"
+					},
+					{
+						"value": 532626,
+						"label": "丘北县"
+					},
+					{
+						"value": 532627,
+						"label": "广南县"
+					},
+					{
+						"value": 532628,
+						"label": "富宁县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2688,
+				"value": 532800,
+				"label": "西双版纳傣族自治州",
+				"children": [{
+						"value": 532801,
+						"label": "景洪市"
+					},
+					{
+						"value": 532822,
+						"label": "勐海县"
+					},
+					{
+						"value": 532823,
+						"label": "勐腊县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2692,
+				"value": 532900,
+				"label": "大理白族自治州",
+				"children": [{
+						"value": 532901,
+						"label": "大理市"
+					},
+					{
+						"value": 532923,
+						"label": "祥云县"
+					},
+					{
+						"value": 532924,
+						"label": "宾川县"
+					},
+					{
+						"value": 532925,
+						"label": "弥渡县"
+					},
+					{
+						"value": 532928,
+						"label": "永平县"
+					},
+					{
+						"value": 532929,
+						"label": "云龙县"
+					},
+					{
+						"value": 532930,
+						"label": "洱源县"
+					},
+					{
+						"value": 532931,
+						"label": "剑川县"
+					},
+					{
+						"value": 532932,
+						"label": "鹤庆县"
+					},
+					{
+						"value": 532922,
+						"label": "漾濞彝族自治县"
+					},
+					{
+						"value": 532926,
+						"label": "南涧彝族自治县"
+					},
+					{
+						"value": 532927,
+						"label": "巍山彝族回族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2705,
+				"value": 533100,
+				"label": "德宏傣族景颇族自治州",
+				"children": [{
+						"value": 533103,
+						"label": "芒市"
+					},
+					{
+						"value": 533102,
+						"label": "瑞丽市"
+					},
+					{
+						"value": 533122,
+						"label": "梁河县"
+					},
+					{
+						"value": 533123,
+						"label": "盈江县"
+					},
+					{
+						"value": 533124,
+						"label": "陇川县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2711,
+				"value": 533300,
+				"label": "怒江傈僳族自治州",
+				"children": [{
+						"value": 533301,
+						"label": "泸水市"
+					},
+					{
+						"value": 533323,
+						"label": "福贡县"
+					},
+					{
+						"value": 533324,
+						"label": "贡山独龙族怒族自治县"
+					},
+					{
+						"value": 533325,
+						"label": "兰坪白族普米族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2716,
+				"value": 533400,
+				"label": "迪庆藏族自治州",
+				"children": [{
+						"value": 533401,
+						"label": "香格里拉市"
+					},
+					{
+						"value": 533422,
+						"label": "德钦县"
+					},
+					{
+						"value": 533423,
+						"label": "维西傈僳族自治县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 530000,
+		"label": "云南省",
+		"expand": "true"
+	},
+	{
+		"id": 2720,
+		"children": [{
+				"id": 2721,
+				"value": 540100,
+				"label": "拉萨市",
+				"children": [{
+						"value": 540102,
+						"label": "城关区"
+					},
+					{
+						"value": 540121,
+						"label": "林周县"
+					},
+					{
+						"value": 540122,
+						"label": "当雄县"
+					},
+					{
+						"value": 540123,
+						"label": "尼木县"
+					},
+					{
+						"value": 540124,
+						"label": "曲水县"
+					},
+					{
+						"value": 540103,
+						"label": "堆龙德庆区"
+					},
+					{
+						"value": 540126,
+						"label": "达孜县"
+					},
+					{
+						"value": 540127,
+						"label": "墨竹工卡县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2730,
+				"value": 540200,
+				"label": "日喀则市",
+				"children": [{
+						"value": 540202,
+						"label": "桑珠孜区"
+					},
+					{
+						"value": 540221,
+						"label": "南木林县"
+					},
+					{
+						"value": 540222,
+						"label": "江孜县"
+					},
+					{
+						"value": 540223,
+						"label": "定日县"
+					},
+					{
+						"value": 540224,
+						"label": "萨迦县"
+					},
+					{
+						"value": 540225,
+						"label": "拉孜县"
+					},
+					{
+						"value": 540226,
+						"label": "昂仁县"
+					},
+					{
+						"value": 540227,
+						"label": "谢通门县"
+					},
+					{
+						"value": 540228,
+						"label": "白朗县"
+					},
+					{
+						"value": 540229,
+						"label": "仁布县"
+					},
+					{
+						"value": 540230,
+						"label": "康马县"
+					},
+					{
+						"value": 540231,
+						"label": "定结县"
+					},
+					{
+						"value": 540232,
+						"label": "仲巴县"
+					},
+					{
+						"value": 540233,
+						"label": "亚东县"
+					},
+					{
+						"value": 540234,
+						"label": "吉隆县"
+					},
+					{
+						"value": 540235,
+						"label": "聂拉木县"
+					},
+					{
+						"value": 540236,
+						"label": "萨嘎县"
+					},
+					{
+						"value": 540237,
+						"label": "岗巴县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2749,
+				"value": 540300,
+				"label": "昌都市",
+				"children": [{
+						"value": 540302,
+						"label": "卡若区"
+					},
+					{
+						"value": 540321,
+						"label": "江达县"
+					},
+					{
+						"value": 540322,
+						"label": "贡觉县"
+					},
+					{
+						"value": 540323,
+						"label": "类乌齐县"
+					},
+					{
+						"value": 540324,
+						"label": "丁青县"
+					},
+					{
+						"value": 540325,
+						"label": "察雅县"
+					},
+					{
+						"value": 540326,
+						"label": "八宿县"
+					},
+					{
+						"value": 540327,
+						"label": "左贡县"
+					},
+					{
+						"value": 540328,
+						"label": "芒康县"
+					},
+					{
+						"value": 540329,
+						"label": "洛隆县"
+					},
+					{
+						"value": 540330,
+						"label": "边坝县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2761,
+				"value": 540400,
+				"label": "林芝市",
+				"children": [{
+						"value": 540402,
+						"label": "巴宜区"
+					},
+					{
+						"value": 540421,
+						"label": "工布江达县"
+					},
+					{
+						"value": 540422,
+						"label": "米林县"
+					},
+					{
+						"value": 540423,
+						"label": "墨脱县"
+					},
+					{
+						"value": 540424,
+						"label": "波密县"
+					},
+					{
+						"value": 540425,
+						"label": "察隅县"
+					},
+					{
+						"value": 540426,
+						"label": "朗县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2769,
+				"value": 540500,
+				"label": "山南市",
+				"children": [{
+						"value": 540502,
+						"label": "乃东区"
+					},
+					{
+						"value": 540521,
+						"label": "扎囊县"
+					},
+					{
+						"value": 540522,
+						"label": "贡嘎县"
+					},
+					{
+						"value": 540523,
+						"label": "桑日县"
+					},
+					{
+						"value": 540524,
+						"label": "琼结县"
+					},
+					{
+						"value": 540525,
+						"label": "曲松县"
+					},
+					{
+						"value": 540526,
+						"label": "措美县"
+					},
+					{
+						"value": 540527,
+						"label": "洛扎县"
+					},
+					{
+						"value": 540528,
+						"label": "加查县"
+					},
+					{
+						"value": 540529,
+						"label": "隆子县"
+					},
+					{
+						"value": 540530,
+						"label": "错那县"
+					},
+					{
+						"value": 540531,
+						"label": "浪卡子县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2782,
+				"value": 542400,
+				"label": "那曲地区",
+				"children": [{
+						"value": 542421,
+						"label": "那曲县"
+					},
+					{
+						"value": 542422,
+						"label": "嘉黎县"
+					},
+					{
+						"value": 542423,
+						"label": "比如县"
+					},
+					{
+						"value": 542424,
+						"label": "聂荣县"
+					},
+					{
+						"value": 542425,
+						"label": "安多县"
+					},
+					{
+						"value": 542426,
+						"label": "申扎县"
+					},
+					{
+						"value": 542427,
+						"label": "索县"
+					},
+					{
+						"value": 542428,
+						"label": "班戈县"
+					},
+					{
+						"value": 542429,
+						"label": "巴青县"
+					},
+					{
+						"value": 542430,
+						"label": "尼玛县"
+					},
+					{
+						"value": 542431,
+						"label": "双湖县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2794,
+				"value": 542500,
+				"label": "阿里地区",
+				"children": [{
+						"value": 542523,
+						"label": "噶尔县"
+					},
+					{
+						"value": 542521,
+						"label": "普兰县"
+					},
+					{
+						"value": 542522,
+						"label": "札达县"
+					},
+					{
+						"value": 542524,
+						"label": "日土县"
+					},
+					{
+						"value": 542525,
+						"label": "革吉县"
+					},
+					{
+						"value": 542526,
+						"label": "改则县"
+					},
+					{
+						"value": 542527,
+						"label": "措勤县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 540000,
+		"label": "西藏自治区",
+		"expand": "true"
+	},
+	{
+		"id": 2802,
+		"children": [{
+				"id": 2803,
+				"value": 610100,
+				"label": "西安市",
+				"children": [{
+						"value": 610112,
+						"label": "未央区"
+					},
+					{
+						"value": 610102,
+						"label": "新城区"
+					},
+					{
+						"value": 610103,
+						"label": "碑林区"
+					},
+					{
+						"value": 610104,
+						"label": "莲湖区"
+					},
+					{
+						"value": 610111,
+						"label": "灞桥区"
+					},
+					{
+						"value": 610113,
+						"label": "雁塔区"
+					},
+					{
+						"value": 610114,
+						"label": "阎良区"
+					},
+					{
+						"value": 610115,
+						"label": "临潼区"
+					},
+					{
+						"value": 610116,
+						"label": "长安区"
+					},
+					{
+						"value": 610117,
+						"label": "高陵区"
+					},
+					{
+						"value": 610118,
+						"label": "鄠邑区"
+					},
+					{
+						"value": 610122,
+						"label": "蓝田县"
+					},
+					{
+						"value": 610124,
+						"label": "周至县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2817,
+				"value": 610200,
+				"label": "铜川市",
+				"children": [{
+						"value": 610204,
+						"label": "耀州区"
+					},
+					{
+						"value": 610202,
+						"label": "王益区"
+					},
+					{
+						"value": 610203,
+						"label": "印台区"
+					},
+					{
+						"value": 610222,
+						"label": "宜君县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2822,
+				"value": 610300,
+				"label": "宝鸡市",
+				"children": [{
+						"value": 610303,
+						"label": "金台区"
+					},
+					{
+						"value": 610302,
+						"label": "渭滨区"
+					},
+					{
+						"value": 610304,
+						"label": "陈仓区"
+					},
+					{
+						"value": 610322,
+						"label": "凤翔县"
+					},
+					{
+						"value": 610323,
+						"label": "岐山县"
+					},
+					{
+						"value": 610324,
+						"label": "扶风县"
+					},
+					{
+						"value": 610326,
+						"label": "眉县"
+					},
+					{
+						"value": 610327,
+						"label": "陇县"
+					},
+					{
+						"value": 610328,
+						"label": "千阳县"
+					},
+					{
+						"value": 610329,
+						"label": "麟游县"
+					},
+					{
+						"value": 610330,
+						"label": "凤县"
+					},
+					{
+						"value": 610331,
+						"label": "太白县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2835,
+				"value": 610400,
+				"label": "咸阳市",
+				"children": [{
+						"value": 610402,
+						"label": "秦都区"
+					},
+					{
+						"value": 610403,
+						"label": "杨陵区"
+					},
+					{
+						"value": 610404,
+						"label": "渭城区"
+					},
+					{
+						"value": 610481,
+						"label": "兴平市"
+					},
+					{
+						"value": 610422,
+						"label": "三原县"
+					},
+					{
+						"value": 610423,
+						"label": "泾阳县"
+					},
+					{
+						"value": 610424,
+						"label": "乾县"
+					},
+					{
+						"value": 610425,
+						"label": "礼泉县"
+					},
+					{
+						"value": 610426,
+						"label": "永寿县"
+					},
+					{
+						"value": 610427,
+						"label": "彬县"
+					},
+					{
+						"value": 610428,
+						"label": "长武县"
+					},
+					{
+						"value": 610429,
+						"label": "旬邑县"
+					},
+					{
+						"value": 610430,
+						"label": "淳化县"
+					},
+					{
+						"value": 610431,
+						"label": "武功县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2850,
+				"value": 610500,
+				"label": "渭南市",
+				"children": [{
+						"value": 610502,
+						"label": "临渭区"
+					},
+					{
+						"value": 610581,
+						"label": "韩城市"
+					},
+					{
+						"value": 610582,
+						"label": "华阴市"
+					},
+					{
+						"value": 610503,
+						"label": "华州区"
+					},
+					{
+						"value": 610522,
+						"label": "潼关县"
+					},
+					{
+						"value": 610523,
+						"label": "大荔县"
+					},
+					{
+						"value": 610524,
+						"label": "合阳县"
+					},
+					{
+						"value": 610525,
+						"label": "澄城县"
+					},
+					{
+						"value": 610526,
+						"label": "蒲城县"
+					},
+					{
+						"value": 610527,
+						"label": "白水县"
+					},
+					{
+						"value": 610528,
+						"label": "富平县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2862,
+				"value": 610600,
+				"label": "延安市",
+				"children": [{
+						"value": 610602,
+						"label": "宝塔区"
+					},
+					{
+						"value": 610603,
+						"label": "安塞区"
+					},
+					{
+						"value": 610621,
+						"label": "延长县"
+					},
+					{
+						"value": 610622,
+						"label": "延川县"
+					},
+					{
+						"value": 610623,
+						"label": "子长县"
+					},
+					{
+						"value": 610625,
+						"label": "志丹县"
+					},
+					{
+						"value": 610626,
+						"label": "吴起县"
+					},
+					{
+						"value": 610627,
+						"label": "甘泉县"
+					},
+					{
+						"value": 610628,
+						"label": "富县"
+					},
+					{
+						"value": 610629,
+						"label": "洛川县"
+					},
+					{
+						"value": 610630,
+						"label": "宜川县"
+					},
+					{
+						"value": 610631,
+						"label": "黄龙县"
+					},
+					{
+						"value": 610632,
+						"label": "黄陵县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2876,
+				"value": 610700,
+				"label": "汉中市",
+				"children": [{
+						"value": 610702,
+						"label": "汉台区"
+					},
+					{
+						"value": 610721,
+						"label": "南郑县"
+					},
+					{
+						"value": 610722,
+						"label": "城固县"
+					},
+					{
+						"value": 610723,
+						"label": "洋县"
+					},
+					{
+						"value": 610724,
+						"label": "西乡县"
+					},
+					{
+						"value": 610725,
+						"label": "勉县"
+					},
+					{
+						"value": 610726,
+						"label": "宁强县"
+					},
+					{
+						"value": 610727,
+						"label": "略阳县"
+					},
+					{
+						"value": 610728,
+						"label": "镇巴县"
+					},
+					{
+						"value": 610729,
+						"label": "留坝县"
+					},
+					{
+						"value": 610730,
+						"label": "佛坪县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2888,
+				"value": 610800,
+				"label": "榆林市",
+				"children": [{
+						"value": 610802,
+						"label": "榆阳区"
+					},
+					{
+						"value": 610881,
+						"label": "神木市"
+					},
+					{
+						"value": 610822,
+						"label": "府谷县"
+					},
+					{
+						"value": 610803,
+						"label": "横山区"
+					},
+					{
+						"value": 610824,
+						"label": "靖边县"
+					},
+					{
+						"value": 610825,
+						"label": "定边县"
+					},
+					{
+						"value": 610826,
+						"label": "绥德县"
+					},
+					{
+						"value": 610827,
+						"label": "米脂县"
+					},
+					{
+						"value": 610828,
+						"label": "佳县"
+					},
+					{
+						"value": 610829,
+						"label": "吴堡县"
+					},
+					{
+						"value": 610830,
+						"label": "清涧县"
+					},
+					{
+						"value": 610831,
+						"label": "子洲县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2901,
+				"value": 610900,
+				"label": "安康市",
+				"children": [{
+						"value": 610902,
+						"label": "汉滨区"
+					},
+					{
+						"value": 610921,
+						"label": "汉阴县"
+					},
+					{
+						"value": 610922,
+						"label": "石泉县"
+					},
+					{
+						"value": 610923,
+						"label": "宁陕县"
+					},
+					{
+						"value": 610924,
+						"label": "紫阳县"
+					},
+					{
+						"value": 610925,
+						"label": "岚皋县"
+					},
+					{
+						"value": 610926,
+						"label": "平利县"
+					},
+					{
+						"value": 610927,
+						"label": "镇坪县"
+					},
+					{
+						"value": 610928,
+						"label": "旬阳县"
+					},
+					{
+						"value": 610929,
+						"label": "白河县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2912,
+				"value": 611000,
+				"label": "商洛市",
+				"children": [{
+						"value": 611002,
+						"label": "商州区"
+					},
+					{
+						"value": 611021,
+						"label": "洛南县"
+					},
+					{
+						"value": 611022,
+						"label": "丹凤县"
+					},
+					{
+						"value": 611023,
+						"label": "商南县"
+					},
+					{
+						"value": 611024,
+						"label": "山阳县"
+					},
+					{
+						"value": 611025,
+						"label": "镇安县"
+					},
+					{
+						"value": 611026,
+						"label": "柞水县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 610000,
+		"label": "陕西省",
+		"expand": "true"
+	},
+	{
+		"id": 2920,
+		"children": [{
+				"id": 2921,
+				"value": 620100,
+				"label": "兰州市",
+				"children": [{
+						"value": 620102,
+						"label": "城关区"
+					},
+					{
+						"value": 620103,
+						"label": "七里河区"
+					},
+					{
+						"value": 620104,
+						"label": "西固区"
+					},
+					{
+						"value": 620105,
+						"label": "安宁区"
+					},
+					{
+						"value": 620111,
+						"label": "红古区"
+					},
+					{
+						"value": 620121,
+						"label": "永登县"
+					},
+					{
+						"value": 620122,
+						"label": "皋兰县"
+					},
+					{
+						"value": 620123,
+						"label": "榆中县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2930,
+				"value": 620200,
+				"label": "嘉峪关市",
+				"children": []
+			},
+			{
+				"id": 2931,
+				"value": 620300,
+				"label": "金昌市",
+				"children": [{
+						"value": 620302,
+						"label": "金川区"
+					},
+					{
+						"value": 620321,
+						"label": "永昌县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2934,
+				"value": 620400,
+				"label": "白银市",
+				"children": [{
+						"value": 620402,
+						"label": "白银区"
+					},
+					{
+						"value": 620403,
+						"label": "平川区"
+					},
+					{
+						"value": 620421,
+						"label": "靖远县"
+					},
+					{
+						"value": 620422,
+						"label": "会宁县"
+					},
+					{
+						"value": 620423,
+						"label": "景泰县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2940,
+				"value": 620500,
+				"label": "天水市",
+				"children": [{
+						"value": 620502,
+						"label": "秦州区"
+					},
+					{
+						"value": 620503,
+						"label": "麦积区"
+					},
+					{
+						"value": 620521,
+						"label": "清水县"
+					},
+					{
+						"value": 620522,
+						"label": "秦安县"
+					},
+					{
+						"value": 620523,
+						"label": "甘谷县"
+					},
+					{
+						"value": 620524,
+						"label": "武山县"
+					},
+					{
+						"value": 620525,
+						"label": "张家川回族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2948,
+				"value": 620600,
+				"label": "武威市",
+				"children": [{
+						"value": 620602,
+						"label": "凉州区"
+					},
+					{
+						"value": 620621,
+						"label": "民勤县"
+					},
+					{
+						"value": 620622,
+						"label": "古浪县"
+					},
+					{
+						"value": 620623,
+						"label": "天祝藏族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2953,
+				"value": 620700,
+				"label": "张掖市",
+				"children": [{
+						"value": 620702,
+						"label": "甘州区"
+					},
+					{
+						"value": 620722,
+						"label": "民乐县"
+					},
+					{
+						"value": 620723,
+						"label": "临泽县"
+					},
+					{
+						"value": 620724,
+						"label": "高台县"
+					},
+					{
+						"value": 620725,
+						"label": "山丹县"
+					},
+					{
+						"value": 620721,
+						"label": "肃南裕固族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2960,
+				"value": 620800,
+				"label": "平凉市",
+				"children": [{
+						"value": 620802,
+						"label": "崆峒区"
+					},
+					{
+						"value": 620821,
+						"label": "泾川县"
+					},
+					{
+						"value": 620822,
+						"label": "灵台县"
+					},
+					{
+						"value": 620823,
+						"label": "崇信县"
+					},
+					{
+						"value": 620824,
+						"label": "华亭县"
+					},
+					{
+						"value": 620825,
+						"label": "庄浪县"
+					},
+					{
+						"value": 620826,
+						"label": "静宁县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2968,
+				"value": 620900,
+				"label": "酒泉市",
+				"children": [{
+						"value": 620902,
+						"label": "肃州区"
+					},
+					{
+						"value": 620981,
+						"label": "玉门市"
+					},
+					{
+						"value": 620982,
+						"label": "敦煌市"
+					},
+					{
+						"value": 620921,
+						"label": "金塔县"
+					},
+					{
+						"value": 620922,
+						"label": "瓜州县"
+					},
+					{
+						"value": 620923,
+						"label": "肃北蒙古族自治县"
+					},
+					{
+						"value": 620924,
+						"label": "阿克塞哈萨克族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2976,
+				"value": 621000,
+				"label": "庆阳市",
+				"children": [{
+						"value": 621002,
+						"label": "西峰区"
+					},
+					{
+						"value": 621021,
+						"label": "庆城县"
+					},
+					{
+						"value": 621022,
+						"label": "环县"
+					},
+					{
+						"value": 621023,
+						"label": "华池县"
+					},
+					{
+						"value": 621024,
+						"label": "合水县"
+					},
+					{
+						"value": 621025,
+						"label": "正宁县"
+					},
+					{
+						"value": 621026,
+						"label": "宁县"
+					},
+					{
+						"value": 621027,
+						"label": "镇原县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2985,
+				"value": 621100,
+				"label": "定西市",
+				"children": [{
+						"value": 621102,
+						"label": "安定区"
+					},
+					{
+						"value": 621121,
+						"label": "通渭县"
+					},
+					{
+						"value": 621122,
+						"label": "陇西县"
+					},
+					{
+						"value": 621123,
+						"label": "渭源县"
+					},
+					{
+						"value": 621124,
+						"label": "临洮县"
+					},
+					{
+						"value": 621125,
+						"label": "漳县"
+					},
+					{
+						"value": 621126,
+						"label": "岷县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 2993,
+				"value": 621200,
+				"label": "陇南市",
+				"children": [{
+						"value": 621202,
+						"label": "武都区"
+					},
+					{
+						"value": 621221,
+						"label": "成县"
+					},
+					{
+						"value": 621222,
+						"label": "文县"
+					},
+					{
+						"value": 621223,
+						"label": "宕昌县"
+					},
+					{
+						"value": 621224,
+						"label": "康县"
+					},
+					{
+						"value": 621225,
+						"label": "西和县"
+					},
+					{
+						"value": 621226,
+						"label": "礼县"
+					},
+					{
+						"value": 621227,
+						"label": "徽县"
+					},
+					{
+						"value": 621228,
+						"label": "两当县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3003,
+				"value": 622900,
+				"label": "临夏回族自治州",
+				"children": [{
+						"value": 622901,
+						"label": "临夏市"
+					},
+					{
+						"value": 622921,
+						"label": "临夏县"
+					},
+					{
+						"value": 622922,
+						"label": "康乐县"
+					},
+					{
+						"value": 622923,
+						"label": "永靖县"
+					},
+					{
+						"value": 622924,
+						"label": "广河县"
+					},
+					{
+						"value": 622925,
+						"label": "和政县"
+					},
+					{
+						"value": 622926,
+						"label": "东乡族自治县"
+					},
+					{
+						"value": 622927,
+						"label": "积石山保安族东乡族撒拉族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3012,
+				"value": 623000,
+				"label": "甘南藏族自治州",
+				"children": [{
+						"value": 623001,
+						"label": "合作市"
+					},
+					{
+						"value": 623021,
+						"label": "临潭县"
+					},
+					{
+						"value": 623022,
+						"label": "卓尼县"
+					},
+					{
+						"value": 623023,
+						"label": "舟曲县"
+					},
+					{
+						"value": 623024,
+						"label": "迭部县"
+					},
+					{
+						"value": 623025,
+						"label": "玛曲县"
+					},
+					{
+						"value": 623026,
+						"label": "碌曲县"
+					},
+					{
+						"value": 623027,
+						"label": "夏河县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 620000,
+		"label": "甘肃省",
+		"expand": "true"
+	},
+	{
+		"id": 3021,
+		"children": [{
+				"id": 3022,
+				"value": 630100,
+				"label": "西宁市",
+				"children": [{
+						"value": 630103,
+						"label": "城中区"
+					},
+					{
+						"value": 630102,
+						"label": "城东区"
+					},
+					{
+						"value": 630104,
+						"label": "城西区"
+					},
+					{
+						"value": 630105,
+						"label": "城北区"
+					},
+					{
+						"value": 630122,
+						"label": "湟中县"
+					},
+					{
+						"value": 630123,
+						"label": "湟源县"
+					},
+					{
+						"value": 630121,
+						"label": "大通回族土族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3030,
+				"value": 630200,
+				"label": "海东市",
+				"children": [{
+						"value": 630202,
+						"label": "乐都区"
+					},
+					{
+						"value": 630203,
+						"label": "平安区"
+					},
+					{
+						"value": 630222,
+						"label": "民和回族土族自治县"
+					},
+					{
+						"value": 630223,
+						"label": "互助土族自治县"
+					},
+					{
+						"value": 630224,
+						"label": "化隆回族自治县"
+					},
+					{
+						"value": 630225,
+						"label": "循化撒拉族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3037,
+				"value": 632200,
+				"label": "海北藏族自治州",
+				"children": [{
+						"value": 632223,
+						"label": "海晏县"
+					},
+					{
+						"value": 632222,
+						"label": "祁连县"
+					},
+					{
+						"value": 632224,
+						"label": "刚察县"
+					},
+					{
+						"value": 632221,
+						"label": "门源回族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3042,
+				"value": 632300,
+				"label": "黄南藏族自治州",
+				"children": [{
+						"value": 632321,
+						"label": "同仁县"
+					},
+					{
+						"value": 632322,
+						"label": "尖扎县"
+					},
+					{
+						"value": 632323,
+						"label": "泽库县"
+					},
+					{
+						"value": 632324,
+						"label": "河南蒙古族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3047,
+				"value": 632500,
+				"label": "海南藏族自治州",
+				"children": [{
+						"value": 632521,
+						"label": "共和县"
+					},
+					{
+						"value": 632522,
+						"label": "同德县"
+					},
+					{
+						"value": 632523,
+						"label": "贵德县"
+					},
+					{
+						"value": 632524,
+						"label": "兴海县"
+					},
+					{
+						"value": 632525,
+						"label": "贵南县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3053,
+				"value": 632600,
+				"label": "果洛藏族自治州",
+				"children": [{
+						"value": 632621,
+						"label": "玛沁县"
+					},
+					{
+						"value": 632622,
+						"label": "班玛县"
+					},
+					{
+						"value": 632623,
+						"label": "甘德县"
+					},
+					{
+						"value": 632624,
+						"label": "达日县"
+					},
+					{
+						"value": 632625,
+						"label": "久治县"
+					},
+					{
+						"value": 632626,
+						"label": "玛多县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3060,
+				"value": 632700,
+				"label": "玉树藏族自治州",
+				"children": [{
+						"value": 632701,
+						"label": "玉树市"
+					},
+					{
+						"value": 632722,
+						"label": "杂多县"
+					},
+					{
+						"value": 632723,
+						"label": "称多县"
+					},
+					{
+						"value": 632724,
+						"label": "治多县"
+					},
+					{
+						"value": 632725,
+						"label": "囊谦县"
+					},
+					{
+						"value": 632726,
+						"label": "曲麻莱县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3067,
+				"value": 632800,
+				"label": "海西蒙古族藏族自治州",
+				"children": [{
+						"value": 632802,
+						"label": "德令哈市"
+					},
+					{
+						"value": 632801,
+						"label": "格尔木市"
+					},
+					{
+						"value": 632821,
+						"label": "乌兰县"
+					},
+					{
+						"value": 632822,
+						"label": "都兰县"
+					},
+					{
+						"value": 632823,
+						"label": "天峻县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 630000,
+		"label": "青海省",
+		"expand": "true"
+	},
+	{
+		"id": 3073,
+		"children": [{
+				"id": 3074,
+				"value": 640100,
+				"label": "银川市",
+				"children": [{
+						"value": 640106,
+						"label": "金凤区"
+					},
+					{
+						"value": 640104,
+						"label": "兴庆区"
+					},
+					{
+						"value": 640105,
+						"label": "西夏区"
+					},
+					{
+						"value": 640181,
+						"label": "灵武市"
+					},
+					{
+						"value": 640121,
+						"label": "永宁县"
+					},
+					{
+						"value": 640122,
+						"label": "贺兰县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3081,
+				"value": 640200,
+				"label": "石嘴山市",
+				"children": [{
+						"value": 640202,
+						"label": "大武口区"
+					},
+					{
+						"value": 640205,
+						"label": "惠农区"
+					},
+					{
+						"value": 640221,
+						"label": "平罗县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3085,
+				"value": 640300,
+				"label": "吴忠市",
+				"children": [{
+						"value": 640302,
+						"label": "利通区"
+					},
+					{
+						"value": 640303,
+						"label": "红寺堡区"
+					},
+					{
+						"value": 640381,
+						"label": "青铜峡市"
+					},
+					{
+						"value": 640323,
+						"label": "盐池县"
+					},
+					{
+						"value": 640324,
+						"label": "同心县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3091,
+				"value": 640400,
+				"label": "固原市",
+				"children": [{
+						"value": 640402,
+						"label": "原州区"
+					},
+					{
+						"value": 640422,
+						"label": "西吉县"
+					},
+					{
+						"value": 640423,
+						"label": "隆德县"
+					},
+					{
+						"value": 640424,
+						"label": "泾源县"
+					},
+					{
+						"value": 640425,
+						"label": "彭阳县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3097,
+				"value": 640500,
+				"label": "中卫市",
+				"children": [{
+						"value": 640502,
+						"label": "沙坡头区"
+					},
+					{
+						"value": 640521,
+						"label": "中宁县"
+					},
+					{
+						"value": 640522,
+						"label": "海原县"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 640000,
+		"label": "宁夏回族自治区",
+		"expand": "true"
+	},
+	{
+		"id": 3101,
+		"children": [{
+				"id": 3102,
+				"value": 650100,
+				"label": "乌鲁木齐市",
+				"children": [{
+						"value": 650102,
+						"label": "天山区"
+					},
+					{
+						"value": 650103,
+						"label": "沙依巴克区"
+					},
+					{
+						"value": 650104,
+						"label": "新市区"
+					},
+					{
+						"value": 650105,
+						"label": "水磨沟区"
+					},
+					{
+						"value": 650106,
+						"label": "头屯河区"
+					},
+					{
+						"value": 650107,
+						"label": "达坂城区"
+					},
+					{
+						"value": 650109,
+						"label": "米东区"
+					},
+					{
+						"value": 650121,
+						"label": "乌鲁木齐县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3111,
+				"value": 650200,
+				"label": "克拉玛依市",
+				"children": [{
+						"value": 650203,
+						"label": "克拉玛依区"
+					},
+					{
+						"value": 650202,
+						"label": "独山子区"
+					},
+					{
+						"value": 650204,
+						"label": "白碱滩区"
+					},
+					{
+						"value": 650205,
+						"label": "乌尔禾区"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3116,
+				"value": 650400,
+				"label": "吐鲁番市",
+				"children": [{
+						"value": 650402,
+						"label": "高昌区"
+					},
+					{
+						"value": 650421,
+						"label": "鄯善县"
+					},
+					{
+						"value": 650422,
+						"label": "托克逊县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3120,
+				"value": 650500,
+				"label": "哈密市",
+				"children": [{
+						"value": 650502,
+						"label": "伊州区"
+					},
+					{
+						"value": 650522,
+						"label": "伊吾县"
+					},
+					{
+						"value": 650521,
+						"label": "巴里坤哈萨克自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3124,
+				"value": 652900,
+				"label": "阿克苏地区",
+				"children": [{
+						"value": 652901,
+						"label": "阿克苏市"
+					},
+					{
+						"value": 652922,
+						"label": "温宿县"
+					},
+					{
+						"value": 652923,
+						"label": "库车县"
+					},
+					{
+						"value": 652924,
+						"label": "沙雅县"
+					},
+					{
+						"value": 652925,
+						"label": "新和县"
+					},
+					{
+						"value": 652926,
+						"label": "拜城县"
+					},
+					{
+						"value": 652927,
+						"label": "乌什县"
+					},
+					{
+						"value": 652928,
+						"label": "阿瓦提县"
+					},
+					{
+						"value": 652929,
+						"label": "柯坪县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3134,
+				"value": 653100,
+				"label": "喀什地区",
+				"children": [{
+						"value": 653101,
+						"label": "喀什市"
+					},
+					{
+						"value": 653121,
+						"label": "疏附县"
+					},
+					{
+						"value": 653122,
+						"label": "疏勒县"
+					},
+					{
+						"value": 653123,
+						"label": "英吉沙县"
+					},
+					{
+						"value": 653124,
+						"label": "泽普县"
+					},
+					{
+						"value": 653125,
+						"label": "莎车县"
+					},
+					{
+						"value": 653126,
+						"label": "叶城县"
+					},
+					{
+						"value": 653127,
+						"label": "麦盖提县"
+					},
+					{
+						"value": 653128,
+						"label": "岳普湖县"
+					},
+					{
+						"value": 653129,
+						"label": "伽师县"
+					},
+					{
+						"value": 653130,
+						"label": "巴楚县"
+					},
+					{
+						"value": 653131,
+						"label": "塔什库尔干塔吉克自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3147,
+				"value": 653200,
+				"label": "和田地区",
+				"children": [{
+						"value": 653201,
+						"label": "和田市"
+					},
+					{
+						"value": 653221,
+						"label": "和田县"
+					},
+					{
+						"value": 653222,
+						"label": "墨玉县"
+					},
+					{
+						"value": 653223,
+						"label": "皮山县"
+					},
+					{
+						"value": 653224,
+						"label": "洛浦县"
+					},
+					{
+						"value": 653225,
+						"label": "策勒县"
+					},
+					{
+						"value": 653226,
+						"label": "于田县"
+					},
+					{
+						"value": 653227,
+						"label": "民丰县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3156,
+				"value": 652300,
+				"label": "昌吉回族自治州",
+				"children": [{
+						"value": 652301,
+						"label": "昌吉市"
+					},
+					{
+						"value": 652302,
+						"label": "阜康市"
+					},
+					{
+						"value": 652323,
+						"label": "呼图壁县"
+					},
+					{
+						"value": 652324,
+						"label": "玛纳斯县"
+					},
+					{
+						"value": 652325,
+						"label": "奇台县"
+					},
+					{
+						"value": 652327,
+						"label": "吉木萨尔县"
+					},
+					{
+						"value": 652328,
+						"label": "木垒哈萨克自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3164,
+				"value": 652700,
+				"label": "博尔塔拉蒙古自治州",
+				"children": [{
+						"value": 652701,
+						"label": "博乐市"
+					},
+					{
+						"value": 652702,
+						"label": "阿拉山口市"
+					},
+					{
+						"value": 652722,
+						"label": "精河县"
+					},
+					{
+						"value": 652723,
+						"label": "温泉县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3169,
+				"value": 652800,
+				"label": "巴音郭楞蒙古自治州",
+				"children": [{
+						"value": 652801,
+						"label": "库尔勒市"
+					},
+					{
+						"value": 652822,
+						"label": "轮台县"
+					},
+					{
+						"value": 652823,
+						"label": "尉犁县"
+					},
+					{
+						"value": 652824,
+						"label": "若羌县"
+					},
+					{
+						"value": 652825,
+						"label": "且末县"
+					},
+					{
+						"value": 652827,
+						"label": "和静县"
+					},
+					{
+						"value": 652828,
+						"label": "和硕县"
+					},
+					{
+						"value": 652829,
+						"label": "博湖县"
+					},
+					{
+						"value": 652826,
+						"label": "焉耆回族自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3179,
+				"value": 653000,
+				"label": "克孜勒苏柯尔克孜自治州",
+				"children": [{
+						"value": 653001,
+						"label": "阿图什市"
+					},
+					{
+						"value": 653022,
+						"label": "阿克陶县"
+					},
+					{
+						"value": 653023,
+						"label": "阿合奇县"
+					},
+					{
+						"value": 653024,
+						"label": "乌恰县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3184,
+				"value": 654000,
+				"label": "伊犁哈萨克自治州",
+				"children": [{
+						"value": 654002,
+						"label": "伊宁市"
+					},
+					{
+						"value": 654003,
+						"label": "奎屯市"
+					},
+					{
+						"value": 654004,
+						"label": "霍尔果斯市"
+					},
+					{
+						"value": 654021,
+						"label": "伊宁县"
+					},
+					{
+						"value": 654023,
+						"label": "霍城县"
+					},
+					{
+						"value": 654024,
+						"label": "巩留县"
+					},
+					{
+						"value": 654025,
+						"label": "新源县"
+					},
+					{
+						"value": 654026,
+						"label": "昭苏县"
+					},
+					{
+						"value": 654027,
+						"label": "特克斯县"
+					},
+					{
+						"value": 654028,
+						"label": "尼勒克县"
+					},
+					{
+						"value": 654022,
+						"label": "察布查尔锡伯自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3196,
+				"value": 654200,
+				"label": "塔城地区",
+				"children": [{
+						"value": 654201,
+						"label": "塔城市"
+					},
+					{
+						"value": 654202,
+						"label": "乌苏市"
+					},
+					{
+						"value": 654221,
+						"label": "额敏县"
+					},
+					{
+						"value": 654223,
+						"label": "沙湾县"
+					},
+					{
+						"value": 654224,
+						"label": "托里县"
+					},
+					{
+						"value": 654225,
+						"label": "裕民县"
+					},
+					{
+						"value": 654226,
+						"label": "和布克赛尔蒙古自治县"
+					}
+				],
+				"expand": "true"
+			},
+			{
+				"id": 3204,
+				"value": 654300,
+				"label": "阿勒泰地区",
+				"children": [{
+						"value": 654301,
+						"label": "阿勒泰市"
+					},
+					{
+						"value": 654321,
+						"label": "布尔津县"
+					},
+					{
+						"value": 654322,
+						"label": "富蕴县"
+					},
+					{
+						"value": 654323,
+						"label": "福海县"
+					},
+					{
+						"value": 654324,
+						"label": "哈巴河县"
+					},
+					{
+						"value": 654325,
+						"label": "青河县"
+					},
+					{
+						"value": 654326,
+						"label": "吉木乃县"
+					},
+					{
+						"value": 659001,
+						"label": "石河子市"
+					},
+					{
+						"value": 659002,
+						"label": "阿拉尔市"
+					},
+					{
+						"value": 659003,
+						"label": "图木舒克市"
+					},
+					{
+						"value": 659004,
+						"label": "五家渠市"
+					},
+					{
+						"value": 659005,
+						"label": "北屯市"
+					},
+					{
+						"value": 659006,
+						"label": "铁门关市"
+					},
+					{
+						"value": 659007,
+						"label": "双河市"
+					},
+					{
+						"value": 659008,
+						"label": "可克达拉市"
+					},
+					{
+						"value": 659009,
+						"label": "昆玉市"
+					}
+				],
+				"expand": "true"
+			}
+		],
+		"value": 650000,
+		"label": "新疆维吾尔自治区",
+		"expand": "true"
+	},
+	{
+		"id": 3221,
+		"children": [{
+			"id": 3222,
+			"value": 810100,
+			"label": "香港特别行政区",
+			"children": []
+		}],
+		"value": 810000,
+		"label": "香港特别行政区",
+		"expand": "true"
+	},
+	{
+		"id": 3223,
+		"children": [{
+			"children": [],
+			"id": 3224,
+			"value": 820100,
+			"label": "澳门特别行政区(澳)"
+		}],
+		"value": 820000,
+		"label": "澳门特别行政区",
+		"expand": "true"
+	},
+	{
+		"id": 3225,
+		"value": 710000,
+		"label": "台湾省",
+		"expand": "true"
+	}
+]

+ 151 - 0
components/tki-tree/style.css

@@ -0,0 +1,151 @@
+.tki-tree-mask {
+  position: fixed;
+  top: 0rpx;
+  right: 0rpx;
+  bottom: 0rpx;
+  left: 0rpx;
+  z-index: 9998;
+  background-color: rgba(0, 0, 0, 0.6);
+  opacity: 0;
+  transition: all 0.3s ease;
+  visibility: hidden;
+}
+.tki-tree-mask.show {
+  visibility: visible;
+  opacity: 1;
+}
+.tki-tree-cnt {
+  position: fixed;
+  top: 0rpx;
+  right: 0rpx;
+  bottom: 0rpx;
+  left: 0rpx;
+  z-index: 9999;
+  top: 160rpx;
+  transition: all 0.3s ease;
+  transform: translateY(100%);
+}
+.tki-tree-cnt.show {
+  transform: translateY(0);
+}
+.tki-tree-bar {
+  background-color: #fff;
+  height: 72rpx;
+  padding-left: 20rpx;
+  padding-right: 20rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  box-sizing: border-box;
+  border-bottom-width: 1rpx !important;
+  border-bottom-style: solid;
+  border-bottom-color: #f5f5f5;
+  font-size: 32rpx;
+  color: #757575;
+  line-height: 1;
+}
+.tki-tree-bar-confirm {
+  color: #2979ff;
+}
+.tki-tree-view {
+  position: absolute;
+  top: 0rpx;
+  right: 0rpx;
+  bottom: 0rpx;
+  left: 0rpx;
+  top: 72rpx;
+  background-color: #fff;
+  padding-top: 20rpx;
+  padding-right: 20rpx;
+  padding-bottom: 20rpx;
+  padding-left: 20rpx;
+}
+.tki-tree-view-sc {
+  height: 100%;
+  overflow: hidden;
+}
+.tki-tree-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  font-size: 26rpx;
+  color: #757575;
+  line-height: 1;
+  height: 0;
+  opacity: 0;
+  transition: 0.2s;
+  position: relative;
+  overflow: hidden;
+}
+.tki-tree-item.show {
+  height: 80rpx;
+  opacity: 1;
+}
+.tki-tree-item.showchild:before {
+  transform: rotate(90deg);
+}
+.tki-tree-item.last:before {
+  opacity: 0;
+}
+.tki-tree-icon {
+  width: 26rpx;
+  height: 26rpx;
+  margin-right: 8rpx;
+}
+.tki-tree-label {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  height: 100%;
+  line-height: 1.2;
+}
+.tki-tree-check {
+  width: 40px;
+  height: 40px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
+.tki-tree-check-yes,
+.tki-tree-check-no {
+  width: 20px;
+  height: 20px;
+  border-top-left-radius: 20%;
+  border-top-right-radius: 20%;
+  border-bottom-right-radius: 20%;
+  border-bottom-left-radius: 20%;
+  border-top-width: 1rpx;
+  border-left-width: 1rpx;
+  border-bottom-width: 1rpx;
+  border-right-width: 1rpx;
+  border-style: solid;
+  border-color: #2979ff;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  box-sizing: border-box;
+}
+.tki-tree-check-yes-b {
+  width: 12px;
+  height: 12px;
+  border-top-left-radius: 20%;
+  border-top-right-radius: 20%;
+  border-bottom-right-radius: 20%;
+  border-bottom-left-radius: 20%;
+  background-color: #2979ff;
+}
+.tki-tree-check .radio {
+  border-top-left-radius: 50%;
+  border-top-right-radius: 50%;
+  border-bottom-right-radius: 50%;
+  border-bottom-left-radius: 50%;
+}
+.tki-tree-check .radio .tki-tree-check-yes-b {
+  border-top-left-radius: 50%;
+  border-top-right-radius: 50%;
+  border-bottom-right-radius: 50%;
+  border-bottom-left-radius: 50%;
+}
+.hover-c {
+  opacity: 0.6;
+}

File diff suppressed because it is too large
+ 90 - 0
components/tki-tree/tki-tree.vue


+ 30 - 0
components/uni-status-bar.vue

@@ -0,0 +1,30 @@
+<template>
+    <view class="uni-status-bar" :style="style">
+        <slot></slot>
+    </view>
+</template>
+
+<script>
+    export default {
+        computed: {
+            style() {
+                //#ifdef MP-WEIXIN
+                var systemInfo = uni.getSystemInfoSync()
+                return `height:${systemInfo.statusBarHeight}px`
+                //#endif
+                //#ifdef APP-PLUS
+                return ''
+                //#endif
+            }
+        }
+    }
+</script>
+
+<style>
+    .uni-status-bar {
+        display: block;
+        width: 100%;
+        height: 20px;
+        height: var(--status-bar-height);
+    }
+</style>

+ 60 - 0
main.js

@@ -0,0 +1,60 @@
+import Vue from 'vue';
+import App from './App';
+import store from '@/store';
+// 混入
+import goPage from '@/mixin/goPage.js';
+import uView from "uview-ui";
+Vue.use(uView);
+// 公共处理函数
+import * as utils from './common/utils.js';
+// 新增按钮,全部组件
+import addBtn from './components/AddData.vue'
+// 空白页面,全局组件
+import empty from '@/components/empty/index.vue'
+// 手机顶部状态栏,全局组件
+import uniStatusBar from '@/components/uni-status-bar.vue';
+// 数字精度计算
+import NP from "number-precision";
+
+// 权限
+import { checkActionAccess } from "@/common/check";
+import * as nodes from "@/common/node";
+import Tabbar from '@/components/Tabbar/index';
+Vue.component('Tabbar', Tabbar)
+
+Vue.prototype.$accessCheck = checkActionAccess;
+Vue.prototype.$Access = nodes;
+
+Vue.prototype.$utils = utils;
+Vue.prototype.$store = store;
+Vue.prototype.$NP = NP; // 高精度数学计算
+Vue.mixin(goPage)
+Vue.component('addBtn', addBtn)
+Vue.component('Aempty', empty)
+Vue.component('uniStatusBar', uniStatusBar)
+
+/* 获取上页的数据 */
+Vue.prototype._prePage = () => {
+	let pages = getCurrentPages();
+	let prePage = pages[pages.length - 2];
+	// #ifdef H5
+	return prePage;
+	// #endif
+	return prePage.$vm;
+}
+
+Vue.config.productionTip = false
+
+App.mpType = 'app'
+
+const app = new Vue({
+	...App
+})
+// http拦截器,将此部分放在new Vue()和app.$mount()之间,才能App.vue中正常使用
+import httpInterceptor from '@/common/http.interceptor.js'
+Vue.use(httpInterceptor, app)
+
+// http接口API集中管理引入部分
+import httpApi from '@/common/http.api.js'
+Vue.use(httpApi, app)
+app.$mount()

+ 113 - 0
manifest.json

@@ -0,0 +1,113 @@
+{
+    "name" : "店铺管理",
+    "appid" : "__UNI__BA71A93",
+    "description" : "",
+    "versionName" : "1.2.0",
+    "versionCode" : 120,
+    "transformPx" : false,
+    "app-plus" : {
+        "nvueCompiler" : "uni-app",
+        "compilerVersion" : 3,
+        "modules" : {
+            "Maps" : {}
+        },
+        "distribute" : {
+            "android" : {
+                "permissions" : [
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CALL_PHONE\"/>",
+                    "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.INTERNET\"/>",
+                    "<uses-permission android:name=\"android.permission.MODIFY_AUDIO_SETTINGS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.RECORD_AUDIO\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
+                    "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
+                ],
+                "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ]
+            },
+            "ios" : {
+                "idfa" : false,
+                "privacyDescription" : {
+                    "NSPhotoLibraryUsageDescription" : "需要您的同意,才能访问相册,上传商品图片",
+                    "NSPhotoLibraryAddUsageDescription" : "需要您的同意,才能访问相册,保存商品图片",
+                    "NSCameraUsageDescription" : "该应用需要使用您的相机,以便拍摄上传商品图片",
+                    "NSLocationWhenInUseUsageDescription" : "需要您的同意,才能在使用期间访问您的地理位置,获取当前您的地理位置",
+                    "NSLocationAlwaysUsageDescription" : "需要您的同意,才能在使用期间访问您的地理位置,获取当前您的地理位置",
+                    "NSLocationAlwaysAndWhenInUseUsageDescription" : "需要您的同意,才能在使用期间访问您的地理位置,获取当前您的地理位置"
+                }
+            },
+            "sdkConfigs" : {
+                "maps" : {
+                    "amap" : {
+                        "appkey_ios" : "d8d30eab203ac428dd3ede0371d641e9",
+                        "appkey_android" : "cde759d7d263c48af94c1205739df17d"
+                    }
+                },
+                "ad" : {},
+                "share" : {},
+                "push" : {}
+            },
+            "icons" : {
+                "android" : {
+                    "hdpi" : "unpackage/res/icons/72x72.png",
+                    "xhdpi" : "unpackage/res/icons/96x96.png",
+                    "xxhdpi" : "unpackage/res/icons/144x144.png",
+                    "xxxhdpi" : "unpackage/res/icons/192x192.png"
+                },
+                "ios" : {
+                    "appstore" : "unpackage/res/icons/1024x1024.png",
+                    "ipad" : {
+                        "app" : "unpackage/res/icons/76x76.png",
+                        "app@2x" : "unpackage/res/icons/152x152.png",
+                        "notification" : "unpackage/res/icons/20x20.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "proapp@2x" : "unpackage/res/icons/167x167.png",
+                        "settings" : "unpackage/res/icons/29x29.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "spotlight" : "unpackage/res/icons/40x40.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png"
+                    },
+                    "iphone" : {
+                        "app@2x" : "unpackage/res/icons/120x120.png",
+                        "app@3x" : "unpackage/res/icons/180x180.png",
+                        "notification@2x" : "unpackage/res/icons/40x40.png",
+                        "notification@3x" : "unpackage/res/icons/60x60.png",
+                        "settings@2x" : "unpackage/res/icons/58x58.png",
+                        "settings@3x" : "unpackage/res/icons/87x87.png",
+                        "spotlight@2x" : "unpackage/res/icons/80x80.png",
+                        "spotlight@3x" : "unpackage/res/icons/120x120.png"
+                    }
+                }
+            }
+        },
+        "splashscreen" : {
+            "alwaysShowBeforeRender" : false,
+            "waiting" : false
+        }
+    },
+    "quickapp" : {},
+    "mp-weixin" : {
+        "appid" : "wx8420f8d7be946bd2",
+        "setting" : {
+            "urlCheck" : true
+        },
+        "permission" : {
+            "scope.userLocation" : {
+                "desc" : "你的位置信息将用于小程序位置接口的效果展示"
+            }
+        }
+    }
+}

+ 55 - 0
mixin/goPage.js

@@ -0,0 +1,55 @@
+export default {
+	data(){
+		return{
+			inputStyle:'color:#CAD0D7;font-weight:400;font-size:28rpx',
+		}
+	},
+	methods: {
+		callPhone(mobile) {
+			if (!mobile) return
+			uni.makePhoneCall({
+				phoneNumber: mobile
+			})
+		},
+		// 复制
+		copy(no) {
+			if (!no) return
+			uni.setClipboardData({
+				data: no,
+				success: res => {
+					uni.showToast({
+						title: '复制成功',
+						icon: 'none',
+						duration: 2000
+					});
+				}
+			});
+		},
+		goPage(url, type) {
+			if (type === 'none') {
+				return
+			}
+			if (type === 'switchTab') {
+				uni.switchTab({
+					url: url
+				})
+			} else if (type === 'redirectTo') {
+				uni.redirectTo({
+					url: url
+				})
+			} else if (type === 'reLaunch') {
+				uni.reLaunch({
+					url: url
+				})
+			} else {
+				if (type === false) {
+					this.$u.toast('暂无权限')
+					return
+				}
+				uni.navigateTo({
+					url: url
+				})
+			}
+		}
+	}
+}

+ 787 - 0
pages.json

@@ -0,0 +1,787 @@
+{
+	"easycom": {
+		"^u-(.*)": "uview-ui/components/u-$1/u-$1.vue"
+	},
+	"pages": [{
+			"path": "pages/index/index",
+			"style": {
+				"navigationBarTitleText": "工作台",
+				"navigationStyle": "custom",
+				"enablePullDownRefresh": true
+			}
+		},
+		{
+			"path": "pages/index/WxCode",
+			"style": {
+				"navigationBarTitleText": "我的小程序码"
+			}
+		},
+		{
+			"path": "pages/order/index",
+			"style": {
+				"navigationBarTitleText": "订单管理",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "black"
+			}
+		}, {
+			"path": "pages/goods/index",
+			"style": {
+				"navigationBarTitleText": "商品列表",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/goods/AddSelGoods",
+			"style": {
+				"navigationBarTitleText": "新增商品"
+			}
+		},
+		{
+			"path": "pages/customer/CustomerList",
+			"style": {
+				"navigationBarTitleText": "客户列表",
+				"navigationStyle": "custom",
+				"navigationBarTextStyle": "black"
+			}
+		},
+		{
+			"path": "pages/order/orderInfo",
+			"style": {
+				"navigationBarTitleText": "订单详情",
+				"enablePullDownRefresh": true
+			}
+		},
+
+		{
+			"path": "pages/order/OrderAdd",
+			"style": {
+				"navigationBarTitleText": "代客下单"
+			}
+		},
+		{
+			"path": "pages/order/OrderGoodsList",
+			"style": {
+				"navigationBarTitleText": "商品清单"
+			}
+		},
+		{
+			"path": "pages/goods/goodsDetail",
+			"style": {
+				"navigationBarTitleText": "商品资料详情"
+			}
+		},
+		{
+			"path": "pages/user/index",
+			"style": {
+				"navigationBarTitleText": "我的",
+				"navigationBarTextStyle": "black",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/goods/AddGoodsOneStore",
+			"style": {
+				"navigationBarTitleText": "新建商品"
+			}
+		},
+
+		{
+			"path": "pages/goods/SaleGoodsDetail",
+			"style": {
+				"navigationBarTitleText": "商品详情"
+			}
+		},
+		{
+			"path": "pages/enterprise/index",
+			"style": {
+				"navigationBarTitleText": "切换企业"
+			}
+		},
+		{
+			"path": "pages/login/index",
+			"style": {
+				"navigationBarTitleText": "登录",
+				"navigationStyle": "custom"
+			}
+		},
+
+		{
+			"path": "pages/goods/SkuOneStore",
+			"style": {
+				"navigationBarTitleText": "规格明细"
+			}
+		},
+
+		{
+			"path": "pages/goods/sku",
+			"style": {
+				"navigationBarTitleText": "设置规格"
+			}
+		},
+
+		{
+			"path": "pages/app/index",
+			"style": {
+				"navigationBarTitleText": "应用"
+			}
+		},
+
+
+
+		{
+			"path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",
+			"style": {
+				"disableScroll": true,
+				"app-plus": {
+					"backgroundColorTop": "transparent",
+					"background": "transparent",
+					"titleNView": false,
+					"scrollIndicator": false,
+					"popGesture": "none",
+					"animationType": "fade-in",
+					"animationDuration": 200
+				}
+			}
+		}
+	],
+	"subPackages": [{
+		"root": "pagesT",
+		"pages": [{
+				"path": "goods/addGoods",
+				"style": {
+					"navigationBarTitleText": "新建商品资料"
+				}
+			},
+			{
+				"path": "goods/BaseGoodslist",
+				"style": {
+					"navigationBarTitleText": "商品资料"
+				}
+			},
+			{
+				"path": "goods/AddGoodsclassification",
+				"style": {
+					"navigationBarTitleText": "新增分类",
+					"enablePullDownRefresh": false
+				}
+			},
+
+			{
+				"path": "goods/goodsclassification",
+				"style": {
+					"navigationBarTitleText": "商品分类",
+					"enablePullDownRefresh": false
+				}
+			}, {
+				"path": "user/editPwd",
+				"style": {
+					"navigationBarTitleText": "修改密码"
+				}
+			},
+			{
+				"path": "user/editID",
+				"style": {
+					"navigationBarTitleText": "修改账号",
+					"enablePullDownRefresh": false
+				}
+
+			},
+			{
+				"path": "order/ReturnDetail",
+				"style": {
+					"navigationBarTitleText": "退货单详情"
+				}
+			},
+			{
+				"path": "order/AddReturn",
+				"style": {
+					"navigationBarTitleText": "新建退货单"
+				}
+			},
+			{
+				"path": "order/AddShippingAddress",
+				"style": {
+					"navigationBarTitleText": "新增收货地址",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "notice/notice",
+				"style": {
+					"navigationBarTitleText": "系统公告",
+					"enablePullDownRefresh": false
+				}
+
+			}, {
+				"path": "notice/noticeDetails",
+				"style": {
+					"navigationBarTitleText": "公告详情",
+					"enablePullDownRefresh": false
+				}
+
+			},
+			{
+				"path": "customer/CustomerDetail",
+				"style": {
+					"navigationBarTitleText": "客户详情",
+					"enablePullDownRefresh": true,
+					"navigationStyle": "custom",
+					"navigationBarTextStyle": "black"
+				}
+			},
+			{
+				"path": "customer/VisitLogs",
+				"style": {
+					"navigationBarTitleText": "客户浏览记录",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "customer/StaffList",
+				"style": {
+					"navigationBarTitleText": "销售排行",
+					"enablePullDownRefresh": true
+				}
+
+			},
+			{
+				"path": "customer/CommunicationLogs",
+				"style": {
+					"navigationBarTitleText": "客户拜访",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "customer/CommunicationLogsAdd",
+				"style": {
+					"navigationBarTitleText": "新增客户拜访"
+				}
+			},
+			{
+				"path": "customer/AddCustomer",
+				"style": {
+					"navigationBarTitleText": "新增客户"
+				}
+			},
+			{
+				"path": "customer/BuyLogs",
+				"style": {
+					"navigationBarTitleText": "客户购买记录",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "goods/GoodsbyWarehouse",
+				"style": {
+					"navigationBarTitleText": "选择商品",
+					"enablePullDownRefresh": true
+				}
+
+			},
+			{
+				"path": "stock/stockQuery",
+				"style": {
+					"navigationBarTitleText": "库存查询"
+				}
+			}, {
+				"path": "stock/SaleOutDetail",
+				"style": {
+					"navigationBarTitleText": "出库详情",
+					"enablePullDownRefresh": true
+				}
+			}, {
+				"path": "stock/GodownEntryDetail",
+				"style": {
+					"navigationBarTitleText": "入库详情",
+					"enablePullDownRefresh": true
+				}
+			}, {
+				"path": "stock/GodownEntry",
+				"style": {
+					"navigationBarTitleText": "入库单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "stock/WarehouseRegion",
+				"style": {
+					"navigationBarTitleText": "库区库位",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "stock/WarehouseRegionBySku",
+				"style": {
+					"navigationBarTitleText": "库区库位",
+					"enablePullDownRefresh": true
+				}
+			}, {
+				"path": "stock/SalesOrder",
+				"style": {
+					"navigationBarTitleText": "出库单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "Finance/ApplyReceipt",
+				"style": {
+					"navigationBarTitleText": "收款申请单"
+				}
+			},
+			{
+				"path": "Finance/ReturnFrom",
+				"style": {
+					"navigationBarTitleText": "退款单"
+				}
+			},
+			{
+				"path": "Finance/ReturnFromDetails",
+				"style": {
+					"navigationBarTitleText": "退款单详情"
+				}
+			},
+			{
+				"path": "Finance/ReturnFromAdd",
+				"style": {
+					"navigationBarTitleText": "新增退款单"
+				}
+			},
+			{
+				"path": "Finance/ApplyReceiptDetail",
+				"style": {
+					"navigationBarTitleText": "收款申请单详情",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "Finance/AddApplyReceipt",
+				"style": {
+					"navigationBarTitleText": "新增收款申请单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "Finance/CustomerBalance",
+				"style": {
+					"navigationBarTitleText": "客户往来表"
+				}
+			}, {
+				"path": "Finance/CustomerBalanceDetail",
+				"style": {
+					"navigationBarTitleText": "客户往来明细表"
+				}
+			},
+			{
+				"path": "statement/DataReport",
+				"style": {
+					"navigationBarTitleText": "数据报表",
+					"enablePullDownRefresh": false
+				}
+			},
+			{
+				"path": "Purchase/index",
+				"style": {
+					"navigationBarTitleText": "采购单"
+				}
+			},
+			{
+				"path": "Purchase/AddPurchase",
+				"style": {
+					"navigationBarTitleText": "新增采购单"
+				}
+			},
+			{
+				"path": "Purchase/PurchaseDetail",
+				"style": {
+					"navigationBarTitleText": "采购单详情",
+					"enablePullDownRefresh": true
+				}
+			},
+
+			{
+				"path": "Purchase/PurchaseGoods",
+				"style": {
+					"navigationBarTitleText": "已选商品"
+				}
+			},
+			{
+				"path": "Purchase/Supplier",
+				"style": {
+					"navigationBarTitleText": "供应商",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "Purchase/AddSupplier",
+				"style": {
+					"navigationBarTitleText": "新建供应商"
+				}
+			},
+			{
+				"path": "Purchase/SupplierDetail",
+				"style": {
+					"navigationBarTitleText": "供应商详情",
+					"enablePullDownRefresh": true
+				}
+			},
+
+			{
+				"path": "Purchase/PurchaseReturnOrder",
+				"style": {
+					"navigationBarTitleText": "采购退货单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "Purchase/AddPurchaseReturn",
+				"style": {
+					"navigationBarTitleText": "新增采购退货单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "Purchase/PurchaseReturnDetail",
+				"style": {
+					"navigationBarTitleText": "采购退货单详情",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "staff/selStaff",
+				"style": {
+					"navigationBarTitleText": "选择员工",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "customer/selCustomer",
+				"style": {
+					"navigationBarTitleText": "选择客户",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "customer/CustomerMap",
+				"style": {
+					"navigationBarTitleText": "客户分布图",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "customer/selCustomerType",
+				"style": {
+					"navigationBarTitleText": "选择客户类型",
+					"enablePullDownRefresh": true
+				}
+			},
+			// 商品列表BySku
+			{
+				"path": "goods/selGoods",
+				"style": {
+					"navigationBarTitleText": "选择商品",
+					"enablePullDownRefresh": true
+				}
+			},
+			// 商品资料列表
+			{
+				"path": "goods/selBaseGoods",
+				"style": {
+					"navigationBarTitleText": "选择商品资料",
+					"enablePullDownRefresh": true
+				}
+			},
+			// 商品资料列表BySku
+			{
+				"path": "goods/selGoodsBasicBySku",
+				"style": {
+					"navigationBarTitleText": "选择商品",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "brand/selBrand",
+				"style": {
+					"navigationBarTitleText": "选择品牌",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "shop/selShop",
+				"style": {
+					"navigationBarTitleText": "选择店铺",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "payment/selPayment",
+				"style": {
+					"navigationBarTitleText": "选择支付方式",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "supplier/selSupplier",
+				"style": {
+					"navigationBarTitleText": "选择供应商",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "werahouse/selWerahouse",
+				"style": {
+					"navigationBarTitleText": "选择仓库",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "account/selAccount",
+				"style": {
+					"navigationBarTitleText": "账户列表",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "account/AccountManagement",
+				"style": {
+					"navigationBarTitleText": "资金账户管理",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "account/AddAcount",
+				"style": {
+					"navigationBarTitleText": "新增账户",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "account/AccountDetails",
+				"style": {
+					"navigationBarTitleText": "资金账户详情",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "order/selOrder",
+				"style": {
+					"navigationBarTitleText": "订单列表",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "order/purchaseGoods",
+				"style": {
+					"navigationBarTitleText": "已采购商品",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "order/selPurchase",
+				"style": {
+					"navigationBarTitleText": "采购单列表",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "werahouse/selReservoir",
+				"style": {
+					"navigationBarTitleText": "库位管理",
+					"enablePullDownRefresh": true
+				}
+			}, {
+				"path": "driver/driver",
+				"style": {
+					"navigationBarTitleText": "选择司机",
+					"enablePullDownRefresh": true
+				}
+
+			}, {
+				"path": "stock/setLogistics",
+				"style": {
+					"navigationBarTitleText": "设置物流信息"
+				}
+			}, {
+				"path": "statement/MerchandiseSalesStatement",
+				"style": {
+					"navigationBarTitleText": "商品销售报表",
+					"enablePullDownRefresh": true
+				}
+			}, {
+				"path": "statement/CustomerMerchandiseReport",
+				"style": {
+					"navigationBarTitleText": "客户商品报表",
+					"enablePullDownRefresh": true
+				}
+
+			}, {
+				"path": "statement/CustomerOrderReport",
+				"style": {
+					"navigationBarTitleText": "客户订单报表",
+					"enablePullDownRefresh": true
+				}
+
+			}, {
+				"path": "statement/OrderDataReport",
+				"style": {
+					"navigationBarTitleText": "订单数据报表",
+					"enablePullDownRefresh": true
+				}
+
+			}, {
+				"path": "statement/RegionalOrderReport",
+				"style": {
+					"navigationBarTitleText": "地区订单报表",
+					"enablePullDownRefresh": true
+				}
+
+			}, {
+				"path": "statement/VisitRepor",
+				"style": {
+					"navigationBarTitleText": "拜访报表",
+					"enablePullDownRefresh": true
+				}
+
+			}, {
+				"path": "statement/VisitReporDetails",
+				"style": {
+					"navigationBarTitleText": "拜访明细",
+					"enablePullDownRefresh": true
+				}
+
+			}, {
+				"path": "stock/flowing",
+				"style": {
+					"navigationBarTitleText": "库存流水",
+					"navigationStyle": "custom",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "stock/Allocation",
+				"style": {
+					"navigationBarTitleText": "调拨单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "stock/AllocationDetails",
+				"style": {
+					"navigationBarTitleText": "调拨单详情",
+					"enablePullDownRefresh": true
+				}
+
+			},
+			{
+				"path": "stock/Allocationedit",
+				"style": {
+					"navigationBarTitleText": "新增调拨单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "stock/Inventory",
+				"style": {
+					"navigationBarTitleText": "盘点单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "stock/InventoryDetails",
+				"style": {
+					"navigationBarTitleText": "盘点单详情",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "stock/AddInventory",
+				"style": {
+					"navigationBarTitleText": "新增盘点单",
+					"enablePullDownRefresh": true
+				}
+			},
+			{
+				"path": "stock/Loss",
+				"style": {
+					"navigationBarTitleText": "报损单",
+					"enablePullDownRefresh": true
+				}
+
+			},
+			{
+				"path": "stock/LossDetails",
+				"style": {
+					"navigationBarTitleText": "报损单详情",
+					"enablePullDownRefresh": true
+				}
+
+			},
+			{
+				"path": "stock/AddLoss",
+				"style": {
+					"navigationBarTitleText": "新建报损单",
+					"enablePullDownRefresh": true
+				}
+
+			}, {
+				"path": "stock/SweepCodeOutbound",
+				"style": {
+					"navigationBarTitleText": "扫码出库",
+					"enablePullDownRefresh": false
+				}
+			}, {
+				"path": "stock/OutgoingGoodsInventory",
+				"style": {
+					"navigationBarTitleText": "出库商品清单",
+					"enablePullDownRefresh": false
+				}
+			}
+		]
+	}],
+	"tabBar": {
+		"color": "#999999",
+		"selectedColor": "#2979ff",
+		"backgroundColor": "#ffffff",
+		"list": [{
+				"pagePath": "pages/index/index",
+				"text": "工作台",
+				"iconPath": "static/Tar_bar_slices/index.png",
+				"selectedIconPath": "static/Tar_bar_slices/index-fill.png"
+			}, {
+				"pagePath": "pages/order/index",
+				"text": "订单",
+				"iconPath": "static/Tar_bar_slices/order.png",
+				"selectedIconPath": "static/Tar_bar_slices/order-fill.png",
+				"style": {
+					"navigationBarTextStyle": "black"
+				}
+			}, {
+				"pagePath": "pages/goods/index",
+				"text": "商品",
+				"iconPath": "static/Tar_bar_slices/goods.png",
+				"selectedIconPath": "static/Tar_bar_slices/goods-fill.png"
+			},
+			{
+				"pagePath": "pages/customer/CustomerList",
+				"text": "客户",
+				"iconPath": "static/Tar_bar_slices/user.png",
+				"selectedIconPath": "static/Tar_bar_slices/user-fill.png"
+			},
+			{
+				"pagePath": "pages/user/index",
+				"text": "我的",
+				"iconPath": "static/Tar_bar_slices/my.png",
+				"selectedIconPath": "static/Tar_bar_slices/my-fill.png"
+			}
+		]
+	},
+	"globalStyle": {
+		"navigationBarTextStyle": "white",
+		"navigationBarTitleText": "六牛云商",
+		"navigationBarBackgroundColor": "#4076D6",
+		"backgroundColor": "#f7f8fa",
+		"usingComponents": {
+			"ly-tree-node": "/components/ly-tree/ly-tree-node"
+		}
+	}
+}

+ 235 - 0
pages/app/app.js

@@ -0,0 +1,235 @@
+export const menus = [
+	{
+		menuName: '销售管理',
+		menuList: [{
+				url: '/pages/order/OrderAdd',
+				label: '代客下单',
+				icon: 'custom-icon-piliangxiadan',
+				color: '#f29611',
+				access: 'OrderAdd'
+			},
+			{
+				url: '/pagesT/stock/SalesOrder',
+				label: '出库单',
+				icon: 'custom-icon-quehuoshangpinshu',
+				color: '#5c6aff',
+				access: 'InventoryOut'
+			}
+		],
+	},
+	{
+		menuName: '采购管理',
+		menuList: [{
+				url: '/pagesT/Purchase/index',
+				label: '采购单',
+				icon: 'custom-icon-caigou-tianchong',
+				color: '#7747EE',
+				access: 'PurchaseOrder'
+			},
+			{
+				url: '/pagesT/Purchase/PurchaseReturnOrder',
+				label: '采购退货单',
+				icon: 'custom-icon-tuihuo',
+				color: '#4076D6',
+				access: 'PurchaseReturnOrder'
+			},
+
+			{
+				url: '/pagesT/stock/GodownEntry',
+				label: '入库单',
+				icon: 'custom-icon-ruku',
+				color: '#4076D6',
+				access: 'InventoryIn'
+			},
+			{
+				url: '/pagesT/Purchase/Supplier',
+				label: '供应商',
+				icon: 'custom-icon-group_fill',
+				color: '#4076D6',
+				access: 'Supplier'
+			},
+		],
+	},
+	{
+		menuName: '仓库管理',
+		menuList: [{
+				url: '/pagesT/goods/BaseGoodslist',
+				label: '商品资料',
+				icon: 'custom-icon-shangpin2',
+				color: '#f29611',
+				access: 'BaseDataList'
+			},
+			{
+				url: '/pagesT/goods/goodsclassification',
+				label: '商品分类',
+				icon: 'custom-icon-fenlei-1',
+				color: '#4076D6',
+				access: 'GoodsClassify'
+			}, {
+				url: '/pagesT/stock/Allocation',
+				label: '调拨单',
+				icon: 'custom-icon-tiaobodanguanli',
+				color: '#7747EE',
+				access: 'AllocationForm'
+			},
+			{
+				url: '/pagesT/stock/Inventory',
+				label: '盘点单',
+				icon: 'custom-icon-pandianguanli',
+				color: '#f29611',
+				access: 'Inventory'
+			},
+			{
+				url: '/pagesT/stock/Loss',
+				label: '报损单',
+				icon: 'custom-icon-cunchujinggao',
+				color: '#e8443c',
+				access: 'LossReport'
+			},
+			{
+				url: '/pagesT/stock/stockQuery',
+				label: '库存查询',
+				icon: 'custom-icon-chaxun',
+				color: '#7747EE',
+				access: 'query'
+			},
+
+			{
+				url: '/pagesT/stock/flowing',
+				label: '库存流水',
+				icon: 'custom-icon-xiaoxiwuliufill',
+				color: '#5c6aff',
+				access: 'flowing'
+			}
+		],
+	},
+	{
+		menuName: '经营分析',
+		menuList: [
+			// {
+			// 	url: '/pagesT/customer/CustomerMap',
+			// 	label: '客户分布图',
+			// 	icon: 'custom-icon-piliangxiadan',
+			// 	color: '#f29611',
+			// 	access: 'CustomerMap'
+			// },
+			{
+				url: '/pagesT/customer/VisitLogs',
+				label: '浏览记录',
+				icon: 'custom-icon-liulanjilu-tianchong',
+				color: '#7747EE',
+				access: 'CustomerBehaviorBrowsingHistory'
+			},
+			{
+				url: '/pagesT/customer/BuyLogs',
+				label: '购买记录',
+				icon: 'custom-icon-gouwuche',
+				color: '#7747EE',
+				access: 'CustomerBehaviorPurchaseHistory'
+			},
+			{
+				url: '/pagesT/customer/CommunicationLogs',
+				label: '客户拜访',
+				icon: 'custom-icon-fuwu',
+				color: '#f29611',
+				access: 'CustomerListvisitedLogs'
+			},
+			{
+				url: '/pagesT/customer/StaffList',
+				label: '销售排行',
+				icon: 'custom-icon-paihangbang',
+				color: '#f29611',
+				access: 'salesRanking'
+			},
+
+			// {
+			// 	url: '/pagesT/statement/DataReport',
+			// 	label: '数据报表',
+			// 	icon: 'custom-icon-xiaoshouyuce',
+			// 	color: '#5c6aff'
+			// }
+			{
+				url: '/pagesT/statement/MerchandiseSalesStatement',
+				label: '商品销售报表',
+				icon: 'custom-icon-jinkoubaoguanchanpinbaobiao',
+				color: '#5c6aff',
+				access: 'goodsFormMerchandiseSalesStatement'
+			},
+			{
+				url: '/pagesT/statement/CustomerMerchandiseReport',
+				label: '客户商品报表',
+				icon: 'custom-icon-xiaoshouyuce',
+				color: '#5c6aff',
+				access: 'goodsFormCustomerMerchandiseReport'
+			},
+			{
+				url: '/pagesT/statement/CustomerOrderReport',
+				label: '客户订单报表',
+				icon: 'custom-icon-gongchengshiwudantongjifenxi',
+				color: '#5c6aff',
+				access: 'orderFormCustomerOrderReport'
+			},
+
+			{
+				url: '/pagesT/statement/VisitRepor',
+				label: '拜访报表',
+				icon: 'custom-icon-baifang',
+				color: '#5c6aff',
+				access: 'CustomerStatementsVisitRepor'
+			},
+			{
+				url: '/pagesT/statement/RegionalOrderReport',
+				label: '地区订单报表',
+				icon: 'custom-icon-tongjibaobiao',
+				color: '#5c6aff',
+				access: 'orderFormRegionalOrderReport'
+			},
+			{
+				url: '/pagesT/statement/OrderDataReport',
+				label: '订单数据报表',
+				icon: 'custom-icon-xiaoshoudingdan',
+				color: '#5c6aff',
+				access: 'orderFormOrderDataReport'
+			},
+		],
+	},
+	{
+		menuName: '资金管理',
+		menuList: [{
+				url: '/pagesT/account/AccountManagement',
+				label: '资金账户管理',
+				icon: 'custom-icon-zhanghuguanli',
+				color: '#5c6aff',
+				access: 'AccountManagement'
+			},
+			{
+				url: '/pagesT/Finance/ReturnFrom',
+				label: '退款单',
+				icon: 'custom-icon-tuikuan',
+				color: '#e8443c',
+				access: 'ReturnFrom'
+			},
+			{
+				url: '/pagesT/Finance/ApplyReceipt',
+				label: '收款申请单',
+				icon: 'custom-icon-shoukuandanguanli',
+				color: '#5c6aff',
+				access: 'ApplyReceipt'
+			},
+			{
+				url: '/pagesT/Finance/CustomerBalance',
+				label: '客户余额表',
+				icon: 'custom-icon-yue',
+				color: '#7747EE',
+				access: 'CustomerBalance'
+			},
+			{
+				url: '/pagesT/Finance/CustomerBalanceDetail',
+				label: '客户余额明细表',
+				icon: 'custom-icon-mingxi',
+				color: '#5c6aff',
+				access: 'CustomerBalanceDetail'
+			},
+		]
+	}
+]

+ 201 - 0
pages/app/index.vue

@@ -0,0 +1,201 @@
+<template>
+	<view class="out-box">
+		<view class="app-view">
+			<view class="now-name">常用应用</view>
+			<view class="app-ul">
+				<block v-for="(app, appi) in now_list" :key="appi">
+					<view class="app-li" @click="chooseMenu(app)" v-if="$accessCheck($Access[app.access])">
+						<view class="icon-view" :style="{ background: app.color }"><text :class="[app.icon]" class="custom-icon"></text></view>
+						<view class="label ellipsis">{{ app.label }}</view>
+						<view class="icon-circle"><u-icon name="minus-circle-fill" color="#fa3534" size="24"></u-icon></view>
+					</view>
+				</block>
+			</view>
+		</view>
+		<view class="app-view" v-for="(item, index) in app_list" :key="index">
+			<view class="menu-name">{{ item.menuName }}</view>
+			<view class="app-ul">
+				<block v-for="(app, appi) in item.menuList" :key="appi">
+					<view class="app-li" @click="chooseMenu(app)" v-if="$accessCheck($Access[app.access])">
+						<view class="icon-view" :style="{ background: app.color, opacity: now_list.find(menu => menu.url === app.url) ? '0.6' : '1' }">
+							<text :class="[app.icon]" class="custom-icon"></text>
+						</view>
+						<view class="label ellipsis">{{ app.label }}</view>
+						<view class="icon-circle">
+							<u-icon v-if="!!now_list.find(menu => menu.url === app.url)" name="checkmark-circle-fill" color="#B8C0C8" size="24"></u-icon>
+							<u-icon v-else name="plus-circle-fill" color="#2979ff" size="24"></u-icon>
+						</view>
+					</view>
+				</block>
+			</view>
+		</view>
+		<view class="confirm-btn" @click="updateCommonApp">完成</view>
+	</view>
+</template>
+
+<script>
+import { menus } from './app.js';
+export default {
+	data() {
+		return {
+			now_list: [
+				{
+					url: '/pages/order/OrderAdd',
+					label: '代客下单',
+					icon: 'custom-icon-piliangxiadan',
+					color: '#f29611',
+					access: 'OrderAdd'
+				},
+				{
+					url: '/pagesT/stock/SalesOrder',
+					label: '出库单',
+					icon: 'custom-icon-quehuoshangpinshu',
+					color: '#5c6aff',
+					access: 'InventoryOut'
+				},
+				{
+					url: '/pagesT/customer/StaffList',
+					label: '销售排行',
+					icon: 'custom-icon-paihangbang',
+					color: '#f29611',
+					access: 'salesRanking'
+				},
+				{
+					url: '/pagesT/customer/CommunicationLogs',
+					label: '客户拜访',
+					icon: 'custom-icon-fuwu',
+					color: '#f29611',
+					access: 'CustomerListvisitedLogs'
+				}
+			],
+			app_list: []
+		};
+	},
+	computed: {
+		userCenterId() {
+			return this.$store.state.userInfo.userCenterId;
+		},
+		enterpriseScope() {
+			return this.$store.state.enterprise.scope;
+		}
+	},
+	onLoad() {
+		if (parseInt(this.$store.state.enterprise.scope) === 4) {
+			this.app_list = menus.map(item => {
+				return{
+					...item,
+					menuList:item.menuList.filter(menu=>menu.label !== '商品资料')
+				}
+			});
+		} else {
+			this.app_list = menus;
+		}
+	},
+	onShow() {
+		this.getCommonAppInfo();
+	},
+	methods: {
+		chooseMenu(app) {
+			const index = this.now_list.findIndex(menu => menu.url === app.url);
+			if (index > -1) {
+				if (this.now_list.length === 1) {
+					this.$u.toast('最少保留一个应用');
+					return;
+				}
+				this.now_list.splice(index, 1);
+			} else {
+				this.now_list.push(app);
+			}
+		},
+		getCommonAppInfo() {
+			this.$u.api.getCommonAppInfo(this.userCenterId).then(res => {
+				if (res.data.jsonKey) {
+					if(res.data.jsonKey[0].icon.indexOf('ibon')>-1){
+						return
+					}
+					this.now_list = res.data.jsonKey;
+				}
+			});
+		},
+		updateCommonApp() {
+			this.$u.api
+				.updateCommonApp(this.userCenterId, {
+					jsonKey: this.now_list
+				})
+				.then(res => {
+					uni.navigateBack();
+				});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.out-box {
+	padding-bottom: 80rpx;
+}
+.app-view {
+	.now-name {
+		color: #333333;
+		font-weight: bold;
+		line-height: 80rpx;
+		padding: 0 32rpx;
+	}
+	.menu-name {
+		font-size: 24rpx;
+		color: #879bba;
+		line-height: 70rpx;
+		padding: 0 32rpx;
+	}
+	.app-ul {
+		display: flex;
+		flex-wrap: wrap;
+		background-color: #ffffff;
+		padding-top: 40rpx;
+		.app-li {
+			text-align: center;
+			width: 25%;
+			margin-bottom: 40rpx;
+			position: relative;
+			.icon-circle {
+				position: absolute;
+				top: 0;
+				right: 30rpx;
+				height: 24rpx;
+				width: 24rpx;
+				line-height: 24rpx;
+			}
+			.icon-view {
+				width: 72rpx;
+				height: 72rpx;
+				line-height: 72rpx;
+				border-radius: 30rpx;
+				margin: 0 auto;
+
+				.custom-icon {
+					font-size: 42rpx;
+					color: #ffffff;
+				}
+			}
+
+			.label {
+				font-size: 24rpx;
+				line-height: 36rpx;
+				padding-top: 16rpx;
+				color: #2d405e;
+			}
+		}
+	}
+}
+.confirm-btn {
+	background-color: $uni-color-primary;
+	color: #ffffff;
+	text-align: center;
+	height: 80rpx;
+	line-height: 80rpx;
+	position: fixed;
+	width: 100%;
+	left: 0;
+	bottom: 0;
+}
+</style>

+ 613 - 0
pages/customer/CustomerList.vue

@@ -0,0 +1,613 @@
+<template>
+	<view>
+		<view class="top-view">
+			<u-navbar :border-bottom="false" :is-back="false" title-color="#fff" title=" " :background="nav_background">
+				<view class="headline">
+					<u-search
+						height="72"
+						placeholder-color="#879BBA"
+						bg-color="#ECF0F7"
+						:show-action="false"
+						:clearabled="true"
+						color="#879BBA"
+						@search="searchConfirm"
+						placeholder="客户名称/手机号…"
+						@clear="searchConfirm"
+						v-model="search_form.keyword"
+					></u-search>
+				</view>
+			</u-navbar>
+			<view class="tabs-view">
+				<u-tabs-swiper
+					ref="tabs"
+					font-size="26"
+					:current="tabs_current"
+					:list="tabs_list"
+					@change="tabsChange"
+					:is-scroll="false"
+					inactive-color="#62738E"
+					:bar-style="{ borderRadius: '6rpx', height: '6rpx', width: '32rpx', backgroundColor: '#4076D6' }"
+					:active-item-style="{ color: '#2D405E', fontSize: '32rpx' }"
+				></u-tabs-swiper>
+				<view class="search-view clearfix">
+					<view class="title ellipsis" @click="openSel('account_status_show')">
+						<u-icon
+							size="12"
+							label-pos="left"
+							label-color="#62738e"
+							color="#b8c0c8"
+							label-size="26"
+							:label="account_status_name"
+							name="arrow-down-fill"
+							class="ico"
+						></u-icon>
+					</view>
+					<view class="title ellipsis" @click="goPage('/pagesT/shop/selShop')">
+						<u-icon size="12" label-pos="left" label-color="#62738e" color="#b8c0c8" label-size="26" :label="shop_name" name="arrow-down-fill" class="ico"></u-icon>
+					</view>
+					<view class="title ellipsis" @click="goPage('/pagesT/staff/selStaff')">
+						<u-icon size="12" label-pos="left" label-color="#62738e" color="#b8c0c8" label-size="26" :label="salesName" name="arrow-down-fill" class="ico"></u-icon>
+					</view>
+					<!-- <view class="title ellipsis" @click="openSel('from_show')">
+						<u-icon size="12" label-pos="left" label-color="#62738e" color="#b8c0c8" label-size="26" :label="sourceName" name="arrow-down-fill" class="ico"></u-icon>
+					</view> -->
+					<view class="title" @click="clearValue()">
+						<u-icon label="重置" name="reload" label-color="#62738E" color="#62738E" margin-left="8" size="24" label-size="26"></u-icon>
+					</view>
+				</view>
+			</view>
+			<view class="explain">
+				<view class="float_left">
+					<text>全部</text>
+					<text v-if="tabs_current === 1">待审核</text>
+					<text v-else-if="tabs_current === 2">待完善资料</text>
+					<text v-else>已审核</text>
+				</view>
+				<view class="float_right">共{{ total }}条</view>
+			</view>
+		</view>
+
+		<scroll-view
+			class="list-ul"
+			scroll-y="true"
+			@refresherrefresh="refresherrefresh"
+			:refresher-enabled="true"
+			:refresher-triggered="refresher_triggered"
+			@scrolltolower="scrolltolower"
+		>
+			<view class="list-li" v-for="(item, index) in customer_list" :key="index" @click="goPage(`/pagesT/customer/CustomerDetail?id=${item.id}`)">
+				<view class="title clearfix">
+					<view class="float_left ellipsis" style="margin-left: 40rpx; width: 350rpx;">业务员:{{ item.salesManName || '未设置' }}</view>
+					<view class="float_right" style="margin-right: 40rpx;">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+				</view>
+				<view class="list-cont">
+					<view class="list-cont-li clearfix">
+						<view class="type-view" v-if="item.customerType">{{ item.customerType }}</view>
+						<view class="custom-name">{{ item.name }}</view>
+						<view v-if="item.enableStatus === 5" class="float_right" style="margin-right: 40rpx;margin-top: 4rpx;">
+							<image src="../../static/img/start-using@2x.png" class="audit"></image>
+						</view>
+						<view v-else class="float_right" style="margin-right: 40rpx;margin-top: 4rpx;"><image src="../../static/img/forbidden.png" class="audit"></image></view>
+					</view>
+					<view class="list-cont-li">
+						<text class="label">联系人</text>
+						{{ item.contact[0].name || '无' }}
+					</view>
+					<view class="list-cont-li" style="line-height: 48rpx;height: 48rpx;">
+						<text class="label">联系电话</text>
+						<text @click.stop="callPhone(item.mobile)">{{ item.mobile }}</text>
+						<view @click.stop="orderAdd(item)" class="float_right btn" v-if="item.status === 2 && item.enableStatus === 5">代客下单</view>
+						<view @click.stop="goPage('/pagesT/customer/AddCustomer?id=' + item.id)" class="float_right btn" v-else-if="item.status === 0">完善资料</view>
+						<block v-else-if="item.status === 1">
+							<view @click.stop="openModel('确定要审核通过该客户吗?', '审核', item)" class="float_right btn" style="padding: 8rpx 21rpx;">审核通过</view>
+						</block>
+					</view>
+				</view>
+			</view>
+			<view v-if="!customer_list.length" class="empty-view"><u-empty text="暂无客户" mode="list"></u-empty></view>
+			<u-loadmore v-if="customer_list.length" :status="load_status" />
+		</scroll-view>
+		<addBtn v-if="$accessCheck($Access.CustomerListAddCustomer)" url="/pagesT/customer/AddCustomer"></addBtn>
+		<u-popup v-model="search_show" mode="right">
+			<view class="search-pop">
+				<uniStatusBar></uniStatusBar>
+				<view class="form-view" style="padding-top: 45px;">
+					<u-form label-width="160rpx" label-position="left">
+						<!-- <u-form-item label="注册来源">
+							<view class="clearfix form-val" @click="openSel('from_show')">
+								<text class="float_left ellipsis">{{ search_form.source ? sourceName : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('source')">
+									<u-icon :name="!search_form.source ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item> -->
+						<u-form-item label="下单时间">
+							<view class="clearfix form-val" @click="openSel('month_show')">
+								<text class="float_left ellipsis">{{ search_form.time_value ? search_form.time_name : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('time_value')">
+									<u-icon :name="!search_form.time_value ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+				<view class="search-btn">
+					<view class="btn-li" @click="clearValue()">重置</view>
+					<view class="btn-li" @click="searchConfirm">确定</view>
+				</view>
+			</view>
+		</u-popup>
+		<u-select @confirm="fromChange" v-model="from_show" :list="order_from"></u-select>
+		<u-select @confirm="accountStatusChange" v-model="account_status_show" :list="account_status"></u-select>
+		<SelDeparment v-model="show_department" @confirm="departmentConfirm" @cancel="departmentCancel" />
+		<RegionSel v-model="region_show" @confirm="regionConfirm" @cancel="regionCancel" />
+		<u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm" @cancel="modelCancel"></u-modal>
+		<u-select v-model="month_show" :list="tabs_list1" @confirm="confirm"></u-select>
+		<!-- 底部tabbar -->
+		<Tabbar v-model="tabbar_current"></Tabbar>
+	</view>
+</template>
+
+<script>
+import RegionSel from '@/components/region/RegionSel.vue';
+import SelDeparment from '@/components/SelDepartment.vue';
+import uniStatusBar from '../../components/uni-status-bar.vue';
+export default {
+	components: {
+		RegionSel,
+		SelDeparment,
+		uniStatusBar
+	},
+	data() {
+		return {
+			refresher_triggered: false, //设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
+			tabbar_current: 3,
+			nav_background: {
+				backgroundColor: '#fff'
+			},
+			model_tag: '',
+			model_show: false,
+			model_content: '',
+			from_show: false,
+			show_department: false,
+			region_show: false,
+			search_show: false,
+			customer_list: [],
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			tabs_current: 0,
+			status: 2,
+			salesName: '业务员',
+			staffData: '',
+			region_name: '',
+			shopData: '',
+			shop_name: '所属店铺',
+			department_name: '',
+			sourceName: '注册来源',
+			search_form: {
+				keyword: '',
+				type: '',
+				// provinceCode: '',
+				// cityCode: '',
+				// districtCode: '',
+				enableStatus: 5,
+				// departmentId: '',
+				shopId: '', // 商铺Id
+				content: '',
+				salesManId: '',
+				source: '',
+				tag: '',
+				time_name: '',
+				time_value: ''
+			},
+			handel_data: {}, // 需要操作的客户
+			order_from: [
+				{
+					label: 'ios',
+					value: 1
+				},
+
+				{
+					label: '安卓',
+					value: 2
+				},
+				{
+					label: '微信小程序',
+					value: 3
+				},
+				{
+					label: '后台创建',
+					value: 4
+				},
+				{
+					label: 'H5页面',
+					value: 5
+				},
+				{
+					label: 'pc页面',
+					value: 6
+				},
+				{
+					label: '字节跳动小程序',
+					value: 8
+				}
+			],
+			account_status: [
+				{
+					value: 5,
+					label: '已启用'
+				},
+				{
+					value: 4,
+					label: '已禁用'
+				}
+			],
+			tabs_list: [
+				{
+					value: 2,
+					name: '已审核'
+				},
+				{
+					value: 1,
+					name: '待审核'
+				},
+				{
+					value: 0,
+					name: '待完善'
+				}
+			],
+			account_status_show: false,
+			account_status_name: '状态',
+			tabs_list1: [
+				{
+					label: '当月',
+					value: 0
+				},
+				{
+					label: '当日',
+					value: 1
+				}
+			],
+			month_show: false
+		};
+	},
+	watch: {
+		staffData(val) {
+			if (val) {
+				this.search_form.salesManId = val.id;
+				this.salesName = val.staffName;
+				this.page = 1;
+				this.getAllCustomer();
+			}
+		},
+		shopData(val) {
+			if (val) {
+				this.search_form.shopId = val.id;
+				this.shop_name = val.name;
+				this.page = 1;
+				this.getAllCustomer();
+			}
+		}
+	},
+	onLoad() {
+		this.getAllCustomer();
+	},
+	methods: {
+		//滚动到底部,上拉加载
+		scrolltolower() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllCustomer();
+			}
+		},
+		//客户审核
+		updateCustomerCheckStatus() {
+			this.$u.api
+				.updateCustomerCheckStatus({
+					id: this.handel_data.id,
+					status: 2
+				})
+				.then(res => {
+					this.getAllCustomer();
+					this.$u.toast('审核成功');
+				});
+		},
+		//代客下单
+		orderAdd(item) {
+			const obj = {
+				shopId: item.shopId,
+				userCenterId: item.userCenterId,
+				customerId: item.id,
+				customerName: item.name
+			};
+			this.goPage('/pages/order/OrderAdd?customer=' + JSON.stringify(obj));
+		},
+		// 状态切换
+		tabsChange(index) {
+			this.tabs_current = index;
+			this.status = this.tabs_list[index].value;
+			this.page = 1;
+			this.getAllCustomer();
+		},
+		// 获取所有客户数据
+		getAllCustomer() {
+			if (!this.$accessCheck(this.$Access.CustomerListGetCustomerInfo)) {
+				this.$u.toast('抱歉,您没有权限');
+				return;
+			}
+			this.load_status = 'loading';
+			this.$u.api
+				.getAllCustomer({
+					page: this.page,
+					pageSize: this.pageSize,
+					status: this.status,
+					...this.search_form
+				})
+				.then(res => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+					if (this.page === 1) {
+						this.customer_list = res.data;
+					} else {
+						this.customer_list = this.customer_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				})
+				.catch(err => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+				});
+		},
+		statusChange(row) {
+			this.search_form.enableStatus = row.value;
+		},
+		regionConfirm(val) {
+			this.search_form.provinceCode = val[0].value;
+			this.search_form.cityCode = val[1].value;
+			this.search_form.districtCode = val[2].value;
+			let name = '';
+			val.forEach(item => {
+				name += item.label;
+			});
+			this.region_name = name;
+		},
+		regionCancel(val) {
+			this.region_show = false;
+		},
+		departmentConfirm(val) {
+			this.search_form.departmentId = val[val.length - 1].value;
+			this.department_name = val[val.length - 1].label;
+			this.search_form.salesManId = '';
+			this.salesName = '';
+		},
+		departmentCancel(val) {
+			this.show_department = false;
+		},
+		// 来源筛选
+		fromChange(e) {
+			this.search_form.source = e[0].value;
+			this.sourceName = e[0].label;
+			this.page = 1;
+			this.getAllCustomer();
+		},
+		openSel(key) {
+			this[key] = true;
+		},
+		searchConfirm() {
+			this.search_show = false;
+			this.page = 1;
+			this.getAllCustomer();
+		},
+		clearValue(params) {
+			if (!params) {
+				this.sourceName = '注册来源';
+				this.shop_name = '所属店铺';
+				this.salesName = '业务员';
+				this.account_status_name = '状态';
+				this.search_form = {
+					keyword: '',
+					type: '',
+					// provinceCode: '',
+					// cityCode: '',
+					// districtCode: '',
+					enableStatus: 5,
+					// departmentId: '',
+					shopId: '', // 商铺Id
+					content: '',
+					salesManId: '',
+					source: '',
+					tag: '',
+					time_name: '',
+					time_value: ''
+				};
+				this.searchConfirm();
+			} else {
+				if (Array.isArray(params)) {
+					params.forEach(item => {
+						this.search_form[item] = '';
+					});
+					this.region_name = '';
+				} else {
+					this.search_form[params] = '';
+				}
+			}
+		},
+		// 打开提示框
+		openModel(content, tag, row) {
+			this.model_content = content;
+			this.model_show = true;
+			this.model_tag = tag;
+			this.handel_data = row;
+		},
+		// 审核
+		modelConfirm() {
+			switch (this.model_tag) {
+				case '审核':
+					this.updateCustomerCheckStatus();
+					break;
+				case '拒绝':
+					this.revokeAudit();
+					break;
+			}
+		},
+		modelCancel() {},
+		accountStatusChange(e) {
+			this.search_form.enableStatus = e[0].value;
+			this.account_status_name = e[0].label;
+			this.page = 1;
+			this.getAllCustomer();
+		},
+		confirm(val) {
+			this.search_form.time_value = val[0].value;
+			this.search_form.time_name = val[0].label;
+		},
+		callPhone(mobile) {
+			uni.makePhoneCall({
+				phoneNumber: mobile
+			});
+		},
+		// 下拉刷新
+		refresherrefresh() {
+			this.refresher_triggered = true;
+			this.page = 1;
+			this.getAllCustomer();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.headline {
+	margin-left: 20rpx;
+	margin-top: 10rpx;
+	margin-bottom: 18rpx;
+	/*#ifdef APP-PLUS*/
+	width: 710rpx;
+	/*#endif*/
+	/*#ifdef MP-WEIXIN*/
+	width: 480rpx;
+	/*#endif*/
+	height: 72rpx;
+}
+.top-view {
+	// padding-top: var(--status-bar-height);
+	.tabs-view {
+		width: 100%;
+		background-color: #ffffff;
+
+		.search-view {
+			width: 100%;
+			border-top: 1px solid #ecf0f7;
+			display: flex;
+			.title {
+				flex: 5;
+				height: 84rpx;
+				text-align: center;
+				font-weight: 400;
+				line-height: 84rpx;
+			}
+		}
+	}
+	.explain {
+		width: 100%;
+		height: 76rpx;
+		line-height: 76rpx;
+		color: #879bba;
+		font-size: 24rpx;
+		padding: 0 28rpx 0 32rpx;
+		transform: translateY(-6rpx);
+	}
+}
+
+.list-ul {
+	height: calc(100vh - 460rpx);
+	z-index: 1;
+	.list-li {
+		width: 710rpx;
+		margin: 0 auto 24rpx;
+		background-color: #ffffff;
+		border-radius: 8rpx;
+
+		.title {
+			line-height: 76rpx;
+			border-bottom: 1px solid #ecf0f7;
+			font-size: 24rpx;
+			color: #cad0d7;
+			font-weight: 400;
+
+			.float_rigth {
+				.custom-icon-jinru {
+					margin-left: 10rpx;
+					font-size: 28rpx;
+				}
+			}
+		}
+
+		.list-cont {
+			padding-bottom: 40rpx;
+			.list-cont-li {
+				margin-top: 24rpx;
+				line-height: 40rpx;
+				font-size: 28rpx;
+				font-family: DINPro-Regular;
+				font-weight: 400;
+				color: #2d405e;
+				border-radius: 8rpx;
+				padding-left: 40rpx;
+				.type-view {
+					margin-right: 16rpx;
+					display: inline-block;
+					width: 126rpx;
+					height: 40rpx;
+					background: url(../../static/img/type_bg.png) no-repeat center center;
+					background-size: 100% 100%;
+					vertical-align: middle;
+					color: #ffffff;
+					font-size: 24rpx;
+					font-weight: 400;
+					line-height: 40rpx;
+					text-align: center;
+				}
+				.custom-name {
+					font-family: DIN-Medium;
+					display: inline-block;
+					vertical-align: middle;
+					width: 400rpx;
+					line-height: 36rpx;
+					font-weight: 600;
+				}
+
+				.audit {
+					width: 78rpx;
+					height: 30rpx;
+				}
+
+				.label {
+					display: inline-block;
+					width: 114rpx;
+					font-weight: 300;
+					font-size: 28rpx;
+					color: #b8c0c8;
+					margin-right: 30rpx;
+				}
+
+				.btn {
+					width: 178rpx;
+					height: 48rpx;
+					line-height: 48rpx;
+					text-align: center;
+					border: 1px solid #b8c0c8;
+					font-size: 24rpx;
+					font-weight: 400;
+					color: #2d405e;
+					border-radius: 8rpx;
+					margin-right: 40rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 118 - 0
pages/enterprise/index.vue

@@ -0,0 +1,118 @@
+<template>
+	<view class="enterprise">
+		<view class="enterprise-title">我管理的店铺</view>
+		<view class="e-ul">
+			<view v-for="(item, index) in enterprise_list" :key="index" class="e-li clearfix" @click="goShop(item)">
+				<view class="float_left"><image :src="item.logo" mode="aspectFill"></image></view>
+				<view class="float_left en-info">
+					<view class="en-name">{{ item.enterpriseName }}</view>
+					<view class="en-time">有效期: {{ $u.timeFormat(item.expireTime) }}</view>
+				</view>
+				<view class="status-r">
+					<u-tag v-if="item.expireStatus" text="已打烊" size="mini" mode="plain" type="info" />
+					<u-tag v-else text="营业中" size="mini" mode="plain" type="success" />
+					<text class="custom-icon custom-icon-jinru"></text>
+				</view>
+			</view>
+			<u-loadmore status="nomore" />
+		</view>
+		<view class="submit-btn" @click="logout"><view class="btn-min">切换登录账号</view></view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			enterprise_list: []
+		};
+	},
+	onLoad() {
+		this.getAllEnterprise();
+	},
+	methods: {
+		// 获取企业列表
+		getAllEnterprise() {
+			this.$u.api.getAllEnterprise().then(res => {
+				this.enterprise_list = res.data;
+			});
+		},
+		// 切换登录账号(退出登录)
+		logout() {
+			uni.clearStorageSync();
+			this.$store.commit('commit_hasLogin', false);
+			this.goPage('/pages/login/index', 'reLaunch');
+		},
+		// 进入企业
+		async goShop(row) {
+			this.$store.commit('commit_enToken', row.token);
+			this.$store.commit('commit_enterprise', row);
+			await this.getAclList(row.roleType);
+			await this.getStaffByToken(row.roleType);
+			this.goPage('/pages/index/index','switchTab')
+		},
+		// 获取登录权限
+		async getAclList(roleType){
+			await this.$u.api.getAclList(roleType).then(res=>{
+				this.$store.commit('commit_access', res.data);
+			})
+		},
+		async getStaffByToken(roleType){
+			await this.$u.api.getStaffByToken(roleType).then(res=>{
+				this.$store.commit('commit_userInfo', res.data);
+			})
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.enterprise {
+	padding-bottom: 140rpx;
+	.enterprise-title {
+		font-size: 24rpx;
+		font-weight: 600;
+		line-height: 80rpx;
+		padding: 0 25rpx;
+	}
+	.e-ul {
+		.e-li {
+			width: 700rpx;
+			margin: 0 auto 20rpx;
+			background-color: #ffffff;
+			border-radius: 10rpx;
+			padding: 20rpx;
+			position: relative;
+			image {
+				width: 100rpx;
+				height: 100rpx;
+				border-radius: 100%;
+				margin-right: 20rpx;
+			}
+			.en-info {
+				.en-name {
+					padding-top: 10rpx;
+					font-weight: 700;
+				}
+				.en-time {
+					padding-top: 10rpx;
+					font-size: 22rpx;
+					color: #999999;
+				}
+			}
+			.status-r {
+				position: absolute;
+				top: 50%;
+				transform: translateY(-50%);
+				right: 20rpx;
+				.custom-icon {
+					vertical-align: middle;
+					margin-left: 10rpx;
+					color: #333333;
+					font-size: 28rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 796 - 0
pages/goods/AddGoodsOneStore.vue

@@ -0,0 +1,796 @@
+<template>
+	<view class="add-goods">
+		<u-form :model="form" ref="goodsForm" label-width="160">
+			<view class="form-title">基本信息</view>
+			<view class="form-cont">
+				<u-form-item required label="商品相册" label-position="top"><upload :images="form.images" @handleRemove="imgRemove" @uploadSuccess="uploadSuccess" /></u-form-item>
+				<u-form-item required label="商品名称"><u-input input-align="right" v-model="form.title" /></u-form-item>
+				<u-form-item required label="商品分类">
+					<view class="form-main" @click="openSel('cate_show')">
+						<text v-if="category_name">{{ category_name }}</text>
+						<text class="input-pl" v-else>请选择商品分类</text>
+					</view>
+					<view slot="right"><u-icon name="arrow-down-fill" size="24"></u-icon></view>
+				</u-form-item>
+				<u-form-item label="商品品牌">
+					<view class="form-main" @click="goPage('/pagesT/brand/selBrand')">
+						<text v-if="brand_name">{{ brand_name }}</text>
+						<text class="input-pl" v-else>请选择品牌</text>
+					</view>
+					<view slot="right"><u-icon name="arrow-down-fill" size="24"></u-icon></view>
+				</u-form-item>
+				<u-form-item label="商品卖点"><u-input input-align="right" v-model="form.describe" /></u-form-item>
+				<u-form-item label="抄码商品">
+					<view class="form-value">
+						<u-switch style="transform: translateY(14rpx);" @change="switchChange" v-model="isEq" :active-value="5" :inactive-value="4" size="40"></u-switch>
+					</view>
+				</u-form-item>
+				<u-form-item label="负库存销售">
+					<view class="form-value">
+						<u-switch
+							style="transform: translateY(14rpx);"
+							@change="distributionChange"
+							v-model="isDistribution"
+							:active-value="5"
+							:inactive-value="4"
+							size="40"
+						></u-switch>
+					</view>
+				</u-form-item>
+				<u-form-item label="是否上架">
+					<view class="form-value">
+						<u-switch
+							style="transform: translateY(14rpx);"
+							@change="enableStatusChange"
+							v-model="enableStatus"
+							:active-value="5"
+							:inactive-value="4"
+							size="40"
+						></u-switch>
+					</view>
+				</u-form-item>
+				<u-form-item label="保质期">
+					<u-input input-align="right" v-model="form.expireTime" />
+					<view slot="right">天</view>
+				</u-form-item>
+				<u-form-item label="关键词" label-position="top">
+					<view class="top-value">
+						<u-tag class="tag-li" v-for="(item, index) in form.tag" :key="index" :text="item" closeable type="primary" @close="deletTag(index)" />
+						<u-button size="mini" @click="openSel('tag_show')">
+							<u-icon name="plus" margin-right="20"></u-icon>
+							新增
+						</u-button>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="form-title">规格明细</view>
+			<view class="form-cont">
+				<u-form-item required label="基本单位">
+					<view class="form-main" @click="openSel('m_unit_show')">
+						<text v-if="master_unit">{{ master_unit }}</text>
+						<text class="input-pl" v-else>请选择基本单位</text>
+					</view>
+					<view slot="right"><u-icon name="arrow-down-fill" size="24"></u-icon></view>
+				</u-form-item>
+				<u-form-item label="辅助单位" label-position="top">
+					<view class="top-value">
+						<block v-for="(item, index) in form.unitData" :key="index">
+							<u-tag
+								class="tag-li"
+								v-if="item.isMaster === 4"
+								:text="'1' + item.unitName + '=' + item.conversion + master_unit"
+								:closeable="isEditSpec === 5 || isEq"
+								type="primary"
+								@close="deletUnit(index, item.unitName)"
+							/>
+						</block>
+						<u-button v-if="!isEq || (isEq && form.unitData.length < 1)" size="mini" @click="openSel('unit_show')">
+							<u-icon name="plus" margin-right="20"></u-icon>
+							新增
+						</u-button>
+					</view>
+				</u-form-item>
+				<u-form-item label="商品规格">
+					<view @click="editSku" slot="right" style="font-size: 28rpx; color: #007AFF;">
+						<u-icon name="edit-pen" size="28"></u-icon>
+						<text style="margin-left: 10rpx;">编辑</text>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="form-title">物流设置</view>
+			<view class="form-cont">
+				<u-form-item label="快递运费">
+					<view class="form-main" @click="openSel('expressType_show')">
+						<text v-if="expressType_name">{{ expressType_name }}</text>
+						<text class="input-pl" v-else>请选择</text>
+					</view>
+					<view slot="right"><u-icon name="arrow-down-fill" size="24"></u-icon></view>
+				</u-form-item>
+				<u-form-item label="运费模版" v-if="form.expressType === 2">
+					<view class="form-main" @click="openSel('template_show')">
+						<text v-if="template_name">{{ template_name }}</text>
+						<text class="input-pl" v-else>请选择</text>
+					</view>
+					<view slot="right"><u-icon name="arrow-down-fill" size="24"></u-icon></view>
+				</u-form-item>
+				<u-form-item label="统一运费" v-if="form.expressType === 3">
+					<u-input input-align="right" v-model="form.expressFee" />
+					<view slot="right">元</view>
+				</u-form-item>
+			</view>
+			<view class="form-title">商品详情</view>
+			<view class="form-cont"><editorW :html="form.description" @editInput="editInput"></editorW></view>
+		</u-form>
+		<view class="submit-btn"><u-button class="handel-btn" @click="submit" :loading="sub_load" :ripple="true" type="primary">提交发布</u-button></view>
+		<u-popup v-model="tag_show" border-radius="10" mode="center">
+			<view class="pop-model">
+				<view class="pop-tit">新增关键词</view>
+				<input :focus="true" type="text" confirm-type="done" @confirm="tagConfirm" placeholder-class="input-pl" placeholder="请输入" v-model="tag_key" />
+				<u-button type="primary" size="medium" @click="tagConfirm">确定</u-button>
+			</view>
+		</u-popup>
+		<u-popup v-model="unit_show" mode="center" border-radius="10">
+			<view class="pop-model">
+				<view class="pop-tit">新增辅助单位</view>
+				<view class="unit-model-main">
+					<text>1</text>
+					<view class="sel-view" @click="openSel('fz_unit_show')">
+						<text v-if="pop_unit_obj.label">{{ pop_unit_obj.label }}</text>
+						<text class="input-pl" v-else>请选择</text>
+					</view>
+					=
+					<input class="uni-num-input" type="digit" v-model="conversion" />
+					<text>{{ master_unit }}</text>
+				</view>
+				<view class="confirm-btn" @click="unitPopConfirm">确定</view>
+			</view>
+		</u-popup>
+		<tki-tree ref="tkitree" :selectParent="true" :range="cate_list" rangeKey="title" @confirm="cateConfirm"></tki-tree>
+		<u-select v-model="m_unit_show" mode="single-column" value-name="id" label-name="unitName" :list="unit_options" @confirm="unitConfirm"></u-select>
+		<u-select z-index="10080" v-model="fz_unit_show" mode="single-column" value-name="id" label-name="unitName" :list="unit_options" @confirm="unitPopSelConfirm"></u-select>
+		<u-select v-model="expressType_show" @confirm="expressTypeConfirm" :list="expressType_list"></u-select>
+		<!-- 运费模版 -->
+		<u-select v-model="template_show" @confirm="templateConfirm" label-name="title" value-name="id" :list="express_list"></u-select>
+	</view>
+</template>
+
+<script>
+import editorW from '@/components/editor/editor.vue';
+import upload from '@/components/qiniu/QiniuUpload.vue';
+import tkiTree from '@/components/tki-tree/tki-tree.vue';
+const priceDataLi = {
+	conversion: 0,
+	unitName: '',
+	unitId: 0,
+	isMaster: 5,
+	enabledLadder: 0,
+	salePriceAreaType: 1,
+	salePrice: 0,
+	ladderPrice: [],
+	marketPrice: 0,
+	memberPrice: '',
+	setNum: 1,
+	specImage: '',
+	barCode: '',
+	weight: ''
+};
+export default {
+	components: { editorW, upload, tkiTree },
+	data() {
+		return {
+			sub_load: false,
+			express_list: [],
+			expressType_show: false,
+			template_show: false,
+			expressType_name: '包邮',
+			isEq: false,
+			isDistribution: false,
+			enableStatus: true,
+			shopData: '',
+			conversion: '', //辅助单位换算比例
+			master_unit: '', //基本单位
+			pop_unit_obj: {}, // 弹窗辅助单位
+			tag_show: false, //新增关键词弹窗
+			tag_key: '', // 新增关键词
+			brandData: {}, //品牌数据
+			brand_name: '', //品牌名称
+			category_name: '', //分类名称
+			unit_options: [], //计量单位
+			copy_unit_options: [], //计量单位
+			expressType_list: [
+				{
+					label: '包邮',
+					value: 1
+				},
+				{
+					label: '运费模版',
+					value: 2
+				},
+				{
+					label: '统一运费',
+					value: 3
+				}
+			],
+			unit_show: false, // 新增辅助弹窗
+			cate_show: false, // 商品分类弹窗
+			m_unit_show: false, // 单位弹窗
+			fz_unit_show: false,
+			brand_list: [],
+			cate_list: [],
+			isEditSpec: 5, // 5 表示此商品从未采购过,允许用户随意编辑单位和属性;4 表示商品已经采购过,隐藏添加属性按钮,避免skuid重组
+			form: {
+				merchantId: '',
+				assistCategoryPath: [],
+				assistCategoryId: '',
+				delUnitIds: [],
+				delSpecSkuIds: [],
+				createUserName: '',
+				isDistribution: '',
+				isShield: '',
+				deliverySupIds: '',
+				expressType: '', //运费模版
+				expressFee: '', // 统一运费
+				showExpress: '',
+				ruleId: '',
+				notArea: [],
+				notCustomerType: '',
+				notCustomer: '',
+				title: '', //商品名称
+				storage: '', //货架编码
+				specType: 1, // 是否启用多规格 1单规格 2多规格
+				specGroup: [], //多规格数据
+				specMultiple: [], //多规格明细
+				unitData: [], //计量单位
+				describe: '', //商品卖点
+				code: '', //商品code
+				barCode: '', //商品条码
+				weight: '', //商品重量
+				categoryId: '', //分类ID
+				categoryPath: '', //分类路径
+				expireTime: '', //保质期
+				brandId: '', //品牌ID
+				tag: [], //关键词
+				description: '', //商品详情
+				noSalesShop: '', //不销售店铺ID
+				images: [], //商品图片
+				enableStatus: 5, //是否上架
+				isStore: false, //是否是商户后台上传商品
+				isEq: 4 //超码商品 4否 5是
+			}
+		};
+	},
+	watch: {
+		brandData(val) {
+			if (val.id) {
+				this.form.brandId = val.id;
+				this.brand_name = val.title;
+			}
+		}
+	},
+	onLoad(options) {
+		this.getAllExpressRule()
+		if (options.id) {
+			this.goods_id = options.id;
+			this.getQuickGoodsInfo();
+			uni.setNavigationBarTitle({
+				title: '编辑商品'
+			});
+		}
+		this.getAllCategory();
+		this.getAllUnit();
+	},
+	methods: {
+		//抄码商品
+		switchChange(val) {
+			this.form.isEq = val;
+		},
+		// 负库存销售
+		distributionChange(val) {
+			this.form.isDistribution = val;
+		},
+		// 是否上架
+		enableStatusChange(val) {
+			this.form.enableStatus = val;
+		},
+		templateConfirm(arr) {
+			this.template_name = arr[0].label;
+			this.form.ruleId = arr[0].value;
+		},
+		expressTypeConfirm(arr) {
+			this.expressType_name = arr[0].label;
+			this.form.expressType = arr[0].value;
+		},
+		//运费模版
+		getAllExpressRule() {
+			this.$u.api.getAllExpressRule().then(res => {
+				this.express_list = res.data;
+			});
+		},
+		cateConfirm(arr) {
+			this.category_name = arr[0].title;
+			this.form.categoryId = arr[0].id;
+			if (arr[0].parents.length) {
+				this.form.categoryPath = arr[0].parents.map(item => item.id).join(',') + ',' + arr[0].id;
+			} else {
+				this.form.categoryPath = arr[0].id;
+			}
+		},
+		editInput(val) {
+			this.form.description = val;
+		},
+		// 获取商品详情
+		getQuickGoodsInfo() {
+			this.$u.api.getQuickGoodsInfo(this.goods_id).then(res => {
+				const data = res.data;
+				this.category_name = data.categoryName;
+				this.brand_name = data.brandName;
+				this.isDistribution = data.isDistribution === 5;
+				this.isEq = data.isEq === 5;
+				this.enableStatus = data.enableStatus === 5;
+				this.master_unit = data.unitData.find(item => item.isMaster === 5).unitName;
+				const expressTypeData = this.expressType_list.find(item => item.value === data.expressType);
+				this.expressType_name = expressTypeData ? expressTypeData.label : '';
+				if (data.expressType === 2) {
+					this.template_name = this.express_list.find(item => item.id === data.ruleId).title;
+				}
+				this.form = {
+					basicGoodsId: data.basicGoodsId,
+					merchantId: data.merchantId,
+					assistCategoryPath: data.assistCategoryPath,
+					assistCategoryId: data.assistCategoryId,
+					delUnitIds: data.delUnitIds,
+					delSpecSkuIds: data.delSpecSkuIds,
+					createUserName: data.createUserName,
+					isDistribution: data.isDistribution,
+					isShield: data.isShield,
+					deliverySupIds: data.deliverySupIds,
+					expressType: data.expressType,
+					expressFee: data.expressFee,
+					showExpress: data.showExpress,
+					ruleId: data.ruleId,
+					notArea: data.notArea,
+					notCustomerType: data.notCustomerType,
+					notCustomer: data.notCustomer,
+					title: data.title,
+					storage: data.storage,
+					specType: data.specType,
+					specGroup: data.specGroup,
+					specMultiple: data.specMultiple,
+					unitData: data.unitData.map(item => {
+						return {
+							id: item.id,
+							unitName: item.unitName,
+							isMaster: item.isMaster,
+							unitId: item.unitId,
+							conversion: item.conversion || 0
+						};
+					}),
+					describe: data.describe,
+					code: data.code,
+					barCode: data.barCode,
+					weight: data.weight,
+					categoryId: data.categoryId,
+					categoryPath: data.categoryPath,
+					expireTime: data.expireTime,
+					brandId: data.brandId,
+					tag: data.tag.filter(item => !!item),
+					description: data.description,
+					noSalesShop: data.noSalesShop,
+					images: data.images,
+					enableStatus: data.enableStatus,
+					isStore: data.isStore,
+					isEq: data.isEq
+				};
+				console.log(this.form);
+			});
+		},
+		//基本单位选择
+		unitConfirm(arr) {
+			// 检查辅助单位是否包含当前选择的单位
+			const isFu = this.form.unitData.find(item => item.unitName === arr[0].label);
+			if (!!isFu) {
+				this.$u.toast('基本单位不能与辅助单位用同一个');
+				return;
+			}
+
+			this.master_unit = arr[0].label;
+			const index = this.form.unitData.findIndex(item => item.isMaster === 5);
+
+			const unit = {
+				isMaster: 5,
+				isDefault: 5,
+				isNew: 5,
+				specType: 1,
+				barCode: '',
+				weight: '',
+				unitName: arr[0].label,
+				unitId: arr[0].value
+			};
+			if (index === -1) {
+				this.form.unitData.push(unit);
+			} else {
+				this.form.unitData[index] = {
+					...this.form.unitData[index],
+					...unit
+				};
+			}
+
+			const skuIndex = this.form.specMultiple.findIndex(item => item.isMaster === 5);
+			if (skuIndex > -1) {
+				this.form.specMultiple[skuIndex].unitId = arr[0].value;
+				this.form.specMultiple[skuIndex].unitName = arr[0].label;
+				this.form.specMultiple[skuIndex].salePrice = {
+					...this.form.specMultiple[skuIndex].salePrice,
+					unitName: arr[0].label,
+					unitId: arr[0].value
+				};
+			}
+		},
+		editSku() {
+			if (!this.master_unit) {
+				this.$u.toast('请先选择基本单位');
+				return;
+			}
+			let obj = [];
+			if (this.form.specMultiple.length) {
+				obj = this.form.specMultiple;
+			} else {
+				obj = this.form.unitData;
+			}
+			// console.log(obj)
+			// console.log(this.form.specType);
+			// return
+			if (this.form.specType === 1) {
+				this.goPage('/pages/goods/SkuOneStore?specType=' + this.form.specType + '&unitData=' + JSON.stringify(obj));
+			} else {
+				this.goPage(
+					'/pages/goods/SkuOneStore?specType=' +
+						this.form.specType +
+						'&unitData=' +
+						JSON.stringify(this.form.unitData) +
+						'&specMultiple=' +
+						JSON.stringify(this.form.specMultiple) +
+						'&specGroup=' +
+						JSON.stringify(this.form.specGroup)
+				);
+			}
+		},
+		openSel(key) {
+			if (key === 'unit_show') {
+				if (!this.master_unit) {
+					this.$u.toast('请先选择基本单位');
+					return;
+				}
+			} else if (key === 'cate_show') {
+				this.$refs.tkitree._show();
+				return;
+			} else if (key === 'm_unit_show') {
+				if (this.isEditSpec === 4) {
+					return;
+				}
+				// 抄码商品主单位只能选择KG
+				if (this.isEq) {
+					this.unit_options = this.copy_unit_options.filter(item => item.unitName === 'KG');
+				} else {
+					this.unit_options = this.$u.deepClone(this.copy_unit_options);
+				}
+			} else if (key === 'fz_unit_show') {
+				if (this.isEq) {
+					this.unit_options = this.copy_unit_options.filter(item => item.unitName === '件');
+				} else {
+					this.unit_options = this.$u.deepClone(this.copy_unit_options);
+				}
+			}
+			this[key] = true;
+		},
+		// 新增关键词确定
+		tagConfirm() {
+			this.tag_show = false;
+			this.form.tag.push(this.tag_key);
+			this.tag_key = '';
+		},
+		deletTag(index) {
+			this.form.tag.splice(index, 1);
+		},
+		deletShop(index) {
+			this.no_sales_shop.splice(index, 1);
+		},
+		// 图片上传成功
+		uploadSuccess(imgUrl) {
+			this.form.images.push(imgUrl);
+		},
+		//移除图片
+		imgRemove(arr) {
+			this.form.images = arr;
+		},
+		//  获取所有商品分类
+		getAllCategory() {
+			this.$u.api
+				.getAllCategory({
+					enableStatus: 5
+				})
+				.then(res => {
+					this.cate_list = res.data;
+				});
+		},
+		reduceCate(list) {
+			list.forEach(item => {
+				if (!item.children) {
+					item.children = [
+						{
+							id: '',
+							title: '全部'
+						}
+					];
+				} else {
+					item.children = this.reduceCate(item.children);
+				}
+			});
+			return list;
+		},
+		getAllUnit() {
+			this.$u.api
+				.getAllUnit({
+					page: 1,
+					pageSize: 99
+				})
+				.then(res => {
+					// 备份一份单位数据
+					this.copy_unit_options = this.$u.deepClone(res.data);
+					this.unit_options = res.data;
+				});
+		},
+		// 辅助单位选择
+		unitPopSelConfirm(arr) {
+			if (arr[0].label === this.master_unit) {
+				this.$u.toast('辅助单位不能与基本单位用同一个');
+				return;
+			}
+			const index = this.form.unitData.findIndex(item => item.unitName === arr[0].label);
+			if (index > -1) {
+				this.$u.toast('该单位已被选择');
+				return;
+			}
+			this.pop_unit_obj = arr[0];
+		},
+		// 辅助单位确定
+		unitPopConfirm() {
+			if (!this.conversion) {
+				this.$u.toast('请输入换算比例');
+				return;
+			}
+			this.form.unitData.push({
+				unitName: this.pop_unit_obj.label,
+				isMaster: 4,
+				unitId: this.pop_unit_obj.value,
+				conversion: this.conversion
+			});
+			if (this.form.specType === 1) {
+				this.form.specMultiple = this.form.unitData.map(item => {
+					return {
+						unitName: item.unitName,
+						isMaster: item.isMaster,
+						isSale: 5,
+						isDefault: 4,
+						unitId: item.unitId,
+						conversion: item.conversion || 0,
+						specImage: '',
+						specGroup: [],
+						salePrice: {
+							unitName: item.unitName,
+							isMaster: item.isMaster,
+							unitId: item.unitId,
+							conversion: item.conversion || 0,
+							deleteStatus: 4,
+							enabledLadder: 0,
+							salePriceAreaType: 1,
+							salePrice: 0,
+							ladderPrice: [],
+							marketPrice: 0,
+							memberPrice: '',
+							setNum: 1
+						}
+					};
+				});
+			} else {
+				const skuArr = this.form.specMultiple.filter(item => item.isMaster === 5);
+				const fuskuArr = skuArr.map(item => {
+					return {
+						unitName: this.pop_unit_obj.label,
+						isMaster: 4,
+						isSale: 5,
+						isDefault: 4,
+						unitId: this.pop_unit_obj.value,
+						conversion: this.conversion,
+						specImage: '',
+						specGroup: item.specGroup,
+						salePrice: {
+							unitName: this.pop_unit_obj.label,
+							isMaster: 4,
+							unitId: this.pop_unit_obj.value,
+							conversion: this.conversion,
+							deleteStatus: 4,
+							enabledLadder: 0,
+							salePriceAreaType: 1,
+							salePrice: 0,
+							ladderPrice: [],
+							marketPrice: 0,
+							memberPrice: '',
+							setNum: 1
+						}
+					};
+				});
+				this.form.specMultiple = this.form.specMultiple.concat(fuskuArr);
+			}
+
+			// 重置弹窗数据
+			this.unit_show = false;
+			this.conversion = '';
+			this.pop_unit_obj = {};
+		},
+		deletUnit(index, unitName) {
+			this.form.unitData.splice(index, 1);
+			this.form.specMultiple.forEach((item, index) => {
+				if (item.unitName === unitName) {
+					this.form.specMultiple.splice(index, 1);
+				}
+			});
+		},
+		submit() {
+			if (!this.form.images.length) {
+				this.$u.toast('请至少选择一张商品图片');
+				return;
+			}
+			if (!this.form.title) {
+				this.$u.toast('请输入商品名称');
+				return;
+			}
+			if (!this.form.categoryId) {
+				this.$u.toast('请选择商品分类');
+				return;
+			}
+			if (!this.form.unitData.length) {
+				this.$u.toast('请选择基本单位');
+				return;
+			}
+			if (!this.form.specMultiple || !this.form.specMultiple.length) {
+				this.$u.toast('请编辑商品规格');
+				return;
+			}
+			// 检查规格里面的销售价是不是为0
+			let isSalePrice = true;
+			for (let i in this.form.specMultiple) {
+				let item = this.form.specMultiple[i];
+				if (!item.salePrice.salePrice || item.salePrice.salePrice <= 0) {
+					const skuName = item.specGroup.map(sku => sku.specValueName).join(';');
+					this.$u.toast(`规格【${item.unitName + ';' + skuName}】的销售价必须大于0`);
+					isSalePrice = false;
+					break;
+				}
+			}
+			if (!isSalePrice) {
+				return;
+			}
+			// 编辑页面清楚ID
+			this.form.specMultiple.map(item => {
+				if (item.id) {
+					delete item.id;
+				}
+				return item;
+			});
+			// 做延迟处理是为了获取富文本框中的值
+			setTimeout(() => {
+				this.sub_load = true;
+				if (this.goods_id) {
+					this.$u.api
+						.editQuickGoods({
+							...this.form,
+							id: this.goods_id,
+							tag: this.form.tag ? this.form.tag.join(',') : ''
+						})
+						.then(res => {
+							this.sub_load = false;
+							this.$u.toast('修改成功');
+							setTimeout(() => {
+								uni.navigateBack();
+							}, 2000);
+						})
+						.catch(err => {
+							this.sub_load = false;
+						});
+				} else {
+					this.$u.api
+						.addBasicAndPublishGoods({ ...this.form, tag: this.form.tag ? this.form.tag.join(',') : '' })
+						.then(res => {
+							this.sub_load = false;
+							this.$u.toast('新增成功');
+							setTimeout(() => {
+								uni.navigateBack();
+							}, 2000);
+						})
+						.catch(err => {
+							this.sub_load = false;
+						});
+				}
+			}, 200);
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.add-goods {
+	padding-bottom: 120rpx;
+	.form-title {
+		line-height: 90rpx;
+		font-weight: 700;
+		padding: 0 24rpx;
+	}
+	.form-cont {
+		padding: 0 24rpx;
+		background-color: #ffffff;
+		.form-value {
+			text-align: right;
+			width: 100%;
+		}
+		.top-value {
+			text-align: left;
+			width: 100%;
+		}
+		.form-main {
+			text-align: right;
+			.input-pl {
+				color: #c0c4cc;
+				font-size: 28rpx;
+			}
+		}
+	}
+}
+.pop-model {
+	padding: 0 30rpx 20rpx;
+	text-align: center;
+	input {
+		border: 1px solid #f5f5f5;
+		line-height: 70rpx;
+		height: 70rpx;
+		margin-bottom: 20rpx;
+	}
+	.pop-tit {
+		line-height: 70rpx;
+	}
+	.confirm-btn {
+		width: 80%;
+		display: block;
+		background-color: $uni-color-primary;
+		text-align: center;
+		color: #ffffff;
+		line-height: 70rpx;
+		height: 70rpx;
+		border-radius: 10rpx;
+		margin: 0 auto;
+	}
+	.unit-model-main {
+		margin-bottom: 30rpx;
+		margin-top: 10rpx;
+		width: 600rpx;
+		line-height: 70rpx;
+		input {
+			display: inline-block;
+			vertical-align: middle;
+			width: 200rpx;
+			margin: 0 10rpx;
+		}
+		.sel-view {
+			margin: 0 10rpx;
+			display: inline-block;
+			vertical-align: middle;
+			width: 200rpx;
+			height: 70rpx;
+			border: 1px solid #f5f5f5;
+		}
+	}
+}
+.tag-li {
+	margin-right: 20rpx;
+}
+</style>

+ 723 - 0
pages/goods/AddSelGoods.vue

@@ -0,0 +1,723 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="150" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="选择店铺" prop="shopName">
+					<u-input @click="goPage('/pagesT/shop/selShop')" class="dis-input" disabled v-model="add_form.shopName" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item required label="选择商品" prop="goodsName">
+					<u-input @click="selGoods" class="dis-input" disabled v-model="add_form.goodsName" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="上下架">
+					<view class="form-value">
+						<u-switch
+							style="transform: translateY(14rpx);"
+							@change="enableStatusChange"
+							v-model="enableStatus"
+							:active-value="5"
+							:inactive-value="4"
+							size="40"
+						></u-switch>
+					</view>
+				</u-form-item>
+				<u-form-item label="负库存销售">
+					<view class="form-value">
+						<u-switch
+							style="transform: translateY(14rpx);"
+							@change="isDistributionChange"
+							v-model="isDistribution"
+							:active-value="5"
+							:inactive-value="4"
+							size="40"
+						></u-switch>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="快递运费">
+					<u-input @click="openSel('expressType_show')" class="dis-input" disabled v-model="expressType_name" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="商品服务" label-position="top">
+					<u-checkbox-group>
+						<u-checkbox v-model="item.checked" v-for="(item, index) in serve_list" :key="index" :name="item.id">{{ item.servicesName }}</u-checkbox>
+					</u-checkbox-group>
+				</u-form-item>
+				<u-form-item label="运费模版" v-if="add_form.expressType === 2">
+					<u-input @click="openSel('template_show')" class="dis-input" disabled v-model="template_name" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="统一运费" v-if="add_form.expressType === 3"><u-input v-model="add_form.expressFee" placeholder="请输入" /></u-form-item>
+			</view>
+			<view class="form-model-view" v-if="spec_multiple.length">
+				<u-form-item label-position="top" label="价格明细">
+					<view class="price-ul">
+						<view class="price-li clearfix">
+							<view class="price-li-in">规格明细</view>
+							<view class="price-li-in">共{{ spec_multiple.length }}种规格</view>
+							<view class="price-li-in" @click="openSel('price_show')" v-if="add_form.specType === 2">
+								批量设置
+								<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+							</view>
+						</view>
+						<view class="price-li thead ">
+							<view class="price-li-in">规格名称</view>
+							<view class="price-li-in" style="color: #333333;">订货价</view>
+						</view>
+						<view class="price-li clearfix" v-for="(item, index) in spec_multiple" :key="index">
+							<view class="price-li-in">
+								{{ item.unitName }};
+								<text v-for="(sku, skuI) in item.specGroup" :key="skuI">{{ sku.specValueName }}</text>
+							</view>
+							<view class="price-li-in" @click="openSel('price_show', item, index)">
+								{{ (item.enabledLadder !== 1 && item.salePrice > 0) || item.enabledLadder === 1 ? '已设置' : '未设置' }}
+								<u-icon name="arrow-right" size="24" color="#999999"></u-icon>
+							</view>
+						</view>
+					</view>
+				</u-form-item>
+			</view>
+		</u-form>
+		<view class="submit-btn"><view class="btn-min" @click="submit">提交发布</view></view>
+		<u-select v-model="expressType_show" @confirm="expressTypeConfirm" :list="expressType_list"></u-select>
+		<!-- 运费模版 -->
+		<u-select v-model="template_show" @confirm="templateConfirm" label-name="title" value-name="id" :list="express_list"></u-select>
+		<u-popup v-model="price_show" mode="bottom" :mask-close-able="false">
+			<view class="pop-ul">
+				<view class="sku-name" v-if="!pop_price.unitName">批量设置</view>
+				<view class="sku-name" v-else>
+					{{ pop_price.unitName }};
+					<text v-for="(sku, skuI) in pop_price.specGroup" :key="skuI">{{ sku.specValueName }}</text>
+					<text v-if="pop_price.isMaster === 4" style="font-weight: 400;font-size: 24rpx;">
+						(1{{ pop_price.unitName }}={{ Number(pop_price.conversion) }}{{ primary_unit }})
+					</text>
+				</view>
+				<view class="pop-li clearfix">
+					<view class="float_left">阶梯价</view>
+					<view class="float_right">
+						<u-switch
+							:disabled="isEq === 5 && pop_price.isMaster === 4"
+							style="transform: translateY(14rpx);"
+							@change="ladderChange"
+							v-model="pop_enabled_ladder"
+							:active-value="1"
+							:inactive-value="0"
+							size="40"
+						></u-switch>
+					</view>
+				</view>
+				<view class="pop-li clearfix" v-if="pop_price.enabledLadder !== 1">
+					<view class="float_left">销售价/元</view>
+					<view class="float_right">
+						<input
+							@blur="salePriceBlur"
+							:disabled="isEq === 5 && pop_price.isMaster === 4"
+							input-align="right"
+							placeholder="请输入"
+							v-model="pop_price.salePrice"
+							height="90"
+							type="digit"
+						/>
+					</view>
+				</view>
+				<view class="pop-li ladder-price clearfix" v-if="pop_price.enabledLadder === 1">
+					<view class="clearfix" style="padding: 10rpx 0;">
+						<view class="float_left">销售价/元</view>
+						<view class="float_right" v-if="pop_price.ladderPrice.length < 3"><u-button @click="addLadderprice" size="mini" type="primary">新增</u-button></view>
+					</view>
+					<view style="padding-bottom: 10rpx;" v-for="(ladder, ladderI) in pop_price.ladderPrice" :key="ladderI">
+						<view class="input-view">
+							<input disabled type="digit" v-model="ladder.from" />
+							<u-tag :text="pop_price.unitName || '件'" mode="light" />
+						</view>
+						-
+						<view class="input-view">
+							<input
+								:disabled="isEq === 5 && pop_price.isMaster === 4"
+								@blur="ladderBlur($event, ladderI)"
+								type="digit"
+								v-if="ladderI !== pop_price.ladderPrice.length - 1"
+								v-model="ladder.to"
+							/>
+							<input v-else disabled value="∞" />
+							<u-tag :text="pop_price.unitName || '件'" mode="light" />
+						</view>
+						=
+						<view class="input-view">
+							<input :disabled="isEq === 5 && pop_price.isMaster === 4" type="digit" @blur="salePriceLadderBlur(ladderI)" v-model="ladder.price" />
+							<u-icon
+								name="shanchu"
+								v-if="pop_price.ladderPrice.length > 2 && ladderI !== pop_price.ladderPrice.length - 1"
+								color="#ff4501"
+								custom-prefix="custom-icon"
+								@click="delLadderPrice(ladderI)"
+							></u-icon>
+						</view>
+					</view>
+				</view>
+				<view class="pop-li clearfix">
+					<view class="float_left">会员价/元</view>
+					<view class="float_right">
+						<input
+							:disabled="isEq === 5 && pop_price.isMaster === 4"
+							input-align="right"
+							placeholder="请输入"
+							v-model="pop_price.memberPrice"
+							height="90"
+							type="digit"
+						/>
+					</view>
+				</view>
+				<view class="pop-li clearfix">
+					<view class="float_left">市场价/元</view>
+					<view class="float_right"><input input-align="right" placeholder="请输入" v-model="pop_price.marketPrice" height="90" type="digit" /></view>
+				</view>
+				<view class="pop-li clearfix">
+					<view class="float_left">起订数量</view>
+					<view class="float_right"><u-input input-align="right" placeholder="请输入" v-model="pop_price.setNum" height="90" type="number" /></view>
+				</view>
+				<view class="pop-li clearfix">
+					<view class="float_left">是否销售</view>
+					<view class="float_right">
+						<u-switch style="transform: translateY(14rpx);" v-model="pop_price.isSale" :active-value="5" :inactive-value="4" size="40"></u-switch>
+					</view>
+				</view>
+				<view class="btn" @click="popconfirm">确定</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			template_show: false,
+			template_name: '',
+			pop_enabled_ladder: false,
+			pop_price: {},
+			sku_price_index: 0,
+			price_show: false,
+			expressType_show: false,
+			expressType_list: [
+				{
+					value: 1,
+					label: '包邮'
+				},
+				{
+					value: 2,
+					label: '运费模版'
+				},
+				{
+					value: 3,
+					label: '统一运费'
+				}
+			],
+			shopData: '',
+			goodsSel: '',
+			enableStatus: true,
+			isDistribution: false,
+			expressType_name: '包邮',
+			spec_multiple: [],
+			add_form: {
+				createUserName: '',
+				goodsName: '',
+				enableStatus: 5,
+				isDistribution: 4, //负库存销售
+				specType: '',
+				goodsBasicId: 0, // 商品基础资料
+				shopId: '', // 店铺
+				shopName: '', // 店铺
+				images: [], // 相册
+				salesArea: [], // 销售区域
+				serviceInfo: 1,
+				price: [], // 区域价
+				specification: [], // // 规格
+				content: '', // 商品描述
+				isRecommend: 5, // 5推荐 4不推荐
+				sort: '1', // 排序
+				deliverySupIds: '1,2', // 物流支持 固定值 1 快递 2 自提 传参格式:1,2
+				expressType: 1, // 快递运费 1 包邮 2 运费模版 3 固定费用
+				expressFee: '', // 固定费用
+				showExpress: 5, // 是否展示快递 5展示 4不展示
+				ruleId: '', // 运费模版id
+				isShield: 4, // 经营屏蔽 4关闭 5开启
+				notArea: [], //经营屏蔽地区
+				notCustomerType: '', //经营屏蔽 客户类型屏蔽
+				notCustomer: '', //经营屏蔽 客户屏蔽
+				support: ''
+			},
+			express_list: [],
+			goods_id: '',
+			primary_unit: '',
+			primary_unit_num: '',
+			serve_list: [],
+			support_list: [], // 预存商品服务数据
+			isEq: 4 //是否是抄码商品
+		};
+	},
+	computed: {
+		userName() {
+			return this.$store.state.userInfo.name;
+		}
+	},
+	watch: {
+		shopData(val) {
+			if (val) {
+				this.add_form.shopId = val.id;
+				this.add_form.shopName = val.name;
+			}
+		},
+		goodsSel(val) {
+			if (val) {
+				this.getGoodsBasicInfoById(val.id);
+			}
+		}
+	},
+	async onLoad(options) {
+		if (options.id) {
+			this.goods_id = options.id;
+			uni.setNavigationBarTitle({
+				title: '编辑商品'
+			});
+			await this.getGoodsInfo();
+		}
+		await this.getAllExpressRule();
+		await this.getAllGoodsSupport();
+	},
+	methods: {
+		// 商品详情
+		async getGoodsInfo() {
+			await this.$u.api.getGoodsInfo(this.goods_id).then(({ data }) => {
+				// this.goods_detail = res.data;
+				this.isEq = data.isEq;
+				this.enableStatus = data.enableStatus === 5;
+				this.isDistribution = data.isDistribution === 5;
+				this.spec_multiple = data.specMultiple;
+				this.support_list = data.support.map(item => Number(item));
+				this.add_form = {
+					createUserName: data.createUserName,
+					goodsName: data.title,
+					enableStatus: data.enableStatus,
+					isDistribution: data.isDistribution, //负库存销售
+					specType: data.specType,
+					goodsBasicId: data.basicGoodsId, // 商品基础资料
+					shopId: data.shopId, // 店铺
+					shopName: data.shopName, // 店铺
+					images: data.images, // 相册
+					salesArea: data.salesArea, // 销售区域
+					serviceInfo: data.serviceInfo,
+					price: data.price, // 区域价
+					specification: data.specification, // // 规格
+					content: data.content, // 商品描述
+					isRecommend: data.isRecommend, // 5推荐 4不推荐
+					sort: data.sort, // 排序
+					deliverySupIds: data.deliverySupIds, // 物流支持 固定值 1 快递 2 自提 传参格式:1,2
+					expressType: data.expressType, // 快递运费 1 包邮 2 运费模版 3 固定费用
+					expressFee: data.goodsName, // 固定费用
+					showExpress: data.showExpress, // 是否展示快递 5展示 4不展示
+					ruleId: data.ruleId, // 运费模版id
+					isShield: data.isShield, // 经营屏蔽 4关闭 5开启
+					notArea: data.notArea, //经营屏蔽地区
+					notCustomerType: data.notCustomerType, //经营屏蔽 客户类型屏蔽
+					notCustomer: data.notCustomer //经营屏蔽 客户屏蔽
+				};
+			});
+		},
+		expressTypeConfirm(arr) {
+			this.expressType_name = arr[0].label;
+			this.add_form.expressType = arr[0].value;
+		},
+		templateConfirm(arr) {
+			this.template_name = arr[0].label;
+			this.add_form.ruleId = arr[0].value;
+		},
+		openSel(key, row, index) {
+			this[key] = true;
+			if (key === 'price_show') {
+				if (!row) {
+					this.pop_enabled_ladder = false;
+					this.sku_price_index = '';
+					this.pop_price = {
+						ladderPrice: [],
+						marketPrice: '',
+						memberPrice: '',
+						salePrice: '',
+						setNum: 1,
+						isSale: true,
+						enabledLadder: 0
+					};
+				} else {
+					this.pop_enabled_ladder = row.enabledLadder === 1;
+					this.sku_price_index = index;
+					this.pop_price = {
+						...row,
+						isSale: row.isSale !== 4
+					};
+				}
+			}
+		},
+		selGoods() {
+			if (!this.add_form.shopId) {
+				this.$u.toast('请选择店铺');
+				return;
+			}
+			this.goPage(`/pagesT/goods/selBaseGoods?check=-1&shopId=${this.add_form.shopId}`);
+		},
+		//运费模版
+		getAllExpressRule() {
+			this.$u.api.getAllExpressRule().then(res => {
+				this.express_list = res.data;
+			});
+		},
+		getGoodsBasicInfoById(id) {
+			this.$u.api
+				.getGoodsBasicInfoById(id, {
+					isAddGoods: 5
+				})
+				.then(({ data }) => {
+					let arr = '';
+					data.unitData.forEach(item => {
+						if (item.isMaster === 5) {
+							arr = item.unitName;
+						}
+					});
+					this.primary_unit = arr;
+					this.add_form.goodsName = data.title;
+					this.add_form.images = data.images;
+					this.add_form.specType = data.specType;
+					this.add_form.content = data.description;
+					this.add_form.goodsBasicId = data.id;
+					if (data.specType === 1) {
+						this.add_form.specification = (data.branchUnit || []).concat(data.masterUnit);
+					} else if (data.specType === 2) {
+						this.add_form.specification = data.specMultiple;
+					}
+					this.spec_multiple = data.specMultiple.map(item => {
+						return {
+							...item,
+							ladderPrice: [],
+							marketPrice: '',
+							memberPrice: '',
+							salePrice: '',
+							salePriceAreaType: 1,
+							setNum: 1,
+							isSale: 5,
+							enabledLadder: 0
+						};
+					});
+				});
+		},
+		submit() {
+			this.add_form.createUserName = this.userName;
+			if (!this.add_form.shopName) {
+				this.$u.toast('请选择发布商铺');
+				return;
+			}
+			if (!this.add_form.goodsName) {
+				this.$u.toast('请选择发布商品');
+				return;
+			}
+
+			// 判断价格是否为0
+			const isFSale = this.spec_multiple.every(item => item.isSale === 4);
+			if (isFSale) {
+				this.$u.toast('至少保留一条规格的销售状态为【启用】');
+				return;
+			}
+			let isPrice = false;
+			for (let i in this.spec_multiple.length) {
+				let item = this.spec_multiple[i];
+				if (item.enabledLadder === 1) {
+					isPrice = item.ladderPrice.some(item => item.price <= 0);
+				} else {
+					isPrice = item.salePrice <= 0;
+				}
+				let skuName = '';
+				if (item.specGroup && item.specGroup.length) {
+					skuName = item.specGroup.map(item => item.specValueName).join(';');
+				}
+				if (isPrice) {
+					this.$u.toast(`规格【${item.unitName};${skuName}】的价格不能为0`);
+					break;
+				}
+			}
+			if (isPrice) {
+				return;
+			}
+			this.add_form.support = this.serve_list.filter(item => item.checked).map(item => item.id);
+			this.add_form.price = this.spec_multiple;
+			if (this.goods_id) {
+				this.$u.api.editGoods(this.goods_id, this.add_form).then(res => {
+					this.$u.toast('修改成功');
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 2000);
+				});
+			} else {
+				this.$u.api.addGoods(this.add_form).then(res => {
+					this.$u.toast('新增成功');
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 2000);
+				});
+			}
+		},
+		isDistributionChange(val) {
+			this.add_form.isDistribution = val;
+		},
+		enableStatusChange(val) {
+			this.add_form.enableStatus = val;
+		},
+		addLadderprice() {
+			const target = this.$u.deepClone(this.pop_price);
+			if (!target.ladderPrice.length) {
+				target.ladderPrice.push({
+					from: 1,
+					price: '',
+					to: 2
+				});
+			} else {
+				const upL = target.ladderPrice[0];
+				target.ladderPrice.splice(1, '', {
+					from: upL.to + 1,
+					price: '',
+					to: upL.to + 2
+				});
+				if (target.ladderPrice.length === 3) {
+					target.ladderPrice[target.ladderPrice.length - 1].from = upL.to + 3;
+				}
+			}
+			this.pop_price = target;
+		},
+		ladderChange(val) {
+			this.pop_price.enabledLadder = val;
+			if (val === 1) {
+				this.pop_price.ladderPrice = [
+					{
+						from: 1,
+						price: 0,
+						to: 2
+					},
+					{
+						from: 3,
+						price: 0,
+						to: 4
+					},
+					{
+						from: 5,
+						price: 0,
+						to: 999999999
+					}
+				];
+			} else {
+				this.pop_price.ladderPrice = [];
+			}
+		},
+		//  价格设置
+		popconfirm() {
+			if (this.pop_price.enabledLadder === 1) {
+				const isPrice = this.pop_price.ladderPrice.some(item => item.price <= 0);
+				if (isPrice) {
+					this.$u.toast('销售价不能为0');
+					return;
+				}
+			} else {
+				if (this.pop_price.salePrice <= 0) {
+					this.$u.toast('销售价不能为0');
+					return;
+				}
+			}
+			let target = this.$u.deepClone(this.spec_multiple);
+			if (!this.pop_price.unitName) {
+				// 批量设置
+				this.spec_multiple = target.map(item => {
+					item = {
+						...item,
+						...this.pop_price,
+						isSale: this.pop_price.isSale ? 5 : 4
+					};
+					// 根据换算关系 批量设置
+					if (Number(item.conversion)) {
+						item.salePrice = this.$NP.times(Number(item.conversion), this.pop_price.salePrice);
+						item.marketPrice = this.$NP.times(Number(item.conversion), this.pop_price.marketPrice);
+						item.memberPrice = this.$NP.times(Number(item.conversion), this.pop_price.memberPrice);
+						if (this.pop_price.enabledLadder === 1) {
+							item.ladderPrice = this.pop_price.ladderPrice.map(ladder => {
+								return {
+									...ladder,
+									price: this.$NP.times(Number(item.conversion), ladder.price)
+								};
+							});
+						}
+					}
+					// const salePrice = Number(item.)
+					return item;
+				});
+			} else {
+				// 抄码商品根据比例自动换算
+				if (this.add_form.specType === 1 && this.pop_price.isMaster === 5) {
+					target.forEach(item => {
+						if (item.conversion && item.isMaster === 4) {
+							item.marketPrice = this.$NP.times(this.pop_price.marketPrice, item.conversion);
+							item.salePrice = this.$NP.times(this.pop_price.salePrice, item.conversion);
+							item.memberPrice = this.$NP.times(this.pop_price.memberPrice, item.conversion);
+							if (this.isEq === 5) {
+								item.enabledLadder = this.pop_price.enabledLadder;
+								item.ladderPrice = this.pop_price.ladderPrice.map(ladder => {
+									return {
+										...ladder,
+										price: this.$NP.times(ladder.price, item.conversion)
+									};
+								});
+							}
+						}
+					});
+				}
+				target[this.sku_price_index] = {
+					...this.pop_price,
+					isSale: this.pop_price.isSale ? 5 : 4
+				};
+				this.spec_multiple = target;
+			}
+			this.price_show = false;
+		},
+		ladderBlur(e, index) {
+			let val = Number(e.detail.value);
+			const target = this.$u.deepClone(this.pop_price);
+			if (val <= target.ladderPrice[index].from) {
+				val = target.ladderPrice[index].from + 1;
+				target.ladderPrice[index].to = val;
+			}
+			target.ladderPrice[index + 1].from = val + 1;
+			if (index === 0) {
+				target.ladderPrice[index + 1].to = val + 2;
+				if (target.ladderPrice[index + 2]) {
+					target.ladderPrice[index + 2].from = val + 3;
+				}
+			}
+			this.pop_price = target;
+		},
+		delLadderPrice(index) {
+			const target = this.$u.deepClone(this.pop_price);
+			target.ladderPrice.splice(index, 1);
+			target.ladderPrice[0].from = 1;
+			target.ladderPrice[target.ladderPrice.length - 1].from = target.ladderPrice[0].to + 1;
+			this.pop_price = target;
+		},
+		// 销售价失去焦点
+		salePriceBlur(val) {
+			this.pop_price.marketPrice = this.$NP.times(this.pop_price.salePrice, 1.5);
+		},
+		// 阶梯价第一级失去焦点
+		salePriceLadderBlur(index) {
+			if (index === 0) {
+				this.pop_price.marketPrice = this.$NP.times(this.pop_price.ladderPrice[0].price, 1.5);
+			}
+		},
+		async getAllGoodsSupport() {
+			await this.$u.api
+				.getAllGoodsSupport({
+					page: 1,
+					pageSize: 99
+				})
+				.then(res => {
+					this.serve_list = res.data.map(item => {
+						return {
+							...item,
+							checked: this.support_list.indexOf(item.id) > -1
+						};
+					});
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.price-ul {
+	.price-li {
+		width: 700rpx;
+		line-height: 90rpx;
+		display: flex;
+		border-top: 1px solid #eeeeee;
+
+		.price-li-in {
+			flex: 2;
+			text-align: center;
+			color: #999999;
+
+			&:first-child {
+				text-align: left;
+				color: #333333;
+			}
+
+			&:last-child {
+				text-align: right;
+			}
+		}
+	}
+
+	.thead {
+		padding-top: 30rpx;
+		line-height: 60rpx;
+		font-size: 24rpx;
+		font-weight: bold;
+	}
+}
+
+.pop-ul {
+	line-height: 90rpx;
+
+	.sku-name {
+		font-weight: bold;
+		padding: 0 24rpx;
+	}
+
+	.pop-li {
+		padding: 0 24rpx;
+		border-top: 1px solid #eeeeee;
+		line-height: 90rpx;
+
+		input {
+			text-align: right;
+			line-height: 90rpx;
+			height: 90rpx;
+			display: inline-block;
+			vertical-align: middle;
+		}
+	}
+
+	.ladder-price {
+		line-height: 60rpx;
+
+		.input-view {
+			line-height: 60rpx;
+			display: inline-block;
+			width: 210rpx;
+			margin: 0 6rpx;
+
+			input {
+				padding: 0 8rpx;
+				display: inline-block;
+				vertical-align: middle;
+				width: 100rpx;
+				border: 1px solid #eeeeee;
+				border-radius: 10rpx;
+				line-height: 60rpx;
+				height: 60rpx;
+				margin-right: 8rpx;
+			}
+		}
+	}
+
+	.btn {
+		text-align: center;
+		color: #ffffff;
+		line-height: 90rpx;
+		background-color: $uni-color-primary;
+	}
+}
+</style>

+ 322 - 0
pages/goods/SaleGoodsDetail.vue

@@ -0,0 +1,322 @@
+<template>
+	<view class="">
+		<view class="goods-scroll"><u-swiper :list="list" :height="340" indicator-pos="bottomRight" mode="number"></u-swiper></view>
+		<view class="goods-info info-view">
+			<view class="goods-name">{{ goods_base_detail.title || '' }}</view>
+			<view class="goods-desc">{{ goods_base_detail.describe || '' }}</view>
+			<view class="goods-code clearfix">
+				<view class="float_left">
+					<text class="info-label">商品编码</text>
+					{{ goods_base_detail.code || '' }}
+				</view>
+				<view class="float_right" v-if="goods_base_detail.storage">
+					<text class="info-label">货架编码</text>
+					{{ goods_base_detail.storage || '未设置' }}
+				</view>
+			</view>
+		</view>
+		<view class="goods-info-other info-view">
+			<view class="info-li">
+				<view class="info-label">商品分类</view>
+				<view class="info-val">{{ goods_base_detail.categoryTitle || '' }}</view>
+			</view>
+			<view class="info-li">
+				<view class="info-label">商品品牌</view>
+				<view class="info-val">{{ goods_base_detail.brandTitle || '未设置' }}</view>
+			</view>
+			<view class="info-li">
+				<view class="info-label">保质期/天</view>
+				<view class="info-val">{{ goods_base_detail.expireTime || '未设置' }}</view>
+			</view>
+		</view>
+		<view class="info-view tag-view">
+			<text class="info-label">关键词</text>
+			<u-tag v-for="(item, index) in tag_list" :key="index" class="tag-li" mode="plain" :text="item" />
+			<text v-if="!tag_list.length" class="input-pl">未设置</text>
+		</view>
+		<view class="goods-info-other info-view">
+			<view class="info-li">
+				<view class="info-label">商品状态</view>
+				<view class="info-val">{{ goods_detail.enableStatus === 5 ? '上架' : '下架' }}</view>
+			</view>
+			<view class="info-li">
+				<view class="info-label">负库存销售</view>
+				<view class="info-val">{{ goods_detail.isDistribution === 5 ? '开启' : '禁用' }}</view>
+			</view>
+			<view class="info-li">
+				<view class="info-label">经营屏蔽</view>
+				<view class="info-val">{{ goods_detail.isShield === 5 ? '开启' : '禁用' }}</view>
+			</view>
+			<view class="info-li">
+				<view class="info-label">快递运费</view>
+				<view class="info-val">{{ goods_detail.enableStatus === 1 ? '包邮' : goods_detail.enableStatus === 2 ? '运费模版' : '统一运费' }}</view>
+			</view>
+		</view>
+
+		<view class="info-view tag-view">
+			<view class="unit-master">
+				<text class="info-label">基本单位</text>
+				<text>{{ master_unit.unitName || '' }}</text>
+			</view>
+			<view>
+				<text class="info-label">辅助单位</text>
+				<block v-for="(item, index) in other_unit_data" :key="index">
+					<u-tag v-if="item.isMaster !== 5" class="tag-li" mode="plain" :text="'1' + item.unitName + '=' + Number(item.conversion) + master_unit.unitName" />
+				</block>
+				<text v-if="!other_unit_data.length" class="input-pl">未设置</text>
+			</view>
+		</view>
+
+		<view class="sku-detail">
+			<view class="info-title">规格明细</view>
+			<view class="sku-li" v-for="(item, index) in goods_detail.specMultiple" :key="index">
+				<view class="clearfix">
+					<view class="float_left sku-img">
+						<image :src="item.specImage || '../../static/img/goods.png'" mode="aspectFill"></image>
+						<text class="default-sku" v-if="item.isDefault === 5">默认规格</text>
+					</view>
+					<view class="float_left sku-info">
+						<view class="sku-name">
+							{{ item.unitName }};
+							<text v-for="(spec, s) in item.specGroup" :key="s">{{ spec.specValueName }}</text>
+						</view>
+						<view class="price">
+							<text class="sale-price" v-if="item.enabledLadder !== 1">{{ $utils.formattedNumber(item.salePrice) }}</text>
+							<text class="market-price">{{ $utils.formattedNumber(item.marketPrice) }}</text>
+						</view>
+						<view class="num">
+							<text>库存:{{ $utils.formatNub(item.inventory) }}{{ item.unitName }}</text>
+							<text>起订:{{ $utils.formatNub(item.setNum) }}{{ item.unitName }}</text>
+						</view>
+						<view class="num">
+							<text>重量:{{ item.weight ? item.weight / 1000 : 0 }}kg</text>
+							<text>销量:{{ $utils.formatNub(item.salesNum) }}{{ item.unitName }}</text>
+						</view>
+					</view>
+				</view>
+				<view class="ladder-price" v-if="item.enabledLadder === 1">
+					<view class="price-li" v-for="(la, laI) in item.ladderPrice" :key="laI">
+						<view class="num-top">
+							{{ la.from }}-
+							<text v-if="laI === item.ladderPrice.length - 1">∞</text>
+							<text v-else>{{ la.to }}</text>
+							{{ item.unitName }}
+						</view>
+						<view class="price">{{ $utils.formattedNumber(la.price) }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="sku-detail">
+			<view class="info-title">商品详情</view>
+			<view class="detail-view"><rich-text :nodes="goods_base_detail.description"></rich-text></view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list: [],
+			goods_id: '',
+			goods_base_detail: {},
+			master_unit: {},
+			other_unit_data: [],
+			tag_list: [],
+			basic_goods_id: '',
+			goods_detail: {
+				specMultiple: []
+			}
+		};
+	},
+	onLoad(options) {
+		if (options.id) {
+			this.goods_id = options.id;
+			this.basic_goods_id = options.basicGoodsId;
+			this.getGoodsBasicInfoById();
+			this.getGoodsInfo();
+		}
+	},
+	methods: {
+		// 商品详情
+		getGoodsInfo() {
+			this.$u.api.getGoodsInfo(this.goods_id).then(res => {
+				this.goods_detail = res.data;
+			});
+		},
+		// 商品基础资料
+		getGoodsBasicInfoById() {
+			this.$u.api.getGoodsBasicInfoById(this.basic_goods_id).then(res => {
+				this.goods_base_detail = res.data;
+				this.list = res.data.images.map(item => {
+					return {
+						image: item
+					};
+				});
+				this.tag_list = res.data.tag ? res.data.tag.split(',') : [];
+				this.master_unit = res.data.unitData.find(item => item.isMaster === 5);
+				this.other_unit_data = res.data.unitData.filter(item => item.isMaster === 4);
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.goods-scroll {
+	width: 702rpx;
+	margin: 0 auto 20rpx;
+}
+.info-view {
+	background-color: #ffffff;
+	width: 702rpx;
+	margin: 0 auto;
+	border-radius: 10rpx;
+	margin-bottom: 20rpx;
+	padding: 20rpx;
+	.info-label {
+		font-size: 24rpx;
+		color: #999999;
+	}
+}
+.goods-info {
+	font-size: 24rpx;
+	.goods-name {
+		font-size: 28rpx;
+		font-weight: 700;
+	}
+	.goods-desc {
+		padding: 10rpx 0;
+		color: #999999;
+	}
+	.goods-code {
+		.info-label {
+			margin-right: 10rpx;
+		}
+	}
+}
+.goods-info-other {
+	display: flex;
+	.info-li {
+		flex: 4;
+		font-size: 26rpx;
+		text-align: center;
+		border-right: 1px solid #f5f5f5;
+		.info-label {
+			padding-bottom: 20rpx;
+		}
+		&:last-child {
+			border-right: 0 none;
+		}
+	}
+}
+.tag-view {
+	.info-label {
+		margin-right: 20rpx;
+	}
+	.tag-li {
+		margin-right: 10rpx;
+	}
+}
+.unit-master {
+	padding-bottom: 20rpx;
+}
+.sku-detail {
+	.info-title {
+		text-align: center;
+		line-height: 90rpx;
+		font-size: 24rpx;
+		color: #666666;
+	}
+	.sku-li {
+		margin: 0 auto 20rpx;
+		width: 702rpx;
+		background-color: #ffffff;
+		padding: 24rpx;
+		border-radius: 20rpx;
+		.sku-img {
+			position: relative;
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 10rpx;
+			overflow: hidden;
+			image {
+				width: 100%;
+				height: 100%;
+			}
+			.default-sku {
+				position: absolute;
+				width: 100%;
+				font-size: 20rpx;
+				line-height: 36rpx;
+				height: 36rpx;
+				text-align: center;
+				color: #ffffff;
+				left: 0;
+				bottom: 0;
+				background-color: $uni-color-success;
+			}
+		}
+		.sku-info {
+			margin-left: 20rpx;
+			font-size: 24rpx;
+			color: #6c6c6c;
+			.sku-name {
+				color: #000000;
+				font-size: 28rpx;
+				font-weight: bold;
+			}
+			.price {
+				padding-top: 6rpx;
+				.sale-price {
+					font-size: 28rpx;
+					color: $uni-color-error;
+					font-weight: bold;
+					margin-right: 20rpx;
+				}
+				.market-price {
+					font-size: 22rpx;
+					color: #999999;
+					text-decoration: line-through;
+				}
+			}
+			.num {
+				line-height: 36rpx;
+				padding-top: 10rpx;
+				text {
+					margin-right: 20rpx;
+				}
+			}
+		}
+		.ladder-price {
+			margin-top: 20rpx;
+			border-top: 1px solid #eeeeee;
+			font-size: 24rpx;
+			padding: 20rpx 0;
+			display: flex;
+			.price-li {
+				flex: 3;
+				text-align: center;
+				border-right: 1px solid #eeeeee;
+				.price {
+					font-size: 28rpx;
+					font-weight: bold;
+					padding-top: 8rpx;
+					color: $uni-color-error;
+				}
+				&:last-child {
+					border-right: 0 none;
+				}
+			}
+		}
+	}
+}
+.detail-view {
+	background-color: #ffffff;
+	padding: 20rpx;
+	img {
+		width: 100%;
+	}
+}
+</style>

+ 1159 - 0
pages/goods/SkuOneStore.vue

@@ -0,0 +1,1159 @@
+<template>
+	<view class="sku-view">
+		<!-- 是否是多规格 -->
+		<view class="switch-view clearfix">
+			<view class="float_left">启用多规格</view>
+			<view class="float_right"><u-switch size="40" @change="specTypeChange" v-model="specType"></u-switch></view>
+		</view>
+		<view class="sku-name-view" v-if="specType">
+			<view class="sku-ul">
+				<view class="sku-li" v-for="(item, index) in spec_group" :key="index">
+					<view class="sku-label clearfix">
+						<view class="float_left">
+							{{ item.groupSpec.specName }}
+							<text class="custom-icon custom-icon-delete" @click="deletSpecGroup(index)"></text>
+						</view>
+						<view class="float_right sku-val-add-btn" @click="openSkuLabelPop('sku_val_pop', index, item.groupSpec.specId)">
+							<text class="custom-icon custom-icon-xinzeng"></text>
+							新增规格值
+						</view>
+					</view>
+
+					<view class="sku-val-ul">
+						<view class="sku-val-li" v-for="(ic, inc) in item.params" :key="inc">
+							{{ ic.specName }}
+							<text class="custom-icon custom-icon-delete" @click="deletSpecValue(index, inc)"></text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="sku-group" v-if="specType">
+			<view class="sku-group-tit clearfix">
+				<text>规格组合</text>
+				<view class="rest-btn float_right" @click="openSkuLabelPop('sku_label_pop')">添加规格组合</view>
+			</view>
+			<!-- 同步规格 -->
+			<view class="sku-group-main">
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">规格图片</view>
+						<view class="sku-main"><upload :images="set.specImage ? [set.specImage] : []" @handleRemove="imgRemoveTotal" @uploadSuccess="uploadSuccessTotal" /></view>
+						<u-button size="mini" type="primary" @click="synchro('specImage')">同步</u-button>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">是否销售</view>
+						<view class="input-view"><u-switch size="30" v-model="set.isSale"></u-switch></view>
+						<u-button size="mini" type="primary" @click="synchro('isSale')">同步</u-button>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">销售价</view>
+						<view class="input-view">
+							<input v-if="!set.enabledLadder" type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="set.salePrice" />
+							<view class="other-view" v-else>
+								<u-button size="mini" type="primary" @click="openLadder(-1, set)">{{ set.ladderPrice.length > 0 ? '已设置' : '去设置' }}</u-button>
+							</view>
+						</view>
+					
+						<u-button size="mini" type="primary" @click="synchro('salePrice')">同步</u-button>
+					</view>
+				</view>
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">会员价</view>
+						<view class="input-view"><input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="set.memberPrice" /></view>
+						<u-button size="mini" type="primary" @click="synchro('memberPrice')">同步</u-button>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">市场价</view>
+						<view class="input-view"><input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="set.marketPrice" /></view>
+						<u-button size="mini" type="primary" @click="synchro('marketPrice')">同步</u-button>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">起订数量</view>
+						<view class="input-view"><input type="number" placeholder="请输入" placeholder-class="input-pl" v-model="set.setNum" /></view>
+						<u-button size="mini" type="primary" @click="synchro('setNum')">同步</u-button>
+					</view>
+				</view>
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">启用阶梯价</view>
+						<view class="input-view"><u-switch size="30" v-model="set.enabledLadder"></u-switch></view>
+						<u-button size="mini" type="primary" @click="synchro('enabledLadder')">同步</u-button>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">商品条码</view>
+						<view class="input-view"><input type="text" placeholder="请输入" placeholder-class="input-pl" v-model="set.barCode" /></view>
+						<u-button size="mini" type="primary" @click="synchro('barCode')">同步</u-button>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">重量/g</view>
+						<view class="input-view"><input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="set.weight" /></view>
+						<u-button size="mini" type="primary" @click="synchro('weight')">同步</u-button>
+					</view>
+				</view>
+			</view>
+			<!-- 单个规格 -->
+			<view>
+				<view v-if="specMultipleUnit.length > 1" style="border-bottom: 1px solid #EEEEEE;">
+					<u-tabs-swiper @change="tabChange" ref="tabs" name="unitName" :current="tab_current" :list="specMultipleUnit" :is-scroll="false"></u-tabs-swiper>
+				</view>
+				<view class="sku-group-main" v-for="(sku, index) in specMultipleUnit[tab_current].specMultiple" :key="index">
+					<view class="sku-group-label clearfix">
+						<view class="float_left">
+							<text>{{ specMultipleUnit[tab_current].unitName }};</text>
+							<text>{{ sku.specName }};</text>
+						</view>
+						<view class="float_right">
+							<text class="default-label">默认:</text>
+							<view class="default-switch"><u-switch size="30" v-model="sku.isDefault" @change="isDefaultChange($event, index)"></u-switch></view>
+						</view>
+					</view>
+					<view class="sku-top">
+						<view class="sku-top-li">
+							<view class="label">规格图片</view>
+							<view class="sku-main">
+								<upload :images="sku.specImage ? [sku.specImage] : []" @uploadSuccess="uploadSuccess($event, index)" @handleRemove="imgRemove(index)" />
+							</view>
+						</view>
+						<view class="sku-top-li">
+							<view class="label">是否销售</view>
+							<view class="other-view"><u-switch size="30" v-model="sku.isSale"></u-switch></view>
+						</view>
+						<view class="sku-top-li">
+							<view class="label">销售价</view>
+							<input v-if="!sku.enabledLadder" type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="sku.salePrice" />
+							<view class="other-view" v-else>
+								<u-button size="mini" type="primary" @click="openLadder(index, sku)">{{ sku.ladderPrice.length > 0 ? '已设置' : '去设置' }}</u-button>
+							</view>
+						</view>
+					</view>
+					<view class="sku-top">
+						<view class="sku-top-li">
+							<view class="label">会员价</view>
+							<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="sku.memberPrice" />
+						</view>
+						<view class="sku-top-li">
+							<view class="label">市场价</view>
+							<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="sku.marketPrice" />
+						</view>
+						<view class="sku-top-li">
+							<view class="label">起订数量</view>
+							<input type="number" placeholder="请输入" placeholder-class="input-pl" v-model="sku.setNum" />
+						</view>
+					</view>
+					<view class="sku-top">
+						<view class="sku-top-li">
+							<view class="label">启用阶梯价</view>
+							<view class="other-view"><u-switch size="30" v-model="sku.enabledLadder"></u-switch></view>
+						</view>
+						<view class="sku-top-li">
+							<view class="label">商品条码</view>
+							<input type="text" placeholder="请输入" placeholder-class="input-pl" v-model="sku.barCode" />
+						</view>
+						<view class="sku-top-li">
+							<view class="label">重量/g</view>
+							<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="sku.weight" />
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 不启用多规格 单位 -->
+		<view class="sku-group unit-group" v-else>
+			<view class="sku-group-main" v-for="(item, index) in unit_data" :key="index">
+				<view class="sku-group-label clearfix">
+					<text class="float_left">{{ item.unitName }}</text>
+					<view class="float_right">
+						<text class="default-label">默认:</text>
+						<view class="default-switch"><u-switch size="30" v-model="item.isDefault" @change="isDefaultChange($event, index)"></u-switch></view>
+					</view>
+				</view>
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">规格图片</view>
+						<view class="sku-main" style="height: auto;">
+							<upload :images="item.specImage ? [item.specImage] : []" @uploadSuccess="uploadSuccess($event, index)" @handleRemove="imgRemove(index)" />
+						</view>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">是否销售</view>
+						<view class="other-view"><u-switch size="30" v-model="item.isSale"></u-switch></view>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">销售价</view>
+						<input v-if="!item.enabledLadder" type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="item.salePrice" />
+						<view class="other-view" v-else>
+							<u-button size="mini" type="primary" @click="openLadder(index, item)">{{ item.ladderPrice.length > 0 ? '已设置' : '去设置' }}</u-button>
+						</view>
+					</view>
+				</view>
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">会员价</view>
+						<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="item.memberPrice" />
+					</view>
+					<view class="sku-top-li">
+						<view class="label">市场价</view>
+						<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="item.marketPrice" />
+					</view>
+					<view class="sku-top-li">
+						<view class="label">起订数量</view>
+						<input type="number" placeholder="请输入" placeholder-class="input-pl" v-model="item.setNum" />
+					</view>
+				</view>
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">启用阶梯价</view>
+						<view class="other-view"><u-switch size="30" v-model="item.enabledLadder"></u-switch></view>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">商品条码</view>
+						<input type="text" placeholder="请输入" placeholder-class="input-pl" v-model="item.barCode" />
+					</view>
+					<view class="sku-top-li">
+						<view class="label">重量/g</view>
+						<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="item.weight" />
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="submit-btn"><view class="btn-min" @click="skuConfirm">确定</view></view>
+		<!-- 选择规格组 -->
+		<u-popup v-model="sku_label_pop" border-radius="16" mode="bottom">
+			<view class="pop-view">
+				<view class="handel-btn clearfix">
+					<text class="float_left" @click="cancelSkuLabelPop('sku_label_pop')">取消</text>
+					<text class="float_right" @click="specConfitm">确定</text>
+				</view>
+				<view class="pop-cont">
+					<block v-for="(item, index) in spec_list" :key="index">
+						<view class="sku-li clearfix" :class="[spec_group.find(its => its.groupSpec.specId === item.id) ? 'sku-on' : '']" @click="changeSpec(item.id)">
+							<text class="sku-val-label float_left">{{ item.specName }}</text>
+							<text class="custom-icon custom-icon-radio float_right" style="color: #999999;" v-if="spec_group.find(its => its.groupSpec.specId === item.id)"></text>
+							<text class="custom-icon float_right" v-else :class="[temporary_spec_id === item.id ? 'custom-icon-xuanze_xuanzhong' : 'custom-icon-xuanze']"></text>
+						</view>
+					</block>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 选择规格值 -->
+		<u-popup v-model="sku_val_pop" border-radius="16" mode="bottom">
+			<view class="pop-view">
+				<view class="handel-btn clearfix">
+					<text class="float_left" @click="cancelSkuLabelPop('sku_val_pop')">取消</text>
+					<text class="float_right" @click="specValueConfirm">确定</text>
+				</view>
+				<view class="pop-cont">
+					<view class="sku-li clearfix" v-for="(item, index) in spec_data_child" :key="index" @click="selSpecChild(item.id)">
+						<text class="sku-val-label float_left">{{ item.specName }}</text>
+						<text class="custom-icon float_right" :class="[temporary_spec_chid.indexOf(item.id) > -1 ? 'custom-icon-xuanze_xuanzhong' : 'custom-icon-xuanze']"></text>
+					</view>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 阶梯价 -->
+		<u-popup v-model="ladder_show" border-radius="16" mode="bottom">
+			<view class="pop-view">
+				<view class="handel-btn clearfix">
+					<text class="float_left" @click="cancelSkuLabelPop('ladder_show')">取消</text>
+					<text class="float_right" @click="ladderPriceConfirm">确定</text>
+				</view>
+				<view class="pop-cont">
+					<view class="sku-li" v-for="(ladder, ladderI) in ladderPrice" :key="ladderI">
+						<view class="input-view"><input disabled type="digit" v-model="ladder.from" /></view>
+						至
+						<view class="input-view">
+							<input @blur="ladderBlur($event, ladderI)" type="digit" v-if="ladderI !== ladderPrice.length - 1" v-model="ladder.to" />
+							<input v-else disabled value="∞" />
+							<u-tag :text="unitName || '件'" mode="light" />
+						</view>
+						=
+						<view class="input-view">
+							<input type="digit" v-model="ladder.price" />
+							<u-tag text="元" mode="light" />
+							<u-icon
+								name="shanchu"
+								v-if="ladderPrice.length > 2 && ladderI !== ladderPrice.length - 1"
+								color="#ff4501"
+								custom-prefix="custom-icon"
+								@click="delLadderPrice(ladderI)"
+							></u-icon>
+						</view>
+					</view>
+				</view>
+				<view @click="addLadderprice" class="btn-view" :style="{ backgroundColor: ladderPrice.length > 2 ? '#999999' : '' }">新增</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+import upload from '@/components/qiniu/QiniuUpload.vue';
+const ladderPrice = [
+	{
+		from: 1,
+		price: '',
+		to: 2
+	},
+	{
+		from: 3,
+		price: '',
+		to: 4
+	},
+	{
+		from: 5,
+		price: '',
+		to: 999999999
+	}
+];
+export default {
+	components: {
+		upload
+	},
+	data() {
+		return {
+			set: {
+				specImage: '',
+				enabledLadder: false,
+				ladderPrice: [],
+				salePrice: '',
+				marketPrice: '',
+				memberPrice:'',
+				setNum: '',
+				barCode: '',
+				weight: '',
+				isSale: 5
+			},
+			ladderPrice: [],
+			ladder_show: false,
+			specMultiple: [], //组合好的规格明细
+			spec_group_index: '', // 当前规格下标
+			spec_data_child: [],
+			specImage: '',
+			barCode: {},
+			weight: {},
+			specType: false,
+			current: 0, // tabs组件的current值,表示当前活动的tab选项
+			sku_label_pop: false,
+			sku_val_pop: false,
+			unit_data: [],
+			spec_list: [],
+			spec_group: [], // 属性组
+			specMultipleUnit: [],
+			tab_current: 0,
+			temporary_spec_id: '', // 临时存储规格id
+			temporary_spec_chid: [], // 临时存储属性值id
+			unit_data_obj: [] // 单位数据
+		};
+	},
+	watch: {
+		specType(val) {
+			if (val) {
+				// this.specGroupRest();
+			}
+		}
+	},
+	onLoad(options) {
+		this.specType = parseInt(options.specType) === 2;
+		// 存一份原始单位数据
+		this.unit_data_obj = JSON.parse(options.unitData);
+		this.getAllSpecManage();
+		this.initialization(options);
+	},
+	methods: {
+		// 初始化
+		initialization(options) {
+			const unitData = JSON.parse(options.unitData);
+			console.log(unitData);
+			if (!this.specType) {
+				this.unit_data = unitData.map(item => {
+					let params = {};
+					let obj = {
+						enabledLadder: false,
+						isDefault: item.isDefault === 5,
+						salePrice: '',
+						marketPrice: '',
+						memberPrice:'',
+						setNum: 1,
+						isSale: item.isSale !== 4,
+						barCode: '',
+						weight: '',
+						specImage: '',
+						ladderPrice: [],
+						salePriceAreaType: 1,
+						...item
+					};
+					if (item.salePrice) {
+						params = {
+							...obj,
+							...item.salePrice,
+							isDefault: item.isDefault === 5,
+							isSale: item.isSale !== 4,
+							enabledLadder: item.enabledLadder === 1
+						};
+					} else {
+						params = { ...obj, enabledLadder: item.enabledLadder === 1 };
+					}
+					return params;
+				});
+				console.log(this.unit_data);
+			} else {
+				const obj = {};
+				this.specMultiple = JSON.parse(options.specMultiple);
+				this.spec_group = JSON.parse(options.specGroup).map(item => {
+					return {
+						groupSpec: item.groupSpec,
+						params: item.params.map(sku => {
+							return {
+								specId: sku.specValueId,
+								specName: sku.specValueName
+							};
+						})
+					};
+				});
+				let specMultipleUnit = unitData.map(item => {
+					return {
+						unitId: item.unitId,
+						unitName: item.unitName,
+						conversion: item.conversion || 0,
+						isMaster: item.isMaster,
+						specMultiple: []
+					};
+				});
+				console.log(this.specMultiple);
+				specMultipleUnit.forEach(item => {
+					this.specMultiple.forEach(sku => {
+						if (sku.unitId === item.unitId) {
+							const specName = sku.specGroup.map(spec => spec.specValueName).join('_');
+							const specId = sku.specGroup.map(spec => spec.specValueId).join('_');
+							const groupSpecName = sku.specGroup.map(spec => spec.specName).join('_');
+							const groupSpecId = sku.specGroup.map(spec => spec.specId).join('_');
+							const specMultipleItem = {
+								isDefault: sku.isDefault === 5,
+								isSale: sku.isSale !== 4,
+								specImage: sku.specImage,
+								enabledLadder: sku.salePrice.enabledLadder === 1,
+								ladderPrice: sku.salePrice.ladderPrice,
+								salePrice: sku.salePrice.salePrice,
+								marketPrice: sku.salePrice.marketPrice,
+								memberPrice: sku.memberPrice,
+								setNum: sku.salePrice.setNum,
+								barCode: sku.barCode,
+								weight: sku.weight,
+								specGroup: sku.specGroup,
+								unitId: item.unitId,
+								unitName: item.unitName,
+								specName: specName,
+								specId: specId,
+								groupSpecName: groupSpecName,
+								groupSpecId: groupSpecId
+							};
+							item.specMultiple.push(specMultipleItem);
+						}
+					});
+				});
+				this.specMultipleUnit = specMultipleUnit;
+			}
+		},
+		// 单位切换
+		tabChange(current) {
+			this.tab_current = current;
+		},
+		// 获取属性列表
+		getAllSpecManage() {
+			this.$u.api
+				.getAllSpecManage({
+					page: 1,
+					pageSize: 100
+				})
+				.then(res => {
+					this.spec_list = res.data;
+				});
+		},
+		// 默认属性切换
+		isDefaultChange(value, unitIndex) {
+			if (value) {
+				if (!this.specType) {
+					this.unit_data.forEach((item, index) => {
+						if (index !== unitIndex) {
+							item.isDefault = false;
+						}
+					});
+				} else {
+					this.specMultipleUnit.forEach((item,index)=>{
+						if (index !== this.tab_current) {
+							item.specMultiple.forEach(sku=>{
+								sku.isDefault = false;
+							})
+						}else{
+							item.specMultiple.forEach((sku,skuindex)=>{
+								if (skuindex !== unitIndex) {
+									sku.isDefault = false;
+								}
+							})
+						}
+					})
+				}
+			}
+		},
+		//弹窗打开
+		openSkuLabelPop(key, index, specId) {
+			this[key] = true;
+			if (key === 'sku_val_pop') {
+				this.spec_group_index = index;
+				const obj = this.spec_list.find(item => item.id === specId);
+				this.spec_data_child = obj.child || [];
+				this.temporary_spec_chid = this.spec_group[index].params.map(item => item.specId);
+			}
+		},
+		// 弹窗取消
+		cancelSkuLabelPop(key) {
+			this[key] = false;
+		},
+		// 单位切换
+		tabsChange(index) {
+			this.current = index;
+		},
+		// 图片上传成功
+		uploadSuccess(imgUrl, index) {
+			if (this.specType) {
+				this.specMultipleUnit[this.tab_current].specMultiple[index].specImage = imgUrl;
+			} else {
+				this.unit_data[index].specImage = imgUrl;
+			}
+		},
+		// 删除图片
+		imgRemove(index) {
+			if (this.specType) {
+				this.specMultipleUnit[this.tab_current].specMultiple[index].specImage = '';
+			} else {
+				this.unit_data[index].specImage = '';
+			}
+		},
+		// 同步规格上传成功
+		uploadSuccessTotal(imgUrl) {
+			this.set.specImage = imgUrl;
+		},
+		// 同步规格图片删除
+		imgRemoveTotal(arr) {
+			this.set.specImage = '';
+		},
+		// 选择规格组
+		changeSpec(id) {
+			if (this.spec_group.find(its => its.groupSpec.specId === id)) {
+				return;
+			}
+			if (this.temporary_spec_id !== id) {
+				this.temporary_spec_id = id;
+			}
+		},
+		// 切换多规格开关
+		specTypeChange(val) {
+			if (val && !this.specMultipleUnit.length) {
+				this.specMultipleUnit = this.unit_data_obj.map(item => {
+					return {
+						unitId: item.unitId,
+						unitName: item.unitName,
+						conversion: item.conversion || 0,
+						isMaster: item.isMaster,
+						specMultiple: []
+					};
+				});
+			}
+		},
+		// 选择属性名
+		specConfitm() {
+			const obj = this.spec_list.find(item => item.id === this.temporary_spec_id);
+			if (obj) {
+				this.spec_group.push({
+					groupSpec: {
+						specName: obj.specName,
+						specId: obj.id
+					},
+					params: []
+				});
+			}
+			this.sku_label_pop = false;
+			this.temporary_spec_id = '';
+		},
+
+		// 选择属性值
+		selSpecChild(id) {
+			const index = this.temporary_spec_chid.indexOf(id);
+			if (index === -1) {
+				this.temporary_spec_chid.push(id);
+			} else {
+				this.temporary_spec_chid.splice(index, 1);
+			}
+		},
+		// 选择属性值确定
+		specValueConfirm() {
+			const target = this.$u.deepClone(this.temporary_spec_chid);
+			this.spec_group[this.spec_group_index].params = target.map(item => {
+				const specName = this.spec_data_child.find(itemf => itemf.id === item).specName;
+				return {
+					specId: item,
+					specName: specName
+				};
+			});
+			this.sku_val_pop = false;
+			this.temporary_spec_chid = [];
+			this.specGroupRest();
+		},
+		// 重排规格组合
+		specGroupRest() {
+			const skuArr = this.spec_group.map(item => {
+				item.params = item.params.map(itemP => {
+					return {
+						...itemP,
+						groupSpecName: item.groupSpec.specName,
+						groupSpecId: item.groupSpec.specId
+					};
+				});
+				return item.params;
+			});
+			let skuArrDo = [];
+			if (skuArr.length) {
+				skuArrDo = this.doExchange(skuArr);
+			}
+			// 备份一份规格明细,用来填充重排规格组之前的图片
+			const cloneUnitData = this.$u.deepClone(this.specMultipleUnit);
+			this.specMultipleUnit = this.specMultipleUnit.map((item, index) => {
+				const cloneSpecGroup = cloneUnitData[index].specMultiple || [];
+				return {
+					...item,
+					specMultiple: skuArrDo.map(itemSp => {
+						const indexSS = cloneSpecGroup.findIndex(itemC => itemC.id === itemSp.id);
+						let obj = {};
+						if (indexSS > -1) {
+							obj = {
+								...itemSp,
+								isDefault: cloneSpecGroup[indexSS].isDefault,
+								isSale: cloneSpecGroup[indexSS].isSale !== 4,
+								specImage: cloneSpecGroup[indexSS].specImage,
+								enabledLadder: cloneSpecGroup[indexSS].enabledLadder === 1,
+								ladderPrice: cloneSpecGroup[indexSS].ladderPrice,
+								salePrice: cloneSpecGroup[indexSS].salePrice,
+								marketPrice: cloneSpecGroup[indexSS].marketPrice,
+								memberPrice: cloneSpecGroup[indexSS].memberPrice,
+								setNum: cloneSpecGroup[indexSS].setNum,
+								barCode: cloneSpecGroup[indexSS].barCode,
+								weight: cloneSpecGroup[indexSS].weight
+							};
+						} else {
+							obj = {
+								...itemSp,
+								isDefault: itemSp.isDefault || false,
+								isSale: itemSp.isSale || 5,
+								specImage: itemSp.specImage || '',
+								enabledLadder: itemSp.enabledLadder || false,
+								ladderPrice: itemSp.ladderPrice || [],
+								salePrice: itemSp.salePrice || 0,
+								marketPrice: itemSp.marketPrice || 0,
+								memberPrice: itemSp.memberPrice || 0,
+								setNum: itemSp.setNum || 1,
+								barCode: itemSp.barCode || '',
+								weight: itemSp.weight || 0
+							};
+						}
+						return obj;
+					})
+				};
+			});
+		},
+		// 规格组合
+		doExchange(doubleArrays) {
+			console.log(doubleArrays);
+			const len = doubleArrays.length;
+			if (len >= 2) {
+				const len1 = doubleArrays[0].length;
+				const len2 = doubleArrays[1].length;
+				const newlen = len1 * len2;
+				const temp = new Array(newlen);
+				let index = 0;
+				for (let i = 0; i < len1; i++) {
+					for (let j = 0; j < len2; j++) {
+						temp[index] = {
+							groupSpecId: doubleArrays[0][i].groupSpecId + '_' + doubleArrays[1][j].groupSpecId,
+							groupSpecName: doubleArrays[0][i].groupSpecName + '_' + doubleArrays[1][j].groupSpecName,
+							specId: doubleArrays[0][i].specId + '_' + doubleArrays[1][j].specId,
+							specName: doubleArrays[0][i].specName + '_' + doubleArrays[1][j].specName,
+							specImage: '',
+							setNum: 1,
+							isSale: true,
+							salePrice: 0,
+							enabledLadder: 0,
+							ladderPrice: [],
+							marketPrice: 0,
+							memberPrice:'',
+							barCode: '',
+							weight: '',
+							isDefault: false
+						};
+						index++;
+					}
+				}
+				let newArray = new Array(len - 1);
+				newArray[0] = temp;
+				if (len > 2) {
+					let _count = 1;
+					for (let i = 2; i < len; i++) {
+						newArray[_count] = doubleArrays[i];
+						_count++;
+					}
+				}
+				return this.doExchange(newArray);
+			} else {
+				return doubleArrays[0].map(item => {
+					return {
+						...item,
+						specImage: '',
+						setNum: 1,
+						isSale: true,
+						barCode: '',
+						weight: '',
+						isDefault: false,
+						salePrice: 0,
+						enabledLadder: false,
+						ladderPrice: [],
+						marketPrice: 0,
+						memberPrice:'',
+					};
+				});
+			}
+		},
+		// 删除规格组
+		deletSpecGroup(index) {
+			this.spec_group.splice(index, 1);
+			this.specGroupRest();
+		},
+		// 删除规格值
+		deletSpecValue(index, iVal) {
+			this.spec_group[index].params.splice(iVal, 1);
+			this.specGroupRest();
+		},
+		// 同步
+		synchro(key) {
+			this.specMultipleUnit[this.tab_current].specMultiple.forEach(item => {
+				item[key] = this.set[key];
+			});
+		},
+		// 阶梯价输入框失去焦点
+		ladderBlur(e, index) {
+			let val = Number(e.detail.value);
+			const target = this.$u.deepClone(this.ladderPrice);
+			if (val <= target[index].from) {
+				val = target[index].from + 1;
+				target[index].to = val;
+			}
+			target[index + 1].from = val + 1;
+			if (index === 0) {
+				target[index + 1].to = val + 2;
+				if (target[index + 2]) {
+					target[index + 2].from = val + 3;
+				}
+			}
+			this.ladderPrice = target;
+		},
+		// 阶梯价弹窗确定
+		ladderPriceConfirm() {
+			if (this.sku_index === -1) {
+				this.set.ladderPrice = this.ladderPrice;
+			} else {
+				if (this.specType) {
+					// 多规格
+					this.specMultipleUnit[this.tab_current].specMultiple[this.sku_index].ladderPrice = this.ladderPrice;
+				} else {
+					// 单规格
+					this.unit_data[this.sku_index].ladderPrice = this.ladderPrice;
+				}
+			}
+			this.ladder_show = false;
+		},
+		// 阶梯价删除
+		delLadderPrice(index) {
+			const target = this.$u.deepClone(this.ladderPrice);
+			target.splice(index, 1);
+			target[0].from = 1;
+			target[target.length - 1].from = target[0].to + 1;
+			this.ladderPrice = target;
+		},
+		// 打开阶梯价弹窗
+		openLadder(index, row) {
+			this.sku_index = index;
+			this.ladderPrice = row.ladderPrice.length > 0 ? row.ladderPrice : this.$u.deepClone(ladderPrice);
+			this.ladder_show = true;
+		},
+		// 增加一条阶梯价
+		addLadderprice() {
+			if (this.ladderPrice.length >= 3) {
+				return;
+			}
+			const target = this.$u.deepClone(this.ladderPrice);
+			if (!target.length) {
+				target.push({
+					from: 1,
+					price: '',
+					to: 2
+				});
+			} else {
+				const upL = target[0];
+				target.splice(1, '', {
+					from: upL.to + 1,
+					price: '',
+					to: upL.to + 2
+				});
+				if (target.length === 3) {
+					target[target.length - 1].from = upL.to + 3;
+				}
+			}
+			this.ladderPrice = target;
+		},
+		// 规格确定
+		skuConfirm() {
+			if (!this.specType) {
+				const specMultiple = this.unit_data.map(item => {
+					const salePriceS = {
+						conversion: item.conversion || 0,
+						unitName: item.unitName,
+						unitId: item.unitId,
+						isMaster: item.isMaster,
+						deleteStatus: 4,
+						enabledLadder: item.enabledLadder ? 1 : 0,
+						salePriceAreaType: 1,
+						salePrice: item.salePrice,
+						ladderPrice: item.ladderPrice,
+						marketPrice: item.marketPrice,
+						memberPrice:item.memberPrice,
+						setNum: item.setNum
+					};
+					return {
+						barCode: item.barCode,
+						weight: item.weight,
+						unitId: item.unitId,
+						unitName: item.unitName,
+						isMaster: item.isMaster,
+						conversion: item.conversion || 0,
+						specImage: item.specImage,
+						specGroup: [],
+						salePrice: salePriceS,
+						customerTypePrice: [],
+						customerPrice: [],
+						isDefault: item.isDefault ? 5 : 4
+					};
+				});
+				console.log('specMultiple', specMultiple);
+				this._prePage().form.specMultiple = specMultiple;
+			} else {
+				console.log(this.specMultipleUnit);
+				let specMultiple = [];
+				this.specMultipleUnit.forEach(item => {
+					item.specMultiple.forEach(sku => {
+						const groupSpecName = sku.groupSpecName.split('_');
+						const groupSpecId = sku.groupSpecId.toString().split('_');
+						const specName = sku.specName.split('_');
+						const specId = sku.specId.toString().split('_');
+
+						const specGroup = groupSpecName.map((item, index) => {
+							return {
+								specId: groupSpecId[index],
+								specName: item,
+								specValueName: specName[index],
+								specValueId: specId[index]
+							};
+						});
+						specMultiple.push({
+							barCode: sku.barCode,
+							weight: sku.weight,
+							isDefault: sku.isDefault ? 5 : 4,
+							unitId: item.unitId,
+							unitName: item.unitName,
+							isMaster: item.isMaster,
+							conversion: item.conversion,
+							specImage: sku.specImage,
+							specGroup: specGroup,
+							salePrice: {
+								unitName: item.unitName,
+								unitId: item.unitId,
+								isMaster: item.isMaster,
+								conversion: item.conversion,
+								deleteStatus: 4,
+								enabledLadder: sku.enabledLadder ? 1 : 0,
+								salePriceAreaType: 1,
+								salePrice: sku.salePrice,
+								ladderPrice: sku.ladderPrice,
+								marketPrice: sku.marketPrice,
+								memberPrice:sku.memberPrice,
+								setNum: sku.setNum,
+								isSale: sku.isSale
+							},
+							customerPrice: [],
+							customerTypePrice: []
+						});
+					});
+				});
+				const specGroup = this.spec_group.map(item => {
+					return {
+						groupSpec: item.groupSpec,
+						params: item.params.map(sku => {
+							return {
+								specValueId: sku.specId,
+								specValueName: sku.specName
+							};
+						})
+					};
+				});
+				console.log('specMultiple', specMultiple);
+				console.log('spec_group', specGroup);
+				this._prePage().form.specMultiple = specMultiple;
+				this._prePage().form.specGroup = specGroup;
+			}
+			this._prePage().form.specType = this.specType ? 2 : 1;
+
+			console.log('specType', this.specType);
+			// return
+			uni.navigateBack();
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.sku-view {
+	padding-bottom: 140rpx;
+	.switch-view {
+		line-height: 100rpx;
+		padding: 0 24rpx;
+		background-color: #ffffff;
+		border-bottom: 1px solid #f5f5f5;
+	}
+}
+.sku-name-view {
+	padding: 0 24rpx;
+	.sku-ul {
+		padding-top: 30rpx;
+		.sku-li {
+			margin-bottom: 30rpx;
+			.sku-label {
+				.float_left {
+					padding: 0 20rpx;
+					line-height: 50rpx;
+					border-radius: 8rpx;
+					font-size: 24rpx;
+					display: inline-block;
+					border: 1px dotted $uni-color-primary;
+					color: $uni-color-primary;
+					.custom-icon {
+						margin-left: 20rpx;
+					}
+				}
+
+				.sku-val-add-btn {
+					font-size: 24rpx;
+					color: $uni-color-primary;
+					.custom-icon-xinzeng {
+						font-size: 24rpx;
+					}
+				}
+			}
+			.sku-val-ul {
+				padding-top: 14rpx;
+				.sku-val-li {
+					padding: 0 20rpx;
+					line-height: 50rpx;
+					border-radius: 8rpx;
+					font-size: 24rpx;
+					display: inline-block;
+					background-color: $uni-color-primary;
+					color: #ffffff;
+					margin-right: 10rpx;
+					.custom-icon {
+						margin-left: 20rpx;
+					}
+				}
+			}
+		}
+	}
+}
+.sku-group {
+	.sku-group-tit {
+		padding: 20rpx 24rpx;
+		line-height: 50rpx;
+		font-size: 24rpx;
+		.rest-btn {
+			line-height: 50rpx;
+			background-color: $uni-color-primary;
+			border-radius: 6rpx;
+			padding: 0 20rpx;
+			color: #ffffff;
+		}
+	}
+	.sku-group-main {
+		background-color: #ffffff;
+		margin-bottom: 30rpx;
+		.sku-group-label {
+			line-height: 74rpx;
+			height: 70rpx;
+			padding: 0 46rpx;
+			position: relative;
+			border-bottom: 1px solid #f5f5f5;
+			.float_right {
+				height: 68rpx;
+				line-height: 68rpx;
+				.default-label {
+					font-size: 24rpx;
+					margin-right: 24rpx;
+				}
+				.default-switch {
+					display: inline-block;
+					vertical-align: middle;
+					transform: translateY(4rpx);
+				}
+			}
+			&::before {
+				content: '';
+				position: absolute;
+				display: block;
+				width: 6rpx;
+				height: 34rpx;
+				background-color: $uni-color-primary;
+				left: 24rpx;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+		}
+		.sku-top {
+			font-size: 24rpx;
+			padding: 20rpx 0;
+			display: flex;
+			width: 750rpx;
+			border-bottom: 1px solid #f5f5f5;
+			&:last-child {
+				border-bottom: 0 none;
+			}
+			.sku-top-li {
+				flex: 5;
+				text-align: center;
+				border-right: 1px solid #f5f5f5;
+				input {
+					border: 1px solid #f5f5f5;
+					line-height: 60rpx;
+					height: 60rpx;
+					display: block;
+					margin: 20rpx;
+				}
+				.other-view {
+					margin: 20rpx 0;
+					height: 60rpx;
+					line-height: 60rpx;
+				}
+				.label {
+					.yuan {
+						color: $uni-color-primary;
+					}
+				}
+				.sku-main {
+					margin: 20rpx 0;
+				}
+				.input-view {
+					margin: 20rpx 0;
+					// min-height: 128rpx;
+					view {
+						padding-bottom: 10rpx;
+						text {
+							margin-right: 10rpx;
+						}
+						input {
+							border: 1px solid #f5f5f5;
+							line-height: 50rpx;
+							height: 50rpx;
+							width: 150rpx;
+							vertical-align: middle;
+							display: inline-block;
+						}
+					}
+				}
+				&:last-child {
+					border-bottom: 0 none;
+				}
+			}
+		}
+	}
+}
+.unit-group {
+	margin-top: 20rpx;
+	.sku-group-main {
+		.sku-top {
+			padding-bottom: 0;
+			.sku-top-li {
+				input {
+					border: 1px solid #f5f5f5;
+					line-height: 60rpx;
+					height: 60rpx;
+					display: block;
+					margin: 20rpx;
+				}
+				.sku-main {
+					line-height: 60rpx;
+					height: 60rpx;
+					margin: 20rpx;
+				}
+			}
+		}
+	}
+}
+.pop-view {
+	.handel-btn {
+		padding: 0 30rpx;
+		line-height: 90rpx;
+		border-bottom: 1px solid #f5f5f5;
+		.float_right {
+			color: $uni-color-primary;
+		}
+	}
+	.pop-cont {
+		max-height: 800rpx;
+		overflow: auto;
+		padding: 0 30rpx;
+		.sku-li {
+			line-height: 80rpx;
+			border-bottom: 1px solid #f5f5f5;
+			.custom-icon {
+				font-size: 40rpx;
+				color: $uni-color-primary;
+			}
+			.input-view {
+				display: inline-block;
+				margin-right: 10rpx;
+				input {
+					width: 120rpx;
+					border: 1px solid #eee;
+					border-radius: 4rpx;
+					height: 50rpx;
+					line-height: 50rpx;
+					text-align: center;
+					display: inline-block;
+					vertical-align: middle;
+					margin: 0 10rpx;
+				}
+			}
+		}
+		.sku-on {
+			color: #999999;
+		}
+	}
+	.btn-view {
+		height: 80rpx;
+		margin-top: 30rpx;
+		line-height: 80rpx;
+		text-align: center;
+		color: #ffffff;
+		background-color: $uni-color-primary;
+		&.disabled-btn {
+			background-color: #999999;
+		}
+	}
+}
+</style>

+ 288 - 0
pages/goods/goodsDetail.vue

@@ -0,0 +1,288 @@
+<template>
+	<view class="">
+		<view class="goods-scroll"><u-swiper :list="list" :height="340" indicator-pos="bottomRight" mode="number"></u-swiper></view>
+		<view class="goods-info info-view">
+			<view class="goods-name">{{ goods_detail.title||'' }}</view>
+			<view class="goods-desc">{{ goods_detail.describe||'' }}</view>
+			<view class="goods-code clearfix">
+				<view class="float_left">
+					<text class="info-label">商品编码</text>
+					{{ goods_detail.code||'' }}
+				</view>
+				<view class="float_right" v-if="goods_detail.storage">
+					<text class="info-label">货架编码</text>
+					{{ goods_detail.storage || '未设置' }}
+				</view>
+			</view>
+		</view>
+		<view class="goods-info-other info-view">
+			<view class="info-li">
+				<view class="info-label">商品分类</view>
+				<view class="info-val">{{ goods_detail.categoryTitle||'' }}</view>
+			</view>
+			<view class="info-li">
+				<view class="info-label">商品品牌</view>
+				<view class="info-val">{{ goods_detail.brandTitle || '未设置'}}</view>
+			</view>
+			<view class="info-li">
+				<view class="info-label">保质期/天</view>
+				<view class="info-val">{{ goods_detail.expireTime || '未设置' }}</view>
+			</view>
+			<view class="info-li">
+				<view class="info-label">商品状态</view>
+				<view class="info-val">{{ goods_detail.enableStatus === 5 ? '启用' : '禁用' }}</view>
+			</view>
+		</view>
+		<view class="info-view tag-view" >
+			<text class="info-label">关键词</text>
+			<u-tag v-for="(item,index) in tag_list" :key="index" class="tag-li" mode="plain" :text="item" />
+			<text v-if="!tag_list.length" class="input-pl">未设置</text>
+		</view>
+		<view class="info-view tag-view">
+			<view class="unit-master">
+				<text class="info-label">基本单位</text>
+				<text>{{ master_unit.unitName||'' }}</text>
+			</view>
+			<view>
+				<text class="info-label">辅助单位</text>
+				<block v-for="(item, index) in other_unit_data" :key="index">
+					<u-tag v-if="item.isMaster !== 5" class="tag-li" mode="plain" :text="'1' + item.unitName + '='+ Number(item.conversion) + master_unit.unitName" />
+				</block>
+				<text v-if="!other_unit_data.length" class="input-pl">未设置</text>
+			</view>
+		</view>
+
+		<view class="sku-detail" v-if="goods_detail.specType === 1">
+			<view class="info-title">规格明细</view>
+			<view class="info-view uni-sku-view" v-for="(item, index) in goods_detail.unitData" :key="index">
+				<view class="sku-label">{{ item.unitName }}</view>
+				<view class="sku-info-ul">
+					<view class="sku-info-li">
+						<view class="sku-info-name">商品条码</view>
+						<view class="sku-info-val">{{ item.barCode|| '未设置' }}</view>
+					</view>
+					<view class="sku-info-li">
+						<view class="sku-info-name">商品重量</view>
+						<view class="sku-info-val">{{ (item.weight||0) / 1000 }}kg</view>
+					</view>
+					<view class="sku-info-li">
+						<view class="sku-info-name">默认属性</view>
+						<view class="sku-info-val">{{ item.isDefault === 5 ? '是' : '否' }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="sku-detail" v-if="goods_detail.specType === 2">
+			<view class="info-title">规格明细</view>
+			<view class="info-view" v-for="(item, index) in goods_detail.specMultiple">
+				<view class="sku-label">
+					<image :src="item.specImage || list[0].image" mode="aspectFill"></image>
+					<text class="sku-name">
+						<block v-for="(its, ins) in item.specGroup" :key="ins">{{ its.specValueName }};</block>
+					</text>
+				</view>
+				<view class="clearfix sku-info-ul">
+					<text class="info-label">商品条码</text>
+					<view class="info-val">
+						<view class="val-li" v-for="(itu, inu) in goods_detail.unitData" :key="inu">{{ itu.unitName }}:{{ item.barCode[itu.unitId] || '未设置' }}</view>
+					</view>
+				</view>
+				<view class="clearfix sku-info-ul">
+					<text class="info-label">商品重量</text>
+					<view class="info-val">
+						<view class="val-li" v-for="(itu, inu) in goods_detail.unitData" :key="inu">{{ itu.unitName }}:{{ item.weight[itu.unitId] || '未设置' }}</view>
+					</view>
+				</view>
+				<view class="clearfix sku-info-ul">
+					<text class="info-label">默认属性</text>
+					<view class="info-val">
+						<view class="val-li" v-for="(itu, inu) in goods_detail.unitData" :key="inu">{{ itu.unitName }}:{{ item.isDefault[itu.unitId] === 5 ? '是' : '否' }}</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="sku-detail">
+			<view class="info-title">商品详情</view>
+			<view class="detail-view"><rich-text :nodes="goods_detail.description"></rich-text></view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			list: [],
+			goods_id: '',
+			goods_detail: {},
+			master_unit: {},
+			other_unit_data: [],
+			tag_list:[]
+		};
+	},
+	onLoad(options) {
+		if(options.id){
+			this.goods_id = options.id;
+			this.getGoodsBasicInfoById();
+		}
+
+	},
+	methods: {
+		getGoodsBasicInfoById() {
+			this.$u.api.getGoodsBasicInfoById(this.goods_id).then(res => {
+				this.goods_detail = res.data;
+				this.list = res.data.images.map(item => {
+					return {
+						image: item
+					};
+				});
+				this.tag_list=res.data.tag?res.data.tag.split(','):[]
+				this.master_unit = res.data.unitData.find(item => item.isMaster === 5);
+				this.other_unit_data = res.data.unitData.filter(item => item.isMaster === 4);
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.goods-scroll {
+	width: 702rpx;
+	margin: 0 auto 20rpx;
+}
+.info-view {
+	background-color: #ffffff;
+	width: 702rpx;
+	margin: 0 auto;
+	border-radius: 10rpx;
+	margin-bottom: 20rpx;
+	padding: 20rpx;
+	.info-label {
+		font-size: 24rpx;
+		color: #999999;
+	}
+}
+.goods-info {
+	font-size: 24rpx;
+	.goods-name {
+		font-size: 28rpx;
+		font-weight: 700;
+	}
+	.goods-desc {
+		padding: 10rpx 0;
+		color: #999999;
+	}
+	.goods-code {
+		.info-label {
+			margin-right: 10rpx;
+		}
+	}
+}
+.goods-info-other {
+	display: flex;
+	.info-li {
+		flex: 4;
+		font-size: 26rpx;
+		text-align: center;
+		border-right: 1px solid #f5f5f5;
+		.info-label {
+			padding-bottom: 20rpx;
+		}
+		&:last-child {
+			border-right: 0 none;
+		}
+	}
+}
+.tag-view {
+	.info-label {
+		margin-right: 20rpx;
+	}
+	.tag-li {
+		margin-right: 10rpx;
+	}
+}
+.unit-master {
+	padding-bottom: 20rpx;
+}
+.sku-detail {
+	.info-title {
+		text-align: center;
+		line-height: 90rpx;
+		font-size: 24rpx;
+		color: #666666;
+	}
+	.sku-label {
+		image {
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 8rpx;
+			vertical-align: middle;
+			margin-right: 30rpx;
+		}
+	}
+	.sku-info-ul {
+		position: relative;
+		padding: 20rpx 0;
+		padding-left: 120rpx;
+		border-bottom: 1px solid #f5f5f5;
+		line-height: 40rpx;
+		&:last-child {
+			border-bottom: 0;
+		}
+		.info-label {
+			position: absolute;
+			left: 0;
+			top: 50%;
+			font-size: 24rpx;
+			transform: translateY(-50%);
+		}
+		.info-val {
+			border-left: 1px solid #f5f5f5;
+			padding-left: 30rpx;
+			font-size: 28rpx;
+		}
+	}
+	.uni-sku-view {
+		.sku-label {
+			padding-bottom: 20rpx;
+			position: relative;
+			text-align: center;
+			&::before {
+				display: block;
+				content: '';
+				width: 50rpx;
+				height: 6rpx;
+				background-color: $uni-color-primary;
+				bottom: 10rpx;
+				position: absolute;
+				left: 50%;
+				transform: translateX(-50%);
+			}
+		}
+		.sku-info-ul {
+			display: flex;
+			padding-left: 0;
+			.sku-info-li {
+				flex: 3;
+				text-align: center;
+				border-right: 1px solid #f5f5f5;
+				.sku-info-name {
+					color: #999999;
+					padding-bottom: 10rpx;
+					font-size: 24rpx;
+				}
+				&:last-child {
+					border-right: 0;
+				}
+			}
+		}
+	}
+}
+.detail-view {
+	background-color: #ffffff;
+	padding: 20rpx;
+	img{
+		width: 100%;
+	}
+}
+</style>

+ 695 - 0
pages/goods/index.vue

@@ -0,0 +1,695 @@
+<template>
+	<view>
+		<u-navbar title="商品列表" back-icon-color="#2D405E" :title-bold="true" title-color="#2D405E" title-size="32" :border-bottom="false" :is-back="false"></u-navbar>
+		<block v-if="$accessCheck($Access.PublishGoods)">
+			<view class="keyword-view clearfix">
+				<view class="float_left">
+					<u-search
+						@clear="searchList"
+						@search="searchList"
+						:show-action="false"
+						:clearabled="true"
+						placeholder="商品名称/编码/条码进行搜索"
+						v-model="keyword"
+						height="72"
+						placeholder-color="#879BBA"
+						color="#879BBA"
+						bg-color="#ECF0F7"
+					></u-search>
+				</view>
+				<!-- <view class="float_right" v-if="$accessCheck($Access.PublishGoodsSearch)" @click="openSel('search_show')">
+					<text class="custom-icon custom-icon-shaixuan"></text>
+				</view> -->
+				<view class="tabs-view">
+					<view class="search-view clearfix">
+						<view class="title ellipsis" @click="openSel('salesStatus_show')">
+							<u-icon
+								size="12"
+								label-pos="left"
+								label-color="#62738e"
+								color="#b8c0c8"
+								label-size="26"
+								:label="salesStatus_name"
+								name="arrow-down-fill"
+								class="ico"
+							></u-icon>
+						</view>
+						<view class="title ellipsis" @click="goPage('/pagesT/brand/selBrand')">
+							<u-icon
+								size="12"
+								label-pos="left"
+								label-color="#62738e"
+								color="#b8c0c8"
+								label-size="26"
+								:label="brand_name"
+								name="arrow-down-fill"
+								class="ico"
+							></u-icon>
+						</view>
+						<view class="title ellipsis" @click="goPage('/pagesT/shop/selShop')">
+							<u-icon size="12" label-pos="left" label-color="#62738e" color="#b8c0c8" label-size="26" :label="shop_name" name="arrow-down-fill" class="ico"></u-icon>
+						</view>
+						<view class="title ellipsis" style="line-height: 116rpx;color: #62738e;" @click="clearValue()"><text>重置</text></view>
+					</view>
+				</view>
+			</view>
+			<view class="catet-view"><u-tabs name="title" :list="cateT_list" height="70" font-size="28" :current="cateT_current" @change="cateTchange"></u-tabs></view>
+			<view class="main-view clearfix" :style="{ height: height }">
+				<view class="left-view float_left">
+					<scroll-view scroll-y="true" class="left-scroll">
+						<view class="cate-li ellipsis" :class="[!category_id ? 'cate-on' : '']" @click="changeCate()">全部</view>
+						<view
+							class="cate-li ellipsis"
+							v-for="(item, index) in category_list"
+							:key="index"
+							@click="changeCate(item)"
+							:class="[category_id === item.id ? 'cate-on' : '']"
+						>
+							{{ item.title }}
+						</view>
+					</scroll-view>
+				</view>
+				<view class="rigth-view float_left">
+					<scroll-view
+						scroll-y="true"
+						class="rigth-scroll"
+						@scrolltolower="moreGoods"
+						:scroll-top="scrollTop"
+						@refresherrefresh="refresherrefresh"
+						:refresher-enabled="true"
+						:refresher-triggered="refresher_triggered"
+					>
+						<view class="goods-li" v-for="(item, index) in goods_list" :key="index">
+							<view @click="goPage(`/pages/goods/SaleGoodsDetail?id=${item.id}&basicGoodsId=${item.basicGoodsId}`)">
+								<view class="goods-main clearfix">
+									<image class="goods-img float_left" :src="item.images[0]" mode="aspectFill"></image>
+									<view class="goods-info float_left">
+										<view class="goods-name">{{ item.title }}</view>
+										<view class="goods-code">{{ item.code }}</view>
+									</view>
+								</view>
+								<view class="goods-tag clearfix">
+									<view class="tag-li" :class="[item.enableStatus === 5 ? 'green' : 'red']">{{ item.enableStatus === 5 ? '上架' : '下架' }}</view>
+									<view class="tag-li brand">{{ item.categoryName }}</view>
+									<view v-if="item.brandName" class="tag-li else">{{ item.brandName }}</view>
+								</view>
+							</view>
+							<view class="handel-btn">
+								<view v-if="$accessCheck($Access.PublishGoodsUpdateEnableStatus)" class="btn-li" @click="GoodsUpdateEnableStatus(item)">
+									{{ item.enableStatus === 5 ? '下架' : '上架' }}
+								</view>
+								<view v-if="$accessCheck($Access.PublishGoodsEditGoods)" class="btn-li" style="border-left: 1rpx solid #ECF0F7;" @click="editGoods(item)">
+									编辑
+								</view>
+								<!-- <view v-if="$accessCheck($Access.PublishGoodsGetGoodsInfo)" class="btn-li"
+									style="border-left: 1rpx solid #ECF0F7;"
+									@click="goPage(`/pages/goods/SaleGoodsDetail?id=${item.id}&basicGoodsId=${item.basicGoodsId}`)">
+									查看
+								</view> -->
+							</view>
+						</view>
+						<u-loadmore v-if="goods_list.length" :status="load_status" />
+						<view v-if="!goods_list.length" class="empty-view"><u-empty text="暂无商品" mode="favor"></u-empty></view>
+					</scroll-view>
+				</view>
+			</view>
+			<addBtn @click="addBtnClick"></addBtn>
+		</block>
+		<view v-else class="empty-view"><u-empty text="没有权限" mode="order"></u-empty></view>
+		<u-popup v-model="search_show" mode="right">
+			<view class="search-pop">
+				<uniStatusBar></uniStatusBar>
+				<view class="form-view" style="padding-top: 45px;">
+					<u-form label-width="160rpx" label-position="left">
+						<u-form-item label-position="top" label="销售状态">
+							<text
+								v-for="(item, index) in status_list"
+								:key="index"
+								class="check-li"
+								:class="[enableStatus === item.value ? 'active' : '']"
+								@click="statusChange(item)"
+							>
+								{{ item.label }}
+							</text>
+						</u-form-item>
+						<u-form-item label="品牌">
+							<view class="clearfix form-val" @click="goPage('/pagesT/brand/selBrand')">
+								<text class="float_left ellipsis">{{ brandId ? brand_name : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('brandId')">
+									<u-icon :name="!brandId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+						<u-form-item label="所属店铺">
+							<view class="clearfix form-val" @click="goPage('/pagesT/shop/selShop')">
+								<text class="float_left ellipsis">{{ shopId ? shop_name : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('shopId')">
+									<u-icon :name="!shopId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="search-btn">
+					<view class="btn-li" @click="clearValue()">重置</view>
+					<view class="btn-li" @click="searchList">确定</view>
+				</view>
+			</view>
+		</u-popup>
+		<u-modal
+			v-model="tip_show"
+			@confirm="goPage('/pages/goods/AddSelGoods', $accessCheck($Access.AddBaseData))"
+			@cancel="goPage('/pagesT/goods/addGoods', $accessCheck($Access.PublishGoodsAddGoods))"
+			:show-cancel-button="true"
+			cancel-text="商品资料"
+			confirm-text="销售商品"
+			content=" "
+			title="请选择"
+		></u-modal>
+		<u-select @confirm="salesStatusChange" v-model="salesStatus_show" :list="status_list"></u-select>
+		<!-- 底部tabbar -->
+		<Tabbar v-model="tabbar_current"></Tabbar>
+	</view>
+</template>
+
+<script>
+import uniStatusBar from '../../components/uni-status-bar.vue';
+export default {
+	components: {
+		uniStatusBar
+	},
+	data() {
+		return {
+			refresher_triggered: false, //设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
+			tabbar_current:2,
+			cateT_current: 0,
+			cateT_list: [],
+			tip_show: false,
+			brandData: '',
+			shopData: '',
+			status_list: [{
+					value: 5,
+					label: '上架'
+				},
+				{
+					value: 4,
+					label: '下架'
+				}
+			],
+			search_show: false,
+			load_status: 'nomore',
+			tab_current: 0,
+			category_list: [], // 分类列表
+			category_id: '', // 分类id
+			category_t_id: '', // 分类二级id
+			auditStatus: 2, // 审核状态
+			isOption: '', // 是否是自选商品
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			goods_list: [],
+			brandId: '', //品牌
+			brand_name: '所属品牌',
+			keyword: '', //关键词
+			enableStatus: '', //上下架
+			shopId: '',
+			shop_name: '所属店铺',
+			scrollTop: -1,
+			salesStatus_show: false,
+			salesStatus_name: '全部商品'
+		};
+	},
+	watch: {
+		brandData(val) {
+			if (val.id) {
+				this.brandId = val.id;
+				this.brand_name = val.title;
+				this.searchList()
+			}
+		},
+		shopData(val) {
+			if (val) {
+				this.shopId = val.id;
+				this.shop_name = val.name;
+				this.searchList()
+			}
+		}
+	},
+	computed: {
+		height() {
+			return this.cateT_list.length ? 'calc(100vh - 388rpx)' : 'calc(100vh - 308rpx)';
+		},
+		enterprise() {
+			return this.$store.state.enterprise;
+		}
+	},
+	onLoad(options) {
+		this.getAllCategory();
+	},
+	onShow() {
+		this.page = 1;
+		this.getData();
+	},
+	methods: {
+		cateTchange(index) {
+			this.cateT_current = index;
+			this.category_t_id = index ? this.cateT_list[index].id : '';
+			this.scrollTop = 0;
+			this.$nextTick(() => {
+				this.scrollTop = -1;
+			});
+			this.page = 1;
+			this.getData();
+		},
+		addBtnClick() {
+			if (this.enterprise.scope === 4) {
+				this.goPage('/pages/goods/AddGoodsOneStore', this.$accessCheck(this.$Access
+					.PublishGoodsAddBasicAndPublishGoods));
+			} else {
+				this.tip_show = true;
+			}
+		},
+		editGoods(item) {
+			if (this.enterprise.scope === 4) {
+				this.goPage('/pages/goods/AddGoodsOneStore?id=' + item.id);
+			} else {
+				this.goPage('/pages/goods/AddSelGoods?id=' + item.id);
+			}
+		},
+		statusChange(row) {
+			this.enableStatus = row.value;
+		},
+		GoodsUpdateEnableStatus(row) {
+			uni.showModal({
+				title: '提示',
+				content: `确定要${row.enableStatus === 5 ? '下架' : '上架'}该商品吗?`,
+				success: res => {
+					if (res.confirm) {
+						this.$u.api
+							.GoodsUpdateEnableStatus({
+								enableStatus: row.enableStatus === 5 ? 4 : 5,
+								id: row.id
+							})
+							.then(res => {
+								this.$u.toast('操作成功');
+								this.searchList();
+							});
+					}
+				}
+			});
+		},
+		morehandel(item) {
+			item.is_more = !item.is_more;
+		},
+		//  获取所有商品分类
+		getAllCategory() {
+			this.$u.api
+				.getAllCategory({
+					enableStatus: 5
+				})
+				.then(res => {
+					this.category_list = res.data;
+				});
+		},
+		// 切换分类
+		changeCate(row) {
+			this.scrollTop = 0;
+			this.$nextTick(() => {
+				this.scrollTop = -1;
+			});
+			if (row) {
+				this.category_id = row.id;
+				if (row.children) {
+					const children = this.$u.deepClone(row.children);
+					children.unshift({
+						title: '全部',
+						id: 0
+					});
+					this.cateT_list = children;
+				} else {
+					this.cateT_list = [];
+				}
+			} else {
+				this.category_id = 0;
+				this.cateT_list = [];
+			}
+			this.category_t_id = '';
+			this.cateT_current = 0;
+			this.page = 1;
+			this.getData();
+		},
+		// 滚动到底部,触发上拉加载
+		moreGoods() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getData();
+			}
+		},
+		// 下拉刷新
+		refresherrefresh() {
+			this.refresher_triggered = true;
+			this.page = 1;
+			this.getData();
+		},
+		searchList() {
+			this.search_show = false;
+			this.page = 1;
+			this.getData();
+		},
+		// 判断当前使用方法为列表接口还是搜索引擎接口 获取列表数据
+		getData() {
+			let categoryPath = '';
+
+			if (this.category_id && this.category_t_id) {
+				categoryPath = this.category_id + ',' + this.category_t_id;
+			} else if (this.category_id) {
+				categoryPath = this.category_id;
+			} else {
+				categoryPath = '';
+			}
+
+			// 搜索参数规整
+			const obj = {
+				keyword: this.keyword,
+				brandId: this.brandId,
+				categoryPath: categoryPath,
+				enableStatus: this.enableStatus,
+				shopId: this.shopId
+			};
+			const isKey = this.$utils.isSerch(obj);
+			if (isKey) {
+				this.getAllGoodsSearch(obj);
+			} else {
+				this.getAllGoods();
+			}
+		},
+		// 获取商品列表
+		getAllGoods() {
+			this.load_status = 'loading';
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize
+			};
+			this.$u.api.getAllGoods(params).then(res => {
+				// 设置当前下拉刷新状态为false
+				this.refresher_triggered = false;
+				if (this.page === 1) {
+					this.goods_list = res.data;
+				} else {
+					this.goods_list = this.goods_list.concat(res.data);
+				}
+				this.total = res.pageTotal;
+				this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+			}).catch(err => {
+				// 设置当前下拉刷新状态为false
+				this.refresher_triggered = false;
+			});
+		},
+		// 商品搜索
+		getAllGoodsSearch(obj) {
+			this.load_status = 'loading';
+			let params = {
+				...obj,
+				page: this.page,
+				pageSize: this.pageSize
+			};
+			this.$u.api.getAllGoodsSearch(params).then(res => {
+				// 设置当前下拉刷新状态为false
+				this.refresher_triggered = false;
+				if (this.page === 1) {
+					this.goods_list = res.data;
+				} else {
+					this.goods_list = this.goods_list.concat(res.data);
+				}
+				this.total = res.pageTotal;
+				this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+			}).catch(err => {
+				// 设置当前下拉刷新状态为false
+				this.refresher_triggered = false;
+			});;
+		},
+		enableStatusConfirm(arr) {
+			this.enableStatus = arr[0].value;
+			this.enableStatus_name = arr[0].value ? arr[0].label : '';
+			this.searchList();
+		},
+		clearProp(key) {
+			this[key] = '';
+			this[key + '_name'] = '';
+			this.searchList();
+		},
+		openSel(key) {
+			this[key] = true;
+		},
+		clearValue(key) {
+			// if (!key) {
+			// 	this.keyword = '';
+			// 	this.brandId = '';
+			// 	this.category_id = '';
+			// 	this.enableStatus = '';
+			// 	this.shopId = '';
+			// 	this.searchList();
+			// } else {
+			// 	this[key] = '';
+			// }
+			this.keyword = '';
+			this.brandId = '';
+			this.category_id = '';
+			this.enableStatus = '';
+			this.shopId = '';
+			this.salesStatus_name = '全部商品'
+			this.brand_name = '所属品牌'
+			this.shop_name = '所属店铺'
+			this.searchList();
+		},
+		salesStatusChange(e) {
+			this.enableStatus = e[0].value
+			this.salesStatus_name = e[0].label
+			this.searchList();
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.tabs-view {
+	width: 100%;
+	background-color: #ffffff;
+
+	.search-view {
+		width: 100%;
+		display: flex;
+
+		.title {
+			flex: 5;
+			height: 102rpx;
+			text-align: center;
+			font-weight: 400;
+			line-height: 102rpx;
+		}
+	}
+}
+
+.catet-view {
+	border-bottom: 1px solid #f5f5f5;
+}
+
+.keyword-view {
+	background-color: #ffffff;
+	padding: 0 24rpx 0;
+
+	.float_left {
+		width: 100%;
+	}
+
+	.float_right {
+		line-height: 64rpx;
+		width: 50rpx;
+		text-align: center;
+		color: #666666;
+	}
+}
+
+.main-view {
+	height: calc(100vh - 106rpx);
+
+	.left-view {
+		width: 200rpx;
+		background-color: #ffffff;
+		height: 100%;
+
+		.left-scroll {
+			width: 100%;
+			height: 100%;
+
+			.cate-li {
+				width: 100%;
+				line-height: 80rpx;
+				padding-left: 36rpx;
+				color: #4b4b4b;
+				background-color: #ffffff;
+				font-size: 26rpx;
+				font-weight: 400;
+			}
+
+			.cate-on {
+				background-color: rgb(235, 240, 248);
+				color: #000000;
+				position: relative;
+				font-weight: 600;
+				font-size: 28rpx;
+
+				&::before {
+					content: '';
+					display: block;
+					width: 6rpx;
+					height: 20rpx;
+					background-color: $uni-color-primary;
+					position: absolute;
+					left: 14rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+	}
+
+	.rigth-view {
+		width: calc(100% - 200rpx);
+		background-color: #ffffff;
+		height: 100%;
+
+		.rigth-scroll {
+			width: 100%;
+			height: 100%;
+			background-color: #f5f5f6;
+
+			.goods-li {
+				padding: 16rpx 0 0;
+				margin: 20rpx 16rpx;
+				border-bottom: 1px solid #f5f5f5;
+				position: relative;
+				background-color: #ffffff;
+				border-radius: 8rpx;
+
+				.goods-tag {
+					// padding: 16rpx 0;
+					margin: 16rpx 0 24rpx 16rpx;
+
+					.tag-li {
+						float: left;
+						margin-right: 8rpx;
+						min-width: 104rpx;
+						height: 32rpx;
+						font-size: 20rpx;
+						text-align: center;
+						line-height: 32rpx;
+						border-radius: 4rpx;
+						padding: 0 6rpx;
+					}
+
+					.brand {
+						line-height: 28rpx;
+						border-radius: 4rpx;
+						border: 1rpx solid #4076d6;
+						color: #4076d6;
+					}
+
+					.else {
+						background-color: rgb(206, 242, 255);
+						color: #32c5ff;
+					}
+
+					.red {
+						background-color: rgb(255, 237, 238);
+						color: #f67778;
+					}
+
+					.green {
+						background-color: rgb(218, 248, 242);
+						color: #00c395;
+					}
+				}
+
+				.goods-main {
+					margin-left: 16rpx;
+
+					.goods-img {
+						border-radius: 8rpx;
+						width: 114rpx;
+						height: 114rpx;
+						margin-right: 16rpx;
+					}
+
+					.goods-info {
+						width: 348rpx;
+
+						.goods-name {
+							-webkit-line-clamp: 1;
+							font-size: 28rpx;
+							color: #2d405e;
+							font-family: PingFangSC-Medium, PingFang SC;
+							font-weight: 500;
+						}
+
+						.goods-code {
+							font-size: 22rpx;
+							padding-top: 6rpx;
+							color: #62738e;
+						}
+
+						.goods-num {
+							color: #999999;
+							font-size: 22rpx;
+
+							text {
+								padding-right: 10rpx;
+							}
+						}
+					}
+				}
+
+				.handel-btn {
+					display: flex;
+					height: 76rpx;
+					border-top: 1px solid #ecf0f7;
+
+					.btn-li {
+						color: #879bba;
+						font-size: 28rpx;
+						line-height: 76rpx;
+						flex: 3;
+						text-align: center;
+						// border: 1px solid #dddddd;
+						// margin: 20rpx 10rpx 0;
+						// border-radius: 8rpx;
+					}
+				}
+
+				.more-btn {
+					position: absolute;
+					right: 20rpx;
+					bottom: -120rpx;
+					background-color: #ffffff;
+					border-radius: 10rpx;
+					padding: 0 20rpx;
+					z-index: 9;
+					box-shadow: 0px 3px 24rpx rgba(0, 0, 0, 0.1);
+
+					.more-btn-li {
+						font-size: 24rpx;
+						line-height: 60rpx;
+						text-align: center;
+						border-bottom: 1px solid #f5f5f5;
+
+						&:last-child {
+							border: 0 none;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 649 - 0
pages/goods/sku.vue

@@ -0,0 +1,649 @@
+<template>
+	<view class="sku-view">
+		<!-- 是否是多规格 -->
+		<view class="switch-view clearfix">
+			<view class="float_left">启用多规格</view>
+			<view class="float_right"><u-switch size="40" v-model="specType"></u-switch></view>
+		</view>
+		<view class="sku-name-view" v-if="specType">
+			<view class="sku-ul">
+				<view class="sku-li" v-for="(item, index) in spec_group" :key="index">
+					<view class="sku-label clearfix">
+						<view class="float_left">
+							{{ item.groupSpec.specName }}
+							<text class="custom-icon custom-icon-delete" @click="deletSpecGroup(index)"></text>
+						</view>
+						<view class="float_right sku-val-add-btn" @click="openSkuLabelPop('sku_val_pop', index, item.groupSpec.specId)">
+							<text class="custom-icon custom-icon-xinzeng"></text>
+							新增规格值
+						</view>
+					</view>
+
+					<view class="sku-val-ul">
+						<view class="sku-val-li" v-for="(ic, inc) in item.params" :key="inc">
+							{{ ic.specValueName }}
+							<text class="custom-icon custom-icon-delete" @click="deletSpecValue(index, inc)"></text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<view class="sku-group" v-if="specType">
+			<view class="sku-group-tit clearfix">
+				<text>规格组合</text>
+				<view class="rest-btn float_right" @click="openSkuLabelPop('sku_label_pop')">添加规格组合</view>
+			</view>
+			<!-- 同步规格 -->
+			<view class="sku-group-main">
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">规格图片</view>
+						<view class="sku-main"><upload :images="specImage ? [specImage] : []" @handleRemove="imgRemoveTotal" @uploadSuccess="uploadSuccessTotal" /></view>
+						<u-button size="mini" type="primary" @click="synchro('specImage')">同步</u-button>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">商品条码</view>
+						<view class="input-view">
+							<view v-for="(item, index) in unit_data" :key="index">
+								<text>{{ item.unitName }}:</text>
+								<input type="text" placeholder="请输入" placeholder-class="input-pl" v-model="barCode[item.unitId]" />
+							</view>
+						</view>
+
+						<u-button size="mini" type="primary" @click="synchro('barCode')">同步</u-button>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">重量/g</view>
+						<view class="input-view">
+							<view v-for="(item, index) in unit_data" :key="index">
+								<text>{{ item.unitName }}:</text>
+								<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="weight[item.unitId]" />
+							</view>
+						</view>
+						<u-button size="mini" type="primary" @click="synchro('weight')">同步</u-button>
+					</view>
+				</view>
+			</view>
+			<!-- 单个规格 -->
+			<view class="sku-group-main" v-for="(sku, index) in specMultiple" :key="index">
+				<view class="sku-group-label">{{ sku.specValueName }}</view>
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">规格图片</view>
+						<view class="sku-main">
+							<upload :images="sku.specImage ? [sku.specImage] : []" @uploadSuccess="uploadSuccess($event, index)" @handleRemove="imgRemove(index)" />
+						</view>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">商品条码</view>
+						<view class="input-view">
+							<view v-for="(item, index) in unit_data" :key="index">
+								<text>{{ item.unitName }}:</text>
+								<input type="text" placeholder="请输入" placeholder-class="input-pl" v-model="sku.barCode[item.unitId]" />
+							</view>
+						</view>
+					</view>
+					<view class="sku-top-li">
+						<view class="label">重量/g</view>
+						<view class="input-view">
+							<view v-for="(item, index) in unit_data" :key="index">
+								<text>{{ item.unitName }}:</text>
+								<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="sku.weight[item.unitId]" />
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<!-- 不启用多规格 单位 -->
+		<view class="sku-group unit-group" v-else>
+			<view class="sku-group-main" v-for="(item, index) in unit_data" :key="index">
+				<view class="sku-group-label">{{ item.unitName }}</view>
+				<view class="sku-top">
+					<view class="sku-top-li">
+						<view class="label">商品条码</view>
+						<input type="text" placeholder="请输入" placeholder-class="input-pl" v-model="item.barCode" />
+					</view>
+					<view class="sku-top-li">
+						<view class="label">重量/g</view>
+						<input type="digit" placeholder="请输入" placeholder-class="input-pl" v-model="item.weight" />
+					</view>
+					<!-- <view class="sku-top-li">
+						<view class="label">默认属性</view>
+						<view class="sku-main">
+							<u-switch size="30" v-model="item.isDefault" @change='unit'></u-switch>
+						</view>
+					</view> -->
+				</view>
+			</view>
+		</view>
+		<view class="submit-btn"><view class="btn-min" @click="skuConfirm">确定</view></view>
+		<!-- 选择规格组 -->
+		<u-popup v-model="sku_label_pop" border-radius="16" mode="bottom">
+			<view class="pop-view">
+				<view class="handel-btn clearfix">
+					<text class="float_left" @click="cancelSkuLabelPop('sku_label_pop')">取消</text>
+					<text class="float_right" @click="specConfitm">确定</text>
+				</view>
+				<view class="pop-cont">
+					<block v-for="(item, index) in spec_list" :key="index">
+						<view class="sku-li clearfix" :class="[spec_group.find(its => its.groupSpec.specId === item.id) ? 'sku-on' : '']" @click="changeSpec(item.id)">
+							<text class="sku-val-label float_left">{{ item.specName }}</text>
+							<text class="custom-icon custom-icon-radio float_right" style="color: #999999;" v-if="spec_group.find(its => its.groupSpec.specId === item.id)"></text>
+							<text class="custom-icon float_right" v-else :class="[temporary_spec_id === item.id ? 'custom-icon-xuanze_xuanzhong' : 'custom-icon-xuanze']"></text>
+						</view>
+					</block>
+				</view>
+			</view>
+		</u-popup>
+		<!-- 选择规格值 -->
+		<u-popup v-model="sku_val_pop" border-radius="16" mode="bottom">
+			<view class="pop-view">
+				<view class="handel-btn clearfix">
+					<text class="float_left" @click="cancelSkuLabelPop('sku_val_pop')">取消</text>
+					<text class="float_right" @click="specValueConfirm">确定</text>
+				</view>
+				<view class="pop-cont">
+					<view class="sku-li clearfix" v-for="(item, index) in spec_data_child" :key="index" @click="selSpecChild(item.id)">
+						<text class="sku-val-label float_left">{{ item.specName }}</text>
+						<text
+							class="custom-icon float_right"
+							:class="[temporary_spec_chid.indexOf(item.id) > -1 ? 'custom-icon-xuanze_xuanzhong' : 'custom-icon-weixuanze']"
+						></text>
+					</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+import upload from '@/components/qiniu/QiniuUpload.vue';
+export default {
+	components: {
+		upload
+	},
+	data() {
+		return {
+			specMultiple: [], //组合好的规格明细
+			spec_group_index: '', // 当前规格下标
+			spec_data_child: [],
+			specImage: '',
+			barCode: {},
+			weight: {},
+			specType: false,
+			current: 0, // tabs组件的current值,表示当前活动的tab选项
+			sku_label_pop: false,
+			sku_val_pop: false,
+			unit_data: [],
+			spec_list: [],
+			spec_group: [], // 属性组
+			temporary_spec_id: '', // 临时存储规格id
+			temporary_spec_chid: [] // 临时存储属性值id
+		};
+	},
+	watch: {
+		specType(val) {
+			if (val) {
+				this.specGroupRest();
+			}
+		}
+	},
+	onLoad(options) {
+		this.specType = parseInt(options.specType) === 2;
+		this.unit_data = JSON.parse(options.unitData);
+		// console.log(this.unit_data);
+		const obj = {};
+		this.unit_data.forEach(item => {
+			obj[item.unitId] = '';
+			item.isDefault = item.isDefault === 5;
+		});
+		this.barCode = this.$u.deepClone(obj);
+		this.weight = this.$u.deepClone(obj);
+		if (this.specType) {
+			this.specMultiple = JSON.parse(options.specMultiple).map(item => {
+				const groupSpecId = item.specGroup.map(itemP => itemP.specId).join('_');
+				const groupSpecName = item.specGroup.map(itemP => itemP.specName).join('_');
+				const specValueId = item.specGroup.map(itemP => itemP.specValueId).join('_');
+				const specValueName = item.specGroup.map(itemP => itemP.specValueName).join('_');
+				return {
+					...item,
+					groupSpecId: groupSpecId,
+					groupSpecName: groupSpecName,
+					specValueId: specValueId,
+					specValueName: specValueName
+				};
+			});
+			this.spec_group = JSON.parse(options.specGroup);
+		}
+		this.getAllSpecManage();
+	},
+
+	methods: {
+		// 获取属性列表
+		getAllSpecManage() {
+			this.$u.api
+				.getAllSpecManage({
+					page: 1,
+					pageSize: 100
+				})
+				.then(res => {
+					this.spec_list = res.data;
+				});
+		},
+		openSkuLabelPop(key, index, specId) {
+			this[key] = true;
+			if (key === 'sku_val_pop') {
+				this.spec_group_index = index;
+				const obj = this.spec_list.find(item => item.id === specId);
+				// console.log(obj, specId);
+				this.spec_data_child = obj.child || [];
+				this.temporary_spec_chid = this.spec_group[index].params.map(item => item.specValueId);
+			}
+		},
+		cancelSkuLabelPop(key) {
+			this[key] = false;
+		},
+		// 单位切换
+		tabsChange(index) {
+			this.current = index;
+		},
+		uploadSuccess(imgUrl, index) {
+			this.specMultiple[index].specImage = imgUrl;
+		},
+		imgRemove(index) {
+			this.specMultiple[index].specImage = '';
+		},
+		uploadSuccessTotal(imgUrl) {
+			this.specImage = imgUrl;
+		},
+		imgRemoveTotal(arr) {
+			this.specImage = '';
+		},
+		changeSpec(id) {
+			if (this.spec_group.find(its => its.groupSpec.specId === id)) {
+				return;
+			}
+			if (this.temporary_spec_id !== id) {
+				this.temporary_spec_id = id;
+			}
+		},
+		// 选择属性名
+		specConfitm() {
+			const obj = this.spec_list.find(item => item.id === this.temporary_spec_id);
+			if (obj) {
+				this.spec_group.push({
+					groupSpec: {
+						specName: obj.specName,
+						specId: obj.id
+					},
+					params: []
+				});
+			}
+			this.sku_label_pop = false;
+			this.temporary_spec_id = '';
+		},
+
+		// 选择属性值
+		selSpecChild(id) {
+			const index = this.temporary_spec_chid.indexOf(id);
+			if (index === -1) {
+				this.temporary_spec_chid.push(id);
+			} else {
+				this.temporary_spec_chid.splice(index, 1);
+			}
+		},
+		// 选择属性值确定
+		specValueConfirm() {
+			const target = this.$u.deepClone(this.temporary_spec_chid);
+			this.spec_group[this.spec_group_index].params = target.map(item => {
+				const specValueName = this.spec_data_child.find(itemf => itemf.id === item).specName;
+				return {
+					specValueId: item,
+					specValueName: specValueName
+				};
+			});
+			this.sku_val_pop = false;
+			this.temporary_spec_chid = [];
+			this.specGroupRest();
+		},
+		//重排规格组合
+		specGroupRest() {
+			// 备份一份规格明细,用来填充重排规格组之前的数据
+			const cloneSpecGroup = this.$u.deepClone(this.specMultiple);
+			const skuArr = this.spec_group.map(item => {
+				item.params = item.params.map(itemP => {
+					return {
+						...itemP,
+						groupSpecName: item.groupSpec.specName,
+						groupSpecId: item.groupSpec.specId
+					};
+				});
+				return item.params;
+			});
+
+			this.specMultiple = this.doExchange(skuArr);
+			this.specMultiple.forEach(item => {
+				const obj = cloneSpecGroup.find(itemC => itemC.groupSpecId === item.groupSpecId);
+				if (obj) {
+					item.barCode = obj.barCode;
+					item.weight = obj.weight;
+					item.specImage = obj.specImage;
+				}
+			});
+		},
+		// 规格组合
+		doExchange(doubleArrays) {
+			const len = doubleArrays.length;
+			if (len >= 2) {
+				const len1 = doubleArrays[0].length;
+				const len2 = doubleArrays[1].length;
+				const newlen = len1 * len2;
+				const temp = new Array(newlen);
+				let index = 0;
+				for (let i = 0; i < len1; i++) {
+					let item = doubleArrays[0][i];
+					for (let j = 0; j < len2; j++) {
+						let item_J = doubleArrays[1][j];
+						temp[index] = {
+							groupSpecId: item.groupSpecId + '_' + item_J.groupSpecId,
+							groupSpecName: item.groupSpecName + '_' + item_J.groupSpecName,
+							specValueId: item.specValueId + '_' + item_J.specValueId,
+							specValueName: item.specValueName + '_' + item_J.specValueName
+						};
+						index++;
+					}
+				}
+				let newArray = new Array(len - 1);
+				newArray[0] = temp;
+				if (len > 2) {
+					let _count = 1;
+					for (let i = 2; i < len; i++) {
+						newArray[_count] = doubleArrays[i];
+						_count++;
+					}
+				}
+				return this.doExchange(newArray);
+			} else {
+				if (!doubleArrays.length) {
+					return [];
+				}
+				const obj = {};
+				this.unit_data.forEach(item => {
+					obj[item.unitId] = '';
+				});
+				return doubleArrays[0].map(item => {
+					return {
+						...item,
+						specImage: '',
+						barCode: this.$u.deepClone(obj),
+						isDefault: this.$u.deepClone(obj),
+						weight: this.$u.deepClone(obj)
+					};
+				});
+			}
+		},
+		// 删除规格组
+		deletSpecGroup(index) {
+			this.spec_group.splice(index, 1);
+			this.specGroupRest();
+		},
+		// 删除规格组
+		deletSpecValue(index, iVal) {
+			this.spec_group[index].params.splice(index, 1);
+			this.specGroupRest();
+		},
+		// 同步
+		synchro(key) {
+			this.specMultiple.forEach(item => {
+				item[key] = this[key];
+			});
+		},
+		// 规格确定
+		skuConfirm() {
+			if (!this.specType) {
+				const data = this.unit_data.map(item => {
+					return {
+						...item,
+						isDefault: item.isDefault ? 5 : 4
+					};
+				});
+				this._prePage().form.unitData = data;
+			} else {
+				const specMultiple = this.specMultiple.map(item => {
+					let specGroup = [];
+					if (item.groupSpecName.indexOf('_') > -1) {
+						const specIdArr = item.groupSpecId.split('_');
+						const specNameArr = item.groupSpecName.split('_');
+						const specValueNameArr = item.specValueName.split('_');
+						const specValueIdArr = item.specValueId.split('_');
+						specGroup = specNameArr.map((im, index) => {
+							return {
+								specId: specIdArr[index],
+								specName: specNameArr[index],
+								specValueName: specValueNameArr[index],
+								specValueId: specValueIdArr[index]
+							};
+						});
+					} else {
+						specGroup = [
+							{
+								specId: item.groupSpecId,
+								specName: item.groupSpecName,
+								specValueName: item.specValueName,
+								specValueId: item.specValueId
+							}
+						];
+					}
+					return {
+						specImage: item.specImage,
+						barCode: item.barCode,
+						isDefault: item.isDefault,
+						weight: item.weight,
+						specGroup: specGroup
+					};
+				});
+				// console.log(specMultiple);
+				this._prePage().form.specMultiple = specMultiple;
+				this._prePage().form.specGroup = this.spec_group;
+			}
+			this._prePage().form.specType = this.specType ? 2 : 1;
+			uni.navigateBack();
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.sku-view {
+	padding-bottom: 140rpx;
+	.switch-view {
+		line-height: 100rpx;
+		padding: 0 24rpx;
+		background-color: #ffffff;
+		border-bottom: 1px solid #f5f5f5;
+	}
+}
+.sku-name-view {
+	padding: 0 24rpx;
+	.sku-ul {
+		padding-top: 30rpx;
+		.sku-li {
+			margin-bottom: 30rpx;
+			.sku-label {
+				.float_left {
+					padding: 0 20rpx;
+					line-height: 50rpx;
+					border-radius: 8rpx;
+					font-size: 24rpx;
+					display: inline-block;
+					border: 1px dotted $uni-color-primary;
+					color: $uni-color-primary;
+					.custom-icon {
+						margin-left: 20rpx;
+					}
+				}
+
+				.sku-val-add-btn {
+					font-size: 24rpx;
+					color: $uni-color-primary;
+					.custom-icon-xinzeng {
+						font-size: 24rpx;
+					}
+				}
+			}
+			.sku-val-ul {
+				padding-top: 14rpx;
+				.sku-val-li {
+					padding: 0 20rpx;
+					line-height: 50rpx;
+					border-radius: 8rpx;
+					font-size: 24rpx;
+					display: inline-block;
+					background-color: $uni-color-primary;
+					color: #ffffff;
+					margin-right: 10rpx;
+					.custom-icon {
+						margin-left: 20rpx;
+					}
+				}
+			}
+		}
+	}
+}
+.sku-group {
+	.sku-group-tit {
+		padding: 20rpx 24rpx;
+		line-height: 50rpx;
+		font-size: 24rpx;
+		.rest-btn {
+			line-height: 50rpx;
+			background-color: $uni-color-primary;
+			border-radius: 6rpx;
+			padding: 0 20rpx;
+			color: #ffffff;
+		}
+	}
+	.sku-group-main {
+		background-color: #ffffff;
+		margin-bottom: 30rpx;
+		.sku-group-label {
+			line-height: 74rpx;
+			height: 70rpx;
+			padding: 0 46rpx;
+			position: relative;
+			border-bottom: 1px solid #f5f5f5;
+			&::before {
+				content: '';
+				position: absolute;
+				display: block;
+				width: 6rpx;
+				height: 34rpx;
+				background-color: $uni-color-primary;
+				left: 24rpx;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+		}
+		.sku-top {
+			font-size: 24rpx;
+			padding: 20rpx 0;
+			display: flex;
+			.sku-top-li {
+				flex: 5;
+				text-align: center;
+				border-right: 1px solid #f5f5f5;
+				.label {
+					.yuan {
+						color: $uni-color-primary;
+					}
+				}
+				.sku-main {
+					margin: 20rpx 0;
+				}
+				.input-view {
+					margin: 20rpx 0;
+					min-height: 128rpx;
+					view {
+						padding-bottom: 10rpx;
+						text {
+							margin-right: 10rpx;
+						}
+						input {
+							border: 1px solid #f5f5f5;
+							line-height: 50rpx;
+							height: 50rpx;
+							width: 150rpx;
+							vertical-align: middle;
+							display: inline-block;
+						}
+					}
+				}
+				&:last-child {
+					border-bottom: 0 none;
+				}
+			}
+		}
+	}
+}
+.unit-group {
+	margin-top: 20rpx;
+	.sku-group-main {
+		.sku-top {
+			padding-bottom: 0;
+			.sku-top-li {
+				input {
+					border: 1px solid #f5f5f5;
+					line-height: 60rpx;
+					height: 60rpx;
+					display: block;
+					margin: 20rpx;
+				}
+				.sku-main {
+					line-height: 60rpx;
+					height: 60rpx;
+					margin: 20rpx;
+				}
+			}
+		}
+	}
+}
+.pop-view {
+	.handel-btn {
+		padding: 0 30rpx;
+		line-height: 90rpx;
+		border-bottom: 1px solid #f5f5f5;
+		.float_right {
+			color: $uni-color-primary;
+		}
+	}
+	.pop-cont {
+		max-height: 800rpx;
+		overflow: auto;
+		padding: 0 30rpx;
+		.sku-li {
+			line-height: 80rpx;
+			border-bottom: 1px solid #f5f5f5;
+			.custom-icon {
+				font-size: 40rpx;
+			}
+			.custom-icon-xuanze {
+				color: #999999;
+			}
+			.custom-icon-weixuanze {
+				color: #999999;
+			}
+			.custom-icon-xuanze1 {
+				color: $uni-color-primary;
+			}
+			.custom-icon-radio {
+				color: $uni-color-primary;
+			}
+		}
+		.sku-on {
+			color: #999999;
+		}
+	}
+}
+</style>

+ 131 - 0
pages/index/WxCode.vue

@@ -0,0 +1,131 @@
+<template>
+	<view style="display: flex;justify-content: center;">
+		<view class="wx_code">
+			<view class="wx_code_name">
+				<view class="ellipsis">{{ enterpriseInfo.enterpriseName }}</view>
+				<view class="user-name">{{ userInfo.name }}</view>
+			</view>
+			<view class="wx_code_scan"><image :src="QrSrc" mode="aspectFit" /></view>
+			<view class="wx_code_tips"><text>扫一扫,立即使用小程序商城</text></view>
+		</view>
+		<view class="save-btn" @click="downloadFile">保存小程序码</view>
+	</view>
+</template>
+
+<script>
+import webUrl from '../../common/config.js';
+export default {
+	data() {
+		return {
+			QrSrc: ''
+		};
+	},
+	computed: {
+		userInfo() {
+			return this.$store.state.userInfo;
+		},
+		enterpriseInfo() {
+			return this.$store.state.enterprise;
+		}
+	},
+	onLoad() {
+		this.createwxaqrcode();
+	},
+	methods: {
+		async createwxaqrcode() {
+			let pathS = 'pages/index/index';
+			this.$u.api
+				.createwxaqrcode({
+					path: pathS,
+					params: this.userInfo.staffId + '_'
+				})
+				.then(res => {
+					this.QrSrc = res.data.indexOf('https') > -1 ? res.data : webUrl.QRC_SRC + res.data;
+				});
+		},
+		downloadFile() {
+			uni.showLoading({
+				title: '正在保存'
+			});
+			uni.downloadFile({
+				url: this.QrSrc,
+				success: res => {
+					if (res.statusCode === 200) {
+						uni.saveImageToPhotosAlbum({
+							filePath: res.tempFilePath,
+							success: function() {
+								uni.showToast({
+									title: '保存成功',
+									icon: 'none'
+								});
+							},
+							fail: function() {
+								uni.showToast({
+									title: '保存失败,请稍后重试',
+									icon: 'none'
+								});
+							}
+						});
+					}
+				},
+				fail: err => {
+					uni.showToast({
+						title: '保存失败,请稍后重试',
+						icon: 'none'
+					});
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.save-btn {
+	width: 680upx;
+	position: fixed;
+	bottom: 30upx;
+	left: 50%;
+	transform: translateX(-50%);
+	line-height: 80upx;
+	text-align: center;
+	color: #ffffff;
+	background: $uni-color-primary;
+	height: 80upx;
+	border-radius: 8upx;
+}
+.wx_code {
+	width: 660upx;
+	background-color: #fff;
+	margin-top: 160upx;
+	border-radius: 10upx;
+
+	.wx_code_name {
+		margin: 50upx 0 40upx 50upx;
+		font-size: 32upx;
+		.user-name {
+			font-size: 28upx;
+			color: #666666;
+			padding-top: 6upx;
+		}
+	}
+
+	.wx_code_scan {
+		width: 540upx;
+		height: 540upx;
+		margin: 0 auto;
+	}
+
+	.wx_code_scan image {
+		width: 540upx;
+		height: 540upx;
+	}
+
+	.wx_code_tips {
+		margin: 50upx 0;
+		font-size: 24upx;
+		color: #999999;
+		text-align: center;
+	}
+}
+</style>

+ 1107 - 0
pages/index/index.vue

@@ -0,0 +1,1107 @@
+<template>
+	<view class="home">
+		<view class="top_view">
+			<u-navbar :title-bold="true" :border-bottom="false" :background="{ background: `rgba(64, 118, 214, ${scroll_top / 100})` }" :is-back="false" title=" ">
+				<view class="title">{{ enterprise.enterpriseName || '工作台' }}</view>
+			</u-navbar>
+			<!-- <uniStatusBar></uniStatusBar> -->
+			<!-- <view class="title">{{ enterprise.enterpriseName || '--' }}</view> -->
+			<view class="user_img clearfix">
+				<view class="img">
+					<image :src="enterprise.logo" mode="aspectFill"></image>
+					<span class="img_title">{{ userInfo.name }}</span>
+				</view>
+				<view class="Icon">
+					<view class="btn-li" @click="goPage('/pages/enterprise/index', 'reLaunch')">
+						<u-icon name="qiehuan-" custom-prefix="custom-icon" size="36" color="#4076D6"></u-icon>
+					</view>
+					<view class="btn-li" @click="overview('reset')"><u-icon name="shuaxin" size="36" color="#4076D6" custom-prefix="custom-icon"></u-icon></view>
+					<view class="btn-li" @click="goPage('/pages/index/WxCode')"><u-icon name="erweima" size="32" custom-prefix="custom-icon" color="#4076D6"></u-icon></view>
+					<view class="btn-li" @click="goPage('/pagesT/notice/notice')"><u-icon name="bell" size="36" color="#4076D6"></u-icon></view>
+					<view class="btn-li" @click="logout"><u-icon name="zhuxiao" custom-prefix="custom-icon" size="34" color="#4076D6"></u-icon></view>
+				</view>
+			</view>
+			<view class="top_money clearfix" v-if="$accessCheck($Access.overview)">
+				<view class="float_left" style="font-weight: 400;">
+					<u-icon name="jinbi" size="36" color="#ffffff" margin-left="12" label-color="#ffffff" label-size="24" label="应收账款" custom-prefix="custom-icon"></u-icon>
+				</view>
+				<view class="float_right">
+					<text class="rmb-icon">¥</text>
+					{{ $utils.formatNub(now.totalShouldReceive) }}
+				</view>
+			</view>
+		</view>
+		<view class="top_bottom" v-if="$accessCheck($Access.overview)">
+			<view class="money-li">
+				<view>
+					<u-icon name="jinbi" size="36" color="#f69844" margin-left="12" label-color="#BABBC6" label-size="24" label="应付账款" custom-prefix="custom-icon"></u-icon>
+				</view>
+				<view class="num">
+					¥
+					<text class="written">{{ $utils.formatNub(now.totalShouldPay) }}</text>
+				</view>
+			</view>
+			<view class="money-li">
+				<navigator open-type="switchTab" url="/pages/customer/CustomerList">
+					<view>
+						<u-icon
+							name="customer"
+							size="36"
+							color="#7a15ff"
+							margin-left="12"
+							label-color="#BABBC6"
+							label-size="24"
+							label="当前客户数"
+							custom-prefix="custom-icon"
+						></u-icon>
+
+						<view class="num">
+							<text class="written">{{ Number(now.customerTotalNum) || 0 }}</text>
+						</view>
+					</view>
+				</navigator>
+			</view>
+			<view class="money-li">
+				<view>
+					<u-icon
+						name="shangpin1"
+						size="36"
+						color="#3f64d9"
+						margin-left="12"
+						label-color="#BABBC6"
+						label-size="24"
+						label="库存商品数"
+						custom-prefix="custom-icon"
+					></u-icon>
+				</view>
+				<view class="num">
+					<text class="written">{{ Number(now.numberOfProductsInStock) || 0 }}</text>
+				</view>
+			</view>
+			<view class="money-li">
+				<view>
+					<u-icon name="jine" size="36" color="#f54957" margin-left="12" label-color="#BABBC6" label-size="24" label="库存总金额" custom-prefix="custom-icon"></u-icon>
+				</view>
+				<view class="num">
+					¥
+					<text class="written">{{ $utils.formatNub(now.totalMoneyOfInventory) }}</text>
+				</view>
+			</view>
+		</view>
+		<!-- 内容 -->
+		<view class="content">
+			<!-- 工作台 -->
+			<view class="content_main" style="margin-top: 0;">
+				<view class="content_top clearfix" style="background: linear-gradient(270deg, #FDFFFE 0%, #EAFEEE 100%);">
+					<image src="../../static/img/ic-work.png" class="img"></image>
+					<text class="title-text">工作台</text>
+					<view class="edit-btn float_right" @click="goPage('/pages/app/index')">
+						<u-icon name="edit-pen-fill" color="#4076D6" label-color="#4076D6" size="28" label="编辑" label-size="28"></u-icon>
+					</view>
+				</view>
+				<view class="cont">
+					<swiper class="swiper" indicator-color="#B8C0C8" indicator-active-color="#4076D6" :indicator-dots="true" :autoplay="false" :interval="2000" :duration="500">
+						<swiper-item v-for="(item, index) in nav_list" :key="index">
+							<view class="app-ul">
+								<block v-for="(app, appi) in item" :key="appi">
+									<view class="app-li" @click="goPage(app.url)" v-if="$accessCheck($Access[app.access])">
+										<view class="icon-view" :style="{ background: app.color }"><text :class="[app.icon]" class="custom-icon"></text></view>
+										<view class="label ellipsis">{{ app.label }}</view>
+									</view>
+								</block>
+							</view>
+						</swiper-item>
+					</swiper>
+				</view>
+			</view>
+			<view class="content_main" v-if="$accessCheck($Access.overview)">
+				<view class="content_top">
+					<image src="../../static/img/ic-jy.png" class="img" mode="aspectFill"></image>
+					<text class="title-text">经营概况</text>
+				</view>
+				<!-- 经营概况 -->
+				<view class="content_text">
+					<ul class="content-ul">
+						<li class="li-list">
+							<view class="order_money">下单金额</view>
+							<view class="num">{{ businessOverview.orderTotalMoney }}</view>
+							<!-- 	<view class='txt'>同比<span style='margin-left: 3rpx;color: #2CB244;'>+10%</span><span>
+										<image src="../../static/img/ic-sh.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+						<li class="li-list">
+							<view class="order_money">营业金额</view>
+							<view class="num">{{ businessOverview.orderConfirmedMoney }}</view>
+							<!-- 	<view class='txt'>同比<span style='margin-left: 8rpx;color: #FA6400;'>+10%</span><span>
+										<image src="../../static/img/ic-xd.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+						<li class="li-list">
+							<view class="order_money">今日毛利</view>
+							<view class="num">{{ businessOverview.todayGrossProfit }}</view>
+							<!-- <view class='txt'>同比<span style='margin-left: 3rpx;color: #2CB244;'>+10%</span><span>
+										<image src="../../static/img/ic-sh.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+						<li class="li-list bottom-li">
+							<view class="order_money">今日收款</view>
+							<view class="num">{{ businessOverview.todayReceivedMoney }}</view>
+							<!-- <view class='txt'>同比<span style='margin-left: 3rpx;color: #2CB244;'>+10%</span><span>
+										<image src="../../static/img/ic-sh.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+						<li class="li-list bottom-li">
+							<view class="order_money">今日新增客户数</view>
+							<view class="num">{{ businessOverview.todayNewCustomerNum }}</view>
+							<!-- <view class='txt'>同比<span style='margin-left: 3rpx;color: #2CB244;'>+10%</span><span>
+										<image src="../../static/img/ic-sh.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+					</ul>
+				</view>
+			</view>
+			<!-- 	订单概况 -->
+			<view class="content_main" v-if="$accessCheck($Access.overview)">
+				<view class="content_top clearfix" style="background: linear-gradient(270deg, #FFFFFF 0%, #FDF6E8 100%); ">
+					<view class="float_left">
+						<image src="../../static/img/ic-jyh3.png" class="img" mode="aspectFill"></image>
+						<text class="title-text">订单概况</text>
+					</view>
+					<!-- <view class="float_right" style="color: #B8C0C8;">选择店铺</view> -->
+				</view>
+				<view class="content_text">
+					<ul class="content-ul">
+						<li class="li-list">
+							<view class="order_money">今日订单</view>
+							<view class="num">{{ businessOverview.todayConfirmedOrderNum }}</view>
+							<!-- 	<view class='txt'>同比<span style='margin-left: 3rpx;color: #2CB244;'>+10%</span><span>
+										<image src="../../static/img/ic-sh.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+						<li class="li-list">
+							<view class="order_money">下单客户</view>
+							<view class="num">{{ businessOverview.todayConfirmedOrderCustomerNum }}</view>
+							<!-- 	<view class='txt'>同比<span style='margin-left: 8rpx;color: #FA6400;'>+10%</span><span>
+										<image src="../../static/img/ic-xd.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+						<li class="li-list">
+							<view class="order_money">今日客单价</view>
+							<view class="num">{{ businessOverview.customerAverageMoney }}</view>
+							<!-- <view class='txt'>同比<span style='margin-left: 3rpx;color: #2CB244;'>+10%</span><span>
+										<image src="../../static/img/ic-sh.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+						<li class="li-list bottom-li">
+							<view class="order_money">未出库订单</view>
+							<view class="num">{{ businessOverview.orderNumOfNotOutOfStock }}</view>
+							<!-- <view class='txt'>同比<span style='margin-left: 3rpx;color: #2CB244;'>+10%</span><span>
+										<image src="../../static/img/ic-sh.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+						<li class="li-list bottom-li">
+							<view class="order_money">今日取消订单</view>
+							<view class="num">{{ businessOverview.todayCanceledOrder }}</view>
+							<!-- <view class='txt'>同比<span style='margin-left: 3rpx;color: #2CB244;'>+10%</span><span>
+										<image src="../../static/img/ic-sh.png" style="width: 16rpx;height: 16rpx;">
+										</image>
+									</span></view> -->
+							<!-- <view class="time">
+								昨日
+								<span style="margin-left: 4rpx;">13409.00</span>
+							</view> -->
+						</li>
+					</ul>
+				</view>
+			</view>
+			<!-- 近7日交易统计图 -->
+			<view class="content_main" v-if="$accessCheck($Access.overview)">
+				<view class="content_top" style="background: linear-gradient(270deg, #FDFFFF 0%, #EAFAFE 100%);">
+					<image src="../../static/img/ic-jyh2.png" class="img" style="vertical-align: middle;"></image>
+					<text class="title-text">近7日交易趋势</text>
+				</view>
+				<view class="charts-box"><qiun-data-charts type="area" :chartData="chartData" :echartsH5="true" :echartsApp="true" background="none" :animation="false" /></view>
+			</view>
+			<!-- tab -->
+			<view class="content_main" v-if="$accessCheck($Access.overview)">
+				<view class="content_top tabs-ul">
+					<ul class="ul_tag">
+						<li v-for="(item, index) in tag" :key="index" @click="changeTag(item.value)" class="ul_tag_item" :class="[item.value === rank_on ? 'hover' : '']">
+							{{ item.label }}
+						</li>
+					</ul>
+				</view>
+				<view class="content_bottom">
+					<view class="bottom_top clearfix">
+						<view class="float_left">
+							<text class="sale" @click="changeSel(1)" :class="[ranking_sel === 1 ? 'show-on' : '']">销额</text>
+							<text style="width: 1rpx;height: 24rpx;display: inline-block;border-left: 1rpx solid #ECF0F7;"></text>
+							<text class="sale_num" @click="changeSel(2)" :class="[ranking_sel === 2 ? 'show-on' : '']">销量</text>
+						</view>
+						<view v-if="false" class="float_right" @click="goPage('/pagesT/shop/selShop')">
+							<u-icon
+								name="arrow-down-fill"
+								color="#B8C0C8"
+								margin-right="20"
+								label-size="28rpx"
+								label-color="#B8C0C8"
+								size="14"
+								label="选择店铺"
+								label-pos="left"
+							></u-icon>
+						</view>
+					</view>
+					<view style="margin-top:40rpx">
+						<ul class="progress-ul" v-if="rank_on === 1">
+							<li class="clearfix progress-li" v-for="(item, index) in ranking.categoryRanking" :key="index">
+								<view class="float_left label ellipsis">{{ item.categoryName }}</view>
+								<view class="float_left line">
+									<u-line-progress
+										active-color="#4076D6"
+										:percent="item.percent"
+										:show-percent="false"
+										height="16prx"
+										width="423prx"
+										:round="true"
+									></u-line-progress>
+								</view>
+								<view class="float_right num">{{ item.numberOrMoney }}</view>
+							</li>
+						</ul>
+						<ul class="progress-ul" v-if="rank_on === 2">
+							<li class="clearfix progress-li" v-for="(item, index) in ranking.goodsRanking" :key="index">
+								<view class="float_left label ellipsis">{{ item.goodsName || '未设置' }}</view>
+								<view class="float_left line">
+									<u-line-progress
+										active-color="#4076D6"
+										:percent="item.percent"
+										:show-percent="false"
+										height="16prx"
+										width="423prx"
+										:round="true"
+									></u-line-progress>
+								</view>
+								<view class="float_right num">{{ item.numberOrMoney }}</view>
+							</li>
+						</ul>
+						<ul class="progress-ul" v-if="rank_on === 3">
+							<li class="clearfix progress-li" v-for="(item, index) in ranking.customerRanking" :key="index">
+								<view style="width: 450rpx;border: 0;" class="float_left label ellipsis">{{ item.customerName }}</view>
+								<view style="width: 200rpx;text-align: left;" class="float_right num">{{ item.numberOrMoney }}</view>
+							</li>
+						</ul>
+						<ul class="progress-ul" v-if="rank_on === 4">
+							<li class="clearfix progress-li ellipsis" v-for="(item, index) in ranking.supplierRanking" :key="index">
+								<view style="width: 450rpx;border: 0;" class="float_left label">{{ item.supplierName }}</view>
+								<view style="width: 200rpx;text-align: left;" class="float_right num">{{ item.numberOrMoney }}</view>
+							</li>
+						</ul>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-popup
+			v-model="noticePop"
+			border-radius="18"
+			mode="center"
+			height="905"
+			:custom-style="{
+				background: 'rgba(0,0,0,0)'
+			}"
+		>
+			<view class="mag-view">
+				<view class="mag-top"><image class="notice-i" src="../../static/img/notice-i.png" mode=""></image></view>
+				<view class="msg-cont">
+					<image class="msg-yun" src="../../static/img/notice-bg.png" mode=""></image>
+					<view class="mag-tit">{{ notice_data.title }}</view>
+					<scroll-view class="mag-main" scroll-y>{{ notice_data.content }}</scroll-view>
+				</view>
+				<view class="confirm-btn primary-btn-pain" @click="noticePop = false">我知道了</view>
+			</view>
+		</u-popup>
+		<!-- 底部tabbar -->
+		<Tabbar v-model="tabbar_current"></Tabbar>
+	</view>
+</template>
+
+<script>
+import { mapActions } from 'vuex';
+import uniStatusBar from '../../components/uni-status-bar.vue';
+export default {
+	data() {
+		return {
+			tabbar_current: 0,
+			notice_data: {
+				title: '',
+				content: ''
+			},
+			noticePop: false,
+			shopData: '',
+			ranking: [],
+			now: {}, //
+			type: true,
+			businessOverview: {},
+			active: false,
+			rank_on: 1,
+			list: ['快销品', '包装食品', '饼干糕点', '保健品', '营养保健品', '速冻面店', '办公器材', '美容化妆'],
+			tag: [
+				{
+					value: 1,
+					label: '类目排行',
+					active: true
+				},
+				{
+					value: 2,
+					label: '商品排行',
+					active: false
+				},
+				{
+					value: 3,
+					label: '客户排行',
+					active: false
+				},
+				{
+					value: 4,
+					label: '供应商排行',
+					active: false
+				}
+			],
+			chartData: {
+				categories: [],
+				series: []
+			},
+			tabs_current: 0,
+			tabs_list: [
+				{
+					name: '订单金额'
+				},
+				{
+					name: '客户统计'
+				},
+				{
+					name: '资金统计'
+				},
+				{
+					name: '订单数'
+				}
+			],
+			ranking_sel: 1,
+			nav_list: [
+				[
+					{
+						url: '/pages/order/OrderAdd',
+						label: '代客下单',
+						icon: 'custom-icon-piliangxiadan',
+						color: '#f29611',
+						access: 'OrderAdd'
+					},
+					{
+						url: '/pagesT/stock/SalesOrder',
+						label: '出库单',
+						icon: 'custom-icon-quehuoshangpinshu',
+						color: '#5c6aff',
+						access: 'InventoryOut'
+					},
+					{
+						url: '/pagesT/customer/StaffList',
+						label: '销售排行',
+						icon: 'custom-icon-paihangbang',
+						color: '#f29611',
+						access: 'salesRanking'
+					},
+					{
+						url: '/pagesT/customer/CommunicationLogs',
+						label: '客户拜访',
+						icon: 'custom-icon-fuwu',
+						color: '#f29611',
+						access: 'CustomerListvisitedLogs'
+					}
+				]
+			],
+			scroll_top: 0
+		};
+	},
+	onPageScroll(e) {
+		this.scroll_top = e.scrollTop;
+	},
+	components: {
+		uniStatusBar
+	},
+	computed: {
+		hasLogin() {
+			return this.$store.state.hasLogin;
+		},
+		userInfo() {
+			return this.$store.state.userInfo;
+		},
+		enterprise() {
+			return this.$store.state.enterprise;
+		}
+	},
+	watch: {
+		shopData(val) {}
+	},
+	async onLoad() {
+		// this.noticePop=true
+		if (!this.hasLogin) {
+			this.logout();
+			return;
+		}
+		await this.overview();
+		await this.getupStatusAnnouncementInfo();
+		await this.getBasicSetup();
+	},
+	async onShow() {
+		await this.getCommonAppInfo();
+	},
+	async onPullDownRefresh() {
+		await this.overview();
+		await this.getupStatusAnnouncementInfo();
+		await this.getBasicSetup();
+	},
+	onShareAppMessage(res) {},
+	methods: {
+		...mapActions({
+			logout: 'logout'
+		}),
+		setChartData(timeData, orderMoney, goodsNum, orderNum) {
+			this.chartData = {
+				categories: timeData,
+				series: [
+					{
+						name: '金额',
+						data: orderMoney,
+						// pointShape: 'circle',
+						legendShape: 'line'
+					},
+					{
+						name: '商品数量',
+						data: goodsNum,
+						// pointShape: 'circle',
+						legendShape: 'line'
+					},
+					{
+						name: '订单数量',
+						data: orderNum,
+						// pointShape: 'circle',
+						legendShape: 'line'
+					}
+				]
+			};
+		},
+		changeTag(val) {
+			this.rank_on = val;
+		},
+		changeSel(val) {
+			this.ranking_sel = val;
+			this.overview();
+		},
+		async overview(isReset) {
+			if (isReset) {
+				uni.showLoading({
+					title: '加载中...'
+				});
+			}
+			await this.$u.api
+				.overview({
+					ranking: this.ranking_sel, // "1销量排行 2销额排行",
+					businessOverviewShopId: '', // "经营概况按店铺筛选:为空则筛选全店",
+					categoryRankingShopId: '', // "类目排行按店铺筛选:为空则筛选全店",
+					goodsRankingShopId: '', // "商品排行按店铺筛选:为空则筛选全店",
+					supplierRankingShopId: '' // 供应商排行按店铺筛选:为空则筛选全店"
+				})
+				.then(res => {
+					uni.stopPullDownRefresh();
+					uni.hideLoading();
+					this.businessOverview = res.data.businessOverview;
+					this.now = res.data.aggregateStatistics;
+					this.ranking = res.data.ranking;
+					const timeData = [];
+					const goodsNumData = [];
+					const orderMoneyData = [];
+					const orderNumData = [];
+					this.$nextTick(() => {
+						res.data.chartData.forEach(value => {
+							const arr = value.date.split('-');
+							timeData.push(arr[1] + '-' + arr[2]);
+							goodsNumData.push(Number(value.goodsNum));
+							orderMoneyData.push(Number(value.orderMoney));
+							orderNumData.push(Number(value.orderNum));
+						});
+						this.setChartData(timeData, orderMoneyData, goodsNumData, orderNumData);
+					});
+				})
+				.catch(err => {
+					uni.hideLoading();
+					uni.stopPullDownRefresh();
+				});
+		},
+		async getupStatusAnnouncementInfo() {
+			await this.$u.api.getupStatusAnnouncementInfo().then(res => {
+				if (res.data.upStatus === 5) {
+					this.noticePop = true;
+					this.notice_data.title = res.data.title;
+					this.notice_data.content = res.data.content;
+				} else {
+					this.noticePop = false;
+				}
+			});
+		},
+		async getCommonAppInfo() {
+			await this.$u.api.getCommonAppInfo(this.userInfo.userCenterId).then(res => {
+				if (res.data.jsonKey) {
+					const jsonKey = res.data.jsonKey;
+					if (jsonKey[0].icon.indexOf('ibon') > -1) {
+						return;
+					}
+					//可对一个数进行上舍入
+					let num = Math.ceil(jsonKey.length / 8);
+					let arr = [];
+					for (let i = 0; i < num; i++) {
+						arr[i] = jsonKey.slice(i * 8, i * 8 + 8);
+					}
+					this.nav_list = arr;
+				}
+			});
+		},
+		// 获取基本设置
+		async getBasicSetup() {
+			await this.$u.api.getBasicSetup().then(res => {
+				if (res.data.basicData) {
+					this.$store.commit('commit_basicSet', res.data.basicData);
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.charts-box {
+	width: 710rpx;
+	height: 530rpx;
+	padding: 24rpx 24rpx 0 0;
+	background-color: #ffffff;
+}
+
+.show {
+	color: #2d405e;
+}
+
+.home {
+	font-family: DIN-Medium;
+	.top_bottom {
+		width: 686rpx;
+		margin: 0 auto;
+		background-color: #ffffff;
+		border-radius: 8rpx;
+		display: flex;
+		padding: 32rpx;
+		flex-wrap: wrap;
+		transform: translateY(-146rpx);
+
+		.money-li {
+			padding-left: 42rpx;
+			width: 50%;
+			color: #2d405e;
+			padding-top: 20rpx;
+
+			&:nth-child(odd) {
+				border-right: 1px solid #ecf0f7;
+			}
+
+			&:nth-child(2) {
+				padding-top: 0;
+				border-bottom: 1px solid #ecf0f7;
+			}
+
+			&:first-child {
+				padding-top: 0;
+				border-bottom: 1px solid #ecf0f7;
+			}
+
+			.num {
+				padding-top: 8px;
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #2d405e;
+				line-height: 50rpx;
+
+				.written {
+					font-size: 40rpx;
+				}
+			}
+		}
+	}
+
+	.top_view {
+		padding: 0 32rpx 164rpx;
+		// height: calc(500rpx + var(--status-bar-height));
+		background: linear-gradient(#4076d6, #4076d6, #4076d6, #4076d6, #f5f5f6 100%);
+
+		.title {
+			padding-left: 32rpx;
+			font-size: 32rpx;
+			font-weight: 500;
+			color: #ffffff;
+		}
+
+		.user_img {
+			margin-top: 52rpx;
+
+			.img {
+				float: left;
+
+				image {
+					margin-right: 8rpx;
+					vertical-align: middle;
+					width: 68rpx;
+					height: 68rpx;
+					border-radius: 100%;
+					border: 4rpx solid #ffffff;
+					background-color: #ffffff;
+				}
+
+				.img_title {
+					line-height: 68rpx;
+					vertical-align: middle;
+					font-size: 28rpx;
+					font-weight: 500;
+					color: #ffffff;
+				}
+			}
+
+			.Icon {
+				float: right;
+				line-height: 72rpx;
+
+				.btn-li {
+					font-weight: bold;
+					width: 50rpx;
+					height: 50rpx;
+					background-color: #ffffff;
+					display: inline-block;
+					text-align: center;
+					vertical-align: middle;
+					margin-left: 30rpx;
+					line-height: 50rpx;
+					border-radius: 6rpx;
+				}
+			}
+		}
+
+		.top_money {
+			color: #ffffff;
+			margin-top: 52rpx;
+
+			.float_right {
+				font-size: 34rpx;
+				font-weight: 400;
+				font-family: DINPro-Regular;
+				.rmb-icon {
+					margin-right: 4rpx;
+					font-size: 24rpx;
+				}
+			}
+		}
+
+		.txst {
+			width: 141rpx;
+			height: 33px;
+			font-size: 24px;
+			font-weight: 400;
+			color: #2d405e;
+			line-height: 33px;
+		}
+	}
+
+	.content {
+		transform: translateY(-120rpx);
+
+		.content_main {
+			margin: 24rpx auto;
+			width: 710rpx;
+			border-radius: 12rpx;
+			overflow: hidden;
+
+			.content_top {
+				background: linear-gradient(270deg, #fcfdff 0%, #e2ebff 100%);
+				line-height: 40rpx;
+				height: 80rpx;
+				line-height: 80rpx;
+				padding: 0 24rpx;
+				overflow: hidden;
+
+				.img {
+					width: 40rpx;
+					height: 40rpx;
+					display: inline-block;
+					margin-right: 16rpx;
+					vertical-align: middle;
+				}
+
+				.title-text {
+					font-size: 32rpx;
+					font-weight: 600;
+					color: #2d405e;
+					vertical-align: middle;
+				}
+
+				.edit-btn {
+					margin-left: 20rpx;
+					display: inline-block;
+				}
+
+				&.tabs-ul {
+					overflow: auto;
+					height: 88rpx;
+					padding: 0rpx;
+					background: transparent;
+
+					.ul_tag {
+						display: flex;
+						width: 710rpx;
+						height: 72rpx;
+						line-height: 72rpx;
+						transform: translateY(16rpx);
+						background: linear-gradient(217deg, #ffffff 0%, #ecf0f7 100%);
+
+						.ul_tag_item {
+							flex: 4;
+							width: 177rpx;
+							text-align: center;
+							font-size: 24rpx;
+							font-weight: 400;
+							color: #62738e;
+						}
+
+						.hover {
+							font-weight: 400;
+							height: 88rpx;
+							line-height: 88rpx;
+							background-color: #4076d6;
+							color: #ffffff;
+							font-size: 28rpx;
+							transform: translateY(-16rpx);
+							border-radius: 8rpx 8rpx 0rpx 0rpx;
+						}
+					}
+				}
+			}
+
+			.content_bottom {
+				width: 710rpx;
+				background-color: #ffffff;
+				padding-top: 38rpx;
+
+				.bottom_top {
+					padding: 0 32rpx;
+					height: 50rpx;
+					line-height: 50rpx;
+					font-size: 28rpx;
+
+					.float_right {
+						width: 210rpx;
+						height: 50rpx;
+						border-radius: 25rpx;
+						border: 2rpx solid #b8c0c8;
+						text-align: center;
+						line-height: 36rpx;
+					}
+
+					.sale {
+						font-size: 28rpx;
+						width: 56rpx;
+						height: 40rpx;
+						color: #b8c0c8;
+						margin-left: 32rpx;
+						margin-right: 20rpx;
+					}
+
+					.sale_num {
+						font-size: 28rpx;
+						width: 56rpx;
+						font-weight: 400;
+						color: #b8c0c8;
+						margin-left: 20rpx;
+					}
+
+					.show-on {
+						font-size: 28rpx;
+						font-weight: 500;
+						color: #2d405e;
+					}
+
+					.sel {
+						padding: 10rpx;
+						font-size: 28rpx;
+						width: 210rpx;
+						border-radius: 25rpx;
+						border: 2rpx solid #b8c0c8;
+						margin-left: 320rpx;
+						color: #b8c0c8;
+					}
+				}
+			}
+
+			.content_text {
+				background-color: #ffffff;
+
+				.content-ul {
+					display: flex;
+					flex-wrap: wrap;
+					padding: 0 24rpx;
+
+					.li-list {
+						width: 33.3333%;
+						text-align: center;
+						margin-top: 10rpx;
+						padding-bottom: 32rpx;
+						padding-top: 40rpx;
+						border-bottom: 1px solid #ecf0f7;
+						position: relative;
+
+						&::after {
+							content: '';
+							display: block;
+							width: 1px;
+							height: 120rpx;
+							position: absolute;
+							background-color: #ecf0f7;
+							right: 0;
+							top: 50%;
+							transform: translateY(-48%);
+						}
+
+						&:nth-child(5),
+						&:nth-child(4) {
+							padding-top: 32rpx;
+							padding-bottom: 40rpx;
+							border-bottom: 0;
+						}
+
+						&:nth-child(3),
+						&:last-child {
+							&::after {
+								height: 0;
+								width: 0;
+							}
+						}
+
+						.num {
+							font-size: 44rpx;
+							font-weight: 500;
+							color: #2d405e;
+							line-height: 56rpx;
+							height: 56rpx;
+							padding-top: 12rpx;
+						}
+
+						.order_money {
+							font-size: 24rpx;
+							font-weight: 400;
+							color: #b8c0c8;
+							line-height: 33rpx;
+						}
+
+						.txt {
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #62738e;
+							line-height: 28rpx;
+						}
+
+						.time {
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #62738e;
+							line-height: 45rpx;
+						}
+
+						&.bottom-li {
+							width: 50%;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+
+.cont {
+	.swiper {
+		width: 710rpx;
+		height: 400rpx;
+
+		.app-ul {
+			padding: 40rpx 0 0;
+			display: flex;
+			flex-wrap: wrap;
+			background-color: #ffffff;
+			height: 400rpx;
+
+			.app-li {
+				text-align: center;
+				width: 25%;
+				margin-bottom: 40rpx;
+
+				.icon-view {
+					width: 72rpx;
+					height: 72rpx;
+					line-height: 72rpx;
+					border-radius: 30rpx;
+					margin: 0 auto;
+
+					.custom-icon {
+						font-size: 42rpx;
+						color: #ffffff;
+					}
+				}
+
+				.label {
+					font-size: 26rpx;
+					line-height: 36rpx;
+					padding-top: 16rpx;
+					color: #2d405e;
+				}
+			}
+		}
+	}
+}
+
+.progress-ul {
+	padding-bottom: 40rpx;
+
+	.progress-li {
+		line-height: 90rpx;
+
+		.label {
+			width: 152rpx;
+			text-align: right;
+			border-right: 1px solid #dddddd;
+			padding-right: 12rpx;
+			color: #2d405e;
+			font-size: 24rpx;
+			font-weight: 400;
+		}
+
+		.line {
+			width: 400rpx;
+		}
+
+		.num {
+			color: #5c79b0;
+			font-size: 24rpx;
+			margin-right: 30rpx;
+		}
+	}
+}
+
+.mag-view {
+	text-align: center;
+	transform: translateY(100rpx);
+	background-color: #ffffff;
+	width: 612rpx;
+	border-radius: 18rpx;
+	padding-bottom: 46rpx;
+
+	.mag-top {
+		height: 242rpx;
+		border-radius: 18rpx;
+		background-color: $uni-color-primary;
+		width: 100%;
+		position: relative;
+
+		.notice-i {
+			width: 422rpx;
+			height: 312rpx;
+			position: absolute;
+			top: -100rpx;
+			left: 140rpx;
+		}
+	}
+
+	.msg-cont {
+		padding: 0 50rpx;
+		padding-top: 56rpx;
+		position: relative;
+
+		.msg-yun {
+			position: absolute;
+			width: 622rpx;
+			height: 215rpx;
+			left: 0;
+			top: -116rpx;
+			z-index: 1;
+		}
+
+		.mag-main {
+			height: 200rpx;
+		}
+
+		.mag-tit {
+			position: relative;
+			z-index: 9;
+			font-size: 38upx;
+			font-weight: bold;
+			padding-bottom: 30rpx;
+		}
+	}
+
+	.confirm-btn {
+		line-height: 90rpx;
+		height: 90rpx;
+		font-size: 34rpx;
+		width: 506rpx;
+		margin: 30rpx auto 0;
+		border: 1px solid $uni-color-primary;
+		color: $uni-color-primary;
+		border-radius: 12rpx;
+	}
+}
+</style>

+ 291 - 0
pages/login/index.vue

@@ -0,0 +1,291 @@
+<template>
+	<view>
+		<!-- 商户管理端登录 -->
+		<view class="login_bg" v-if="login_type === 'system'">
+			<image src="../../static/img/login-bg.jpg" mode="scaleToFill"></image>
+			<view class="login-title">商户管理端</view>
+			<view class="login_content">
+				<view class="login_info">
+					<text class="login_tip" v-if="!forgetPwd_istrue">登录</text>
+					<text class="login_tip" v-else>忘记密码</text>
+					<!-- <text class="login_line">|</text> -->
+					<!-- <text @click="login_istrue = false" :class="login_istrue ? '' : 'login_tip'">注册</text> -->
+				</view>
+				<view class="login_input" v-if="!forgetPwd_istrue">
+					<input v-model="mobile" type="number" placeholder="请输入手机号" placeholder-class="inpput-pl" class="input_mobile" />
+					<input v-model="password" type="password" placeholder="输入登录密码" placeholder-class="inpput-pl" class="input_mobile" style="margin-top: 60rpx;" />
+				</view>
+				<view class="login_input" v-else>
+					<input v-model="forget_pwd.mobile" type="number" placeholder="请输入手机号" placeholder-class="inpput-pl" class="input_mobile" />
+					<view class="clearfix" style="margin-top: 60rpx;">
+						<input
+							v-model="forget_pwd.yzm"
+							type="number"
+							placeholder="输入验证码"
+							placeholder-class="inpput-pl"
+							class="input_mobile float_left"
+							style="width: 200rpx;"
+						/>
+						<text class="yzm_btn  float_right">获取验证码</text>
+					</view>
+					<input v-model="forget_pwd.password" type="password" placeholder="输入登录密码" placeholder-class="inpput-pl" class="input_mobile" style="margin-top: 60rpx;" />
+				</view>
+				<view class="login_bottom clearfix" v-if="!forgetPwd_istrue">
+					<!-- <text class="password float_left" @click="forgetPwd_istrue=true">忘记密码?</text> -->
+					<text class="password float_left" @click="login('test')">体验一下</text>
+					<view class="btn float_right" @click="login()">
+						<u-loading :show="is_loading" color="#ffffff" mode="flower"></u-loading>
+						<text>登录</text>
+						<text class="custom-icon custom-icon-jianto1-copy"></text>
+					</view>
+				</view>
+				<view v-else class="login_bottom clearfix">
+					<text class="password float_left" @click="forgetPwd_istrue = false">马上登录</text>
+					<view class="btn float_right" @click="forgetPwd_istrue = false">
+						<text class="login_tit">确定</text>
+						<text class="custom-icon custom-icon-jianto1-copy"></text>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			login_type: 'system',
+			login_istrue: true,
+			is_loading: false,
+			mobile: '',
+			password: '',
+			yzm: '',
+			forgetPwd_istrue: false,
+			forget_pwd: {
+				mobile: '',
+				password: '',
+				yzm: ''
+			}
+		};
+	},
+	onShareAppMessage(res) {},
+	methods: {
+		changeLogin() {
+			this.login_type = this.login_type === 'supplier' ? 'system' : 'supplier';
+		},
+		login(test) {
+			// 体验一下
+			let mobile = '';
+			let password = '';
+			if (test) {
+				mobile = '18888888888';
+				password = '123456';
+			} else {
+				if (!this.mobile) {
+					this.$u.toast('请输入登录账号');
+					return;
+				}
+				if (!this.password) {
+					this.$u.toast('请输入密码');
+					return;
+				}
+				mobile = this.mobile;
+				password = this.password;
+			}
+
+			this.is_loading = true;
+			let params = {
+				mobile: mobile,
+				password: password
+			};
+			if (this.login_type === 'supplier') {
+				params.source = '2'; //1企业员工, 商户登录 2:供应商登录
+			}
+			this.$u.api
+				.login(params)
+				.then(res => {
+					this.is_loading = false;
+					this.$store.commit('commit_token', res.data.token);
+					this.$store.commit('commit_hasLogin', true);
+
+					if (res.data.enterprise.length > 1) {
+						this.goPage('/pages/enterprise/index');
+					} else if (res.data.enterprise.length === 1) {
+						this.goShop(res.data.enterprise[0]);
+					} else {
+						this.$u.toast('抱歉当前账号没有企业');
+					}
+				})
+				.catch(() => {
+					this.is_loading = false;
+				});
+		},
+		forgetPwd() {
+			this.forgetPwd_istrue = true;
+		},
+		// 进入企业
+		async goShop(row) {
+			this.$store.commit('commit_enToken', row.token);
+			this.$store.commit('commit_enterprise', row);
+			if (this.login_type === 'system') {
+				await this.getAclList(row.roleType);
+				await this.getStaffByToken(row.roleType);
+				this.goPage('/pages/index/index', 'switchTab');
+			} else {
+				await this.getSupplierByUserCenterId();
+			}
+		},
+		//获取供应商详情
+		async getSupplierByUserCenterId() {
+			await this.$u.api.getSupplierByUserCenterId().then(res => {
+				this.$store.commit('commit_supplierToken', res.data.token || '');
+				this.$store.commit('commit_userInfo', res.data);
+				// this.goPage('/pages/order/index', 'switchTab');
+			});
+		},
+		// 获取登录权限
+		async getAclList(roleType) {
+			await this.$u.api.getAclList(roleType).then(res => {
+				this.$store.commit('commit_access', res.data);
+			});
+		},
+		async getStaffByToken(roleType) {
+			await this.$u.api.getStaffByToken(roleType).then(res => {
+				this.$store.commit('commit_userInfo', {
+					...res.data,
+					name: res.data.name || this.mobile || '18888888888'
+				});
+			});
+		}
+	}
+};
+</script>
+<style>
+page {
+	background-color: #fff;
+}
+</style>
+<style scoped lang="scss">
+.change-login {
+	position: fixed;
+	bottom: 0;
+	height: 80rpx;
+	width: 100%;
+	left: 0;
+	text-align: center;
+	line-height: 80rpx;
+}
+.login_bg {
+	position: relative;
+	image {
+		width: 100%;
+		height: 458rpx;
+	}
+
+	.login-title {
+		width: 100%;
+		font-size: 48rpx;
+		color: #fff;
+		text-align: center;
+		text-shadow: 0px 3rpx 24rpx rgba(10, 42, 177, 0.75);
+		position: absolute;
+		top: 50%;
+		left: 50%;
+		transform: translateX(-50%);
+	}
+
+	.login_icon {
+		color: #fff;
+		position: absolute;
+		top: 24%;
+		left: 4%;
+	}
+
+	.login_content {
+		width: 100%;
+		background-color: #fff;
+		border-radius: 80rpx 80rpx 0px 0px;
+		position: absolute;
+		top: 83%;
+		left: 0;
+
+		.login_info {
+			height: 280rpx;
+			// padding-left: 100rpx;
+			line-height: 280rpx;
+			font-size: 36rpx;
+			font-weight: 400;
+			color: #333333;
+			text-align: center;
+
+			.login_line {
+				margin: 0 40rpx 0 40rpx;
+				width: 2rpx;
+				height: 32rpx;
+				color: #f1f1f1;
+				display: inline-block;
+			}
+
+			.login_tip {
+				font-size: 48rpx;
+				font-weight: bold;
+				color: #000000;
+			}
+		}
+
+		.login_input {
+			padding: 0 100rpx;
+
+			.input_mobile {
+				height: 100rpx;
+				background-color: #f4f4fb;
+				border-radius: 10rpx;
+				padding: 0 50rpx;
+			}
+
+			.yzm_btn {
+				width: 220rpx;
+				height: 98rpx;
+				border-radius: 12rpx;
+				border: 1px solid #2979ff;
+				color: #2979ff;
+				font-size: 28rpx;
+				text-align: center;
+				font-weight: 500;
+				line-height: 100rpx;
+			}
+		}
+
+		.login_bottom {
+			margin-top: 80rpx;
+			padding: 0 100rpx 0 150rpx;
+
+			.password {
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #999999;
+				line-height: 100rpx;
+			}
+
+			.btn {
+				width: 283rpx;
+				height: 100rpx;
+				background: linear-gradient(90deg, #072afe 0%, #06a0fa 100%);
+				border-radius: 20rpx;
+				color: #fff;
+				padding: 0 60rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				line-height: 100rpx;
+
+				.custom-icon {
+					margin-left: 46rpx;
+					line-height: 100rpx;
+					font-size: 36rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 982 - 0
pages/order/OrderAdd.vue

@@ -0,0 +1,982 @@
+<template>
+	<view class="detail-view">
+		<view class="top-view clearfix"></view>
+		<view class="form-cont">
+			<view class="customer-view">
+				<view class="title clearfix" @click="goPage('/pagesT/customer/selCustomer')">
+					<view class="float_left ellipsis">{{ add_form.customerName }}</view>
+					<view class="float_right"><u-icon color="#879BBA" name="arrow-right" size="24"></u-icon></view>
+				</view>
+				<view class="address-view">
+					<view class="remark_cont" v-if="add_form.customerName === '选择客户'">+{{ add_form.deliveryType !== 2 ? '选择收货信息' : '选择自提点' }}</view>
+					<block v-else>
+						<view @click="openSelect('address_show')" class="remark_particulars" v-if="add_form.deliveryType !== 2">
+							<block v-if="address_list.length > 0">
+								<view class="clearfix">
+									<view class="float_left">联系人:{{ address_list[address_index].name || '--' }}</view>
+									<view class="float_right" style="color: #4076D6;">{{ address_list[address_index].mobile || '--' }}</view>
+								</view>
+								<view class="site">
+									{{ address_list[address_index].area.provinceName }}{{ address_list[address_index].area.cityName
+									}}{{ address_list[address_index].area.districtName }}{{ address_list[address_index].area.address }}
+								</view>
+							</block>
+							<block v-else>
+								<view style="text-align: left;">
+									<text style="margin-right: 30rpx;">暂无收货信息</text>
+									<u-icon name="plus" size="24" color="#007AFF"></u-icon>
+									<text style="color: #007AFF;" @click="goPage(`/pagesT/order/AddShippingAddress?customerId=${add_form.customerId}`)">去新增</text>
+								</view>
+							</block>
+							<view class="arrow-right-icon"><u-icon color="#879BBA" name="arrow-right" size="24"></u-icon></view>
+						</view>
+						<view @click="openSelect('express_show')" class="remark_particulars" v-else>
+							<block v-if="self_express_list.length > 0">
+								<view class="clearfix">
+									<view class="float_left">自提点:{{ self_express_list[express_rule_index].name || '--' }}</view>
+									<view class="float_right" style="color: #4076D6;">{{ self_express_list[express_rule_index].mobile || '--' }}</view>
+								</view>
+								<view class="site">{{ self_express_list[express_rule_index].addressName }}</view>
+							</block>
+							<block v-else>
+								<view style="text-align: left;">
+									<text style="margin-right: 30rpx;">暂无自提点</text>
+									<u-icon name="plus" size="24" color="#007AFF"></u-icon>
+									<text style="color: #007AFF;" @click="goPage(`/pagesT/order/AddShippingAddress?customerId=${add_form.customerId}`)">去新增</text>
+								</view>
+							</block>
+							<view class="arrow-right-icon"><u-icon color="#879BBA" name="arrow-right" size="24"></u-icon></view>
+						</view>
+					</block>
+				</view>
+			</view>
+			<view class="form-model-view">
+				<view class="title clearfix">
+					<view class="float_left ellipsis">商品清单</view>
+					<view class="float_right">共{{ goods_list.length }}种商品,{{ numTotal }}件</view>
+				</view>
+				<view class="btn" v-if="!goods_list.length" @click="selGoods">选择商品</view>
+				<view class="goods-view" v-if="goods_list.length">
+					<block v-for="(item, index) in goods_list" :key="index"><image v-if="index <= 4" :src="item.images[0]" mode="aspectFill"></image></block>
+					<view class="more-goods" @click="openSelect('sel_pop')">查看详情</view>
+				</view>
+
+				<view class="form-item clearfix" style="border-top: 1px solid #ECF0F7;padding-top: 20rpx;">
+					<view class="label">配送方式</view>
+					<view class="value">
+						<u-input :placeholder-style="inputStyle" class="dis-input" placeholder="请选择配送方式" disabled v-model="deliveryType_name" @click="openDelivery" />
+						<u-icon name="arrow-right" size="24" color="#CAD0D7"></u-icon>
+					</view>
+				</view>
+				<view class="form-item clearfix" v-if="add_form.deliveryType === 3">
+					<view class="label">物流类型</view>
+					<view class="value">
+						<u-input
+							:placeholder-style="inputStyle"
+							class="dis-input"
+							placeholder="请选择物流类型"
+							disabled
+							v-model="particularsType_name"
+							@click="particularsType_show = true"
+						/>
+						<u-icon name="arrow-right" size="24" color="#CAD0D7"></u-icon>
+					</view>
+				</view>
+				<view class="form-item clearfix">
+					<view class="label">支付方式</view>
+					<view class="value">
+						<u-input :placeholder-style="inputStyle" class="dis-input" placeholder="请选择支付方式" disabled v-model="payType_name" @click="payType_show = true" />
+						<u-icon name="arrow-right" size="24" color="#CAD0D7"></u-icon>
+					</view>
+				</view>
+			</view>
+			<view class="form-model-view">
+				<view class="form-item clearfix importend-item">
+					<view class="label">商品总额</view>
+					<view class="value">{{ $utils.formattedNumber(totalMoney) }}</view>
+				</view>
+				<view class="form-item clearfix">
+					<view class="label">订单优惠</view>
+					<view class="value error-value">
+						<input
+							placeholder="请输入订单优惠"
+							placeholder-class="input-pl"
+							:disabled="!$accessCheck($Access.OrderAddeditGoodsPrice)"
+							class="dis-input input-sj"
+							type="digit"
+							@focus="totalReduceMoneyFocus"
+							@blur="totalReduceMoneyBlur"
+							v-model="add_form.totalReduceMoney"
+						/>
+					</view>
+				</view>
+				<view class="form-item clearfix">
+					<view class="label">应收</view>
+					<view class="value">{{ $utils.formattedNumber(payMoney) }}</view>
+				</view>
+				<view class="form-item clearfix">
+					<view class="label">实收</view>
+					<view class="value error-value">
+						<input
+							class="dis-input input-sj"
+							placeholder="请输入实收金额"
+							placeholder-class="input-pl"
+							:disabled="!$accessCheck($Access.OrderAddeditGoodsPrice)"
+							type="digit"
+							@focus="receivedMoneyFocus"
+							@blur="receivedMoneyBlur"
+							v-model="add_form.receivedMoney"
+						/>
+					</view>
+				</view>
+				<view class="form-item clearfix importend-item">
+					<view class="label">结算账户</view>
+					<view class="value">
+						<u-input
+							:placeholder-style="inputStyle"
+							class="dis-input"
+							@click="goPage('/pagesT/account/selAccount?shopId=' + account_shopId)"
+							placeholder="请选择结算账户"
+							disabled
+							v-model="accountName"
+						/>
+						<u-icon name="arrow-right" size="24" color="#CAD0D7"></u-icon>
+					</view>
+				</view>
+			</view>
+			<view class="form-model-view">
+				<view class="bz-label">订单备注</view>
+				<view class="bz-value"><u-input type="textarea" v-model="add_form.remark" /></view>
+			</view>
+		</view>
+		<u-select @confirm="particularsTypeChange" v-model="particularsType_show" label-name="label" value-name="value" :list="particularsType_list"></u-select>
+		<u-select @confirm="deliveryTypeChange" v-model="delivery_show" label-name="title" value-name="deliveryType" :list="deliveryType_list"></u-select>
+		<u-select @confirm="payTypeChange" v-model="payType_show" label-name="label" value-name="value" :list="payType_list"></u-select>
+		<u-popup v-model="sel_pop" mode="bottom">
+			<view class="sel-goods-pop">
+				<view class="pop-tit clearfix">
+					<view class="float_left">本次已选商品</view>
+					<view class="float_right" @click="clearGoods">
+						<text class="custom-icon custom-icon-shanchu"></text>
+						<text>清空</text>
+					</view>
+				</view>
+				<scroll-view class="goods-ul" scroll-y>
+					<view class="goods-li" v-for="(item, index) in goods_list" :key="index">
+						<view class="goods-name">{{ item.title }}</view>
+						<view class="goods-code clearfix">
+							<view class="float_left">{{ item.code }}</view>
+							<view class="float_right price-input-view">
+								<text class="label">单价:</text>
+								<input :disabled="!$accessCheck($Access.OrderAddeditGoodsPrice)" class="price-input" type="digit" v-model="item.salePrice" />
+								<text class="yuan">元</text>
+							</view>
+						</view>
+						<view class="goods-code clearfix">
+							<view class="float_left">
+								{{ item.unitName }};
+								<text v-for="(sku, skuI) in item.specGroup" :key="skuI">{{ sku.specValueName }};</text>
+							</view>
+							<view class="float_right" v-if="item.isEq === 4">
+								<u-number-box :min="0" :index="index" @change="addBuyNumChange" :value="item.buyNum"></u-number-box>
+							</view>
+							<view class="float_right" v-else>
+								<view class="price-input-view" style="margin-bottom: 10rpx;">
+									<text class="label">数量:</text>
+									<input class="price-input" type="digit" v-model="item.buyNum" />
+								</view>
+								<view class="price-input-view">
+									<text class="label" style="left: -120rpx;">其他单位:</text>
+									<input class="price-input" type="digit" v-model="item.otherNum" />
+								</view>
+							</view>
+						</view>
+						<text class="custom-icon custom-icon-shanchu" @click="delGoods(index)"></text>
+					</view>
+					<view style="padding-top: 100rpx;" v-if="!goods_list.length"><u-empty text="未选择商品" mode="data"></u-empty></view>
+				</scroll-view>
+			</view>
+		</u-popup>
+		<u-select v-model="address_show" value-name="id" label-name="name" :list="address_list" @confirm="addressChange"></u-select>
+		<u-select v-model="express_show" value-name="id" label-name="name" :list="self_express_list" @confirm="expressChange"></u-select>
+		<view class="detail-bottom"><u-button class="handel-btn" @click="submit" :loading="sub_load" :ripple="true" type="primary">提交订单</u-button></view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			sub_load: false,
+			sel_pop: false,
+			express_show: false,
+			address_show: false,
+			goodsData: '',
+			customerData: '',
+			AccountData: '',
+			goods_list: [],
+			address_list: [],
+			address_index: 0,
+			deliveryType_list: [], //配送方式
+			payType_list: [
+				{
+					label: '货到付款',
+					value: 3
+				},
+				{
+					label: '先款后货',
+					value: 9
+				}
+			],
+			particularsType_list: [
+				{
+					label: '物流专线',
+					value: 4
+				},
+				{
+					label: '物流专车',
+					value: 5
+				}
+			],
+			self_express_list: [],
+			deliveryType_name: '',
+			particularsType_name: '', //物流详情名称
+			particularsType: '', //物流详情id
+			payType_name: '货到付款', //支付方式名称
+			delivery_show: false,
+			payType_show: false,
+			account_shopId: '',
+			payWay: 3, //支付方式
+			express_rule_index: 0,
+			accountName: '',
+			shop_id: '',
+			order_detail: {},
+			add_form: {
+				deliveryType: '',
+				customerName: '选择客户',
+				addressId: '',
+				remark: '',
+				accountList: '',
+				currentAccountName: '',
+				receivedMoney: 0,
+				lists: [],
+				totalMoney: 0,
+				payMoney: 0,
+				totalReduceMoney: 0,
+				userCenterId: '',
+				customerId: '',
+				selfRuleId: '',
+				selfRuleData: '',
+				operatorName: '',
+				payType: 3 //支付方式id
+			},
+			rules: {
+				customerName: [
+					{
+						required: true,
+						message: '请选择客户',
+						// 可以单个或者同时写两个触发验证方式
+						trigger: 'change'
+					}
+				]
+			},
+			particularsType_show: false
+		};
+	},
+	watch: {
+		customerData(val) {
+			if (val) {
+				this.add_form.userCenterId = val.userCenterId;
+				this.add_form.customerId = val.id;
+				this.add_form.customerName = val.name;
+				this.account_shopId = val.shopId;
+				// 获取客户收货地址列表
+				if (this.add_form.deliveryType !== 2) {
+					this.getAllShippingAddress();
+				}
+			}
+		},
+		goodsData(val) {
+			if (val) {
+				uni.removeStorageSync('orderGoods');
+				this.goods_list = val;
+			}
+		},
+		AccountData(val) {
+			if (val) {
+				this.accountName = val.name;
+				this.add_form.accountList = [
+					{
+						accountId: val.id,
+						accountNumber: val.accountNumber,
+						accountName: val.name,
+						money: this.add_form.receivedMoney,
+						discountMoney: 0,
+						finalMoney: this.add_form.receivedMoney,
+						payWay: this.payWay,
+						remark: val.remark
+					}
+				];
+			}
+		}
+	},
+	computed: {
+		userName() {
+			return this.$store.state.userInfo.name;
+		},
+		numTotal() {
+			if (!this.goods_list.length) {
+				return 0;
+			} else if (this.goods_list.length === 1) {
+				return Number(this.goods_list[0].buyNum);
+			} else {
+				let sum = 0;
+				this.goods_list.forEach(item => {
+					sum = sum + Number(item.buyNum);
+				});
+				return sum;
+			}
+		},
+		// 商品总额
+		totalMoney() {
+			if (!this.goods_list.length) {
+				return 0;
+			} else if (this.goods_list.length === 1) {
+				return Number(this.goods_list[0].buyNum) * Number(this.goods_list[0].salePrice);
+			} else {
+				let sum = 0;
+				this.goods_list.forEach(item => {
+					sum = sum + Number(item.buyNum) * Number(item.salePrice);
+				});
+				return sum;
+			}
+		},
+		payMoney() {
+			return this.totalMoney - this.add_form.totalReduceMoney;
+		}
+	},
+	onShow() {
+		this.getAllShippingAddress();
+	},
+	onLoad(options) {
+		if (options.customer) {
+			const customer = JSON.parse(options.customer);
+			this.add_form.userCenterId = customer.userCenterId;
+			this.add_form.customerId = customer.customerId;
+			this.add_form.customerName = customer.customerName;
+			this.account_shopId = customer.shopId;
+			// 获取客户收货地址列表
+			this.getAllShippingAddress();
+		}
+		if (options.id) {
+			this.order_id = options.id;
+			this.add_form.userCenterId = options.userCenterId;
+			uni.setNavigationBarTitle({
+				title: '编辑订单'
+			});
+			this.getOrderInfoById();
+		} else {
+			this.add_form.currentAccountName = this.userName;
+		}
+		this.getAllDelivery();
+		// 获取自提点
+		this.getAllSelfExpressRule();
+	},
+	methods: {
+		// 详情
+		getOrderInfoById() {
+			this.$u.api
+				.getOrderInfoById(this.add_form.userCenterId, {
+					orderId: this.order_id
+				})
+				.then(({ data }) => {
+					uni.stopPullDownRefresh();
+					this.order_detail = data;
+					this.deliveryType_name = data.deliveryName;
+					if (data.accountList && data.accountList.length) {
+						this.accountName = data.accountList[0].accountName;
+					}
+
+					//由于订单是按照店铺拆单的
+					// 所以在编辑订单时,增加此订单的商品时应该只能选择本店铺下的商品
+					this.shop_id = data.shopId;
+					this.account_shopId = data.shopId;
+					this.add_form = {
+						deliveryType: data.deliveryType,
+						customerName: data.customerName,
+						addressId: '',
+						remark: data.remark,
+						accountList: data.accountList,
+						currentAccountName: data.currentAccountName,
+						receivedMoney: data.receivedMoney,
+						totalMoney: data.totalMoney,
+						payMoney: data.payMoney,
+						totalReduceMoney: data.totalReduceMoney,
+						userCenterId: data.userCenterId,
+						customerId: data.customerId,
+						selfRuleId: data.selfRuleId,
+						selfRuleData: data.selfRuleData,
+						operatorName: data.operatorName,
+						payType: Number(data.payType)
+					};
+					if (this.add_form.payType === 9) {
+						this.payType_name = '先款后货';
+					}
+					if (this.add_form.deliveryType === 4) {
+						this.add_form.deliveryType = 3;
+						this.deliveryType_name = '物流';
+						this.particularsType = 4;
+						this.particularsType_name = '物流专线';
+					}
+					if (this.add_form.deliveryType === 5) {
+						this.add_form.deliveryType = 3;
+						this.deliveryType_name = '物流';
+						this.particularsType = 5;
+						this.particularsType_name = '物流专车';
+					}
+					this.goods_list = data.goodsData.map(item => {
+						return {
+							...item,
+							salePrice: item.price,
+							title: item.goodsName,
+							code: item.goodsCode
+						};
+					});
+					if (data.customerId) {
+						// 获取客户收货地址列表
+						this.getAllShippingAddress(this.add_form.deliveryType !== 2 ? data.receiveData.id : '');
+					}
+					// if (this.add_form.deliveryType === 2) {
+					// 	const selfRuleData = JSON.parse(data.selfRuleData);
+					// } else {
+					// 	const receiveData = data.receiveData;
+					// }
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		},
+		openSelect(key) {
+			this[key] = true;
+		},
+		selGoods() {
+			if (!this.add_form.customerId) {
+				this.$u.toast('请选择客户');
+				return;
+			}
+			uni.setStorageSync('orderGoods', JSON.stringify(this.goods_list));
+			this.goPage('/pagesT/goods/selGoods?userCenterId=' + this.add_form.userCenterId + '&shopId=' + this.shop_id);
+		},
+		// 配送方式
+		getAllDelivery() {
+			this.$u.api
+				.getAllDelivery({
+					page: 1,
+					pageSize: 100
+				})
+				.then(res => {
+					this.deliveryType_list = res.data;
+					const defaultType = res.data.find(item => item.defaultStatus === 5);
+					if (defaultType && !this.add_form.deliveryType) {
+						this.add_form.deliveryType = defaultType.deliveryType;
+						this.deliveryType_name = defaultType.title;
+					}
+				});
+		},
+		openDelivery() {
+			this.delivery_show = true;
+		},
+		getAllShippingAddress(id) {
+			this.$u.api.getAllShippingAddress(this.add_form.customerId).then(res => {
+				if (res.data.length) {
+					this.add_form.addressId = res.data[0].id;
+					this.address_list = res.data.map(item => {
+						return {
+							...item,
+							name: item.name || item.mobile
+						};
+					});
+				} else {
+					this.address_list = [];
+				}
+			});
+		},
+		// 获取自提点
+		getAllSelfExpressRule() {
+			this.$u.api.getAllSelfExpressRule().then(res => {
+				this.self_express_list = res.data.map(item => {
+					return {
+						...item,
+						name: item.setData.name,
+						mobile: item.setData.mobile,
+						addressName: item.setData.provinceName + '-' + item.setData.cityName + '-' + item.setData.districtName + '-' + item.setData.address
+					};
+				});
+
+				if (res.data.length) {
+					this.add_form.selfRuleId = res.data[0].id;
+					this.add_form.selfRuleData = res.data[0].setData;
+				}
+			});
+		},
+		// 配送方式
+		deliveryTypeChange(arr) {
+			this.add_form.deliveryType = arr[0].value;
+			this.deliveryType_name = arr[0].label;
+			if (arr[0].value === 1) {
+				this.getAllShippingAddress(this.add_form.customerId);
+			} else if (arr[0].value === 2) {
+				if (this.self_express_list.length) {
+					const target = this.self_express_list[0];
+					this.add_form.selfRuleId = target.id;
+					this.add_form.selfRuleData = target.setData;
+				}
+			}
+		},
+		payTypeChange(e) {
+			this.payType_name = e[0].label;
+			this.add_form.payType = e[0].value;
+		},
+		particularsTypeChange(e) {
+			this.particularsType_name = e[0].label;
+			this.particularsType = e[0].value;
+		},
+		addressChange(arr) {
+			this.add_form.addressId = arr[0].value;
+			this.address_index = this.address_list.findIndex(item => item.id === arr[0].value);
+		},
+		expressChange(arr) {
+			this.add_form.selfRuleId = arr[0].value;
+			this.add_form.selfRuleData = arr[0].setData;
+			this.express_rule_index = this.self_express_list.findIndex(item => item.id === arr[0].value);
+		},
+		submit() {
+			if (!this.goods_list.length) {
+				this.$u.toast('请选择商品');
+				return;
+			}
+			if (this.add_form.receivedMoney > 0 && !this.add_form.accountList.length) {
+				this.$u.toast('请选择结算账户');
+				return;
+			}
+			let lists = this.goods_list.map(item => {
+				return {
+					skuId: item.skuId,
+					code: item.code,
+					goodsId: item.id,
+					buyNum: item.buyNum,
+					otherNum: item.otherNum,
+					shopId: item.shopId,
+					basicGoodsId: item.basicGoodsId || item.goodsBasicId,
+					goodsName: item.title,
+					unitName: item.unitName,
+					specGroup: item.specGroup,
+					inventory: item.inventory,
+					salePrice: item.salePrice,
+					subMoney: item.salePrice * item.buyNum,
+					shopName: item.shopName,
+					goodsImages: item.images[0],
+					brandId: item.brandId,
+					brandName: item.brandName,
+					categoryPath: item.categoryPath,
+					categoryName: item.categoryName,
+					conversion: item.conversion,
+					barCode: item.barCode,
+					storageCode: item.storage,
+					warehouseId: item.warehouseId,
+					originPrice: item.originPrice,
+					specType: item.specType,
+					supplierId: item.supplierId,
+					supplierName: item.supplierName,
+					isEq: item.isEq
+				};
+			});
+
+			let params = {
+				...this.add_form,
+				totalMoney: this.totalMoney,
+				payMoney: this.payMoney,
+				operatorName: this.userName
+			};
+			if (this.particularsType) {
+				params.deliveryType = this.particularsType;
+			}
+			// this.$refs.uForm.validate(valid => {
+			// if (valid) {
+			if (this.order_id) {
+				params.goodsData = lists.map(item => {
+					return {
+						...item,
+						goodsCode: item.code,
+						images: [item.goodsImages],
+						price: item.salePrice,
+						totalMoney: item.subMoney
+					};
+				});
+				this.sub_load = true;
+				this.$u.api
+					.newOrderEdit(this.order_id, {
+						...this.order_detail,
+						...params
+					})
+					.then(res => {
+						this.sub_load = false;
+						this.$u.toast('修改成功');
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 1500);
+					})
+					.catch(res => {
+						this.sub_load = false;
+					});
+			} else {
+				params.lists = lists;
+				this.sub_load = true;
+				this.$u.api
+					.newAddOrder(params)
+					.then(res => {
+						this.sub_load = false;
+						this.$u.toast('下单成功');
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 1500);
+					})
+					.catch(res => {
+						this.sub_load = false;
+					});
+			}
+			// }
+			// });
+		},
+		delGoods(index) {
+			this.goods_list.splice(index, 1);
+			if (!this.goods_list.length) {
+				this.sel_pop = false;
+			}
+		},
+		addBuyNumChange({ value, index }) {
+			const target = this.$u.deepClone(this.goods_list);
+			if (Number(value) === 0) {
+				target.splice(index, 1);
+			} else {
+				target[index].buyNum = value;
+			}
+			this.goods_list = target;
+		},
+		clearGoods() {
+			this.goods_list = [];
+			this.sel_pop = false;
+		},
+		barCode() {
+			if (!this.add_form.customerId) {
+				this.$u.toast('请选择客户');
+				return;
+			}
+			uni.scanCode({
+				scanType: ['barCode'],
+				success: res => {
+					this.sendBarCode(res.result);
+				}
+			});
+		},
+		sendBarCode(result) {
+			this.$u.api
+				.getGoodsByBarCode({
+					barCode: result
+				})
+				.then(res => {
+					const detail = res.data.detail;
+					const index = this.goods_list.findIndex(item => item.skuId === detail.skuId);
+					if (index !== -1) {
+						this.$u.toast('该商品已存在');
+						return;
+					} else {
+						this.goods_list.push({
+							...detail,
+							buyNum: 1
+						});
+					}
+				});
+		},
+		// 实收输入框获取焦点
+		receivedMoneyFocus(key) {
+			if (!this.add_form.receivedMoney || this.add_form.receivedMoney <= 0) {
+				this.add_form.receivedMoney = '';
+			}
+		},
+		// 实收输入框失去焦点
+		receivedMoneyBlur() {
+			if (!this.add_form.receivedMoney || this.add_form.receivedMoney <= 0) {
+				this.add_form.receivedMoney = 0;
+			}
+		},
+		// 订单优惠输入框获取焦点
+		totalReduceMoneyFocus(key) {
+			if (!this.add_form.totalReduceMoney || this.add_form.totalReduceMoney <= 0) {
+				this.add_form.totalReduceMoney = '';
+			}
+		},
+		// 订单优惠输入框失去焦点
+		totalReduceMoneyBlur() {
+			if (!this.add_form.totalReduceMoney || this.add_form.totalReduceMoney <= 0) {
+				this.add_form.totalReduceMoney = 0;
+			}
+		}
+	},
+	// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
+	onReady() {
+		// this.$refs.uForm.setRules(this.rules);
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.top-view {
+	background: linear-gradient($uni-color-primary, $uni-color-primary, $uni-color-primary, #f5f5f6 100%);
+	height: 360rpx;
+	position: fixed;
+	left: 0;
+	top: 0;
+	width: 100%;
+	z-index: -1;
+}
+
+.form-cont {
+	transform: translateY(70rpx);
+	position: relative;
+	z-index: 1;
+	padding-bottom: 80rpx;
+	.form-model-view {
+		width: 710rpx;
+		background-color: #ffffff;
+		margin: 16rpx auto;
+		border-radius: 8rpx;
+		padding: 10rpx 32rpx;
+		.title {
+			padding: 24rpx 0;
+			.float_left {
+				font-size: 28rpx;
+				font-weight: 600;
+				color: #2d405e;
+			}
+			.float_right {
+				font-size: 28rpx;
+				color: #879bba;
+			}
+		}
+		.btn {
+			width: 646rpx;
+			height: 106rpx;
+			background-color: #ecf0f7;
+			color: #4076d6;
+			text-align: center;
+			line-height: 106rpx;
+			font-size: 26rpx;
+			border-radius: 12rpx;
+			margin: 0 auto 24rpx;
+		}
+		.goods-view {
+			text-align: left;
+			position: relative;
+			width: 100%;
+			margin-bottom: 24rpx;
+			image {
+				width: 102rpx;
+				height: 102rpx;
+				border-radius: 8rpx;
+				margin: 0 6rpx;
+				vertical-align: middle;
+				border: 1px solid #ecf0f7;
+			}
+
+			.more-goods {
+				width: 102rpx;
+				height: 102rpx;
+				border-radius: 8rpx;
+				margin: 0 6rpx;
+				display: inline-block;
+				background-color: #ecf0f7;
+				line-height: 102rpx;
+				text-align: center;
+				vertical-align: middle;
+				font-size: 22rpx;
+				color: #4076d6;
+			}
+		}
+		.form-item {
+			line-height: 80rpx;
+			.label {
+				float: left;
+				color: #879bba;
+			}
+			.value {
+				float: right;
+				width: 400rpx;
+				text-align: right;
+				.input-sj {
+					border-bottom: 1px solid $uni-color-primary;
+				}
+				&.error-value {
+					color: #f67778;
+				}
+			}
+			&.importend-item {
+				.label {
+					color: #2d405e;
+					font-weight: bold;
+				}
+				.value {
+					font-family: DIN-Medium;
+					color: #2d405e;
+				}
+			}
+		}
+		.bz-label {
+			line-height: 80rpx;
+			font-weight: bold;
+		}
+	}
+}
+
+.customer-view {
+	width: 710rpx;
+	background-color: #ffffff;
+	margin: 0 auto 34rpx;
+	border-radius: 8rpx;
+	padding: 0 32rpx;
+
+	.title {
+		padding: 32rpx 0 24rpx;
+
+		.float_left {
+			font-size: 32rpx;
+			font-weight: 600;
+			width: calc(100% - 120rpx);
+			color: #2d405e;
+		}
+	}
+
+	.address-view {
+		border-top: 1px solid #ecf0f7;
+		line-height: 48rpx;
+		height: 142rpx;
+		font-size: 28rpx;
+
+		.remark_cont {
+			width: 170rpx;
+			margin: 0 auto;
+			line-height: 142rpx;
+			color: #4076d6;
+			font-size: 26rpx;
+		}
+
+		.remark_particulars {
+			padding: 24rpx 0;
+			padding-right: 24rpx;
+			color: #879bba;
+			font-size: 26rpx;
+			position: relative;
+			.arrow-right-icon {
+				position: absolute;
+				right: -10rpx;
+				top: 50%;
+				transform: translateY(-50%);
+			}
+		}
+	}
+}
+
+.sel-goods-pop {
+	padding-bottom: 1px;
+
+	.pop-tit {
+		line-height: 70rpx;
+		background-color: #ecf0f7;
+		padding: 0 24rpx;
+		.float_right {
+			font-size: 24rpx;
+			color: #666666;
+			.custom-icon-shanchu {
+				font-size: 26rpx;
+				margin-right: 10rpx;
+			}
+		}
+	}
+
+	.goods-ul {
+		min-height: 400rpx;
+		max-height: 600rpx;
+
+		.goods-li {
+			padding: 24rpx;
+			position: relative;
+			border-bottom: 1px solid #f5f5f5;
+
+			.goods-name {
+				width: 660rpx;
+			}
+
+			.goods-code {
+				padding-top: 10rpx;
+				font-size: 24rpx;
+				line-height: 50rpx;
+				color: #879bba;
+
+				.price-input-view {
+					height: 50rpx;
+					line-height: 50rpx;
+					padding: 0 10rpx;
+					border: 1px solid #ecf0f7;
+					border-radius: 8rpx;
+					width: 212rpx;
+					text-align: center;
+					color: #333333;
+					position: relative;
+
+					.label {
+						position: absolute;
+						left: -80rpx;
+						top: 50%;
+						display: block;
+						transform: translateY(-50%);
+					}
+
+					.price-input {
+						width: 150rpx;
+						height: 50rpx;
+						display: inline-block;
+						vertical-align: middle;
+						margin-right: 10rpx;
+						transform: translateY(-4rpx);
+						font-size: 24rpx;
+					}
+
+					.yuan {
+						color: #879bba;
+					}
+				}
+			}
+
+			.custom-icon-shanchu {
+				position: absolute;
+				right: 24rpx;
+				top: 24rpx;
+				width: 40rpx;
+				height: 40rpx;
+				color: $uni-color-error;
+			}
+		}
+	}
+
+	.btn-view {
+		width: 680rpx;
+		height: 70rpx;
+		line-height: 70rpx;
+		border-radius: 10rpx;
+		background-color: $uni-color-primary;
+		color: #ffffff;
+		text-align: center;
+		margin: 20rpx auto;
+	}
+}
+</style>

+ 127 - 0
pages/order/OrderGoodsList.vue

@@ -0,0 +1,127 @@
+<template>
+	<view>
+		<view class="goods-ul">
+			<view class="goods-li" v-for="(item,index) in goods_list" :key="index">
+				<view class="del-icon"><u-icon name="trash" color="#999999" size="40"></u-icon></view>
+				<view class="goods-name ellipsis">{{item.title}}</view>
+				<view class="goods-code">编号:{{item.code}}</view>
+				<block v-for="(sku,skui) in item.specMultiple" :key="skui">
+					<view class="goods-sku">
+						<text>{{sku.unitName}};</text>
+						<text v-for="(spec,specI) in sku.specGroup">{{spec.specValueName}}</text>
+					</view>
+					<view class="goods-num clearfix">
+						<view class="float_left">
+							<text class="price">¥{{sku.salePrice}}</text>
+							/{{sku.unitName}}
+						</view>
+						<view class="float_right"><u-number-box v-model="sku.buyNum"></u-number-box></view>
+					</view>
+				</block>
+				
+			</view>
+		</view>
+		<view class="detail-bottom">
+			<view class="left-view">
+				<!-- <view class="total-price">¥1000.00</view> -->
+				<view class="left-desc">已选{{goods_list.length}}种,55个</view>
+			</view>
+			<view class="right-view">
+				<view class="btn-li" @click="goPage('/pagesT/goods/selGoods')">选择商品</view>
+				<view class="btn-li" @click="backOrder">下单</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				goodsData:'',
+				goods_list:[]
+			}
+		},
+		watch:{
+			goodsData(val){
+				if(val){
+					this.goods_list=val
+				}
+			}
+		},
+		onLoad() {
+			
+		},
+		methods:{
+			backOrder(){
+				this._prePage().orderGoods = this.add_goods;
+				this.goPage('/pages/order/OrderAdd')
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.goods-ul {
+	padding-bottom: 100rpx;
+	.goods-li {
+		background-color: #ffffff;
+		border-bottom: 1px solid #eeeeee;
+		padding: 20rpx;
+		padding-left: 80rpx;
+		font-size: 24rpx;
+		color: #6c6c6c;
+		line-height: 50rpx;
+		position: relative;
+		.del-icon {
+			position: absolute;
+			top: 50%;
+			left: 20rpx;
+			transform: translateY(-50%);
+		}
+		.goods-name {
+			-webkit-line-clamp: 2;
+			font-size: 28rpx;
+			color: #111111;
+		}
+		.price {
+			font-size: 28rpx;
+			color: $uni-color-error;
+		}
+	}
+}
+.detail-bottom {
+	.left-view {
+		padding: 10rpx 30rpx;
+		.total-price {
+			color: $uni-color-error;
+			font-weight: bold;
+		}
+		.left-desc {
+			font-size: 24rpx;
+			color: #6c6c6c;
+		}
+	}
+	.right-view {
+		padding:10rpx 30rpx;
+		margin-left: 30rpx;
+		.btn-li {
+			display: inline-block;
+			width: 200rpx;
+			text-align: center;
+			line-height: 80rpx;
+			height: 80rpx;
+			background: $uni-color-primary;
+			border: 1px solid $uni-color-primary;
+			color: #ffffff;
+			border-radius: 10rpx;
+			&:first-child {
+				color: #333333;
+				border-color: #eeeeee;
+				background-color: #FFFFFF;
+				margin-right: 20rpx;
+			}
+		}
+	}
+}
+</style>

+ 782 - 0
pages/order/OrderList.vue

@@ -0,0 +1,782 @@
+<template>
+	<view class="order-out-box">
+		<!--  v-if="$accessCheck($Access.orderQuerySearch)" -->
+		<view class="order-status-tab">
+			<view class="keyword-view clearfix">
+				<view class="float_left">
+					<view class="key-select">
+						<u-icon
+							@click="openFrom('show_key_menu')"
+							label-pos="left"
+							color="#879BBA"
+							size="28"
+							label-size="28"
+							label-color="#879BBA"
+							name="arrow-down"
+							:label="keywordType"
+						></u-icon>
+					</view>
+					<view class="search-out">
+						<u-search
+							@clear="searchConfirm()"
+							:show-action="false"
+							@search="searchConfirm()"
+							:clearabled="true"
+							placeholder="请输入……"
+							v-model="search_data.keyword"
+							height="72"
+							placeholder-color="#879BBA"
+							color="#879BBA"
+							bg-color="#ECF0F7"
+						></u-search>
+					</view>
+				</view>
+				<view class="float_right" @click="openSearch"><text class="custom-icon custom-icon-shaixuan"></text></view>
+			</view>
+			<u-tabs-swiper
+				ref="tabs"
+				font-size="26"
+				:current="status_current"
+				:list="status_list"
+				@change="statusChange"
+				:is-scroll="false"
+				inactive-color="#62738E"
+				:bar-style="{ borderRadius: '6rpx', height: '6rpx', width: '32rpx', backgroundColor: '#4076D6' }"
+				:active-item-style="{ color: '#2D405E', fontSize: '32rpx' }"
+			></u-tabs-swiper>
+		</view>
+		<view class="top">
+			<text class="float_left txt">全部订单</text>
+			<text class="float_right txt">共{{ total }}条</text>
+		</view>
+		<scroll-view
+			scroll-y
+			class="order_ul"
+			@refresherrefresh="refresherrefresh"
+			:refresher-enabled="true"
+			:refresher-triggered="refresher_triggered"
+			@scrolltolower="scrollTolower"
+			:scroll-top="scrollTop"
+		>
+			<view class="order_li" v-for="(item, index) in order_list" :key="index" @click="goPage(`/pages/order/orderInfo?userCenterId=${item.userCenterId}&id=${item.id}`)">
+				<view class="order_time clearfix">
+					<view class="float_left">
+						<view class="tag-circleRight">
+							<image
+								:src="
+									item.orderMsg === '待审核'
+										? '../../static/img/ic-audit.png'
+										: item.orderMsg === '已关闭'
+										? '../../static/img/ic-Closed.png'
+										: item.orderMsg === '已出库'
+										? '../../static/img/ic-stock.png'
+										: item.orderMsg === '已完成'
+										? '../../static/img/ic-Completed.png'
+										: item.orderMsg === '待出库'
+										? '../../static/img/ic-delivered.png'
+										: item.orderMsg === '待取消'
+										? '../../static/img/ic-cancel.png'
+										: '../../static/img/ic-delivered.png'
+								"
+								class="img"
+							></image>
+						</view>
+						<text class="txt">{{ item.no }}</text>
+					</view>
+					<view class="float_right">
+						<image
+							:src="
+								parseInt(item.payStatus) === 5
+									? '../../static/img/ic-Paid.png'
+									: parseInt(item.payStatus) === 4
+									? '../../static/img/ic-Unpaid.png'
+									: '../../static/img/ic-pay-bf.png'
+							"
+							style="width:102rpx ;height: 29rpx;"
+						></image>
+					</view>
+				</view>
+				<view class="order_bottom">
+					<view class="order_params">
+						客户名称
+						<text class="right-txt">{{ item.customerName }}</text>
+					</view>
+					<view class="order_params clearfix">
+						<view class="float_left">
+							下单时间
+							<text class="right-txt">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</text>
+						</view>
+						<view class="float_right" style="margin-right: 20rpx;"><u-button size="mini" @click="copyOrderInfo(item.userCenterId, item.id)">一键复制</u-button></view>
+					</view>
+				</view>
+				<view class="clearfix pay-status-tip" :class="[parseInt(item.payStatus) === 5 ? 'pay-success' : parseInt(item.payStatus) === 4 ? 'pay-danger' : 'pay-warning']">
+					<text class="float_left ">
+						<text class="txst">订单金额</text>
+						<text class="money-text">{{ $utils.formattedNumber(item.payAmount) }}</text>
+						【{{ item.payTypeMsg }}】
+					</text>
+					<view class="float_right txst" v-if="parseInt(item.returnStatus) !== 0">
+						<text :class="[parseInt(item.returnStatus) === 1 ? 'warning-status' : 'primary-status']">
+							{{ parseInt(item.returnStatus) === 1 ? '部分退货' : '全部退货' }}
+						</text>
+					</view>
+				</view>
+			</view>
+			<u-loadmore v-if="order_list.length" :status="load_status" />
+			<view v-if="!order_list.length" class="empty-view"><u-empty text="暂无订单" mode="order"></u-empty></view>
+		</scroll-view>
+		<u-popup v-model="search_show" mode="right">
+			<view class="search-pop">
+				<uniStatusBar></uniStatusBar>
+				<view class="form-view" style="padding-top: 45px;">
+					<u-form label-width="160rpx" label-position="left">
+						<u-form-item label-position="top" label="下单日期">
+							<view class="date-li">
+								<picker mode="date" @change="bindDateStartChange">
+									<text class="date-li">{{ search_data.start ? $u.timeFormat(search_data.start, 'yyyy-mm-dd') : '开始日期' }}</text>
+								</picker>
+							</view>
+							<view class="date-line">-</view>
+							<view class="date-li">
+								<picker mode="date" @change="bindDateEndChange">
+									<text class="date-li">{{ search_data.end ? $u.timeFormat(search_data.end, 'yyyy-mm-dd') : '结束日期' }}</text>
+								</picker>
+							</view>
+						</u-form-item>
+						<u-form-item label="下单客户">
+							<view class="clearfix form-val" @click="goPage('/pagesT/customer/selCustomer')">
+								<text class="float_left ellipsis">{{ search_data.customerId ? search_data.customerName : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('customerId')">
+									<u-icon :name="!search_data.customerId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+						<u-form-item label="所属店铺">
+							<view class="clearfix form-val" @click="goPage('/pagesT/shop/selShop')">
+								<text class="float_left ellipsis">{{ search_data.shopId ? search_data.shopName : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('shopId')">
+									<u-icon :name="!search_data.shopId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+						<u-form-item label="支付方式">
+							<view class="clearfix form-val" @click="goPage('/pagesT/payment/selPayment')">
+								<text class="float_left ellipsis">{{ search_data.payType ? search_data.payTypeName : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('payType')">
+									<u-icon :name="!search_data.payType ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+						<u-form-item label="客户类型">
+							<view class="clearfix form-val" @click="goPage('/pagesT/customer/selCustomerType')">
+								<text class="float_left ellipsis">{{ search_data.customerType ? search_data.customerTypeName : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('customerType')">
+									<u-icon :name="!search_data.customerType ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+						<u-form-item label="订单来源">
+							<view class="clearfix form-val" @click="openFrom('from_show')">
+								<text class="float_left ellipsis">{{ search_data.source ? search_data.sourceName : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('source')">
+									<u-icon :name="!search_data.source ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="search-btn">
+					<view class="btn-li" @click="clearValue()">重置</view>
+					<view class="btn-li" @click="searchConfirm">确定</view>
+				</view>
+			</view>
+		</u-popup>
+		<addBtn v-if="$accessCheck($Access.OrderAddAddOrder)" url="/pages/order/OrderAdd"></addBtn>
+		<u-select @confirm="fromChange" v-model="from_show" :list="order_from"></u-select>
+		<u-action-sheet @click="selKeyType" :list="keywordType_list" v-model="show_key_menu"></u-action-sheet>
+	</view>
+</template>
+
+<script>
+import uniStatusBar from '../../components/uni-status-bar.vue';
+export default {
+	components: {
+		uniStatusBar
+	},
+	props: {
+		customerData: {
+			type: [Object, String],
+			default: ''
+		},
+		shopData: {
+			type: [Object, String],
+			default: ''
+		},
+		paymentData: {
+			type: [Object, String],
+			default: ''
+		},
+		customerTypeData: {
+			type: [Object, String],
+			default: ''
+		}
+	},
+	data() {
+		return {
+			refresher_triggered: false, //设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
+			from_show: false,
+			search_show: false,
+			pay_type_list: [],
+			pay_index: 0,
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			status_current: 0, // 状态current
+			order_state: 'all', // 订单状态
+			order_list: [], // 订单列表
+			keywordType: '单据编号',
+			show_key_menu: false,
+			search_data: {
+				keywordType: '',
+				keyword: '',
+				payType: '',
+				payTypeName: '',
+				start: '',
+				end: '',
+				customerId: '',
+				customerName: '',
+				customerType: '',
+				customerTypeName: '',
+				source: '',
+				sourceName: '',
+				shopId: '',
+				shopName: ''
+			},
+			order_from: [
+				{
+					label: 'ios',
+					value: 1
+				},
+
+				{
+					label: '安卓',
+					value: 2
+				},
+				{
+					label: '微信小程序',
+					value: 3
+				},
+				{
+					label: '后台创建',
+					value: 4
+				},
+				{
+					label: 'H5页面',
+					value: 5
+				},
+				{
+					label: 'pc页面',
+					value: 6
+				},
+				{
+					label: '字节跳动小程序',
+					value: 8
+				}
+			],
+			status_list: [
+				{
+					value: 'all',
+					name: '全部'
+				},
+				{
+					// 新订单
+					value: 'waitAudit',
+					name: '待审核'
+				},
+				{
+					// 等待出库
+					value: 'waitOutStock',
+					name: '待出库'
+				},
+				{
+					// 已出库
+					value: 'hasOutStock',
+					name: '已出库'
+				},
+				{
+					// 已收货
+					value: 'finish',
+					name: '已完成'
+				},
+				{
+					// 已取消
+					value: 'close',
+					name: '已关闭'
+				}
+			],
+			scrollTop: -1,
+			keywordType_list: [
+				{
+					text: '单据编号',
+					value: 1
+				},
+				{
+					text: '自提码',
+					value: 2
+				},
+				{
+					text: '商品名称',
+					value: 3
+				},
+				{
+					text: '商品编码',
+					value: 4
+				},
+				{
+					text: '收货人',
+					value: 5
+				},
+				{
+					text: '电话',
+					value: 6
+				},
+				{
+					text: '业务员',
+					value: 7
+				},
+				{
+					text: '详细地址',
+					value: 8
+				}
+			]
+		};
+	},
+	watch: {
+		customerData(val) {
+			if (val) {
+				this.search_data.customerName = val.name;
+				this.search_data.customerId = val.id;
+			}
+		},
+		// 店铺
+		shopData(val) {
+			if (val) {
+				this.search_data.shopName = val.name;
+				this.search_data.shopId = val.id;
+			}
+		},
+		// 支付方式
+		paymentData(val) {
+			if (val) {
+				this.search_data.payTypeName = val.title;
+				this.search_data.payType = val.id;
+			}
+		},
+		// 客户类型
+		customerTypeData(val) {
+			if (val) {
+				this.search_data.customerTypeName = val.name;
+				this.search_data.customerType = val.id;
+			}
+		}
+	},
+	created() {
+		this.getAllOrder();
+	},
+	methods: {
+		// 复制相应信息
+		copyOrderInfo(userCenterId, orderId) {
+			this.$u.api
+				.getOrderInfoById(userCenterId, {
+					orderId: orderId
+				})
+				.then(res => {
+					const data = res.data;
+					let goods = '';
+					data.goodsData.forEach((item, index) => {
+						goods = goods + item.goodsName + '(' + (Number(item.outNum) || Number(item.buyNum)) + '件)';
+					});
+					const copyInfo = `客户:${data.customerName}\n商品:${goods} \n客户电话:${data.customerMobile}\n业务员:${data.salesManName || '无'}\n备注:${data.remark ||
+						'无'}`;
+					uni.setClipboardData({
+						data: copyInfo,
+						success: () => {
+							this.$u.toast('内容已复制');
+						}
+					});
+				});
+		},
+		// 打开订单来源选择框
+		openFrom(key) {
+			console.log(13);
+			this[key] = true;
+		},
+		// 搜索项筛选
+		selKeyType(index) {
+			this.keywordType = this.keywordType_list[index].text;
+			this.search_data.keywordType = this.keywordType_list[index].value;
+		},
+		// 订单来源筛选
+		fromChange(e) {
+			this.search_data.source = e[0].value;
+			this.search_data.sourceName = e[0].label;
+		},
+		// 上拉加载
+		scrollTolower() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getData();
+			}
+		},
+		openSearch() {
+			this.search_show = true;
+		},
+		statusChange(index) {
+			this.scrollTop = 0;
+			this.$nextTick(() => {
+				this.scrollTop = -1;
+			});
+			this.status_current = index;
+			this.order_state = this.status_list[index].value;
+			this.searchConfirm();
+		},
+		clearValue(params) {
+			if (!params) {
+				this.search_data = {
+					keyword: '',
+					payType: '',
+					payTypeName: '',
+					start: '',
+					end: '',
+					customerId: '',
+					customerName: '',
+					customerType: '',
+					customerTypeName: '',
+					source: '',
+					sourceName: '',
+					shopId: '',
+					shopName: ''
+				};
+				this.searchConfirm();
+			} else {
+				this.search_data[params] = '';
+			}
+		},
+		searchConfirm() {
+			this.search_show = false;
+			this.page = 1;
+			this.getData();
+		},
+		//  判断
+		getData() {
+			const obj = {
+				keyword: this.search_data.keyword,
+				payType: this.search_data.payType,
+				shopId: this.search_data.shopId,
+				startTime: this.search_data.start,
+				endTime: this.search_data.end,
+				customerId: this.search_data.customerId,
+				customerType: this.search_data.customerType,
+				source: this.search_data.source
+				// returnStatus: this.search_data.Return,
+				// outStatus: this.searchDate.outStatus,
+				// payStatus: this.searchDate.payStatus,
+			};
+			const isKey = this.$utils.isSerch(obj);
+			if (isKey) {
+				this.searchOrder(obj);
+			} else {
+				this.getAllOrder();
+			}
+		},
+		// 订单列表
+		getAllOrder() {
+			this.load_status = 'loading';
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize,
+				state: this.order_state
+			};
+			this.$u.api
+				.getAllOrder(params)
+				.then(res => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+					if (this.page === 1) {
+						this.order_list = res.data;
+					} else {
+						this.order_list = this.order_list.concat(res.data);
+					}
+					this.order_list = this.order_list.map(item => {
+						return {
+							...item,
+							goods_list: item.goods_list || []
+						};
+					});
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				})
+				.catch(err => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+				});
+		},
+		// 订单列表搜索
+		searchOrder(obj) {
+			this.load_status = 'loading';
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize,
+				state: this.order_state,
+				keywordType: this.search_data.keywordType,
+				...obj
+			};
+			this.$u.api
+				.keywordSearch(params)
+				.then(res => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+					if (this.page === 1) {
+						this.order_list = res.data;
+					} else {
+						this.order_list = this.order_list.concat(res.data);
+					}
+					this.order_list = this.order_list.map(item => {
+						return {
+							...item,
+							goods_list: item.goods_list || []
+						};
+					});
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				})
+				.catch(err => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+				});
+		},
+		bindDateStartChange(e) {
+			this.search_data.start = this.$utils.timeByTimestamp(e.detail.value + ' 00:00:00');
+		},
+		bindDateEndChange(e) {
+			this.search_data.end = this.$utils.timeByTimestamp(e.detail.value + ' 23:59:59');
+		},
+		// 下拉刷新
+		refresherrefresh() {
+			this.refresher_triggered = true;
+			this.page = 1;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.order-out-box {
+	.order-status-tab {
+		width: 100%;
+
+		.keyword-view {
+			padding: 20rpx 24rpx;
+			background-color: #ffffff;
+
+			.float_left {
+				width: 640rpx;
+				height: 72rpx;
+				line-height: 72rpx;
+				background-color: #ecf0f7;
+				position: relative;
+				border-radius: 40rpx;
+				padding-left: 200rpx;
+				.key-select {
+					text-align: center;
+					position: absolute;
+					left: 0;
+					height: 72rpx;
+					width: 200rpx;
+					top: 0;
+				}
+				.search-out {
+					width: 438rpx;
+				}
+				&::before {
+					content: '';
+					display: block;
+					left: 200rpx;
+					height: 40rpx;
+					width: 2rpx;
+					position: absolute;
+					background-color: #ced6e2;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+
+			.float_right {
+				line-height: 64rpx;
+				width: 50rpx;
+				text-align: center;
+				color: #666666;
+			}
+		}
+	}
+}
+
+.top {
+	width: 710rpx;
+	padding: 24rpx 0rpx 0rpx 32rpx;
+	height: 60rpx;
+	margin-bottom: 20rpx;
+
+	.txt {
+		font-size: 24rpx;
+		font-weight: 400;
+		color: #879bba;
+		line-height: 33rpx;
+	}
+}
+
+.order_ul {
+	height: calc(90vh - 226rpx);
+
+	.order_li {
+		background-color: #ffffff;
+		padding-top: 32rpx;
+		border-radius: 8rpx;
+		margin: 0 auto 24rpx;
+		width: 710rpx;
+
+		.money-text {
+			font-family: DIN-Medium;
+			color: $uni-color-error;
+			margin: 0 4rpx;
+			font-size: 28rpx;
+			font-weight: 500;
+			margin-left: 30rpx;
+		}
+
+		.order_time {
+			height: 40rpx;
+			line-height: 40rpx;
+			padding-right: 20rpx;
+			margin-bottom: 24rpx;
+			.tag-circleRight {
+				display: inline-block;
+				margin-left: 40rpx;
+				vertical-align: middle;
+				.img {
+					width: 126rpx;
+					height: 40rpx;
+					display: block;
+				}
+			}
+			.txt {
+				font-size: 28rpx;
+				font-weight: 500;
+				margin-left: 16rpx;
+				font-family: DIN-Medium;
+			}
+		}
+
+		.order_info {
+			padding: 30rpx;
+			font-size: 24rpx;
+			border-bottom: 1px solid #f7f8fa;
+		}
+
+		.remarks {
+			background-color: #f1f1f1;
+			padding: 0 30rpx;
+			height: 60rpx;
+			line-height: 60rpx;
+		}
+
+		.pay-status-tip {
+			margin-left: 0rpx;
+			color: #333333;
+			height: 89rpx;
+			vertical-align: middle;
+			padding: 25rpx 40rpx;
+			font-size: 28rpx;
+			font-weight: 400;
+			background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 195, 149, 0.1) 100%);
+
+			.txst {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #2d405e;
+			}
+		}
+		.pay-success {
+			background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 195, 149, 0.1) 100%);
+		}
+
+		.pay-danger {
+			background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(246, 119, 120, 0.1) 100%);
+		}
+		.pay-warning {
+			background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #fdf6e8 100%);
+		}
+
+		.order_bottom {
+			margin-left: 40rpx;
+			font-size: 28rpx;
+
+			.order_params {
+				margin-bottom: 24rpx;
+				color: #999999;
+
+				.right-txt {
+					font-size: 28rpx;
+					font-weight: 400;
+					color: #2d405e;
+					margin-left: 30rpx;
+				}
+
+				.float_right {
+					color: #333333;
+				}
+			}
+
+			.printing-btn {
+				position: absolute;
+				right: 30rpx;
+				top: 50%;
+				transform: translateY(-50%);
+				text-align: center;
+
+				.custom-icon-dayin {
+					font-size: 30rpx;
+				}
+			}
+
+			.btn {
+				display: flex;
+				justify-content: center;
+				margin-top: 30rpx;
+
+				.btn_some {
+					width: 200rpx;
+					height: 70rpx;
+					line-height: 70rpx;
+					text-align: center;
+					border-radius: 6rpx;
+				}
+
+				.btn_examine {
+					border: 1px solid #2979ff;
+					color: #2979ff;
+				}
+
+				.btn_order {
+					border: 1px solid #999999;
+					color: #999999;
+					margin-left: 30rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 523 - 0
pages/order/OrderReturn.vue

@@ -0,0 +1,523 @@
+<template>
+	<view class="order-out-box">
+		<view class="order-status-tab">
+			<view class="keyword-view clearfix">
+				<view class="float_left">
+					<u-search
+						@clear="searchConfirm()"
+						@search="searchConfirm()"
+						:show-action="false"
+						:clearabled="true"
+						placeholder="订单编号/退货单号/商品名称"
+						v-model="search_data.search"
+						height="72"
+						placeholder-color="#879BBA"
+						color="#879BBA"
+						bg-color="#ECF0F7"
+					></u-search>
+				</view>
+				<view class="float_right" @click="openSearch"><text class="custom-icon custom-icon-shaixuan"></text></view>
+			</view>
+		</view>
+		<scroll-view
+			scroll-y
+			class="order_ul"
+			@scrolltolower="scrollTolower"
+			@refresherrefresh="refresherrefresh"
+			:refresher-enabled="true"
+			:refresher-triggered="refresher_triggered"
+		>
+			<view class="order_li" v-for="(item, index) in order_list" :key="index" @click="goPage(`/pagesT/order/ReturnDetail?id=` + item.id)">
+				<view class="order_time clearfix">
+					<view class="float_left">
+						<view class="tag-circleRight">
+							<image
+								:src="
+									item.inStatus === 4
+										? '../../static/img/ic-delivered.png'
+										: item.inStatus === 5
+										? '../../static/img/ic-stock.png'
+										: '../../static/img/ic-delivered.png'
+								"
+								class="img"
+							></image>
+						</view>
+						<text class="txt">{{ item.no }}</text>
+					</view>
+				</view>
+				<view class="order_bottom">
+					<view class="order_params">
+						客户名称
+						<text class="right-txt">{{ item.customerName }}</text>
+					</view>
+					<view class="order_params clearfix">
+						退货时间
+						<text class="right-txt">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</text>
+					</view>
+					<view class="order_params clearfix">
+						退货数量
+						<text class="right-txt">{{ item.num }}</text>
+					</view>
+				</view>
+				<view class="clearfix pay-status-tip" :class="[parseInt(item.auditStatus) === 2 ? 'pay-success' : parseInt(item.auditStatus) === 3 ? 'pay-danger' : 'pay-warning']">
+					<text class="float_left ">
+						<text class="txst">退货金额</text>
+						<text class="money-text">{{ $utils.formattedNumber(item.returnTotalPrice) }}</text>
+					</text>
+					<view class="float_right txst">
+						<text :class="[parseInt(item.auditStatus) === 2 ? 'primary-status' : parseInt(item.auditStatus) === 3 ? 'danger-status' : 'warning-status']">
+							{{ parseInt(item.auditStatus) === 2 ? '已审核' : parseInt(item.auditStatus) === 3 ? '已驳回' : '未审核' }}
+						</text>
+					</view>
+				</view>
+			</view>
+			<view v-if="!order_list.length" class="empty-view"><u-empty text="暂无订单" mode="order"></u-empty></view>
+			<u-loadmore v-if="order_list.length" :status="load_status" />
+		</scroll-view>
+		<addBtn url="/pagesT/order/AddReturn"></addBtn>
+		<u-popup v-model="search_show" mode="right">
+			<view class="search-pop">
+				<uniStatusBar></uniStatusBar>
+				<view class="form-view" style="padding-top: 45px;">
+					<u-form label-width="160rpx" label-position="left">
+						<u-form-item label-position="top" label="退货日期">
+							<view class="date-li">
+								<picker mode="date" @change="bindDateStartChange">
+									<text class="date-li">{{ search_data.start ? $u.timeFormat(search_data.start, 'yyyy-mm-dd') : '开始日期' }}</text>
+								</picker>
+							</view>
+							<view class="date-line">-</view>
+							<view class="date-li">
+								<picker mode="date" @change="bindDateEndChange">
+									<text class="date-li">{{ search_data.end ? $u.timeFormat(search_data.end, 'yyyy-mm-dd') : '结束日期' }}</text>
+								</picker>
+							</view>
+						</u-form-item>
+						<u-form-item label="所属店铺">
+							<view class="clearfix form-val" @click="goPage('/pagesT/shop/selShop')">
+								<text class="float_left ellipsis">{{ search_data.shopId ? search_data.shopName : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('shopId')">
+									<u-icon :name="!search_data.shopId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+						<u-form-item label-position="top" label="审核状态">
+							<text
+								v-for="(item, index) in order_status"
+								:key="index"
+								class="check-li"
+								:class="[search_data.auditStatus === item.value ? 'active' : '']"
+								@click="statusChange(item)"
+							>
+								{{ item.label }}
+							</text>
+						</u-form-item>
+						<u-form-item label-position="top" label="入库状态">
+							<text
+								v-for="(item, index) in single_status"
+								:key="index"
+								class="check-li"
+								@click="stockChange(item)"
+								:class="[search_data.inStatus === item.value ? 'active' : '']"
+							>
+								{{ item.label }}
+							</text>
+						</u-form-item>
+						<u-form-item label="业务员">
+							<view class="clearfix form-val" @click="goPage('/pagesT/staff/selStaff')">
+								<text class="float_left ellipsis">{{ search_data.operatorId ? search_data.operatorName : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('operatorId')">
+									<u-icon :name="!search_data.operatorId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+				<view class="search-btn">
+					<view class="btn-li" @click="clearValue()">重置</view>
+					<view class="btn-li" @click="searchConfirm">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+import uniStatusBar from '../../components/uni-status-bar.vue';
+export default {
+	components: {
+		uniStatusBar
+	},
+	props: {
+		shopData: {
+			type: [Object, String],
+			default: ''
+		},
+		staffData: {
+			type: [Object, String],
+			default: ''
+		}
+	},
+	data() {
+		return {
+			refresher_triggered: false, //设置当前下拉刷新状态,true 表示下拉刷新已经被触发,false 表示下拉刷新未被触发
+			order_status: [{ value: 2, label: '已审核' }, { value: 1, label: '待审核' }],
+			single_status: [{ value: 4, label: '未入库' }, { value: 5, label: '已入库' }],
+			search_show: false,
+			pay_type_list: [],
+			pay_index: 0,
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			tab_current: 0, // 页面current 0,订单,1,退货单
+			order_state: 'all', // 订单状态
+			order_list: [], // 订单列表
+			search_data: {
+				inStatus: '', //入库状态
+				shopId: '', // 店铺
+				shopName: '',
+				operatorId: '', //员工
+				operatorName: '',
+				auditStatus: '', // 审核状态
+				start: '',
+				end: '',
+				search: '' //关键词
+			}
+		};
+	},
+	created() {
+		this.getAllOrderReturn();
+	},
+	watch: {
+		// 店铺
+		shopData(val) {
+			if (val) {
+				this.search_data.shopName = val.name;
+				this.search_data.shopId = val.id;
+			}
+		},
+		// 业务员
+		staffData(val) {
+			if (val) {
+				this.search_data.operatorName = val.staffName;
+				this.search_data.operatorId = val.id;
+			}
+		}
+	},
+	methods: {
+		// 打开搜索弹窗
+		openSearch() {
+			this.search_show = true;
+		},
+		// 上拉加载
+		scrollTolower() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getData();
+			}
+		},
+		// 复制
+		copy(no) {
+			uni.setClipboardData({
+				data: no,
+				success: res => {
+					uni.showToast({
+						title: '复制成功',
+						icon: 'none',
+						duration: 2000
+					});
+				}
+			});
+		},
+		// 审核状态切换
+		statusChange(row) {
+			this.search_data.auditStatus = row.value;
+		},
+		// 入库状态切换
+		stockChange(row) {
+			this.search_data.inStatus = row.value;
+		},
+		// 搜索确定
+		searchConfirm() {
+			this.search_show = false;
+			this.page = 1;
+			this.getData();
+		},
+		// 重置搜索
+		clearValue(params) {
+			if (!params) {
+				this.search_data = {
+					inStatus: '', //入库状态
+					shopId: '', // 店铺
+					shopName: '',
+					operatorId: '', //员工
+					operatorName: '',
+					auditStatus: '', // 审核状态
+					start: '',
+					end: '',
+					search: '' //关键词
+				};
+				this.searchConfirm();
+			} else {
+				this.search_data[params] = '';
+			}
+		},
+		getData() {
+			const obj = {
+				inStatus: this.search_data.inStatus, //入库状态
+				shopId: this.search_data.shopId, // 店铺
+				operatorId: this.search_data.operatorId, //员工
+				auditStatus: this.search_data.auditStatus, // 审核状态
+				start: this.search_data.start,
+				end: this.search_data.end,
+				search: this.search_data.search //关键词
+			};
+			const isKey = this.$utils.isSerch(obj);
+			if (isKey) {
+				this.searchAllOrderOut(obj);
+			} else {
+				this.getAllOrderReturn();
+			}
+		},
+		// 退货订单列表搜索
+		searchAllOrderOut(obj) {
+			this.load_status = 'loading';
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize,
+				...obj
+			};
+			this.$u.api
+				.searchAllOrderOut(params)
+				.then(res => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+					if (this.page === 1) {
+						this.order_list = res.data;
+					} else {
+						this.order_list = this.order_list.concat(res.data);
+					}
+					this.order_list = this.order_list.map(item => {
+						return {
+							...item,
+							goods_list: item.goods_list || []
+						};
+					});
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				})
+				.catch(err => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+				});
+		},
+		// 退货订单列表
+		getAllOrderReturn() {
+			this.load_status = 'loading';
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize
+			};
+			this.$u.api
+				.getAllOrderReturn(params)
+				.then(res => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+					if (this.page === 1) {
+						this.order_list = res.data;
+					} else {
+						this.order_list = this.order_list.concat(res.data);
+					}
+					this.order_list = this.order_list.map(item => {
+						return {
+							...item,
+							goods_list: item.goods_list || []
+						};
+					});
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				})
+				.catch(err => {
+					// 设置当前下拉刷新状态为false
+					this.refresher_triggered = false;
+				});
+		},
+		bindDateStartChange(e) {
+			this.search_data.start = this.$utils.timeByTimestamp(e.detail.value + ' 00:00:00');
+		},
+		bindDateEndChange(e) {
+			this.search_data.end = this.$utils.timeByTimestamp(e.detail.value + ' 23:59:59');
+		},
+		// 下拉刷新
+		refresherrefresh() {
+			this.refresher_triggered = true;
+			this.page = 1;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.order-out-box {
+	.order-status-tab {
+		width: 100%;
+		.keyword-view {
+			padding: 20rpx 24rpx;
+			background-color: #ffffff;
+			.float_left {
+				width: 640rpx;
+			}
+			.float_right {
+				line-height: 64rpx;
+				width: 50rpx;
+				text-align: center;
+				color: #666666;
+			}
+		}
+	}
+}
+
+.order_ul {
+	height: calc(90vh - 226rpx);
+	padding-top: 24rpx;
+	.order_li {
+		background-color: #ffffff;
+		padding-top: 32rpx;
+		border-radius: 8rpx;
+		margin: 0 auto 24rpx;
+		width: 710rpx;
+
+		.money-text {
+			font-family: DIN-Medium;
+			color: $uni-color-error;
+			margin: 0 4rpx;
+			font-size: 28rpx;
+			font-weight: 500;
+			margin-left: 30rpx;
+		}
+
+		.order_time {
+			height: 40rpx;
+			line-height: 40rpx;
+			padding-right: 20rpx;
+			margin-bottom: 24rpx;
+			.tag-circleRight {
+				display: inline-block;
+				margin-left: 40rpx;
+				vertical-align: middle;
+				.img {
+					width: 126rpx;
+					height: 40rpx;
+					display: block;
+				}
+			}
+			.txt {
+				font-size: 28rpx;
+				font-weight: 500;
+				margin-left: 16rpx;
+				font-family: DIN-Medium;
+			}
+		}
+
+		.order_info {
+			padding: 30rpx;
+			font-size: 24rpx;
+			border-bottom: 1px solid #f7f8fa;
+		}
+
+		.remarks {
+			background-color: #f1f1f1;
+			padding: 0 30rpx;
+			height: 60rpx;
+			line-height: 60rpx;
+		}
+
+		.pay-status-tip {
+			margin-left: 0rpx;
+			color: #333333;
+			height: 89rpx;
+			vertical-align: middle;
+			padding: 25rpx 40rpx;
+			font-size: 28rpx;
+			font-weight: 400;
+			background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 195, 149, 0.1) 100%);
+
+			.txst {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #2d405e;
+			}
+		}
+		.pay-success {
+			background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 195, 149, 0.1) 100%);
+		}
+
+		.pay-danger {
+			background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(246, 119, 120, 0.1) 100%);
+		}
+		.pay-warning {
+			background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, #fdf6e8 100%);
+		}
+
+		.order_bottom {
+			margin-left: 40rpx;
+			font-size: 28rpx;
+
+			.order_params {
+				margin-bottom: 24rpx;
+				color: #999999;
+
+				.right-txt {
+					font-size: 28rpx;
+					font-weight: 400;
+					color: #2d405e;
+					margin-left: 30rpx;
+				}
+
+				.float_right {
+					color: #333333;
+				}
+			}
+
+			.printing-btn {
+				position: absolute;
+				right: 30rpx;
+				top: 50%;
+				transform: translateY(-50%);
+				text-align: center;
+
+				.custom-icon-dayin {
+					font-size: 30rpx;
+				}
+			}
+
+			.btn {
+				display: flex;
+				justify-content: center;
+				margin-top: 30rpx;
+
+				.btn_some {
+					width: 200rpx;
+					height: 70rpx;
+					line-height: 70rpx;
+					text-align: center;
+					border-radius: 6rpx;
+				}
+
+				.btn_examine {
+					border: 1px solid #2979ff;
+					color: #2979ff;
+				}
+
+				.btn_order {
+					border: 1px solid #999999;
+					color: #999999;
+					margin-left: 30rpx;
+				}
+			}
+		}
+	}
+}
+</style>

+ 111 - 0
pages/order/index.vue

@@ -0,0 +1,111 @@
+<template>
+	<view>
+		<u-navbar :border-bottom="false" :is-back="false" title-color="#2b85e4" title=" " :background="nav_background">
+			<view class="tabs-ul">
+				<block v-for="(item, index) in list" :key="index">
+					<view v-if="$accessCheck($Access[item.access])" @click="tabChange(index)" :class="[tab_current === index ? 'tabs-on' : '']" class="tabs-li">
+						{{ item.label }}
+					</view>
+				</block>
+			</view>
+		</u-navbar>
+		<view v-if="tab_current === 0 && $accessCheck($Access['orderQuery'])">
+			<OrderList :customerData="customerData" :shopData="shopData" :paymentData="paymentData" :customerTypeData="customerTypeData" :staffData="staffData"></OrderList>
+		</view>
+		<view v-else-if="tab_current === 1 && $accessCheck($Access['ReturnWarehousingOrder'])"><OrderReturn :shopData="shopData" :staffData="staffData"></OrderReturn></view>
+		<view v-else class="empty-view"><u-empty text="没有权限" mode="order"></u-empty></view>
+		<!-- 底部tabbar -->
+		<Tabbar v-model="tabbar_current"></Tabbar>
+	</view>
+</template>
+
+<script>
+import { mapActions } from 'vuex';
+import OrderReturn from './OrderReturn.vue';
+import OrderList from './OrderList.vue';
+export default {
+	components: {
+		OrderReturn,
+		OrderList
+	},
+	data() {
+		return {
+			tabbar_current: 1,
+			nav_background: {
+				backgroundColor: '#ffffff'
+			},
+			tab_current: 0, // 页面current 0,订单,1,退货单
+			list: [
+				{
+					label: '订单',
+					access: 'orderQuery'
+				},
+				{
+					label: '退货单',
+					access: 'ReturnWarehousingOrder'
+				}
+			],
+			customerData: '',
+			shopData: '',
+			paymentData: '',
+			staffData: '',
+			customerTypeData: '',
+			search_data: {}
+		};
+	},
+	onLoad() {
+		if (!this.$store.state.hasLogin) {
+			this.logout();
+		}
+	},
+	methods: {
+		...mapActions({
+			logout: 'logout'
+		}),
+		tabChange(index) {
+			this.tab_current = index;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.tabs-ul {
+	color: #ffffff;
+	// border: 1px solid rgba($color: #ffffff, $alpha: 0.7);
+	// border-right:1rpx solid #F1F1F1;
+	// border-left:1rpx solid #F1F1F1;
+	display: flex;
+	width: 280rpx;
+	height: 64rpx;
+	font-size: 28rpx;
+	font-weight: 500;
+	line-height: 60rpx;
+	color: #ffffff;
+	background-color: #4076d6;
+	position: absolute;
+	/* #ifdef MP*/
+	right: 20rpx;
+	/*#endif*/
+	/* #ifdef H5 || APP-PLUS*/
+	left: 50%;
+	transform: translateX(-50%);
+	/*#endif*/
+	border-radius: 32rpx;
+	//       color: #FFFFFF;
+	// background-color: #4076D6;
+	.tabs-li {
+		flex: 2;
+		text-align: center;
+	}
+
+	.tabs-on {
+		background-color: #ffffff;
+		border-radius: 32rpx;
+		color: #62738e;
+		border-right: 1rpx solid #f1f1f1;
+		border-left: 1rpx solid #f1f1f1;
+		font-size: 32rpx;
+	}
+}
+</style>

+ 899 - 0
pages/order/orderInfo.vue

@@ -0,0 +1,899 @@
+<template>
+	<view class="detail-view">
+		<view class="top-view clearfix">
+			<view class="float_left">
+				<view class="status-view">
+					<text class="status-text">{{ order_detail.orderMsg }}</text>
+					<u-icon name="arrow-right" size="40"></u-icon>
+				</view>
+				<view class="cancel-reson" v-if="[6, 7].includes(order_detail.orderStatus) && order_detail.extends.cancelReason">
+					取消原因:{{ order_detail.extends.cancelReason || '无' }}
+				</view>
+			</view>
+			<view class="float_right" v-if="order_detail.deliveryType === 2 && order_detail.verifyCode">
+				<u-icon name="tags-fill" color="#ffffff"></u-icon>
+				<text style="margin-left: 10rpx;">{{ order_detail.verifyCode }}</text>
+			</view>
+		</view>
+		<view class="customer-view">
+			<view class="title clearfix">
+				<view class="float_left ellipsis" @click="copyOrderInfo">
+					<text style="margin-right: 20rpx;">{{ order_detail.customerName }}</text>
+					<u-icon color="#879BBA" margin-right="10" name="copy1" custom-prefix="custom-icon" size="28"></u-icon>
+				</view>
+				<view class="float_right">
+					<!-- <u-tag :text="order_detail.orderType === 23 ? '自提' : order_detail.deliveryName || '其他'" size="mini"
+						type="primary" mode="plain" /> -->
+					<view class="tag">{{ order_detail.orderType === 23 ? '自提' : order_detail.deliveryName || '其他' }}</view>
+				</view>
+			</view>
+			<!-- 收货地址 -->
+			<view class="delivery-view" v-if="order_detail.receiveData && order_detail.deliveryType !== 2">
+				<view class="name-top clearfix">
+					<view class="float_left ellipsis">{{ order_detail.receiveData.realName || '--' }}</view>
+					<view class="float_right mobile" @click="callPhone(order_detail.receiveData.mobile)">
+						<text>{{ order_detail.receiveData.mobile || '--' }}</text>
+						<!-- <u-icon name="arrow-right" size="22"></u-icon> -->
+					</view>
+				</view>
+				<view v-if="order_detail.receiveData.area" class="address-view">
+					{{ order_detail.receiveData.area.provinceName }} {{ order_detail.receiveData.area.cityName }} {{ order_detail.receiveData.area.districtName }}
+					{{ order_detail.receiveData.address }}
+				</view>
+			</view>
+			<!-- 自提点  -->
+			<view class="delivery-view" v-if="order_detail.deliveryType === 2 && selfRuleData && selfRuleData.name">
+				<view class="name-top clearfix">
+					<view class="float_left ellipsis">{{ selfRuleData.name || '--' }}</view>
+					<view class="float_right mobile" @click="callPhone(selfRuleData.mobile)">
+						<text>{{ selfRuleData.mobile || '--' }}</text>
+						<u-icon name="arrow-right" size="22"></u-icon>
+					</view>
+				</view>
+				<view class="address-view">{{ selfRuleData.provinceName }} {{ selfRuleData.cityName }} {{ selfRuleData.districtName }} {{ selfRuleData.address }}</view>
+				<view class="address-view" style="padding-bottom: 10rpx;">
+					营业时间:
+					<text v-if="selfRuleData.startTime && selfRuleData.endTime">{{ selfRuleData.startTime }}-{{ selfRuleData.endTime }}</text>
+					<text v-else>全天</text>
+					<text style="padding-left: 5px">{{ selfRuleData.day.join(',') }}</text>
+				</view>
+			</view>
+			<view class="remark clearfix">
+				<view class="remark_text float_left">备注:</view>
+				<view class="float_right">{{ order_detail.remark || '无' }}</view>
+			</view>
+		</view>
+		<!-- <view v-if='order_detail.orderStatus === 6 && order_detail.extends.cancelReason' class="customer-view1"
+			style="margin-top: 20rpx;">
+			<view class="title clearfix">
+				<view class="float_left ellipsis">取消原因</view>
+			</view>
+			<view class="remark">{{ order_detail.extends.cancelReason || '无' }}</view>
+		</view> -->
+		<view class="customer-view" style="margin-top: 20rpx;" v-if="order_detail.deliveryType === 3 && order_detail.logisticsData">
+			<view class="title clearfix">
+				<view class="float_left ellipsis">{{ order_detail.logisticsData.name || '匿名司机' }}</view>
+				<view class="float_right"><u-tag text="车辆信息" size="mini" type="primary" mode="plain" /></view>
+			</view>
+			<!-- 收货地址 -->
+			<view class="delivery-view">
+				<view class="name-top clearfix">
+					<view class="float_left ellipsis">车牌号:{{ order_detail.logisticsData.truckName }}</view>
+					<view class="float_right mobile" @click="callPhone(order_detail.logisticsData.truckTel)">
+						<text>{{ order_detail.logisticsData.truckTel || '--' }}</text>
+						<u-icon name="arrow-right" size="22"></u-icon>
+					</view>
+				</view>
+				<view class="address-view">{{ order_detail.logisticsData.remark }}</view>
+			</view>
+		</view>
+
+		<view class="detail-cont">
+			<view class="info-li clearfix">
+				<view class="label">订单编号</view>
+				<view class="value" @click="copy(order_detail.no)">
+					<u-icon color="#879BBA" margin-right="10" label-pos="left" :label="order_detail.no || '--'" name="copy1" custom-prefix="custom-icon" size="28"></u-icon>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">下单时间</view>
+				<view class="value">{{ $u.timeFormat(order_detail.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">出库状态</view>
+				<view class="value">
+					<text
+						:class="[
+							parseInt(order_detail.outStatus) === 4
+								? 'danger-status'
+								: parseInt(order_detail.outStatus) === 5
+								? 'success-status'
+								: parseInt(order_detail.outStatus) === 6
+								? 'warning-status'
+								: 'primary-status'
+						]"
+					>
+						{{
+							parseInt(order_detail.outStatus) === 4
+								? '未出库'
+								: parseInt(order_detail.outStatus) === 5
+								? '已出库'
+								: parseInt(order_detail.outStatus) === 6
+								? '部分出库'
+								: '其他'
+						}}
+					</text>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">收款状态</view>
+				<view class="value">
+					<text :class="[parseInt(order_detail.payStatus) === 5 ? 'success-status' : parseInt(order_detail.payStatus) === 3 ? 'warning-status' : 'danger-status']">
+						{{ parseInt(order_detail.payStatus) === 4 ? '未收款' : parseInt(order_detail.payStatus) === 5 ? '已收款' : '部分收款' }}
+					</text>
+					<text style="font-size: 22rpx;" v-if="order_detail.payStatus === 3">(剩余未支付¥{{ order_detail.notPayMoney }})</text>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">审核状态</view>
+				<view class="value">
+					<text
+						:class="[
+							parseInt(order_detail.auditStatus) === 1
+								? 'warning-status'
+								: parseInt(order_detail.auditStatus) === 2
+								? 'success-status'
+								: parseInt(order_detail.auditStatus) === 3
+								? 'danger-status'
+								: parseInt(order_detail.auditStatus) === 4
+								? 'warning-status'
+								: 'primary-status'
+						]"
+					>
+						{{
+							parseInt(order_detail.auditStatus) === 1
+								? '待审核'
+								: parseInt(order_detail.auditStatus) === 2
+								? '已通过'
+								: parseInt(order_detail.auditStatus) === 3
+								? '已驳回'
+								: parseInt(order_detail.auditStatus) === 4
+								? '审核中'
+								: '其他'
+						}}
+					</text>
+				</view>
+			</view>
+			<!-- 	<view v-if='order_detail.orderStatus === 6' class="info-li clearfix">
+				<view class="label" label-position="top">取消原因
+					<view>
+						{{order_detail.extends.cancelReason}}
+					</view>
+				</view>
+			</view> -->
+			<view class="info-li clearfix">
+				<view class="label">下单店铺</view>
+				<view class="value">{{ order_detail.shopName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">业务员</view>
+				<view class="value">{{ order_detail.salesManName || '无' }}</view>
+			</view>
+			<block v-if="order_detail.extends && order_detail.extends.bankData && order_detail.extends.bankData.image">
+				<view class="info-li clearfix">
+					<view class="label">账户名称</view>
+					<view class="value">{{ order_detail.extends.bankData.name }}</view>
+				</view>
+				<view class="info-li clearfix">
+					<view class="label">开户银行</view>
+					<view class="value">{{ order_detail.extends.bankData.bankName }}</view>
+				</view>
+				<view class="info-li clearfix">
+					<view class="label">银行账号</view>
+					<view class="value">{{ order_detail.extends.bankData.accountNumber }}</view>
+				</view>
+				<view class="info-li clearfix">
+					<view class="label">打款凭证</view>
+					<view class="value" @click="previewImage(order_detail.extends.bankData.image)">
+						<image style="width: 150rpx;height: 200rpx;" :src="order_detail.extends.bankData.image" mode="heightFix"></image>
+					</view>
+				</view>
+			</block>
+		</view>
+		<view class="goods-cont">
+			<view class="goods-title">
+				<view class="semicircle left-yuan"></view>
+				<view class="semicircle right-yuan"></view>
+				<text class="goods-title-text">{{ order_detail.shopName }}</text>
+			</view>
+			<view class="goods-ul">
+				<view class="semicircle left-yuan"></view>
+				<view class="semicircle right-yuan"></view>
+				<view v-for="(item, index) in order_detail.goodsData" :key="index" class="goods-li clearfix">
+					<view class="goods-img float_left"><image :src="item.images[0]" mode="aspectFill"></image></view>
+					<view class="float_left info">
+						<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+						<view class="goods-num clearfix">
+							<view class="float_left">
+								规格:{{ item.unitName }};
+								<block v-for="(itemS, indexS) in item.specGroup" :key="indexS">{{ itemS.specValueName }};</block>
+							</view>
+							<view class="float_right">
+								购买数量:{{ $utils.formatNub(item.buyNum) }}
+								<text v-if="item.isEq === 5 && item.u_1_buy > 0">({{ $utils.formatNub(item.u_1_buy) }}{{ item.u_1 }})</text>
+							</view>
+						</view>
+						<view class="goods-num clearfix">
+							<view class="float_left price">{{ $utils.formattedNumber(item.price) }}</view>
+							<view class="float_right">
+								发货数量:
+								<text style="color: #F67778;">{{ $utils.formatNub(item.outNum) }}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">商品总价</view>
+				<view class="value">{{ $utils.formattedNumber(order_detail.totalMoney) }}</view>
+			</view>
+			<view class="info-li  clearfix">
+				<view class="label">运费</view>
+				<view class="value">{{ $utils.formattedNumber(order_detail.expressMoney) }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">订单优惠</view>
+				<view class="value" style="color: #F67778">
+					<text class="error-color">-</text>
+					{{ $utils.formattedNumber(order_detail.orderPreferential) }}
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">优惠券优惠</view>
+				<view class="value" style="color: #F67778">
+					<text class="error-color">-</text>
+					{{ $utils.formattedNumber(order_detail.preferential) }}
+				</view>
+			</view>
+			<view class="info-li b-b clearfix">
+				<view class="label">会员卡优惠</view>
+				<view class="value" style="color: #F67778">
+					<text class="error-color">-</text>
+					{{ $utils.formattedNumber(order_detail.vipDiscount) }}
+				</view>
+			</view>
+			<view class="info-li b-b clearfix" v-if="Number(order_detail.retMoney) !== 0">
+				<view class="label">退款金额</view>
+				<view class="value">
+					<text class="error-color">-</text>
+					{{ $utils.formattedNumber(order_detail.retMoney) }}
+				</view>
+			</view>
+			<block v-if="!order_detail.payTypeMsg && order_detail.extends && order_detail.extends.admixPayData && order_detail.extends.admixPayData.length">
+				<view v-for="(item, index) in order_detail.extends.admixPayData" :key="index" class="info-li clearfix" :class="[index === 1 ? 'b-b' : '']">
+					<view class="label">{{ item.title }}</view>
+					<view class="value">{{ $utils.formattedNumber(item.payMoney) }}</view>
+				</view>
+			</block>
+			<view class="info-li clearfix total-pay-money">
+				<view class="semicircle left-yuan"></view>
+				<view class="semicircle right-yuan"></view>
+				<view class="label money-label">实付总金额</view>
+				<view class="value money-value">{{ $utils.formattedNumber(order_detail.payAmount) }}</view>
+			</view>
+			<view class="info-li bottom-info clearfix">
+				支付方式:
+				<text v-if="order_detail.payTypeMsg">{{ order_detail.payTypeMsg }}</text>
+				<text v-else>
+					<block v-if="order_detail.extends && order_detail.extends.admixPayData">
+						<text v-for="(item, index) in order_detail.extends.admixPayData" :key="index">{{ item.title }};</text>
+					</block>
+				</text>
+			</view>
+			<view class="info-li bottom-info clearfix">
+				订单来源:
+				<text>
+					{{
+						parseInt(order_detail.source) === 1
+							? 'ios'
+							: parseInt(order_detail.source) === 2
+							? '安卓'
+							: parseInt(order_detail.source) === 3
+							? '小程序'
+							: parseInt(order_detail.source) === 4
+							? '后台创建'
+							: parseInt(order_detail.source) === 5
+							? 'H5页面'
+							: parseInt(order_detail.source) === 6
+							? 'pc页面'
+							: parseInt(order_detail.source) === 8
+							? '字节跳动小程序'
+							: '其他'
+					}}
+				</text>
+				<image class="bl-line" src="../../static/img/img-bl-line.png" mode="aspectFill"></image>
+			</view>
+		</view>
+		<view class="btn-bottom-view clearfix">
+			<block v-if="order_detail.orderMsg === '待审核'">
+				<view v-if="$accessCheck($Access.orderQueryUpdateOrderStatus)" class="left-btn" @click="cancel">
+					<u-icon
+						label-pos="bottom"
+						margin-top="10rpx"
+						custom-prefix="custom-icon"
+						name="quxiaodingdan"
+						color="#B8C0C8"
+						label="取消订单"
+						label-color="#62738E"
+						label-size="20"
+						size="40"
+					></u-icon>
+				</view>
+				<view v-if="$accessCheck($Access.orderQueryUpdateAuditStatus)" class="handel-btn" @click="openModel('确定要审核通过该订单吗?', '审核')">审核</view>
+				<view
+					v-if="$accessCheck($Access.newOrderListEdit)"
+					class="handel-btn info-btn"
+					@click="goPage(`/pages/order/OrderAdd?id=${order_id}&userCenterId=${userCenterId}`)"
+				>
+					编辑订单
+				</view>
+			</block>
+			<view
+				v-if="$accessCheck($Access.orderQueryUpdateAuditStatus) && order_detail.orderMsg === '待出库'"
+				class="handel-btn info-btn"
+				@click="openModel('确定要驳回审核该订单吗?', '驳回')"
+			>
+				驳回审核
+			</view>
+			<view class="handel-btn" v-if="order_detail.orderMsg === '部分出库'" @click="openModel('是否要再次出库?', '再次出库')">再次出库</view>
+			<view class="handel-btn" v-if="order_detail.orderMsg === '待取消'" @click="openCancelAuditpop">取消审核</view>
+			<view class="handel-btn info-btn" @click="toPrint">小票打印</view>
+		</view>
+		<u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm" @cancel="modelCancel"></u-modal>
+		<u-popup v-model="show" mode="bottom">
+			<view class="pop-ul">
+				<view class="sku-name">请输入取消订单原因</view>
+				<view class="pop-li"><textarea style="width: 100%;" placeholder-class="input-pl" placeholder="请输入" v-model="cancelReason" /></view>
+				<view class="btn" @click="modelConfirm">确定</view>
+			</view>
+		</u-popup>
+		<u-popup width="660" v-model="cancel_audit_show" mode="center" border-radius="10">
+			<view class="pop-ul">
+				<view class="title">取消订单审核</view>
+				<view class="desc">客户发起取消订单:23131</view>
+				<view class="desc-tip">是否同意客户取消订单,如果拒绝,请输入拒绝原因</view>
+				<view class="pop-li" style="border: 0;">
+					<u-input placeholder-style="color:#CAD0D7;" v-model="cancelRejectReason" type="textarea" :border="true" :height="100" :auto-height="true" />
+				</view>
+				<view class="btn-view">
+					<u-button @click="cancelReject" :custom-style="{ marginRight: '20rpx' }" type="error" size="medium">拒绝</u-button>
+					<u-button @click="cancelConfirm" type="primary" size="medium">同意</u-button>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			cancelRejectReason: '',
+			cancel_audit_show: false,
+			model_tag: '',
+			model_show: false,
+			model_content: '',
+			order_id: 0,
+			order_detail: {},
+			selfRuleData: {},
+			updata_istrue: false,
+			cancle_istrue: false,
+			userCenterId: false,
+			show: false,
+			cancelReason: ''
+		};
+	},
+	onPullDownRefresh() {
+		this.getOrderInfoById();
+	},
+	computed: {
+		userInfo() {
+			return this.$store.state.userInfo;
+		}
+	},
+	onLoad(options) {
+		this.order_id = options.id;
+		this.userCenterId = options.userCenterId;
+	},
+	onShow() {
+		this.getOrderInfoById();
+	},
+	methods: {
+		// 复制相应信息
+		copyOrderInfo() {
+			const data = this.order_detail;
+			let goods = '';
+			data.goodsData.forEach((item, index) => {
+				goods = goods + item.goodsName + '(' + (Number(item.outNum) || Number(item.buyNum)) + '件)';
+			});
+			const copyInfo = `客户:${data.customerName}\n商品:${goods} \n客户电话:${data.customerMobile}\n业务员:${data.salesManName || '无'}\n备注:${data.remark || '无'}`;
+			uni.setClipboardData({
+				data: copyInfo,
+				success: () => {
+					this.$u.toast('内容已复制');
+				}
+			});
+		},
+		openCancelAuditpop() {
+			this.cancel_audit_show = true;
+		},
+		// 详情
+		getOrderInfoById() {
+			this.$u.api
+				.getOrderInfoById(this.userCenterId, {
+					orderId: this.order_id
+				})
+				.then(res => {
+					uni.stopPullDownRefresh();
+					this.order_detail = res.data;
+					this.selfRuleData = JSON.parse(res.data.selfRuleData);
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		},
+		// 打开提示框
+		openModel(content, tag) {
+			this.model_content = content;
+			this.model_show = true;
+			this.model_tag = tag;
+		},
+		// 审核
+		modelConfirm() {
+			switch (this.model_tag) {
+				case '取消订单':
+					this.updateOrderStatus();
+					break;
+				case '审核':
+					this.updateAuditStatus();
+					break;
+				case '驳回':
+					this.revokeAudit();
+					break;
+				case '再次出库':
+					this.reStockOut();
+					break;
+			}
+		},
+		modelCancel() {},
+		// 取消订单
+		updateOrderStatus() {
+			this.$u.api
+				.updateOrderStatus(this.order_detail.userCenterId, {
+					orderId: this.order_detail.id,
+					orderStatus: 6,
+					cancelReason: this.cancelReason
+				})
+				.then(res => {
+					this.$u.toast('取消成功');
+					this.show = false;
+					this.getOrderInfoById();
+				});
+		},
+		// 审核订单
+		updateAuditStatus() {
+			this.$u.api
+				.updateAuditStatus(this.order_detail.userCenterId, {
+					orderId: this.order_detail.id,
+					auditStatus: 2,
+					audit: this.userInfo.name
+				})
+				.then(res => {
+					this.$u.toast('审核成功');
+					this.getOrderInfoById();
+				});
+		},
+		// 驳回
+		revokeAudit() {
+			this.$u.api.revokeAudit(this.order_detail.id).then(res => {
+				this.$u.toast('驳回成功');
+				this.getOrderInfoById();
+			});
+		},
+		// 再次出库
+		reStockOut() {
+			this.$u.api.reStockOut(this.order_detail.id).then(res => {
+				this.$u.toast('出库成功');
+				this.getOrderInfoById();
+			});
+		},
+		previewImage(image) {
+			// 预览图片
+			uni.previewImage({
+				urls: [image],
+				longPressActions: {
+					itemList: ['发送给朋友', '保存图片', '收藏']
+				}
+			});
+		},
+		// 单据小票打印
+		toPrint() {
+			this.$u.api
+				.toPrint({
+					objectId: this.order_detail.id,
+					objectType: 1 // 销售单
+				})
+				.then(res => {
+					this.$u.toast('操作成功');
+				});
+		},
+		cancel() {
+			this.show = true;
+			this.model_tag = '取消订单';
+		},
+		async cancelReject() {
+			if (!this.cancelRejectReason) {
+				this.$u.toast('请输入拒绝原因');
+				return;
+			}
+			this.$u.api
+				.updateOrderStatus(this.order_detail.userCenterId, {
+					orderId: this.order_detail.id,
+					orderStatus: 7,
+					cancelRejectReason: this.cancelRejectReason
+				})
+				.then(res => {
+					this.$u.toast('您已拒绝客户的取消订单申请,原因是: ' + this.cancelRejectReason);
+					this.cancel_audit_show = false;
+					this.getOrderInfoById();
+				});
+		},
+		async cancelConfirm() {
+			this.$u.api
+				.updateOrderStatus(this.order_detail.userCenterId, {
+					orderId: this.order_detail.id,
+					orderStatus: 6,
+					cancelReason: '工作人员同意客户主动的发起取消订单'
+				})
+				.then(res => {
+					this.cancel_audit_show = false;
+					this.$u.toast('操作成功');
+					this.getOrderInfoById();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.detail-view {
+	padding-bottom: 100rpx;
+}
+
+.top-view {
+	background: linear-gradient($uni-color-primary, $uni-color-primary, $uni-color-primary, #f5f5f6 100%);
+	padding: 50rpx 30rpx 200rpx;
+	color: #ffffff;
+	font-size: 40rpx;
+
+	.status-text {
+		margin-right: 10rpx;
+	}
+
+	.float_right {
+		font-size: 28rpx;
+	}
+	.float_left {
+		padding-bottom: 20rpx;
+	}
+	.cancel-reson {
+		font-size: 22rpx;
+		line-height: 32rpx;
+		opacity: 0.7;
+		padding-top: 20rpx;
+	}
+}
+
+.customer-view {
+	width: 710rpx;
+	background-color: #ffffff;
+	margin: 0 auto;
+	border-radius: 8rpx;
+	transform: translateY(-200rpx);
+	.title {
+		padding: 32rpx 32rpx 24rpx;
+		.float_left {
+			font-size: 32rpx;
+			font-weight: 600;
+			width: calc(100% - 120rpx);
+			color: #2d405e;
+		}
+		.float_right {
+			.tag {
+				width: 104rpx;
+				height: 32rpx;
+				background-color: rgb(218, 248, 242);
+				color: #00c395;
+				font-size: 20rpx;
+				text-align: center;
+				line-height: 32rpx;
+			}
+		}
+	}
+
+	.delivery-view {
+		font-size: 26rpx;
+		color: #879bba;
+		margin: 0 32rpx;
+		line-height: 36rpx;
+		padding-bottom: 24rpx;
+		.name-top {
+			margin-bottom: 12rpx;
+			.float_left {
+				width: calc(100% - 220rpx);
+			}
+			.mobile {
+				font-size: 28rpx;
+				color: $uni-color-primary;
+			}
+		}
+	}
+
+	.remark {
+		border-top: 1px solid #ecf0f7;
+		line-height: 48rpx;
+		padding: 24rpx 32rpx;
+		font-size: 28rpx;
+		.remark_text {
+			color: #879bba;
+			margin-right: 16rpx;
+		}
+		.float_right {
+			width: 562rpx;
+			color: #2d405e;
+		}
+	}
+}
+
+.detail-cont {
+	width: 710rpx;
+	margin: 0 auto;
+	background-color: #ffffff;
+	border-radius: 8rpx;
+	padding: 10rpx 0;
+	overflow: hidden;
+	transform: translateY(-182rpx);
+	font-size: 28rpx;
+	color: #2d405e;
+	font-family: DINPro-Regular;
+
+	.info-li {
+		padding: 0 32rpx;
+		line-height: 80rpx;
+		.label {
+			float: left;
+			color: #879bba;
+		}
+		.value {
+			float: right;
+		}
+		.money-label {
+			font-weight: bold;
+		}
+		.money-value {
+			font-family: DIN-Medium;
+			font-size: 30rpx;
+		}
+	}
+
+	.b-b {
+		border-bottom: 1px solid #ecf0f7;
+	}
+}
+.semicircle {
+	position: absolute;
+	width: 16rpx;
+	height: 16rpx;
+	background-color: #f5f5f6;
+	border-radius: 100%;
+	bottom: -8rpx;
+	&.left-yuan {
+		left: -10rpx;
+	}
+	&.right-yuan {
+		right: -10rpx;
+	}
+}
+.goods-cont {
+	width: 710rpx;
+	margin: 0 auto;
+	background-color: #ffffff;
+	border-radius: 8rpx;
+	padding: 6rpx 0;
+	transform: translateY(-166rpx);
+	font-size: 28rpx;
+	color: #2d405e;
+	font-family: DINPro-Regular;
+	.goods-title {
+		background-color: #fff;
+		line-height: 96rpx;
+		width: 710rpx;
+		color: #2d405e;
+		font-size: 32rpx;
+		border-bottom: 1rpx dashed #ecf0f7;
+		font-weight: 600;
+		position: relative;
+		.goods-title-text {
+			margin-left: 24rpx;
+		}
+	}
+
+	.goods-ul {
+		padding: 0 24rpx 30rpx;
+		border-bottom: 1px dashed #ecf0f7;
+		position: relative;
+		.goods-li {
+			padding-top: 24rpx;
+			.goods-img {
+				margin-right: 20rpx;
+				image {
+					width: 126rpx;
+					height: 126rpx;
+					border-radius: 14rpx;
+					display: block;
+				}
+			}
+
+			.info {
+				.goods-name {
+					width: 470rpx;
+					-webkit-line-clamp: 2;
+					color: #2d405e;
+					font-size: 28rpx;
+					font-weight: 600;
+				}
+
+				.goods-num {
+					color: #62738e;
+					line-height: 50rpx;
+					font-size: 22rpx;
+					width: 510rpx;
+
+					.float_left {
+						&.price {
+							font-size: 28rpx;
+							font-weight: bold;
+							font-family: DIN-Medium;
+							color: #fa6400;
+						}
+					}
+				}
+			}
+		}
+	}
+
+	.info-li {
+		padding: 0 32rpx;
+		line-height: 80rpx;
+		color: #879bba;
+		.label {
+			float: left;
+		}
+
+		.value {
+			float: right;
+		}
+
+		.money-label {
+			font-weight: bold;
+			color: #2d405e;
+		}
+
+		.money-value {
+			font-size: 30rpx;
+			color: #2d405e;
+			font-family: DIN-Medium;
+		}
+	}
+	.total-pay-money {
+		border-top: 1rpx dashed #ecf0f7;
+		position: relative;
+		.semicircle {
+			top: -8rpx;
+		}
+	}
+	.bottom-info {
+		line-height: 70rpx;
+		color: #b8c0c8;
+		position: relative;
+		font-weight: 400;
+		.bl-line {
+			position: absolute;
+			display: block;
+			width: 710rpx;
+			height: 16rpx;
+			bottom: -16rpx;
+			left: 0;
+		}
+	}
+}
+
+.pop-ul {
+	line-height: 90rpx;
+	.sku-name {
+		font-weight: bold;
+		padding: 0 24rpx;
+	}
+
+	.pop-li {
+		padding: 24rpx;
+		border-top: 1px solid #ecf0f7;
+	}
+
+	.btn {
+		width: 100%;
+		text-align: center;
+		color: #ffffff;
+		line-height: 90rpx;
+		background-color: $uni-color-primary;
+	}
+	.title {
+		text-align: center;
+		font-size: 28rpx;
+		line-height: 80rpx;
+		border-bottom: 1px solid #ecf0f7;
+	}
+	.desc {
+		font-size: 28rpx;
+		line-height: 36rpx;
+		padding-bottom: 10rpx;
+		padding: 10rpx 20rpx 0;
+	}
+	.desc-tip {
+		font-size: 24rpx;
+		line-height: 36rpx;
+		padding-bottom: 10rpx;
+		padding: 10rpx 20rpx 0;
+		color: #879bba;
+	}
+	.btn-view {
+		text-align: center;
+		padding: 20rpx 0;
+	}
+}
+
+.btn-bottom-view {
+	position: fixed;
+	left: 0;
+	bottom: 0;
+	height: 98rpx;
+	background-color: #ffffff;
+	padding: 0 38rpx;
+	width: 100%;
+	overflow: hidden;
+	box-shadow: 0px -4rpx 32rpx 0px rgba(156, 170, 175, 0.16);
+	.left-btn {
+		margin-top: 10rpx;
+		float: left;
+	}
+	.handel-btn {
+		margin-left: 30rpx;
+		margin-top: 20rpx;
+		float: right;
+		width: 164rpx;
+		font-size: 26rpx;
+		height: 60rpx;
+		line-height: 60rpx;
+		text-align: center;
+		border-radius: 32rpx;
+		background-color: $uni-color-primary;
+		border: 1rpx solid $uni-color-primary;
+		color: #ffffff;
+		&.info-btn {
+			border: 1rpx solid #979797;
+			background-color: transparent;
+			color: #2d405e;
+		}
+	}
+}
+</style>

+ 386 - 0
pages/user/index.vue

@@ -0,0 +1,386 @@
+<template>
+	<view>
+		<view class="user-top">
+			<!-- <u-navbar title="我的" :is-back="false" :border-bottom="false" title-color="#ffffff"></u-navbar> -->
+			<view class="user-top-bg"></view>
+			<view class="e-ul">
+				<view class="e-li clearfix">
+					<view class="float_left"><image :src="enterprise.logo" mode="aspectFill"></image></view>
+					<view class="float_left en-info">
+						<view class="en-name clearfix">
+							<view class="float_left" style="margin-right: 14rpx;">{{ userInfo.name || '--' }}</view>
+							<view class="float_left" style="line-height: 36rpx;"><u-icon name="arrow-right" color="#879BBA" size="20"></u-icon></view>
+						</view>
+						<view class="shop">
+							<text class="title float_left">{{ supplier_data.roleName || '' }}</text>
+							<view class="en-time float_left">
+								<view class="en_tig1" v-if="enterprise.expireStatus">已打烊</view>
+								<view class="en_tig" v-else>营业中</view>
+							</view>
+						</view>
+					</view>
+					<!-- 	<view class="en-time">
+						<text class="en_tig" v-if="enterprise.expireStatus">已打烊</text>
+						<text class="en_tig" v-else>营业中</text>
+					</view> -->
+					<view class="enterprise">
+						<view class="enterprise_btn" @click="goPage('/pages/enterprise/index','reLaunch')">
+							<u-icon name="content_ico_city" custom-prefix="custom-icon" size="28"></u-icon>
+							<text style="margin-left: 16rpx;">切换企业</text>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="profit" v-if="userInfo.staffId">
+			<view class="tabs-view">
+				<u-tabs
+					:list="list"
+					font-size="24"
+					inactive-color="#5C79B0"
+					:is-scroll="false"
+					:current="current"
+					@change="tabChange"
+				></u-tabs>
+			</view>
+			<view class="profit-ul">
+				<view class="profit-item">
+					<view class="money"><text class="rmb-icon">¥</text>{{ $utils.formatNub(total_profit) }}</view>
+					<view class="profit-item-list">总提成</view>
+				</view>
+				<view class="profit-item" style="border-left: 2rpx solid #ECF0F7;">
+					<view class="money"><text class="rmb-icon">¥</text>{{ $utils.formatNub(proportion_profit) }}</view>
+					<view class="profit-item-list">比例提成</view>
+				</view>
+				<view class="profit-item" style="border-left: 2rpx solid #ECF0F7;">
+					<view class="money"><text class="rmb-icon">¥</text>{{ $utils.formatNub(goods_profit) }}</view>
+					<view class="profit-item-list">商品提成</view>
+				</view>
+			</view>
+		</view>
+		<view class="menu_ul">
+			<view class="model-tit">商家工具</view>
+			<view class="menu_li">
+				<view class="menu_li_cont" @click="goPage('/pages/index/WxCode')">
+					<image src="../../static/img/ic-rjtg.png" mode=""></image>
+					<view class="menu_li_text">软件推广</view>
+				</view>
+				<view class="menu_li_cont" @click="goPage('/pagesT/user/editPwd')">
+					<image src="../../static/img/ic-xgmm.png" mode=""></image>
+					<view class="menu_li_text">修改密码</view>
+				</view>
+				<view class="menu_li_cont" @click="goPage('/pagesT/user/editID')">
+					<image src="../../static/img/ic-xgzh.png" mode=""></image>
+					<view class="menu_li_text">修改账号</view>
+				</view>
+				<view class="menu_li_cont" @click="logout">
+					<image src="../../static/img/ic-tcdl.png" mode=""></image>
+					<view class="menu_li_text">退出登录</view>
+				</view>
+			</view>
+		</view>
+		<!-- 底部tabbar -->
+		<Tabbar v-model="tabbar_current"></Tabbar>
+	</view>
+</template>
+
+<script>
+import { mapActions } from 'vuex';
+export default {
+	data() {
+		return {
+			tabbar_current: 4,
+			userCenterId: '',
+			goods_profit: '', //商品收益
+			proportion_profit: '', //比例收益
+			total_profit: '', //总收益
+			current: 0,
+			list: [
+				{
+					name: '总提成'
+				},
+				{
+					name: '月提成'
+				},
+				{
+					name: '日提成'
+				}
+			],
+			supplier_data: {}
+		};
+	},
+	computed: {
+		userInfo() {
+			return this.$store.state.userInfo;
+		},
+		enterprise() {
+			return this.$store.state.enterprise;
+		}
+	},
+	onLoad() {
+		this.tabChange(0);
+		// this.onShareAppMessage();
+	},
+	onShareAppMessage(res) {
+		return {
+			title: '六牛云商',
+			path: '/pages/index/index'
+		};
+	},
+	methods: {
+		...mapActions({
+			logout: 'logout'
+		}),
+		tabChange(index) {
+			console.log(index,'切换');
+			if(!this.userInfo.staffId){
+				return
+			}
+			this.current = index;
+			this.$u.api.getStaffInfo(this.userInfo.staffId).then(res => {
+				if (this.current === 1) {
+					this.proportion_profit = res.data.rewardData.rewardMonth.order;
+					this.goods_profit = res.data.rewardData.rewardMonth.goods;
+					this.total_profit = res.data.rewardData.rewardMonth.total;
+				} else if (this.current === 2) {
+					this.proportion_profit = res.data.rewardData.rewardDay.order;
+					this.goods_profit = res.data.rewardData.rewardDay.goods;
+					this.total_profit = res.data.rewardData.rewardDay.total;
+				} else {
+					this.proportion_profit = res.data.rewardData.rewardTotal.order;
+					this.goods_profit = res.data.rewardData.rewardTotal.goods;
+					this.total_profit = res.data.rewardData.rewardTotal.total;
+				}
+				this.supplier_data = res.data;
+			});
+		},
+		...mapActions({
+			logout: 'logout'
+		}),
+		changeEn() {
+			this.goPage('/pages/enterprise/index');
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.profit {
+	width: 690rpx;
+	margin: 0 auto;
+	border-radius: 8rpx;
+	box-shadow: 0rpx 40rpx 40rpx -20rpx rgba(45, 64, 94, 0.06);
+	overflow: hidden;
+	.tabs-view {
+		border-bottom: 1rpx solid #f1f1f1;
+	}
+
+	.profit-ul {
+		padding: 30rpx 0;
+		display: flex;
+		background-color: #ffffff;
+		border-radius: 10rpx;
+
+		.profit-item {
+			flex: 3;
+			text-align: center;
+			font-weight: bold;
+
+			.money {
+				font-size: 32rpx;
+				color: $uni-color-primary;
+				font-weight: bold;
+				font-family: DIN-Medium;
+				.rmb-icon{
+					font-size: 24rpx;
+				}
+			}
+
+			.profit-item-list {
+				font-weight: 400;
+				margin-top: 10rpx;
+				font-size: 22rpx;
+				color: #62738e;
+			}
+		}
+	}
+}
+
+.btn-view {
+	width: 600rpx;
+	margin: 0 auto;
+}
+
+.user-top {
+	background-size: 100% 100%;
+	padding-bottom: 64rpx;
+	.user-top-bg {
+		position: absolute;
+		top: 0;
+		right: 0;
+		width: 585rpx;
+		height: 208rpx;
+		background: linear-gradient(315deg, #00fa69 0%, #ffed81 100%);
+		opacity: 0.2;
+		filter: blur(50rpx);
+	}
+
+	.e-ul {
+		padding-top: 120rpx;
+
+		.e-li {
+			width: 700rpx;
+			margin: 50rpx auto 0;
+			color: #fff;
+			border-radius: 10rpx;
+			padding: 0 20rpx;
+			position: relative;
+
+			image {
+				width: 98rpx;
+				height: 98rpx;
+				border-radius: 100%;
+				margin-right: 16rpx;
+				background-color: #ffffff;
+				border: 2rpx solid #FFFFFF;
+			}
+
+			.en-time {
+				margin-top: 6rpx;
+				margin-left: 16rpx;
+				.en_tig {
+					width: 124rpx;
+					height: 32rpx;
+					background-color: rgb(203, 238, 226);
+					color: #00c395;
+					font-size: 20rpx;
+					line-height: 32rpx;
+					text-align: center;
+				}
+
+				.en_tig1 {
+					width: 124rpx;
+					height: 32rpx;
+					background-color: rgb(255, 232, 233);
+					color: rgb(255, 109, 116);
+					font-size: 20rpx;
+					line-height: 32rpx;
+					text-align: center;
+				}
+			}
+
+			.enterprise {
+				position: absolute;
+				right: 0;
+				top: 50%;
+				transform: translateY(-50%);
+
+				.enterprise_btn {
+					width: 208rpx;
+					height: 64rpx;
+					font-size: 28rpx;
+					color: #fff;
+					background-color: #2d405e;
+					line-height: 64rpx;
+					text-align: center;
+					border-radius: 64rpx;
+				}
+			}
+
+			.en-info {
+				.en-name {
+					padding-top: 10rpx;
+					font-weight: 700;
+					font-size: 30rpx;
+					color: #2d405e;
+				}
+
+				.shop {
+					margin-top: 10rpx;
+					font-size: 26rpx;
+
+					.title {
+						color: #b8c0c8;
+						opacity: 0.8;
+					}
+				}
+			}
+		}
+	}
+
+	.user_info {
+		display: flex;
+		color: #fff;
+		padding: 30rpx;
+		align-items: center;
+		font-size: 32rpx;
+
+		.user_set {
+			flex: 1;
+			text-align: center;
+
+			.tip {
+				margin-top: 10rpx;
+				font-size: 24rpx;
+			}
+		}
+
+		.user_line {
+			flex: 1;
+			height: 60rpx;
+			line-height: 60rpx;
+			text-align: center;
+		}
+	}
+}
+
+.menu_ul {
+	background-color: #fff;
+	margin-bottom: 30rpx;
+	font-size: 26rpx;
+	width: 690rpx;
+	margin: 40rpx auto 0;
+	border-radius: 8rpx;
+	box-shadow: 0rpx 40rpx 40rpx -20rpx rgba(45, 64, 94, 0.06);
+
+	.model-tit {
+		padding: 0 32upx;
+		line-height: 88upx;
+		font-weight: bold;
+		font-size: 28rpx;
+		color: #2d405e;
+	}
+
+	.menu_li {
+		width: 100%;
+		display: flex;
+		padding-bottom: 40rpx;
+
+		.menu_li_cont {
+			margin-top: 16rpx;
+			flex: 1;
+			text-align: center;
+			image {
+				margin: 0 auto;
+				width: 72rpx;
+				height: 72rpx;
+			}
+			.menu_li_text {
+				font-size: 26rpx;
+				color: #2d405e;
+				margin-top: 16rpx;
+			}
+		}
+	}
+	.menu_li_btm {
+		width: 100%;
+		height: 112rpx;
+		line-height: 112rpx;
+		text-align: center;
+		image {
+			width: 290rpx;
+			height: 24rpx;
+		}
+	}
+}
+</style>

+ 421 - 0
pagesT/Finance/AddApplyReceipt.vue

@@ -0,0 +1,421 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="150" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="收款单位" prop="customerName">
+					<u-input @click="goPage('/pagesT/customer/selCustomer')" class="dis-input" disabled
+						v-model="add_form.customerName" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="收款人">
+					<view class="form-value">{{ add_form.operatorName }}</view>
+				</u-form-item>
+				<u-form-item label="当前应收">
+					<view class="form-value">{{ $utils.formattedNumber(add_form.receivable) }}</view>
+				</u-form-item>
+				<u-form-item label='所属店铺'>
+					<view class="clearfix form-val" @click="goPage('/pagesT/shop/selShop')">
+						<view class="float_right" @click.stop="add_form.shopId = ''">
+							<u-icon :name="!add_form.shopId ? 'arrow-right' : 'close-circle-fill'" size="28"
+								color="#999999">
+							</u-icon>
+						</view>
+						<text class="float_right ellipsis">{{ add_form.shopId ? add_form.shopName : '请选择' }}</text>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="收款单明细">
+					<view class="form-value add-btn-go" @click="addAccount">
+						<u-icon name="plus" size="24"></u-icon>
+						<text>添加收款</text>
+					</view>
+				</u-form-item>
+				<view class="detail-ul">
+					<view class="detail-li" v-for="(item, index) in add_form.receiptRequisitionAccountDate"
+						:key="index">
+						<view class="del-icon" @click="delAccount(index)">
+							<u-icon name="minus-circle-fill" size="40" color="#fa3534"></u-icon>
+						</view>
+						<view class="title clearfix">
+							<view class="float_left">结算方式</view>
+							<view class="float_right" @click="openMethods(index)">
+								<text>{{ item.settlementMethod !== '' ? pay_type_list[item.settlementMethod - 1].label : '请选择' }}</text>
+								<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+							</view>
+						</view>
+						<u-form-item label='结算账户'>
+							<view class="clearfix form-val" @click="settlementAccount(index)">
+								<view class="float_right" @click.stop="delsettlementAccount">
+									<u-icon :name="!item.accountId ? 'arrow-right' : 'close-circle-fill'" size="28"
+										color="#999999">
+									</u-icon>
+								</view>
+								<text
+									class="float_right ellipsis">{{ item.accountId ? item.accountName : '请选择' }}</text>
+							</view>
+						</u-form-item>
+						<view class="money-ul">
+							<view class="money-li"><input type="digit" @blur="moneyChange(index)"
+									v-model="item.collectionAmount" placeholder="收款金额" /></view>
+							<view class="money-li"><input type="digit" @blur="moneyChange(index)"
+									v-model="item.preferentialAmount" placeholder="优惠金额" /></view>
+							<view class="money-li"><input type="digit" v-model="item.actualAmount" placeholder="实收金额" />
+							</view>
+						</view>
+						<view class="bottom clearfix"><input type="text" v-model="item.remark" placeholder="备注" />
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="收款总额">
+					<view class="form-value">{{ totalCollectionAmount }}</view>
+				</u-form-item>
+				<u-form-item label="优惠总额">
+					<view class="form-value">{{ totalPreferentialAmount }}</view>
+				</u-form-item>
+				<u-form-item label="实收总额">
+					<view class="form-value">{{ totalActualAmount }}</view>
+				</u-form-item>
+			</view>
+		</u-form>
+		<u-select @confirm="methodsConfirm" v-model="methods_show" :list="pay_type_list"></u-select>
+		<view class="detail-bottom">
+			<view class="handel-btn" @click="submit">提交订单</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				rules: {
+					customerName: [{
+						required: true,
+						message: '请选择收款单位',
+						trigger: ['change', 'blur']
+					}]
+				},
+				add_form: {
+					customerId: '',
+					customerName: '',
+					operatorId: '',
+					operatorName: '',
+					receivable: '',
+					shopId: "",
+					shopName: "",
+					receiptRequisitionAccountDate: [{
+						collectionAmount: '',
+						preferentialAmount: '',
+						actualAmount: '',
+						settlementMethod: '',
+						remark: '',
+						accountName: "",
+						accountId: "",
+					}]
+				},
+				methods_show: false,
+				account_index: 0,
+				pay_type_list: [{
+						value: 1,
+						label: '当面现金'
+					},
+					{
+						value: 2,
+						label: '私人微信'
+					},
+					{
+						value: 3,
+						label: '私人支付宝'
+					},
+					{
+						value: 4,
+						label: '私人银行卡'
+					},
+					{
+						value: 5,
+						label: '公司公户'
+					},
+					{
+						value: 6,
+						label: '公司微信'
+					},
+					{
+						value: 7,
+						label: '公司支付宝'
+					},
+					{
+						value: 8,
+						label: '公司银行卡'
+					}
+				],
+				customerData: '',
+				account_id: '',
+				shopData: {},
+				AccountData: {},
+				index: ''
+			};
+		},
+		computed: {
+			userInfo() {
+				return this.$store.state.userInfo;
+			},
+			// 收款总额
+			totalCollectionAmount() {
+				if (!this.add_form.receiptRequisitionAccountDate.length) {
+					return 0;
+				} else if (this.add_form.receiptRequisitionAccountDate.length === 1) {
+					return Number(this.add_form.receiptRequisitionAccountDate[0].collectionAmount);
+				} else {
+					let sum = 0;
+					this.add_form.receiptRequisitionAccountDate.forEach(item => {
+						sum = this.$NP.plus(sum, Number(item.collectionAmount) || 0);
+					});
+					return sum;
+				}
+			},
+			// 优惠总额
+			totalPreferentialAmount() {
+				if (!this.add_form.receiptRequisitionAccountDate.length) {
+					return 0;
+				} else if (this.add_form.receiptRequisitionAccountDate.length === 1) {
+					return Number(this.add_form.receiptRequisitionAccountDate[0].preferentialAmount);
+				} else {
+					let sum = 0;
+					this.add_form.receiptRequisitionAccountDate.forEach(item => {
+						sum = this.$NP.plus(sum, Number(item.preferentialAmount) || 0);
+					});
+					return sum;
+				}
+			},
+			// 实收总额
+			totalActualAmount() {
+				if (!this.add_form.receiptRequisitionAccountDate.length) {
+					return 0;
+				} else if (this.add_form.receiptRequisitionAccountDate.length === 1) {
+					return Number(this.add_form.receiptRequisitionAccountDate[0].actualAmount);
+				} else {
+					let sum = 0;
+					this.add_form.receiptRequisitionAccountDate.forEach(item => {
+						sum = this.$NP.plus(sum, Number(item.actualAmount) || 0);
+					});
+					return sum;
+				}
+			}
+		},
+		watch: {
+			customerData(val) {
+				if (val) {
+					this.add_form.customerId = val.id;
+					this.add_form.customerName = val.name;
+					this.add_form.receivable = val.money;
+				}
+			},
+			// 店铺
+			shopData(val) {
+				if (val) {
+					this.add_form.shopName = val.name;
+					this.add_form.shopId = val.id;
+				}
+			},
+			AccountData(val) {
+				if (val) {
+					console.log(val);
+					this.add_form.receiptRequisitionAccountDate[this.index].accountId = val.id
+					this.add_form.receiptRequisitionAccountDate[this.index].accountName = val.name
+				}
+			}
+		},
+		onLoad(options) {
+			if (options.id) {
+				this.account_id = options.id;
+				uni.setNavigationBarTitle({
+					title: '编辑收款申请单'
+				});
+				this.getReceiptRequisitionInfo();
+			} else {
+				this.add_form.operatorId = this.userInfo.userCenterId;
+				this.add_form.operatorName = this.userInfo.name;
+			}
+		},
+		methods: {
+			// 详情
+			getReceiptRequisitionInfo() {
+				this.$u.api.getReceiptRequisitionInfo(this.account_id).then(({
+					data
+				}) => {
+					this.add_form = {
+						customerId: data.customerId,
+						customerName: data.customerName,
+						operatorId: data.operatorId,
+						operatorName: data.operatorName,
+						receivable: data.receivable,
+						receiptRequisitionAccountDate: data.accountList.map(item => {
+							return {
+								...item,
+								settlementMethod: item.settlementMethod
+							};
+						})
+					};
+				});
+			},
+			openMethods(index) {
+				this.methods_show = true;
+				this.account_index = index;
+			},
+			methodsConfirm(arr) {
+				this.add_form.receiptRequisitionAccountDate[this.account_index].settlementMethod = arr[0].value;
+			},
+			addAccount() {
+				this.add_form.receiptRequisitionAccountDate.push({
+					collectionAmount: '',
+					preferentialAmount: '',
+					actualAmount: '',
+					settlementMethod: '',
+					remark: ''
+				});
+			},
+			delAccount(index) {
+				if (this.add_form.receiptRequisitionAccountDate.length === 1) {
+					this.$u.toast('至少保留一条');
+					return;
+				}
+				this.add_form.receiptRequisitionAccountDate.splice(index, 1);
+			},
+			moneyChange(index) {
+				const target = this.$u.deepClone(this.add_form.receiptRequisitionAccountDate);
+				//优惠金额不能大于收款金额
+				if (Number(target[index].preferentialAmount) > Number(target[index].collectionAmount)) {
+					target[index].preferentialAmount = Number(target[index].collectionAmount);
+				}
+				let collectionAmount = target[index].collectionAmount;
+				let preferentialAmount = target[index].preferentialAmount;
+				target[index].actualAmount = this.$NP.minus(collectionAmount, preferentialAmount);
+				this.add_form.receiptRequisitionAccountDate = target;
+			},
+			//  添加
+			submit() {
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						const params = {
+							...this.add_form,
+							totalCollectionAmount: this.totalCollectionAmount,
+							totalPreferentialAmount: this.totalPreferentialAmount,
+							totalActualAmount: this.totalActualAmount
+						};
+						let isSub = true;
+						for (let i in this.add_form.receiptRequisitionAccountDate) {
+							let item = this.add_form.receiptRequisitionAccountDate[i];
+							if (!item.collectionAmount) {
+								isSub = false;
+								this.$u.toast('请输入收款金额');
+								break;
+							}
+							if (!item.settlementMethod) {
+								isSub = false;
+								this.$u.toast('请选择结算方式');
+								break;
+							}
+							if(!item.accountId) {
+								isSub = false;
+								this.$u.toast('请选择结算账户');
+								break;
+							}
+						}
+						if (!isSub) {
+							return;
+						}
+						if (this.account_id) {
+							this.$u.api.editReceiptRequisition(this.account_id, params).then(res => {
+								this.$u.toast('修改成功');
+								setTimeout(() => {
+									uni.navigateBack();
+								}, 1500);
+							});
+						} else {
+							this.$u.api.addReceiptRequisition(params).then(res => {
+								this.$u.toast('新增成功');
+								setTimeout(() => {
+									uni.navigateBack();
+								}, 1500);
+							});
+						}
+					}
+				});
+			},
+			settlementAccount(index) {
+				if (!this.add_form.shopId) {
+					this.$u.toast('必须先选择商铺');
+					return
+				}
+				this.goPage('/pagesT/account/selAccount')
+				this.index = index
+			},
+			delsettlementAccount() {
+				this.add_form.receiptRequisitionAccountDate[this.index].accountId = "";
+				this.add_form.receiptRequisitionAccountDate[this.index].accountName = "";
+			}
+		},
+		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.detail-ul {
+		.detail-li {
+			padding-left: 60rpx;
+			position: relative;
+			border-bottom: 1px solid #eeeeee;
+
+			&:last-child {
+				border-bottom: 0 none;
+			}
+
+			.del-icon {
+				position: absolute;
+				top: 50%;
+				left: 0;
+				transform: translateY(-50%);
+			}
+
+			.title {
+				line-height: 80rpx;
+			}
+
+			.money-ul {
+				border-top: 1px solid #eeeeee;
+				padding: 20rpx 0;
+				display: flex;
+
+				.money-li {
+					flex: 3;
+					border-right: 1px solid #eeeeee;
+
+					input {
+						height: 80rpx;
+						line-height: 80rpx;
+						text-align: center;
+					}
+
+					&:last-child {
+						border-right: 0 none;
+					}
+				}
+			}
+
+			.bottom {
+				border-top: 1px solid #eeeeee;
+
+				input {
+					height: 80rpx;
+					line-height: 80rpx;
+				}
+			}
+		}
+	}
+</style>

+ 196 - 0
pagesT/Finance/ApplyReceipt.vue

@@ -0,0 +1,196 @@
+<template>
+	<view>
+		<view class="tabs-view">
+			<view class="keyword-view clearfix">
+				<u-search :clearabled="true" @custom="searchData" @search="searchData" @clear="searchData" placeholder="客户名称" v-model="keyword"></u-search>
+			</view>
+			<u-tabs-swiper ref="tabs" font-size="28" :current="tabs_current" :list="status_list" @change="statusChange" :is-scroll="false"></u-tabs-swiper>
+		</view>
+
+		<view class="list-ul">
+			<view
+				class="list-li"
+				v-for="(item, index) in receipt_list"
+				:key="index"
+				@click="goPage('/pagesT/Finance/ApplyReceiptDetail?id=' + item.id + '&time=' + item.createTime)"
+			>
+				<view class="title clearfix">
+					<view class="float_left">{{ item.customerName }}</view>
+					<view class="float_right">
+						<text class="success-status" v-if="item.auditStatus === 2">已审核</text>
+						<text class="warning-status" v-else>待审核</text>
+						<text class="custom-icon custom-icon-jinru"></text>
+					</view>
+				</view>
+				<view class="list-cont">
+					<view class="list-cont-li" @click.stop="copy(item.no)">
+						<text style="margin-right: 20rpx;">{{ item.no }}</text>
+						<u-icon name="copy" custom-prefix="custom-icon" size="22"></u-icon>
+					</view>
+					<view class="list-cont-li clearfix">
+						<view class="float_left">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd') }}</view>
+						<view class="float_right price">{{ $utils.formattedNumber(item.totalActualAmount) }}</view>
+					</view>
+				</view>
+			</view>
+			<view v-if="!receipt_list.length" class="empty-view"><u-empty text="暂无数据" mode="list"></u-empty></view>
+			<u-loadmore v-if="receipt_list.length" :status="load_status" />
+		</view>
+		<addBtn v-if="$accessCheck($Access.addApplyReceipt)" url="/pagesT/Finance/AddApplyReceipt"></addBtn>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			receipt_list: [],
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			tabs_current: 0,
+			keyword: '',
+			search_show: false,
+			status_list: [
+				{
+					value: '',
+					name: '全部'
+				},
+				{
+					value: 1,
+					name: '待审核'
+				},
+				{
+					value: 2,
+					name: '已审核'
+				}
+			],
+			billStatus: '',
+			customerName: '',
+			customerId: '',
+			customerData: ''
+		};
+	},
+	onShow() {
+		this.page = 1;
+		this.getAllReceiptRequisition();
+	},
+	onReachBottom() {
+		if (this.tab_current === 0) {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllReceiptRequisition();
+			}
+		}
+	},
+	onPullDownRefresh() {
+		this.getAllReceiptRequisition();
+	},
+	methods: {
+		getAllReceiptRequisition() {
+			this.load_status = 'loading';
+			this.$u.api
+				.getAllReceiptRequisition({
+					page: this.page,
+					pageSize: this.pageSize,
+					operatorName: '',
+					custormerName: this.keyword,
+					auditStatus: this.billStatus
+				})
+				.then(res => {
+					uni.stopPullDownRefresh();
+					if (this.page === 1) {
+						this.receipt_list = res.data;
+					} else {
+						this.receipt_list = this.receipt_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		},
+		statusChange(index) {
+			this.tabs_current = index;
+			this.billStatus = this.status_list[index].value;
+			this.searchData();
+		},
+		searchData() {
+			this.page = 1;
+			this.getAllReceiptRequisition();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.tabs-view {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	background-color: #ffffff;
+	z-index: 99;
+	.keyword-view {
+		padding: 20rpx 24rpx 0;
+
+		.float_left {
+			width: 640rpx;
+		}
+
+		.float_right {
+			line-height: 64rpx;
+			width: 50rpx;
+			text-align: center;
+			color: #666666;
+		}
+	}
+}
+
+.list-ul {
+	padding-top: 160rpx;
+
+	.list-li {
+		width: 710rpx;
+		border-radius: 20rpx;
+		margin: 20rpx auto;
+		padding: 10rpx 24rpx 30rpx;
+		margin-top: 20rpx;
+		background-color: #ffffff;
+
+		.title {
+			line-height: 80rpx;
+			border-bottom: 1px solid #eeeeee;
+
+			.float_left {
+				font-weight: bold;
+			}
+
+			.float_rigth {
+				.custom-icon-jinru {
+					margin-left: 10rpx;
+					font-size: 28rpx;
+				}
+			}
+		}
+
+		.list-cont {
+			margin-top: 10rpx;
+
+			.list-cont-li {
+				color: #6c6c6c;
+				line-height: 40rpx;
+				font-size: 24rpx;
+
+				.price {
+					font-weight: bold;
+					font-size: 26rpx;
+					color: $uni-color-error;
+				}
+			}
+		}
+	}
+}
+</style>

+ 206 - 0
pagesT/Finance/ApplyReceiptDetail.vue

@@ -0,0 +1,206 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="150" :model="form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item label="单据编号">
+					<view class="form-value">{{ detail_data.no }}</view>
+				</u-form-item>
+				<u-form-item label="收款单位">
+					<view class="form-value">{{ detail_data.customerName }}</view>
+				</u-form-item>
+				<u-form-item label="当前应收">
+					<view class="form-value">{{ $utils.formattedNumber(detail_data.receivable) }}</view>
+				</u-form-item>
+				<u-form-item label="收款人">
+					<view class="form-value">{{ detail_data.operatorName }}</view>
+				</u-form-item>
+				<u-form-item label="收款时间">
+					<view class="form-value">{{ $u.timeFormat(detail_data.createTime, 'yyyy-mm-dd') }}</view>
+				</u-form-item>
+				<u-form-item label="所属店铺">
+					<view class="form-value">{{ detail_data.shopName }}</view>
+				</u-form-item>
+				<u-form-item label="单据状态">
+					<view class="form-value">
+						<text class="success-status" v-if="detail_data.auditStatus === 2">已审核</text>
+						<text class="warning-status" v-else>待审核</text>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="detail-ul">
+				<view class="detail-li" v-for="(item, index) in detail_data.receiptRequisitionAccountDate" :key="index">
+					<view class="title">{{ statusText(item.settlementMethod) }}</view>
+					<view class="other-ul">
+						<view class="other-li">收款:{{ $utils.formattedNumber(item.collectionAmount) }}</view>
+						<view class="other-li">优惠:{{ $utils.formattedNumber(item.preferentialAmount) }}</view>
+						<view class="other-li">
+							实收:
+							<text class="money">{{ $utils.formattedNumber(item.actualAmount) }}</text>
+						</view>
+					</view>
+					<view class="remark">备注:{{ item.remark || '无' }}</view>
+				</view>
+			</view>
+		</u-form>
+		<view class="detail-bottom" v-if="detail_data.auditStatus !== 2">
+			<view class="handel-btn" v-if="$accessCheck($Access.auditApplyReceipt)" @click="openModel('确定要审核通过该收款申请单吗?', '审核')">审核</view>
+			<view class="handel-btn" v-if="$accessCheck($Access.editApplyReceipt)" @click="goPage(`/pagesT/Finance/AddApplyReceipt?id=${id}`)">编辑</view>
+		</view>
+		<u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm" @cancel="modelCancel"></u-modal>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			model_tag: '',
+			model_show: false,
+			model_content: '',
+			pay_type_list: [
+				{
+					value: 1,
+					label: '当面现金'
+				},
+				{
+					value: 2,
+					label: '私人微信'
+				},
+				{
+					value: 3,
+					label: '私人支付宝'
+				},
+				{
+					value: 4,
+					label: '私人银行卡'
+				},
+				{
+					value: 5,
+					label: '公司公户'
+				},
+				{
+					value: 6,
+					label: '公司微信'
+				},
+				{
+					value: 7,
+					label: '公司支付宝'
+				},
+				{
+					value: 8,
+					label: '公司银行卡'
+				}
+			],
+			add_form: {
+				title: '',
+				provinceCode: '',
+				cityCode: '',
+				districtCode: '',
+				address: '',
+				realName: '',
+				mobile: '',
+				enableStatus: 5,
+				sex: 0,
+				phone: '',
+				position: '',
+				email: '',
+				remark: '',
+				accountName: '',
+				bankName: '',
+				bankCard: ''
+			},
+			id: '',
+			detail_data: []
+		};
+	},
+	onLoad(options) {
+		this.id = options.id;
+	},
+	onShow() {
+		this.getReceiptRequisitionInfo();
+	},
+	onPullDownRefresh() {
+		this.getReceiptRequisitionInfo();
+	},
+	methods: {
+		getReceiptRequisitionInfo() {
+			this.$u.api.getReceiptRequisitionInfo(this.id).then(res => {
+				this.detail_data = res.data;
+			});
+		},
+		statusText(val) {
+			const data = this.pay_type_list.find(item => item.value === val);
+			if (data) {
+				return data.label;
+			} else {
+				return '其他';
+			}
+		},
+		// 打开提示框
+		openModel(content, tag) {
+			this.model_content = content;
+			this.model_show = true;
+			this.model_tag = tag;
+		},
+		modelConfirm() {
+			switch (this.model_tag) {
+				case '审核':
+					this.updateReceiptRequisitionStatus();
+					break;
+			}
+		},
+		updateReceiptRequisitionStatus() {
+			this.$u.api
+				.updateReceiptRequisitionStatus({
+					id: this.id,
+					createTime: this.detail_data.createTime
+				})
+				.then(res => {
+					this.$u.toast('操作成功');
+					this.getReceiptRequisitionInfo();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.detail-ul {
+	.detail-li {
+		width: 710rpx;
+		margin: 20rpx auto;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		padding: 30rpx 24rpx;
+		.title {
+			font-weight: bold;
+		}
+		.other-ul {
+			display: flex;
+			padding-top: 20rpx;
+			.other-li {
+				flex: 3;
+				font-size: 24rpx;
+				text-align: center;
+				.money {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: $uni-color-error;
+				}
+				&:first-child {
+					text-align: left;
+				}
+				&:last-child {
+					text-align: right;
+				}
+			}
+		}
+
+		.remark {
+			border-top: 1px solid #eeeeee;
+			padding-top: 20rpx;
+			margin-top: 20rpx;
+		}
+	}
+}
+</style>

+ 248 - 0
pagesT/Finance/CustomerBalance.vue

@@ -0,0 +1,248 @@
+<template>
+	<view v-if="$accessCheck($Access.CustomerBalanceGetAllCustomerBalance)">
+		<view class="tabs-view">
+			<view class="keyword-view clearfix">
+				<u-search
+					disabled
+					@custom="clearValue"
+					action-text="重置"
+					:clearabled="true"
+					placeholder="请选择客户"
+					v-model="keyword"
+					@click="goPage('/pagesT/customer/selCustomer')"
+				></u-search>
+			</view>
+			<view class="time-search">
+				<view class="time-li" @click="timeShow('start_show')">{{$u.timeFormat(start, 'yyyy-mm-dd') || '开始时间'}}
+				</view>
+				<view class="icon">
+					<u-icon name="arrow-right"></u-icon>
+				</view>
+				<view class="time-li" @click="timeShow('end_show')">{{$u.timeFormat(end, 'yyyy-mm-dd') || '结束时间'}}
+				</view>
+			</view>
+			<u-tabs-swiper ref="tabs" font-size="28" :current="tabs_current" :list="tabs_list" @change="tabsChange"
+				:is-scroll="false"></u-tabs-swiper>
+		</view>
+		<view class="list-ul">
+			<!-- <view class="list-li" @click="goPage('/pagesT/Finance/CustomerBalanceDetail')">
+				<view class="title clearfix">康</view>
+				<view class="list-cont">
+					<view class="list-cont-li">期初:¥12,299,077.00</view>
+					<view class="list-cont-li">期中:¥0.00</view>
+					<view class="list-cont-li">期末:¥12,299,077.00</view>
+					<view class="icon">
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+			</view> -->
+			<view class="list-li" @click="goPage(`/pagesT/Finance/CustomerBalanceDetail?customerId=${item.customerId}`)"
+				v-for="item,index in order_list" :key='index'>
+				<view class="title clearfix">{{item.name}}</view>
+				<view class="list-cont">
+					<view class="list-cont-li">期初:{{$utils.formattedNumber(item.openingBalance)}}</view>
+					<view class="list-cont-li">期中:{{$utils.formattedNumber(item.interimBalance)}}</view>
+					<view class="list-cont-li">期末:{{$utils.formattedNumber(item.endingBalance)}}</view>
+					<view class="icon">
+						<u-icon name="arrow-right"></u-icon>
+					</view>
+				</view>
+			</view>
+			<!-- <view v-if="!balance_list.length" class="empty-view"><u-empty text="暂无数据" mode="list"></u-empty></view> -->
+			<u-loadmore :status="load_status" />
+		</view>
+		<u-picker v-model="start_show" mode="time" :params="time_params" @confirm='startconfirm'></u-picker>
+		<u-picker v-model="end_show" mode="time" :params="time_params" @confirm='endconfirm'></u-picker>
+		<!-- <u-select v-model="show" :list="list" label-name='name' value-name='id' @confirm='confirm'></u-select> -->
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				load_status: 'nomore',
+				time_params: {
+					year: true,
+					month: true,
+					day: true,
+					hour: false,
+					minute: false,
+					second: false
+				},
+				start_show: false,
+				end_show: false,
+				tabs_current: 0,
+				tabs_list: [{
+					name: '有财务往来'
+				}, {
+					name: '无财务往来'
+				}],
+				keyword: '',
+				page: 1,
+				pageSize: 10,
+				total: 0,
+				tag: 5,
+				start: '',
+				end: '',
+				order_list: [],
+				list: [],
+				show: false,
+				customerId: '',
+				customerData: ''
+			};
+		},
+		watch:{
+			customerData(val) {
+				if (val) {
+					this.keyword = val.name;
+					this.customerId = val.id;
+					this.getAllCustomerBalance()
+				}
+			},
+		},
+		onLoad() {
+			this.getAllCustomerBalance()
+			// this.getAllCustomer()
+		},
+		onReachBottom() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllCustomerBalance()
+			}
+		},
+		methods: {
+			clearValue(){
+				this.keyword = '';
+				this.customerId = '';
+				this.page = 1;
+				this.getAllCustomerBalance()
+			},
+			tabsChange(index) {
+				this.tabs_current = index;
+				if (!this.tabs_current) {
+					this.tag = 5
+				} else {
+					this.tag = 4
+				}
+				this.page = 1;
+				this.getAllCustomerBalance()
+			},
+			timeShow(params) {
+				this[params] = true;
+			},
+			getAllCustomerBalance() {
+				let params = {
+					page: this.page,
+					pageSize: this.pageSize,
+					customerId: this.customerId,
+					start: this.start,
+					end: this.end,
+					tag: this.tag,
+				};
+				this.$u.api.getAllCustomerBalance(params).then(res => {
+					if (this.page === 1) {
+						this.order_list = res.data;
+					} else {
+						this.order_list = this.order_list.concat(res.data);
+					}
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
+					this.total = res.pageTotal;
+				});
+			},
+			startconfirm(val) {
+				this.start = this.$utils.timeByTimestamp(val.year + '-' + val.month + '-' + val.day + ' 00:00:00')
+				this.page = 1
+			},
+			endconfirm(val) {
+				this.end = this.$utils.timeByTimestamp(val.year + '-' + val.month + '-' + val.day + ' 23:59:59')
+				this.page = 1
+				if (!this.customerId) {
+					this.$u.toast('请选择客户')
+					return
+				}
+				this.getAllCustomerBalance()
+			},
+			// getAllCustomer() {
+			// 	let params = {
+			// 		page: 1,
+			// 		pageSize: 99,
+			// 		enableStatus: 5,
+			// 		status: 2,
+			// 	}
+			// 	this.$u.api.getAllCustomer(params).then(res => {
+			// 		this.list = res.data
+			// 	});
+			// },
+			// confirm(val) {
+			// 	this.keyword = val[0].label
+			// 	this.customerId = val[0].value
+			// 	this.getAllCustomerBalance()
+			// }
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.tabs-view {
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		background-color: #ffffff;
+		z-index: 99;
+		.keyword-view {
+			padding: 20rpx 24rpx 0;
+		}
+
+		.time-search {
+			line-height: 80rpx;
+			text-align: center;
+			border-bottom: 1px solid #eeeeee;
+
+			.time-li {
+				display: inline-block;
+				width: 350rpx;
+			}
+
+			.icon {
+				width: 50rpx;
+				display: inline-block;
+			}
+		}
+	}
+
+	.list-ul {
+		padding-top: 240rpx;
+
+		.list-li {
+			width: 710rpx;
+			margin: 20rpx auto;
+			padding: 0 30rpx 24rpx;
+			background-color: #ffffff;
+			border-radius: 20rpx;
+
+			.title {
+				line-height: 80rpx;
+				border-bottom: 1px solid #eeeeee;
+				font-weight: bold;
+			}
+
+			.list-cont {
+				margin-top: 10rpx;
+				position: relative;
+
+				.list-cont-li {
+					line-height: 50rpx;
+				}
+
+				.icon {
+					position: absolute;
+					top: 50%;
+					right: 24rpx;
+					transform: translateY(-50%);
+				}
+			}
+		}
+	}
+</style>

+ 380 - 0
pagesT/Finance/CustomerBalanceDetail.vue

@@ -0,0 +1,380 @@
+<template>
+	<view>
+		<view class="tabs-view">
+			<view class="keyword-view clearfix">
+				<u-search
+					disabled
+					@custom="clearValue"
+					action-text="重置"
+					:clearabled="true"
+					placeholder="请选择客户"
+					v-model="keyword"
+					@click="goPage('/pagesT/customer/selCustomer')"
+				></u-search>
+			</view>
+			<view class="time-search">
+				<view class="time-li" @click="timeShow('start_show')">{{ $u.timeFormat(start, 'yyyy-mm-dd') }}</view>
+				<view class="icon"><u-icon name="arrow-right"></u-icon></view>
+				<view class="time-li" @click="timeShow('end_show')">{{ $u.timeFormat(end, 'yyyy-mm-dd') }}</view>
+			</view>
+			<view class="start-view clearfix">
+				<text class="float_left">期初余额</text>
+				<text class="float_right">{{ $utils.formattedNumber(openingBalance) }}</text>
+			</view>
+		</view>
+		<view class="list-ul">
+			<!-- <view class="list-li">
+				<view class="title">416202103093535051261</view>
+				<view class="list-cont">
+					<view class="info-li type">应收单</view>
+					<view class="info-li">源单号:31202103093505289333</view>
+					<view class="money-ul">
+						<view class="money-li"><text>销售金额:</text>¥100</view>
+						<view class="money-li"><text>优惠金额:</text>¥100</view>
+						<view class="money-li"><text>应收金额:</text>¥100</view>
+					</view>
+					<view class="money-ul">
+						<view class="money-li"><text>实收金额:</text>¥100</view>
+						<view class="money-li"><text>应收余额:</text><text class="money">¥100</text></view>
+					</view>
+				</view>
+				<view class="remark">
+					应收单审核通过,本单据应收12299877.0000元
+				</view>
+			</view> -->
+			<view class="list-li" v-for="(item, index) in order_list">
+				<view class="title">{{ item.no }}</view>
+				<view class="list-cont">
+					<view class="info-li type">{{ item.financeType }}</view>
+					<view class="info-li">源单号:{{ item.sourceNo }}</view>
+					<view class="money-ul">
+						<view class="money-li">
+							<text>销售金额:</text>
+							{{ $utils.formattedNumber(item.salesAmount) }}
+						</view>
+						<view class="money-li">
+							<text>优惠金额:</text>
+							{{ $utils.formattedNumber(item.discountMoney) }}
+						</view>
+						<view class="money-li">
+							<text>应收金额:</text>
+							{{ $utils.formattedNumber(item.receivableAmount) }}
+						</view>
+					</view>
+					<view class="money-ul">
+						<view class="money-li">
+							<text>实收金额:</text>
+							{{ $utils.formattedNumber(item.actualReceivableAmount) }}
+						</view>
+						<view class="money-li">
+							<text>应收余额:</text>
+							<text class="money">{{ $utils.formattedNumber(item.receivableBalance) }}</text>
+						</view>
+					</view>
+				</view>
+				<view class="remark">{{ item.remark }}</view>
+			</view>
+			<!-- <view v-if="!balance_list.length" class="empty-view"><u-empty text="暂无数据" mode="list"></u-empty></view> -->
+			<u-loadmore :status="load_status" />
+		</view>
+		<view class="bottom-view">
+			<view class="end-view clearfix">
+				<text class="float_left">期末余额</text>
+				<text class="float_right">{{ $utils.formattedNumber(endingBalance) }}</text>
+			</view>
+			<view class="clearfix total-view">
+				<text class="float_left">合计</text>
+				<view class="float_right">
+					<view class="money-li">实收金额:{{ $utils.formattedNumber(actualReceiveTotal) }}</view>
+					<view class="money-li">
+						应收余额:
+						<text>{{ $utils.formattedNumber(shouldReceiveTotal) }}</text>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-picker v-model="start_show" mode="time" :params="time_params" @confirm="startconfirm"></u-picker>
+		<u-picker v-model="end_show" mode="time" :params="time_params" @confirm="endconfirm"></u-picker>
+		<!-- <u-select v-model="show" :list="list" label-name='name' value-name='id' @confirm='confirm'></u-select> -->
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			load_status: 'nomore',
+			balance_list: [],
+			time_params: {
+				year: true,
+				month: true,
+				day: true,
+				hour: false,
+				minute: false,
+				second: false
+			},
+			start_show: false,
+			end_show: false,
+			tabs_current: 0,
+			tabs_list: [
+				{
+					name: '有财务往来'
+				},
+				{
+					name: '无财务往来'
+				}
+			],
+			keyword: '',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			list: [],
+			show: false,
+			customerId: '',
+			start: '',
+			end: '',
+			order_list: [],
+			openingBalance: 0,
+			endingBalance: 0,
+			actualReceiveTotal: 0,
+			shouldReceiveTotal: 0,
+			customerData: ''
+		};
+	},
+	onLoad(options) {
+		if(options.customerId){
+			this.customerId = options.customerId
+			this.getAllCustomerBalanceDetail()
+		}
+	},
+	watch: {
+		customerData(val) {
+			if (val) {
+				this.keyword = val.name;
+				this.customerId = val.id;
+				this.getAllCustomerBalanceDetail();
+			}
+		}
+	},
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getAllCustomerBalanceDetail();
+		}
+	},
+	methods: {
+		clearValue(){
+			this.keyword = '';
+			this.customerId = '';
+			this.page = 1;
+			this.getAllCustomerBalanceDetail()
+		},
+		tabsChange(index) {
+			this.tabs_current = index;
+			this.page = 1;
+		},
+		timeShow(params) {
+			this[params] = true;
+		},
+		getAllCustomerBalanceDetail() {
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize,
+				customerId: this.customerId,
+				start: this.start,
+				end: this.end
+			};
+			this.$u.api.getAllCustomerBalanceDetail(params).then(res => {
+				if (this.page === 1) {
+					this.order_list = res.data;
+				} else {
+					this.order_list = this.order_list.concat(res.data);
+				}
+				this.openingBalance = res.openingBalance;
+				this.endingBalance = res.endingBalance;
+				this.actualReceiveTotal = res.actualReceiveTotal;
+				this.shouldReceiveTotal = res.shouldReceiveTotal;
+				this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
+				this.total = res.pageTotal;
+			});
+		},
+		// getAllCustomer() {
+		// 	let params = {
+		// 		page: 1,
+		// 		pageSize: 99,
+		// 		enableStatus: 5,
+		// 		status: 2,
+		// 	}
+		// 	this.$u.api.getAllCustomer(params).then(res => {
+		// 		this.list = res.data
+		// 	});
+		// },
+		// confirm(val) {
+		// 	this.keyword = val[0].label
+		// 	this.customerId = val[0].value
+		// 	this.getAllCustomerBalanceDetail()
+		// },
+		startconfirm(val) {
+			this.start = this.$utils.timeByTimestamp(val.year + '-' + val.month + '-' + val.day + ' 00:00:00');
+			this.page = 1;
+		},
+		endconfirm(val) {
+			this.end = this.$utils.timeByTimestamp(val.year + '-' + val.month + '-' + val.day + ' 23:59:59');
+			this.page = 1;
+			if (!this.customerId) {
+				this.$u.toast('请选择客户');
+				return;
+			}
+			this.getAllCustomerBalanceDetail();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.tabs-view {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	background-color: #ffffff;
+	z-index: 99;
+	.keyword-view {
+		padding: 20rpx 24rpx 0;
+	}
+
+	.time-search {
+		line-height: 80rpx;
+		text-align: center;
+		border-bottom: 1px solid #eeeeee;
+
+		.time-li {
+			display: inline-block;
+			width: 350rpx;
+		}
+
+		.icon {
+			width: 50rpx;
+			display: inline-block;
+		}
+	}
+
+	.start-view {
+		line-height: 80rpx;
+		padding: 0 30rpx;
+		background-color: #ffffff;
+
+		.float_right {
+			color: $uni-color-error;
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+	}
+}
+
+.list-ul {
+	padding-top: 240rpx;
+
+	.list-li {
+		width: 710rpx;
+		margin: 20rpx auto;
+		padding: 0 30rpx 24rpx;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+
+		.title {
+			line-height: 80rpx;
+			border-bottom: 1px solid #eeeeee;
+		}
+
+		.remark {
+			line-height: 80rpx;
+			border-top: 1px solid #eeeeee;
+			margin-top: 20rpx;
+		}
+
+		.list-cont {
+			margin-top: 10rpx;
+			font-size: 24rpx;
+			line-height: 40rpx;
+
+			.type {
+				font-weight: bold;
+				font-size: 28rpx;
+				padding: 10rpx 0;
+			}
+
+			.money-ul {
+				margin-top: 10rpx;
+				display: flex;
+
+				.money-li {
+					flex: 3;
+					text-align: center;
+					font-weight: bold;
+
+					text {
+						color: #999999;
+						font-weight: normal;
+					}
+
+					.money {
+						color: $uni-color-error;
+						font-weight: bold;
+					}
+
+					&:last-child {
+						text-align: right;
+					}
+
+					&:first-child {
+						text-align: left;
+					}
+				}
+			}
+		}
+	}
+}
+
+.bottom-view {
+	box-shadow: 0px 2px 12rpx rgba(0, 0, 0, 0.2);
+	position: fixed;
+	bottom: 0;
+	width: 100%;
+	left: 0;
+	background-color: #ffffff;
+	padding: 20rpx 30rpx;
+	z-index: 9;
+	// line-height: 90rpx;
+	.end-view {
+		padding-bottom: 20rpx;
+		border-bottom: 1px solid #eeeeee;
+		margin-bottom: 20rpx;
+
+		.float_right {
+			color: $uni-color-error;
+			font-size: 32rpx;
+			font-weight: bold;
+		}
+	}
+
+	.total-view {
+		color: #6c6c6c;
+
+		.float_right {
+			font-size: 24rpx;
+
+			.money-li {
+				margin-left: 30rpx;
+				display: inline-block;
+
+				text {
+					color: $uni-color-error;
+					font-size: 32rpx;
+					font-weight: bold;
+				}
+			}
+		}
+	}
+}
+</style>

+ 342 - 0
pagesT/Finance/ReturnFrom.vue

@@ -0,0 +1,342 @@
+<template>
+	<view>
+		<view class="tabs-view">
+			<view class="keyword-view clearfix">
+				<view class="float_left">
+					<u-search :show-action="false" @clear="searchData()" @search="searchData()" :clearabled="true"
+						placeholder="单据编号" v-model="search_form.keyword"></u-search>
+				</view>
+				<view class="float_right" @click="openSel('search_show')"><text
+						class="custom-icon custom-icon-shaixuan"></text></view>
+			</view>
+		</view>
+		<view class="list-ul">
+			<view class="list-li clearfix" v-for="(item, index) in return_list" :key="index" @click="details(item.id, item.createTime)">
+				<view class="title clearfix" >
+					<view class="float_left" style="font-size: 28rpx;font-weight: 700;">{{ item.unitName || '--' }}
+					</view>
+					<view class="float_right">
+						<span v-if="item.auditStatus === 1" class="warning-status">待审核</span>
+						<span v-else class="success-status">已审核</span>
+						<text class="custom-icon custom-icon-jinru"></text>
+					</view>
+				</view>
+				<view class="list-cont">
+					<view class="list-cont-li">日期:{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd') }}</view>
+					<view class="list-cont-li clearfix">单据号:{{ item.no }}</view>
+					<view class="list-cont-li clearfix" v-if="item.originNo">源单据号:{{ item.originNo }}</view>
+					<view class="list-cont-li clearfix" v-if="item.shopName">店铺:{{ item.shopName }}</view>
+					<view class="list-cont-li clearfix">类型:{{ item.financeType }}</view>
+					<view class="price">
+						<text>{{ $utils.formattedNumber(item.money) }}</text>
+					</view>
+				</view>
+			</view>
+			<addBtn v-if="$accessCheck($Access.RefundForm_AddRefundForm)" url="/pagesT/Finance/ReturnFromAdd"></addBtn>
+			<u-popup v-model="search_show" mode="right">
+				<view class="search-pop">
+					<view class="form-view">
+						<u-form label-width="160rpx" label-position="left">
+							<u-form-item label="客户">
+								<view class="clearfix form-val" @click="goPage('/pagesT/customer/selCustomer')">
+									<text
+										class="float_left ellipsis">{{ search_form.unitId ? customer_name : '请选择' }}</text>
+									<view class="float_right" @click.stop="clearValue('unitId')">
+										<u-icon :name="!search_form.unitId ? 'arrow-right' : 'close-circle-fill'"
+											size="28" color="#999999"></u-icon>
+									</view>
+								</view>
+							</u-form-item>
+							<u-form-item label="单据状态">
+								<view class="clearfix form-val" @click="openSel('show_status')">
+									<text
+										class="float_left ellipsis">{{ search_form.auditStatus ? auditStatus_name : '请选择' }}</text>
+									<view class="float_right" @click.stop="clearValue('auditStatus')">
+										<u-icon :name="!search_form.auditStatus ? 'arrow-right' : 'close-circle-fill'"
+											size="28" color="#999999"></u-icon>
+									</view>
+								</view>
+							</u-form-item>
+							<u-form-item label-position="top" label="创建日期">
+								<view class="date-li">
+									<picker mode="date" @change="bindDateStartChange">
+										<text
+											class="date-li">{{ search_form.start ? $u.timeFormat(search_form.start, 'yyyy-mm-dd') : '开始日期' }}</text>
+									</picker>
+								</view>
+								<view class="date-line">-</view>
+								<view class="date-li">
+									<picker mode="date" @change="bindDateEndChange">
+										<text
+											class="date-li">{{ search_form.end ? $u.timeFormat(search_form.end, 'yyyy-mm-dd') : '结束日期' }}</text>
+									</picker>
+								</view>
+							</u-form-item>
+						</u-form>
+					</view>
+
+					<view class="search-btn">
+						<view class="btn-li" @click="clearValue()">重置</view>
+						<view class="btn-li" @click="searchConfirm">确定</view>
+					</view>
+				</view>
+			</u-popup>
+			<u-select @confirm="statusChange" v-model="show_status" :list="order_status"></u-select>
+			<u-select @confirm="financeTypeChange" v-model="financeTypeId_status" :list="financeType"></u-select>
+			<view v-if="!return_list.length" class="empty-view">
+				<u-empty text="暂无数据" mode="list"></u-empty>
+			</view>
+			<u-loadmore v-if="return_list.length" :status="load_status" />
+		</view>
+	</view>
+</template>
+<script>
+	export default {
+		data() {
+			return {
+				show_status: false,
+				search_show: false,
+				financeTypeId_status: false,
+				order_status: [{
+					value: 2,
+					label: '已审核'
+				}, {
+					value: 1,
+					label: '待审核'
+				}],
+				financeType: [],
+				load_status: 'nomore',
+				tabs_current: 0,
+				page: 1,
+				pageSize: 10,
+				total: 0,
+				search_form: {
+					keyword: '',
+					auditStatus: '',
+					financeTypeId: '',
+					start: '',
+					end: '',
+					unitId: ''
+				},
+				customer_name: '',
+				return_list: [],
+				werahouseData: '',
+				customerData: '',
+				auditStatus_name: '',
+				financeTypeId_name: ''
+			};
+		},
+		watch: {
+			customerData(val) {
+				if (val) {
+					this.customer_name = val.name;
+					this.search_form.unitId = val.id;
+				}
+			},
+		},
+		onLoad() {
+			this.getAllFinanceType()
+		},
+		onShow() {
+			this.searchData();
+		},
+		onReachBottom() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllRefund();
+			}
+		},
+		onPullDownRefresh() {
+			this.searchData();
+		},
+		methods: {
+			// 审核状态切换
+			statusChange(e) {
+				this.search_form.auditStatus = e[0].value;
+				this.auditStatus_name = e[0].label;
+			},
+			//业务类型切换
+			financeTypeChange(e) {
+				this.search_form.financeTypeId = e[0].value;
+				this.financeTypeId_name = e[0].label;
+			},
+			details(id, createTime) {
+				uni.navigateTo({
+					url: '/pagesT/Finance/ReturnFromDetails?id=' + id + '&&createTime=' + createTime
+				});
+			},
+			openSel(key) {
+				this[key] = true;
+			},
+			bindDateStartChange(e) {
+				this.search_form.start = this.$utils.timeByTimestamp(e.detail.value + ' 00:00:00');
+			},
+			bindDateEndChange(e) {
+				this.search_form.end = this.$utils.timeByTimestamp(e.detail.value + ' 23:59:59');
+			},
+			// 搜索确定
+			searchConfirm() {
+				this.search_show = false;
+				this.searchData();
+			},
+			// 重置搜索
+			clearValue(params) {
+				if (!params) {
+					this.search_form = {
+						keyword: '',
+						auditStatus: '',
+						financeTypeId: '',
+						time: '',
+						start: '',
+						end: '',
+						unitId: ''
+					};
+					this.searchConfirm();
+				} else {
+					this.search_form[params] = '';
+				}
+			},
+			getAllRefund() {
+				this.load_status = 'loading';
+				this.$u.api
+					.getAllRefund({
+						page: this.page,
+						pageSize: this.pageSize,
+						keyword: this.search_form.keyword,
+						financeTypeId: this.search_form.financeTypeId,
+						start: this.search_form.start,
+						end: this.search_form.end,
+						unitId: this.search_form.unitId,
+						auditStatus: this.search_form.auditStatus.toString()
+					})
+					.then(res => {
+						if (this.page === 1) {
+							this.return_list = res.data;
+						} else {
+							this.return_list = this.return_list.concat(res.data);
+						}
+						this.total = res.pageTotal;
+						this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+					});
+			},
+			searchData() {
+				this.page = 1;
+				this.getAllRefund();
+			},
+			//  获取财务类型
+			getAllFinanceType() {
+				this.$u.api.getAllFinanceTypeNoPage(3).then(res => {
+					this.financeType = res.data.map((item) => {
+						return{
+							label: item.name,
+							value: item.id
+						}
+					})
+				})
+
+			},
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.tabs-view {
+		position: fixed;
+		width: 100%;
+		top: 0;
+		left: 0;
+		z-index: 99;
+
+		.btn {
+			width: 70rpx;
+			height: 70rpx;
+			position: fixed;
+			bottom: 50rpx;
+			right: 35rpx;
+			border-radius: 50%;
+			background-color: #2979ff;
+			text-align: center;
+			color: #ffffff;
+			vertical-align: middle;
+			font-size: 49rpx;
+			box-shadow: 0px 9rpx 76rpx 0px rgba(3, 122, 255, 0.55);
+		}
+
+		.keyword-view {
+			padding: 20rpx 24rpx 0;
+			background-color: #ffffff;
+			z-index: 9;
+			padding-bottom: 20rpx;
+
+			.float_left {
+				width: 640rpx;
+			}
+
+			.float_right {
+				line-height: 64rpx;
+				width: 50rpx;
+				text-align: center;
+				color: #666666;
+			}
+		}
+	}
+
+	.list-ul {
+		padding-top: 100rpx;
+
+		.list-li {
+			width: 710rpx;
+			margin: 20rpx auto;
+			padding: 0 24rpx 20rpx;
+			background-color: #ffffff;
+			padding-bottom: 20rpx;
+			border-radius: 20rpx;
+
+			.title {
+				line-height: 80rpx;
+				border-bottom: 1px solid #eeeeee;
+
+				.float_left {
+					font-weight: bold;
+				}
+
+				.float_rigth {
+					.custom-icon-jinru {
+						margin-left: 10rpx;
+						font-size: 28rpx;
+					}
+				}
+			}
+
+			.list-cont {
+				margin-top: 10rpx;
+				position: relative;
+
+				.price {
+					position: absolute;
+					top: 50%;
+					transform: translateY(-50%);
+					right: 0;
+					font-weight: bold;
+					color: $uni-color-error;
+
+					.custom-icon-jinru {
+						font-size: 28rpx;
+						color: #6c6c6c;
+						font-weight: 400;
+					}
+				}
+
+				.list-cont-li {
+					line-height: 40rpx;
+					font-size: 24rpx;
+					color: #666666;
+
+					.mobile {
+						color: $uni-color-primary;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 264 - 0
pagesT/Finance/ReturnFromAdd.vue

@@ -0,0 +1,264 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="150" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="退款单位">
+					<u-input @click="goPage('/pagesT/customer/selCustomer')" disabled class="dis-input" v-model="add_form.unitName" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="单据日期">
+					<picker mode="date" @change="bindDateChange">
+						<view style="width: 524rpx;text-align: right;display: inline-block;margin-right: 10rpx;">
+							<text v-if="add_form.refundTime">{{ $u.timeFormat(add_form.refundTime, 'yyyy-mm-dd') }}</text>
+							<text style="color:#B8C0C8;" v-else>请选择</text>
+						</view>
+						<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+					</picker>
+				</u-form-item>
+				<u-form-item required label="所属店铺">
+					<u-input @click="goPage('/pagesT/shop/selShop')" disabled class="dis-input" v-model="add_form.shopName" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="退款单明细">
+					<view class="form-value add-btn-go" @click="addAccount">
+						<u-icon name="plus" size="24"></u-icon>
+						<text>新增</text>
+					</view>
+				</u-form-item>
+				<view class="detail-ul">
+					<view class="detail-li" v-for="(item, index) in add_form.accountList" :key="index">
+						<view class="del-icon" @click="delAccount(index)"><u-icon name="minus-circle-fill" size="40" color="#fa3534"></u-icon></view>
+						<u-form-item label="结算账户">
+							<view class="in-form-item">
+								<u-input @click="settlementAccount(index)" disabled v-model="item.accountName" placeholder="请选择" />
+								<view class="icon-arrow-right"><u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon></view>
+							</view>
+						</u-form-item>
+						<u-form-item label="退款金额"><input placeholder-style="color:#B8C0C8" type="digit" v-model="item.money" placeholder="请输入退款金额" /></u-form-item>
+						<view class="bottom clearfix"><input placeholder-style="color:#B8C0C8" type="text" v-model="item.remark" placeholder="说点什么吧" /></view>
+					</view>
+				</view>
+			</view>
+		</u-form>
+		<view class="detail-bottom"><u-button class="handel-btn" @click="submit" :loading="sub_load" :ripple="true" type="primary">提交</u-button></view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			sub_load: false,
+			add_form: {
+				unitId: '',
+				unitName: '',
+				sourceNo: '',
+				sourceNoMoney: '',
+				currentAccountName: '',
+				financeType: '销售退款',
+				financeTypeId: 12,
+				shopId: '',
+				money: '',
+				shopName: '',
+				refundTime: '',
+				createTime: '',
+				accountList: [
+					{
+						accountId: '',
+						accountNumber: '',
+						accountName: '',
+						money: '',
+						discountMoney: '',
+						finalMoney: '',
+						payWay: '',
+						remark: ''
+					}
+				]
+			},
+			methods_show: false,
+			account_index: 0,
+			customerData: '',
+			account_id: '',
+			shopData: '',
+			AccountData: '',
+			tag: ''
+		};
+	},
+	computed: {
+		userInfo() {
+			return this.$store.state.userInfo;
+		}
+	},
+	watch: {
+		customerData(val) {
+			if (val) {
+				console.log(val);
+				this.add_form.unitId = val.id;
+				this.add_form.unitName = val.name;
+				this.add_form.money = val.money;
+				this.add_form.type = val.type;
+			}
+		},
+		// 店铺
+		shopData(val) {
+			if (val) {
+				this.add_form.shopName = val.name;
+				this.add_form.shopId = val.id;
+			}
+		},
+		AccountData(val) {
+			if (val) {
+				this.add_form.accountList[this.account_index].accountId = val.id;
+				this.add_form.accountList[this.account_index].accountName = val.name;
+				this.add_form.accountList[this.account_index].accountNumber = val.accountNumber;
+			}
+		}
+	},
+	onLoad(options) {
+		this.add_form.refundTime = parseInt(new Date().getTime() / 1000);
+	},
+	methods: {
+		change(e) {
+			this.refundTime = new Date().getTime();
+		},
+		addAccount() {
+			this.add_form.receiptOffsetData.push({
+				collectionAmount: '',
+				preferentialAmount: '',
+				actualAmount: '',
+				settlementMethod: '',
+				remark: ''
+			});
+		},
+		delAccount(index) {
+			if (this.add_form.accountList.length === 1) {
+				this.$u.toast('至少保留一条');
+				return;
+			}
+			this.add_form.accountList.splice(index, 1);
+		},
+		//  添加
+		submit() {
+			if (!this.add_form.unitName) {
+				this.$u.toast('请选择退款单位');
+				return;
+			}
+			if (!this.add_form.shopId) {
+				this.$u.toast('请选择所属店铺');
+				return;
+			}
+			let isSub = true;
+			for (let i in this.add_form.accountList) {
+				let item = this.add_form.accountList[i];
+				if (!item.accountName) {
+					isSub = false;
+					this.$u.toast('请选择结算账户');
+					break;
+				}
+				if (!item.money) {
+					isSub = false;
+					this.$u.toast('请输入退款金额');
+					break;
+				}
+			}
+			if (!isSub) {
+				return;
+			}
+			this.sub_load = true;
+			this.$u.api
+				.addRefund({
+					...this.add_form,
+					currentAccountName: this.userInfo.name
+				})
+				.then(res => {
+					this.sub_load = false;
+					this.$u.toast('新增成功');
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 1500);
+				})
+				.catch(err => {
+					this.sub_load = false;
+				});
+		},
+		settlementAccount(index) {
+			if (!this.add_form.shopId) {
+				this.$u.toast('请先选择商铺');
+				return;
+			}
+			this.goPage('/pagesT/account/selAccount?shopId=' + this.add_form.shopId);
+			this.account_index = index;
+		},
+		bindDateChange(e) {
+			this.add_form.refundTime = this.$utils.timeByTimestamp(e.detail.value + ' 00:00:00');
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.detail-ul {
+	.detail-li {
+		padding-left: 60rpx;
+		position: relative;
+		border-bottom: 1px solid #eeeeee;
+
+		&:last-child {
+			border-bottom: 0 none;
+		}
+
+		.del-icon {
+			position: absolute;
+			top: 36%;
+			left: 0;
+			transform: translateY(-50%);
+		}
+
+		.title {
+			line-height: 80rpx;
+		}
+
+		.money-ul {
+			border-top: 1px solid #eeeeee;
+			padding: 20rpx 0;
+			display: flex;
+
+			.money-li {
+				flex: 3;
+				border-right: 1px solid #eeeeee;
+
+				input {
+					height: 80rpx;
+					line-height: 80rpx;
+					text-align: center;
+				}
+
+				&:last-child {
+					border-right: 0 none;
+				}
+			}
+		}
+
+		.bottom {
+			// border-top: 1px solid #eeeeee;
+
+			input {
+				height: 80rpx;
+				line-height: 80rpx;
+			}
+		}
+	}
+}
+.in-form-item {
+	position: relative;
+	padding-right: 30rpx;
+	.icon-arrow-right {
+		position: absolute;
+		right: 0;
+		top: 50%;
+		transform: translateY(-50%);
+	}
+}
+</style>

+ 149 - 0
pagesT/Finance/ReturnFromDetails.vue

@@ -0,0 +1,149 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="150" :model="form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item label="退款单位">
+					<view class="form-value">{{ detail_data.unitName }}</view>
+				</u-form-item>
+				<u-form-item label="业务类型">
+					<view class="form-value">{{ detail_data.financeType }}</view>
+				</u-form-item>
+				<u-form-item label="所属店铺">
+					<view class="form-value">{{ detail_data.shopName }}</view>
+				</u-form-item>
+				<u-form-item label="制单人">
+					<view class="form-value">{{ detail_data.currentAccountName }}</view>
+				</u-form-item>
+				<u-form-item label="单据日期">
+					<view class="form-value">{{ $u.timeFormat(detail_data.createTime, 'yyyy-mm-dd') }}</view>
+				</u-form-item>
+				<u-form-item label="单据状态">
+					<view class="form-value">
+						<text class="success-status" v-if="detail_data.auditStatus === 2">已审核</text>
+						<text class="warning-status" v-else>待审核</text>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="detail-ul">
+				<view class="detail-li" v-for="(item,index) in detail_data.accountList" :key="index">
+					<view class="other-ul">
+						<view class="other-li">结算账户:{{ item.accountName || '--' }}</view>
+						<!-- <view class="other-li">退款方式:{{ item.accountName||'--' }}</view> -->
+						<view class="other-li">
+							实际退款金额:
+							<text class="money">{{ $utils.formattedNumber(item.money) }}</text>
+						</view>
+					</view>
+					<view class="remark">备注:{{ item.remark || '无' }}</view>
+				</view>
+			</view>
+		</u-form>
+		<view class="detail-bottom" v-if="detail_data.auditStatus !== 2 && $accessCheck($Access.RefundFormupdateRefundStatus)">
+			<view class="handel-btn" @click="openModel('确定要审核通过该退款单吗?', '审核')">审核</view>
+		</view>
+		<u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm" @cancel="modelCancel"></u-modal>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			model_tag: '',
+			model_show: false,
+			model_content: '',
+			createTime: '',
+			id: '',
+			detail_data: []
+		};
+	},
+	onLoad(options) {
+		this.id = options.id;
+		this.createTime = options.createTime;
+	},
+	onShow() {
+		this.getRefundInfo();
+	},
+	onPullDownRefresh() {
+		this.getRefundInfo();
+	},
+	methods: {
+		getRefundInfo() {
+			this.$u.api
+				.getRefundInfo({
+					id: this.id,
+					createTime: this.createTime
+				})
+				.then(res => {
+					this.detail_data = res.data;
+				});
+		},
+		// 打开提示框
+		openModel(content, tag) {
+			this.model_content = content;
+			this.model_show = true;
+			this.model_tag = tag;
+		},
+		modelConfirm() {
+			switch (this.model_tag) {
+				case '审核':
+					this.updateRefundStatus();
+					break;
+			}
+		},
+		updateRefundStatus() {
+			this.$u.api
+				.updateRefundStatus({
+					id: this.id,
+					createTime: this.detail_data.createTime
+				})
+				.then(res => {
+					this.$u.toast('操作成功');
+					this.getRefundInfo();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss">
+.detail-ul {
+	.detail-li {
+		width: 710rpx;
+		margin: 20rpx auto;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		padding: 20rpx 24rpx;
+		.title {
+			font-weight: bold;
+		}
+		.other-ul {
+			// display: flex;
+			padding-top: 20rpx;
+			.other-li {
+				// flex: 3;
+				font-size: 24rpx;
+				line-height: 40rpx;
+				// text-align: center;
+				.money {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: $uni-color-error;
+				}
+				&:first-child {
+					text-align: left;
+				}
+				&:last-child {
+					// text-align: right;
+				}
+			}
+		}
+
+		.remark {
+			border-top: 1px solid #eeeeee;
+			padding-top: 20rpx;
+			margin-top: 20rpx;
+		}
+	}
+}
+</style>

+ 509 - 0
pagesT/Purchase/AddPurchase.vue

@@ -0,0 +1,509 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="160" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="采购仓库" prop="warehouseName">
+					<u-input @click="goPage('/pagesT/werahouse/selWerahouse')" class="dis-input" disabled v-model="add_form.warehouseName" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item required label="供应商" prop="supplierName">
+					<u-input @click="goPage('/pagesT/supplier/selSupplier')" class="dis-input" disabled v-model="add_form.supplierName" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item required label="采购员" prop="buyerName">
+					<u-input @click="goPage('/pagesT/staff/selStaff')" class="dis-input" disabled v-model="add_form.buyerName" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item required label="商品清单">
+					<view @click="selGoodsPage" class="form-value add-btn-go">
+						<u-icon name="plus" size="24"></u-icon>
+						<text>选择商品</text>
+					</view>
+				</u-form-item>
+				<view class="goods-ul" v-if="goods_list.length">
+					<view class="goods-title clearfix" @click="goMoreGoods">
+						<view class="float_left">请核对已选商品</view>
+						<view class="float_right">编辑</view>
+					</view>
+					<block v-for="(item, index) in goods_list" :key="index">
+						<view class="goods-li clearfix" v-if="index < 6">
+							<view class="goods-img float_left"><u-icon size="40" name="shangpin" custom-prefix="custom-icon" color="#cccccc"></u-icon></view>
+							<view class="float_left info">
+								<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+								<view class="goods-code clearfix">
+									<view class="float_left">{{ item.goodsCode }}</view>
+									<view class="float_right">x{{ $utils.formatNub(item.buyerNum) }}</view>
+								</view>
+								<view class="goods-num clearfix">
+									<view class="float_left">{{ item.unitName }};{{ item.specGropName }}</view>
+									<view @click="goMoreGoods" class="float_right" v-if="item.isEq === 5">
+										其他单位:
+										<text v-if="Number(item.otherNum) > 0">{{ $utils.formatNub(item.otherNum) }}</text>
+										<text v-else style="color: #2979FF;">编辑</text>
+									</view>
+								</view>
+								<view class="goods-num clearfix" v-if="item.skuValue">
+									<view class="float_left">换算比例:{{ item.skuValue }}</view>
+									<text class="float_right">转换数量:{{ item.skuNum }}</text>
+								</view>
+								<view class="goods-num clearfix">
+									<view class="float_left ">
+										<text class="price">{{ $utils.formattedNumber(item.buyerUnitPrice) }}</text>
+									</view>
+									<view class="float_right">
+										小计:
+										<text class="price">{{ $utils.formattedNumber(item.subtotalPrice) }}</text>
+									</view>
+								</view>
+							</view>
+						</view>
+					</block>
+					<view @click="goMoreGoods" class="more-goods" v-if="goods_list.length >= 6">
+						查看更多商品
+						<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+					</view>
+				</view>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="其他金额">
+					<input type="digit" v-model="add_form.otherAmount" class="dis-input" placeholder="请输入" />
+					<text class="rem-unit">元</text>
+				</u-form-item>
+				<u-form-item label="优惠金额">
+					<input type="digit" v-model="add_form.couponAmount" class="dis-input" placeholder="请输入" />
+					<text class="rem-unit">元</text>
+				</u-form-item>
+				<u-form-item label="合计">
+					<input type="digit" v-model="purchaseAmount" class="dis-input" placeholder="请输入" />
+					<text class="rem-unit">元</text>
+				</u-form-item>
+			</view>
+		</u-form>
+		<view class="detail-bottom"><view class="handel-btn" @click="submit">提交订单</view></view>
+	</view>
+</template>
+
+<script>
+const goods = {
+	basicGoodsId: '',
+	goodsCode: '',
+	goodsName: '',
+	skuId: '',
+	unitName: '',
+	categoryId: '',
+	categoryName: '',
+	buyerNum: 0,
+	buyerUnitPrice: 0,
+	subtotalPrice: 0,
+	couponAmount: 0,
+	otherAmount: 0
+};
+export default {
+	data() {
+		return {
+			err_tip_list: [], // 错误提示
+			rules: {
+				warehouseName: [
+					{
+						required: true,
+						message: '请选择采购仓库',
+						trigger: ['change', 'blur']
+					}
+				],
+				supplierName: [
+					{
+						required: true,
+						message: '请选择供应商',
+						trigger: ['change', 'blur']
+					}
+				],
+				buyerName: [
+					{
+						required: true,
+						message: '请选择采购员',
+						trigger: ['change', 'blur']
+					}
+				]
+			},
+			goods_id: [],
+			werahouseData: '',
+			supplierData: '',
+			staffData: '',
+			goodsData: '',
+			purchaseGoods: '',
+			goods_num: '',
+			add_form: {
+				code: '',
+				shopId: '',
+				shopName: '',
+				supplierId: '',
+				supplierName: '',
+				buyerId: '',
+				buyerName: '',
+				operatorName: '',
+				couponAmount: 0,
+				otherAmount: 0,
+				remark: '',
+				goodsData: [],
+				warehouseName: '',
+				warehouseId: '',
+				purchaseType: 4
+			},
+			goods_list: []
+		};
+	},
+	computed: {
+		userName() {
+			return this.$store.state.userInfo.name;
+		},
+		purchaseAmount() {
+			let sum = 0;
+			if (this.goods_list.length > 1) {
+				this.goods_list.forEach(item => {
+					sum = this.$NP.plus(sum, Number(item.subtotalPrice));
+				});
+			} else if (this.goods_list.length === 1) {
+				sum = Number(this.goods_list[0].subtotalPrice);
+			} else {
+				sum = 0;
+			}
+			return this.$NP.plus(sum, this.$NP.minus(this.add_form.otherAmount, this.add_form.couponAmount)) || 0;
+		}
+	},
+	watch: {
+		werahouseData(val) {
+			if (val) {
+				this.add_form.warehouseId = val.id;
+				this.add_form.warehouseName = val.warehouseName;
+			}
+		},
+		supplierData(val) {
+			if (val) {
+				this.add_form.supplierId = val.id;
+				this.add_form.supplierName = val.title;
+			}
+		},
+		staffData(val) {
+			if (val) {
+				this.add_form.buyerId = val.id;
+				this.add_form.buyerName = val.staffName;
+			}
+		},
+		// 选择商品资料页面返回
+		goodsData(list) {
+			if (list) {
+				this.selGoods(list);
+			}
+		},
+		// 已选择采购商品页面返回
+		purchaseGoods(list) {
+			if (list) {
+				this.goods_list = list;
+			}
+		}
+	},
+	// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
+	onReady() {
+		this.$refs.uForm.setRules(this.rules);
+	},
+	onLoad(options) {
+		if (options.id) {
+			this.purchase_id = options.id;
+			uni.setNavigationBarTitle({
+				title: '编辑采购单'
+			});
+			this.getPurchaseInfoById();
+		}
+		// 	// 获取sku换算关系
+		// 	this.getSkuNum();
+		// });
+	},
+	methods: {
+		selGoodsPage() {
+			uni.setStorageSync('purGoods', this.goods_list);
+			this.goPage('/pagesT/goods/selGoodsBasicBySku?pageName=purchase');
+		},
+		goMoreGoods() {
+			uni.setStorageSync('PurchaseGoods', this.goods_list);
+			this.goPage(`/pagesT/Purchase/PurchaseGoods`);
+		},
+		// 详情
+		getPurchaseInfoById() {
+			this.$u.api.getPurchaseInfoById(this.purchase_id).then(({ data }) => {
+				this.add_form = {
+					code: data.code,
+					shopId: data.shopId,
+					shopName: data.shopName,
+					supplierId: data.supplierId,
+					supplierName: data.supplierName,
+					buyerId: data.buyerId,
+					buyerName: data.buyerName,
+					operatorName: data.operatorName,
+					couponAmount: data.couponAmount,
+					otherAmount: data.otherAmount,
+					remark: data.remark,
+					goodsData: data.details,
+					warehouseName: data.warehouseName,
+					warehouseId: data.warehouseId,
+					purchaseType: 4
+				};
+				// 商品
+				this.goods_list = data.details.map(item => {
+					return {
+						...item,
+						skuId: item.skuId,
+						specGropName: item.skuName
+					};
+				});
+				// 获取sku换算关系
+				this.getSkuNum();
+			});
+		},
+		// 多选商品确定
+		selGoods(list) {
+			uni.showLoading()
+			const goodsD = list.map(item => {
+				let specGropName = '';
+				if (item.specGroup) {
+					specGropName = item.specGroup
+						.map(itemS => {
+							return itemS.specValueName;
+						})
+						.join('_');
+				} else {
+					specGropName = item.specGropName;
+				}
+				const buyerNum = item.buyNum || item.buyerNum || 1;
+				return {
+					isEq: item.isEq,
+					basicGoodsId: item.id || item.basicGoodsId,
+					goodsCode: item.code,
+					goodsName: item.title,
+					skuId: item.skuId,
+					specGropName: specGropName,
+					unitName: item.unitName,
+					categoryId: item.categoryId,
+					categoryName: item.categoryName,
+					buyerNum: buyerNum,
+					buyerUnitPrice: item.buyerUnitPrice || '',
+					subtotalPrice: this.$NP.times(buyerNum, item.buyerUnitPrice || 0),
+					couponAmount: item.couponAmount || '',
+					otherAmount: item.otherAmount || ''
+				};
+			});
+			const skuIdArr = goodsD.map(item => {
+				return item.skuId;
+			});
+			this.pricePauseSave(skuIdArr, goodsD);
+		},
+		// 价格暂存查询
+		async pricePauseSave(skuId, goodsData) {
+			uni.showLoading()
+			await this.$u.api
+				.getMoneyPauseSave({
+					skuIds: skuId
+				})
+				.then(({ data }) => {
+					this.goods_list = goodsData.map(item => {
+						return {
+							...item,
+							buyerUnitPrice: item.buyerUnitPrice > 0.1 ? item.buyerUnitPrice : data[item.skuId] || 0.1,
+							subtotalPrice: item.subtotalPrice > 0.1 ? item.subtotalPrice : data[item.skuId] || 0.1
+						};
+					});
+					// 获取sku换算关系
+					this.getSkuNum();
+				});
+		},
+		//换算sku数量
+		getSkuNum() {
+			uni.showLoading()
+			const skuNum = this.goods_list
+				.map(item => {
+					return {
+						skuId: item.skuId,
+						goodsBasicId: item.basicGoodsId,
+						num: Number(item.buyerNum) || 1
+					};
+				})
+				.filter(item => item.skuId);
+			if (!skuNum.length) {
+				return;
+			}
+			this.$u.api.getMasterSkuNum(skuNum).then(({ data }) => {
+				this.goods_list = this.goods_list.map(item => {
+					let obj = {};
+					if (data[item.skuId]) {
+						obj = {
+							title: data[item.skuId].title || '',
+							buyerNum: data[item.skuId].num,
+							skuValue: data[item.skuId].skuValue,
+							skuNum: data[item.skuId].masterNum + data[item.skuId].masterName
+						};
+					}
+					return {
+						...item,
+						...obj
+					};
+				});
+				this.goMoreGoods()
+			});
+		},
+		// 改变数量
+		editNumChange(index, tag) {
+			const target = this.$u.deepClone(this.goods_list);
+			target[index].subtotalPrice = (target[index].buyerNum || 1) * target[index].buyerUnitPrice;
+			this.goods_list = target;
+			if (!target[index].skuId) return;
+			if (tag === 'buyerNum') {
+				// 获取sku换算关系
+				this.getSkuNum();
+			}
+		},
+		// 价格暂存提交
+		async addMoneyPauseSave() {
+			const priceData = this.goods_list.map(item => {
+				return {
+					skuId: item.skuId,
+					money: item.buyerUnitPrice
+				};
+			});
+			await this.$u.api
+				.addMoneyPauseSave({
+					data: priceData
+				})
+				.then(res => {});
+		},
+		submit() {
+			this.$refs.uForm.validate(valid => {
+				if (valid) {
+					if (!this.goods_list.length) {
+						this.$u.toast('请选择商品');
+						return;
+					}
+					const isbuyerNum = this.goods_list.every(item => item.buyerNum > 0);
+					if (!isbuyerNum) {
+						this.$u.toast('采购数量必须大于0');
+						return;
+					}
+					const isbuyerUnitPrice = this.goods_list.every(item => item.buyerUnitPrice > 0);
+					if (!isbuyerUnitPrice) {
+						this.$u.toast('采购单价必须大于0');
+						return;
+					}
+					let goodsData = this.goods_list.map(item => {
+						let goods = {
+							basicGoodsId: item.basicGoodsId,
+							goodsCode: item.goodsCode,
+							goodsName: item.goodsName,
+							skuId: item.skuId,
+							unitName: item.unitName,
+							skuName: item.specGropName,
+							buyerNum: item.buyerNum,
+							buyerUnitPrice: item.buyerUnitPrice,
+							subtotalPrice: item.subtotalPrice,
+							couponAmount: Number(item.couponAmount),
+							otherAmount: Number(item.otherAmount),
+							categoryId: item.categoryId,
+							categoryName: item.categoryName,
+							otherNum: item.otherNum
+						};
+						if (item.id) {
+							goods.id = item.id;
+						}
+						return goods;
+					});
+					const params = {
+						...this.add_form,
+						operatorName: this.userName,
+						goodsData: goodsData
+					};
+					if (this.purchase_id) {
+						this.$u.api.editPurchase(this.purchase_id, params).then(res => {
+							this.$u.toast('修改成功');
+							// 价格暂存添加
+							this.addMoneyPauseSave();
+							setTimeout(() => {
+								uni.navigateBack();
+							}, 2000);
+						});
+					} else {
+						this.$u.api.addPurchase(params).then(res => {
+							this.$u.toast('新建成功');
+							// 价格暂存添加
+							this.addMoneyPauseSave();
+							setTimeout(() => {
+								uni.navigateBack();
+							}, 2000);
+						});
+					}
+				}
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.goods-ul {
+	.more-goods {
+		line-height: 80rpx;
+		border-top: 1px solid #eeeeee;
+		text-align: center;
+		font-size: 24rpx;
+	}
+
+	.goods-title {
+		margin-bottom: 20rpx;
+		line-height: 80rpx;
+		font-size: 24rpx;
+		border-bottom: 1px solid #eeeeee;
+
+		.float_right {
+			color: $uni-color-primary;
+		}
+	}
+
+	.goods-li {
+		line-height: 32rpx;
+		padding-bottom: 24rpx;
+
+		.goods-img {
+			margin-right: 20rpx;
+
+			image {
+				width: 150rpx;
+				height: 150rpx;
+				border-radius: 8rpx;
+				display: block;
+			}
+		}
+
+		.info {
+			.goods-name {
+				width: 640rpx;
+				height: 34rpx;
+				line-height: 34rpx;
+			}
+
+			.goods-code {
+				font-size: 24rpx;
+				padding-top: 10rpx;
+			}
+
+			.goods-num {
+				padding-top: 10rpx;
+				font-size: 24rpx;
+
+				.price {
+					font-size: 28rpx;
+					font-weight: bold;
+					color: $uni-color-error;
+				}
+			}
+		}
+	}
+}
+</style>

+ 388 - 0
pagesT/Purchase/AddPurchaseReturn.vue

@@ -0,0 +1,388 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="150" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="关联采购单" prop="warehouseName">
+					<u-input @click="goPage('/pagesT/order/selPurchase')" class="dis-input" disabled
+						v-model="add_form.originNo" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<block v-if="!!add_form.originNo">
+					<u-form-item label="退货仓库">
+						<view class="form-value">{{ add_form.warehouseName }}</view>
+					</u-form-item>
+					<u-form-item label="供应商">
+						<view class="form-value">{{ add_form.supplierName }}</view>
+					</u-form-item>
+					<u-form-item label="采购员">
+						<view class="form-value">{{ add_form.buyerName }}</view>
+					</u-form-item>
+				</block>
+			</view>
+			<view class="form-model-view">
+				<u-form-item required label="商品清单">
+					<view @click="selGoodsPage" class="form-value add-btn-go">
+						<u-icon name="plus" size="24"></u-icon>
+						<text>选择商品</text>
+					</view>
+				</u-form-item>
+				<view class="goods-ul" v-if="goods_list.length">
+					<block v-for="(item, index) in goods_list" :key="index">
+						<view class="goods-li clearfix">
+							<view class="goods-img float_left">
+								<u-icon size="40" name="shangpin" custom-prefix="custom-icon" color="#cccccc"></u-icon>
+							</view>
+							<view class="del-icon" @click="delGoods(index, item)">
+								<u-icon size="40" name="minus-circle-fill" color="#fa3534"></u-icon>
+							</view>
+							<view class="float_left info">
+								<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+								<view class="goods-code">{{ item.goodsCode }}</view>
+								<view class="goods-num clearfix">
+									<view class="float_left">{{ item.unitName }};{{ item.skuName }}</view>
+									<text
+										class="float_right">可退:{{ $utils.formatNub(item.returnOnNum) }}{{ item.unitName }}</text>
+								</view>
+								<view class="goods-num clearfix">
+									<view class="float_left ">
+										<text class="price">{{ $utils.formattedNumber(item.buyerUnitPrice) }}</text>
+										<text style="margin: 0 10rpx;">x</text>
+										<input type="digit" @blur="buyerNumChange(index)" placeholder="退货数量"
+											v-model="item.buyerNum" />
+									</view>
+									<view class="float_right">
+										小计:
+										<text class="price">{{ $utils.formattedNumber(item.subtotalPrice) }}</text>
+									</view>
+								</view>
+								<view class="goods-num clearfix" v-if="item.isEq === 5">
+									<view class="float_left ">
+										<input type="digit" @blur="buyerNumChange(index)" placeholder="其他单位"
+											v-model="item.otherNum" />
+									</view>
+								</view>
+							</view>
+						</view>
+					</block>
+				</view>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="其他金额"><input type="digit" v-model="add_form.otherAmount" placeholder="请输入" />
+				</u-form-item>
+				<u-form-item label="退货金额"><input type="digit" v-model="purchaseAmount" placeholder="请输入" />
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="备注" label-position="top">
+					<u-input type="textarea" v-model="add_form.remark" />
+				</u-form-item>
+			</view>
+		</u-form>
+		<view class="detail-bottom">
+			<view class="handel-btn" @click="submit">提交</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				purchaseData: '',
+				pusrchaseOut_id: '',
+				goods_list: [],
+				goodsArrData: [],
+				deleteArray: [],
+				purchaseGoodsData: [],
+				add_form: {
+					originId: '',
+					originNo: '',
+					supplierId: '',
+					supplierName: '',
+					warehouseId: '',
+					warehouseName: '',
+					buyerId: '',
+					buyerName: '',
+					operatorName: '',
+					couponAmount: '',
+					otherAmount: '',
+					remark: '',
+					goodsData: [],
+					shopId: '',
+					shopName: ''
+				}
+			};
+		},
+		watch: {
+			purchaseData(val) {
+				if (val) {
+					this.selpurchase(val);
+				}
+			},
+			purchaseGoodsData(val) {
+				if (val) {
+					this.goods_list = val;
+				}
+			}
+		},
+		computed: {
+			userName() {
+				return this.$store.state.userInfo.name;
+			},
+			purchaseAmount() {
+				let sum = 0;
+				if (this.goods_list.length > 1) {
+					this.goods_list.forEach(item => {
+						sum = this.$NP.plus(sum, Number(item.subtotalPrice));
+					});
+				} else if (this.goods_list.length === 1) {
+					sum = Number(this.goods_list[0].subtotalPrice);
+				} else {
+					sum = 0;
+				}
+				return this.$NP.plus(sum, this.add_form.otherAmount);
+			}
+		},
+		onLoad(options) {
+			if (options.id) {
+				this.pusrchaseOut_id = options.id;
+				uni.setNavigationBarTitle({
+					title: '编辑采购退货单'
+				});
+				this.getPurchaseOutInfoById();
+			}
+		},
+		methods: {
+			// 详情
+			getPurchaseOutInfoById() {
+				this.$u.api.getPurchaseOutInfoById(this.pusrchaseOut_id).then(({
+					data
+				}) => {
+					this.add_form.warehouseName = data.warehouseName;
+					this.add_form.warehouseId = data.warehouseId;
+					this.add_form.originId = data.originId;
+					this.add_form.originNo = data.originNo;
+					this.add_form.shopId = data.shopId;
+					this.add_form.shopName = data.shopName;
+					this.add_form.supplierId = data.supplierId;
+					this.add_form.supplierName = data.supplierName;
+					this.add_form.buyerId = data.buyerId;
+					this.add_form.buyerName = data.buyerName;
+					this.add_form.operatorName = data.operatorName;
+					this.add_form.couponAmount = data.couponAmount;
+					this.add_form.otherAmount = data.otherAmount;
+					this.add_form.remark = data.remark;
+					this.goods_list = data.details.map(item => {
+						return {
+							...item,
+							buyerNum: Number(item.buyerNum)
+						};
+					});
+					this.getPurchaseInfoById(data.originId, data.warehouseId, 'detail');
+				});
+			},
+			selGoodsPage() {
+				const obj = {
+					goodsArrData: this.goodsArrData,
+					goods_list: this.goods_list
+				};
+				uni.setStorageSync('purchaseGoods', obj);
+				this.goPage('/pagesT/order/purchaseGoods');
+			},
+			buyerNumChange(index) {
+				const target = this.$u.deepClone(this.goods_list);
+				if (Number(target[index].buyerNum) > Number(target[index].returnOnNum)) {
+					target[index].buyerNum = this.$utils.formatNub(target[index].returnOnNum);
+				}
+				target[index].subtotalPrice = this.$NP.times(target[index].buyerNum, target[index].buyerUnitPrice);
+				this.goods_list = target;
+			},
+			submit() {
+				if (!this.add_form.originNo) {
+					this.$u.toast('请选择关联的采购单');
+					return;
+				}
+				if (!this.goods_list) {
+					this.$u.toast('请选择退货商品');
+					return;
+				}
+				const params = {
+					...this.add_form,
+					deleteArray: this.deleteArray,
+					goodsData: this.$u.deepClone(this.goods_list).map(item => {
+						delete item.num;
+						if (!this.pusrchaseOut_id) {
+							delete item.id;
+						}
+						return item;
+					})
+				};
+
+				if (this.pusrchaseOut_id) {
+					this.$u.api.editPurchaseOut(this.pusrchaseOut_id, params).then(res => {
+						this.$u.toast('编辑成功');
+						uni.navigateBack();
+					});
+				} else {
+					(params.operatorName = this.userName),
+					this.$u.api.addPurchaseOut(params).then(res => {
+						this.$u.toast('提交成功');
+						uni.navigateBack();
+					});
+				}
+			},
+			// 选择采购单 selpurchase
+			selpurchase(val) {
+				const id = val.id;
+				const warehouseId = val.warehouseId;
+				this.getPurchaseInfoById(id, warehouseId);
+				this.add_form.originId = val.id;
+				this.add_form.originNo = val.no;
+				this.add_form.shopId = val.shopId;
+				this.add_form.shopName = val.shopName;
+				this.add_form.buyerId = val.buyerId;
+				this.add_form.buyerName = val.buyerName;
+				this.add_form.remark = val.remark;
+				this.add_form.supplierId = val.supplierId;
+				this.add_form.supplierName = val.supplierName;
+				this.add_form.warehouseName = val.warehouseName;
+				this.add_form.warehouseId = val.warehouseId;
+			},
+			//  获取采购单详情
+			async getPurchaseInfoById(id, warehouseId, isdetail) {
+				this.$u.api
+					.getPurchaseAndBatchInfoById({
+						id: id,
+						warehouseId: warehouseId
+					})
+					.then(({
+						data
+					}) => {
+						if (!isdetail) {
+							this.goods_list = data.map(item => {
+								return {
+									id: item.id,
+									goodsId: item.basicGoodsId,
+									goodsCode: item.goodsCode,
+									goodsName: item.goodsName,
+									unitName: item.unitName,
+									skuName: item.skuName,
+									skuId: item.skuId,
+									purchaseNum: this.$utils.formatNub(item.buyerNum),
+									buyerNum: this.$utils.formatNub(item.returnOnNum),
+									inNum: item.inNum,
+									inOfNum: item.inOfNum,
+									returnOnNum: item.returnOnNum,
+									returnNum: item.returnNum,
+									inventoryNum: this.$utils.formatNub(item.num),
+									buyerUnitPrice: this.$utils.formatNub(item.buyerUnitPrice),
+									subtotalPrice: this.$utils.formatNub(item.subtotalPrice),
+									couponAmount: this.$utils.formatNub(item.couponAmount),
+									otherAmount: this.$utils.formatNub(item.otherAmount),
+									isEq: item.isEq,
+									otherNum: item.otherNum,
+								};
+							});
+						}
+						console.log(this.goods_list);
+						this.goodsArrData = data;
+					});
+			},
+			delGoods(index, row) {
+				if (this.goods_list.length === 1) {
+					this.$u.toast('至少保留一条数据');
+					return;
+				}
+				if (row.id) {
+					this.deleteArray.push(row.id);
+				}
+				this.goods_list.splice(index, 1);
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.goods-ul {
+		padding-top: 10rpx;
+
+		.more-goods {
+			line-height: 80rpx;
+			border-top: 1px solid #eeeeee;
+			text-align: center;
+			font-size: 24rpx;
+		}
+
+		.goods-title {
+			margin-bottom: 20rpx;
+			line-height: 80rpx;
+			font-size: 24rpx;
+			border-bottom: 1px solid #eeeeee;
+
+			.float_right {
+				color: $uni-color-primary;
+			}
+		}
+
+		.goods-li {
+			line-height: 32rpx;
+			padding-bottom: 24rpx;
+			position: relative;
+
+			.del-icon {
+				position: absolute;
+				top: 50%;
+				left: 0;
+				transform: translateY(-50%);
+			}
+
+			.goods-img {
+				margin-right: 20rpx;
+
+				image {
+					width: 150rpx;
+					height: 150rpx;
+					border-radius: 8rpx;
+					display: block;
+				}
+			}
+
+			.info {
+				width: 640rpx;
+
+				.goods-name {
+					width: 640rpx;
+					height: 34rpx;
+					line-height: 34rpx;
+				}
+
+				.goods-code {
+					font-size: 24rpx;
+					padding-top: 10rpx;
+				}
+
+				.goods-num {
+					padding-top: 10rpx;
+					font-size: 24rpx;
+
+					.float_left {
+						input {
+							display: inline-block;
+							border: 1px solid #eeeeee;
+							border-radius: 10rpx;
+							padding: 0 10rpx;
+							vertical-align: middle;
+							text-align: center;
+						}
+					}
+
+					.price {
+						font-size: 28rpx;
+						font-weight: bold;
+						color: $uni-color-error;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 147 - 0
pagesT/Purchase/AddSupplier.vue

@@ -0,0 +1,147 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="150" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="供应商名称">
+					<u-input v-model="add_form.title" placeholder="请输入供应商名称" />
+				</u-form-item>
+				<u-form-item required label="联系人">
+					<u-input v-model="add_form.realName" placeholder="请输入联系人" />
+				</u-form-item>
+				<u-form-item required label="联系电话">
+					<u-input v-model="add_form.mobile" placeholder="请输入手机号码" />
+				</u-form-item>
+				<u-form-item label="联系人职务">
+					<u-input v-model="add_form.position" placeholder="请输入职务" />
+				</u-form-item>
+				<u-form-item label="状态" v-if='$accessCheck($Access.SupplierUpdateEnableStatus)'>
+					<view class="form-value">
+						<u-switch style="transform: translateY(14rpx);" v-model="switchStatus"
+							:active-value="5" :inactive-value="4" size="40" @change='change'></u-switch>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item required label="所属区域">
+					<u-input v-model='area' class="dis-input" @click="region_show = true" disabled placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label-position="top" label="详细地址">
+					<u-input v-model="add_form.address" type="textarea" placeholder="请输入" />
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="开户人">
+					<u-input v-model="add_form.accountName" placeholder="请输入真实姓名" />
+				</u-form-item>
+				<u-form-item label="开户银行">
+					<u-input v-model="add_form.bankName" placeholder="请输入开户银行" />
+				</u-form-item>
+				<u-form-item label="银行账号">
+					<u-input v-model="add_form.bankCard" placeholder="请输入银行账号" />
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="备注" label-position="top">
+					<u-input v-model="add_form.remark" type="textarea" placeholder="请输入备注" />
+				</u-form-item>
+			</view>
+		</u-form>
+		<view class="detail-bottom">
+			<view class="handel-btn" @click="addSupplier">提交</view>
+		</view>
+		<RegionSel v-model="region_show" @confirm="confirm" @cancel="region_show = false" />
+	</view>
+</template>
+
+<script>
+	import RegionSel from '@/components/region/RegionSel.vue';
+	export default {
+		components: {
+			RegionSel
+		},
+		data() {
+			return {
+				region_show: false,
+				add_form: {
+					title: '',
+					provinceCode: '',
+					cityCode: '',
+					districtCode: '',
+					address: '',
+					realName: '',
+					mobile: '',
+					enableStatus: 5,
+					sex: 0,
+					phone: '',
+					position: '',
+					email: '',
+					remark: '',
+					accountName: '',
+					bankName: '',
+					bankCard: '',
+				},
+				area: '',
+				customer_id: '',
+				switchStatus:true
+			};
+		},
+		onLoad(options) {
+			if (options.id) {
+				this.customer_id = options.id
+				uni.setNavigationBarTitle({
+					title: '编辑供应商'
+				});
+				this.getSupplierInfoById();
+			}
+		},
+		methods: {
+			addSupplier() {
+				if (!this.add_form.title.trim() || !this.add_form.realName.trim() || !this.add_form.mobile.trim() || !this
+					.area.trim()) {
+					this.$u.toast('必填项不能为空')
+					return
+				}
+				if (this.customer_id) {
+					this.$u.api.editSupplier(this.customer_id, this.add_form).then(res => {
+						this.$u.toast('编辑成功')
+						setTimeout(() => {
+							uni.navigateBack()
+						}, 500)
+					})
+				} else {
+					this.$u.api.addSupplier(this.add_form).then(res => {
+						this.$u.toast('提交成功')
+						setTimeout(() => {
+							uni.navigateBack()
+						}, 500)
+					})
+				}
+
+			},
+			confirm(val) {
+				this.add_form.provinceCode = val[0].value;
+				this.add_form.cityCode = val[1].value;
+				this.add_form.districtCode = val[2].value;
+				let name = '';
+				val.forEach(item => {
+					name += item.label;
+				});
+				this.area = name;
+			},
+			getSupplierInfoById() {
+				this.$u.api.getSupplierInfoById(this.customer_id).then(res => {
+					this.add_form = res.data
+					this.switchStatus=res.data.enableStatus===5
+					this.area = res.data.area.provinceName + "-" + res.data.area.cityName + "-" + res.data.area
+						.districtName
+				})
+			},
+			change(val) {
+				this.add_form.enableStatus = val
+			}
+		}
+	};
+</script>
+
+<style></style>

+ 289 - 0
pagesT/Purchase/PurchaseDetail.vue

@@ -0,0 +1,289 @@
+<template>
+	<view class="detail-view">
+		<view class="top-view clearfix">
+			<view class="float_left">
+				<text v-if="order_detail.auditStatus === 2" class="status-text">已审核</text>
+				<text v-else class="status-text">待审核</text>
+			</view>
+		</view>
+		<view class="detail-cont">
+			<view class="info-li clearfix">
+				<view class="label">订单编号</view>
+				<view class="value" @click="copy(order_detail.no)">
+					<u-icon margin-right="20" label-pos="left" :label="order_detail.no" name="copy" custom-prefix="custom-icon" size="24"></u-icon>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">采购仓库</view>
+				<view class="value">{{ order_detail.warehouseName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">采购员</view>
+				<view class="value">{{ order_detail.buyerName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">供应商</view>
+				<view class="value">{{ order_detail.supplierName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">制单人</view>
+				<view class="value">{{ order_detail.operatorName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">制单时间</view>
+				<view class="value">{{ $u.timeFormat(order_detail.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+			</view>
+			<block v-if="order_detail.auditStatus === 2">
+				<view class="info-li clearfix">
+					<view class="label">审核人</view>
+					<view class="value">{{ order_detail.auditName }}</view>
+				</view>
+				<view class="info-li clearfix">
+					<view class="label">审核时间</view>
+					<view class="value">{{ $u.timeFormat(order_detail.auditTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+				</view>
+			</block>
+			<view class="goods-title">商品清单</view>
+			<view class="goods-ul">
+				<view class="goods-li clearfix" v-for="(item, index) in order_detail.details" :key="index">
+					<view class="goods-img float_left"><image src="../../static/img/goods.png" mode="aspectFill"></image></view>
+					<view class="float_left info">
+						<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+						<view class="goods-code clearfix">
+							<view class="float_left">{{ item.goodsCode }}</view>
+							<text class="float_right">x{{ $utils.formatNub(item.buyerNum) }}</text>
+						</view>
+						<view class="goods-num clearfix">
+							<view class="float_left">{{ item.unitName }};{{ item.skuName }}</view>
+							<text class="float_right">其他单位:{{ $utils.formatNub(item.otherNum) }}</text>
+						</view>
+						<view class="goods-num clearfix">
+							<view class="float_left ">
+								<text class="price">{{ $utils.formattedNumber(item.buyerUnitPrice) }}</text>
+							</view>
+							<view class="float_right">
+								小计:
+								<text class="price">{{ $utils.formattedNumber(item.subtotalPrice) }}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">其他金额</view>
+				<view class="value">{{ $utils.formattedNumber(order_detail.otherAmount) }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">优惠金额</view>
+				<view class="value">
+					<text class="error-color">-</text>
+					{{ $utils.formattedNumber(order_detail.couponAmount) }}
+				</view>
+			</view>
+
+			<view class="info-li clearfix">
+				<view class="label money-label">采购金额</view>
+				<view class="value money-value">{{ $utils.formattedNumber(order_detail.purchaseAmount) }}</view>
+			</view>
+			<view class="remark-li">
+				<view class="label">备注</view>
+				<view class="remark">
+					<text>{{ order_detail.remark || '无' }}</text>
+				</view>
+			</view>
+		</view>
+		<view class="detail-bottom" v-if="order_detail.auditStatus === 1">
+			<view v-if="$accessCheck($Access.PurchaseOrderDelPurchase)" class="handel-btn info-btn" @click="openModel('请确认是否要删除采购订单?', '删除')">删除</view>
+			<view v-if="$accessCheck($Access.PurchaseOrderEditPurchase)" class="handel-btn" @click="goPage('/pagesT/Purchase/AddPurchase?id=' + order_id)">编辑</view>
+			<view v-if="$accessCheck($Access.PurchaseOrderUpdateAuditStatus)" class="handel-btn" @click="openModel('确定要审核通过该采购订单吗?', '审核')">审核</view>
+		</view>
+		<u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm"></u-modal>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			model_tag: '',
+			model_show: false,
+			model_content: '',
+			order_id: 0,
+			order_detail: {}
+		};
+	},
+	onPullDownRefresh() {
+		this.getPurchaseInfoById();
+	},
+	computed: {
+		userInfo() {
+			return this.$store.state.userInfo;
+		}
+	},
+	onLoad(options) {
+		this.order_id = options.id;
+	},
+	onShow() {
+		this.getPurchaseInfoById();
+	},
+	methods: {
+		// 详情
+		getPurchaseInfoById() {
+			this.$u.api
+				.getPurchaseInfoById(this.order_id)
+				.then(res => {
+					uni.stopPullDownRefresh();
+					this.order_detail = res.data;
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		},
+		// 打开提示框
+		openModel(content, tag) {
+			this.model_content = content;
+			this.model_show = true;
+			this.model_tag = tag;
+		},
+		// 审核
+		modelConfirm() {
+			switch (this.model_tag) {
+				case '审核':
+					this.updateAuditStatusPurchase();
+					break;
+				case '删除':
+					this.delPurchase();
+					break;
+			}
+		},
+		// 审核订单
+		updateAuditStatusPurchase() {
+			this.$u.api
+				.updateAuditStatusPurchase(this.order_id, {
+					auditStatus: '2',
+					auditName: this.userInfo.name
+				})
+				.then(res => {
+					this.$u.toast('审核成功');
+					this.getPurchaseInfoById();
+				});
+		},
+		// 删除采购单
+		delPurchase() {
+			this.$u.api.delPurchase(this.order_id).then(res => {
+				this.$u.toast('已删除');
+				setTimeout(() => {
+					uni.navigateBack();
+				}, 2000);
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.detail-view {
+	padding-bottom: 100rpx;
+}
+.top-view {
+	background-color: $uni-color-primary;
+	height: 200rpx;
+	padding: 0 30rpx;
+	color: #ffffff;
+	font-size: 40rpx;
+	line-height: 100rpx;
+	.status-text {
+		margin-right: 10rpx;
+	}
+	.float_right {
+		font-size: 28rpx;
+	}
+}
+.detail-cont {
+	width: 710rpx;
+	margin: 0 auto;
+	background-color: #ffffff;
+	border-radius: 20rpx;
+	padding: 20rpx 0;
+	overflow: hidden;
+	transform: translateY(-80rpx);
+	.info-li {
+		padding: 0 30rpx;
+		line-height: 80rpx;
+		.label {
+			float: left;
+			color: #6c6c6c;
+		}
+		.value {
+			float: right;
+		}
+		.money-label {
+			font-weight: bold;
+		}
+		.money-value {
+			font-weight: bold;
+			font-size: 30rpx;
+		}
+	}
+	.remark-li {
+		padding: 0 30rpx;
+		.label {
+			color: #6c6c6c;
+			line-height: 60rpx;
+		}
+	}
+	.b-b {
+		border-bottom: 1px solid #eeeeee;
+	}
+	.goods-title {
+		background-color: #5e6a84;
+		line-height: 72rpx;
+		width: 644rpx;
+		margin: 30rpx auto 0;
+		color: #ffffff;
+		border-top-left-radius: 20rpx;
+		border-top-right-radius: 20rpx;
+		padding: 0 24rpx;
+		position: relative;
+		z-index: 1;
+	}
+	.goods-ul {
+		padding: 0 30rpx 30rpx;
+		box-shadow: 0px -3px 12rpx 0px #e4eaf5;
+		border-bottom: 1px solid #eeeeee;
+
+		.goods-li {
+			padding-top: 24rpx;
+			.goods-img {
+				margin-right: 20rpx;
+				image {
+					width: 150rpx;
+					height: 150rpx;
+					border-radius: 8rpx;
+					display: block;
+				}
+			}
+			.info {
+				.goods-name {
+					width: 470rpx;
+					height: 34rpx;
+					line-height: 34rpx;
+				}
+				.goods-code {
+					font-size: 24rpx;
+					padding-top: 10rpx;
+				}
+				.goods-num {
+					padding-top: 10rpx;
+					font-size: 24rpx;
+					.price {
+						font-size: 28rpx;
+						font-weight: bold;
+						color: $uni-color-error;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 206 - 0
pagesT/Purchase/PurchaseGoods.vue

@@ -0,0 +1,206 @@
+<template>
+	<view>
+		<view class="goods-ul">
+			<view class="goods-li" v-for="(item, index) in goods_list" :key="index">
+				<view class="del-icon" @click="delGoods(index)"><u-icon name="minus-circle-fill" color="#fa3534" size="40"></u-icon></view>
+				<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+				<view class="goods-sku clearfix">
+					<view class="float_left" style="width: 430rpx;">规格:{{ item.unitName }}{{ item.specGropName }}</view>
+					<view class="float_right">{{ item.goodsCode }}</view>
+				</view>
+				<view class="goods-sku clearfix" v-if="item.skuValue">
+					<view class="float_left">换算比例:{{ item.skuValue }}</view>
+					<view class="float_right">转换数量:{{ item.skuNum }}</view>
+				</view>
+				<view class="num-ul">
+					<view class="num-li">
+						<view class="label">采购单价</view>
+						<view class="value"><input type="digit" @blur="subtotalPriceChange(index)" v-model="item.buyerUnitPrice" /></view>
+					</view>
+					<view class="num-li">
+						<view class="label">采购数量</view>
+						<view class="value"><input type="digit" @blur="subtotalPriceChange(index)" placeholder="请输入" v-model="item.buyerNum" /></view>
+					</view>
+					<view class="num-li" v-if="item.isEq === 5">
+						<view class="label">其他单位</view>
+						<view class="value"><input type="digit" @blur="subtotalPriceChange(index)" placeholder="请输入" v-model="item.otherNum" /></view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="detail-bottom clearfix">
+			<view class="left-view">
+				<view class="total-price">¥{{ purchaseAmount }}</view>
+				<view class="left-desc">已选{{ goods_list.length }}种,{{ totalNum }}个</view>
+			</view>
+			<view class="right-view" @click="goodsConfirm"><view class="btn-li">确定</view></view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			value: 0,
+			goods_list: []
+		};
+	},
+	computed: {
+		totalNum() {
+			let sum = 0;
+			if (this.goods_list.length > 1) {
+				this.goods_list.forEach(item => {
+					sum = this.$NP.plus(sum, Number(item.buyerNum));
+				});
+			} else if (this.goods_list.length === 1) {
+				sum = Number(this.goods_list[0].buyerNum);
+			} else {
+				sum = 0;
+			}
+			return sum || 0;
+		},
+		purchaseAmount() {
+			let sum = 0;
+			if (this.goods_list.length > 1) {
+				this.goods_list.forEach(item => {
+					sum = this.$NP.plus(sum, Number(item.subtotalPrice));
+				});
+			} else if (this.goods_list.length === 1) {
+				sum = Number(this.goods_list[0].subtotalPrice);
+			} else {
+				sum = 0;
+			}
+			return sum || 0;
+		}
+	},
+	onLoad() {
+		this.goods_list = uni.getStorageSync('PurchaseGoods');
+		console.log('goods_list::', this.goods_list);
+	},
+	methods: {
+		subtotalPriceChange(index) {
+			const target = this.$u.deepClone(this.goods_list);
+			target[index].subtotalPrice = this.$NP.times(target[index].buyerUnitPrice, target[index].buyerNum);
+			this.goods_list = target;
+		},
+		goodsConfirm() {
+			this._prePage().purchaseGoods = this.goods_list;
+			uni.navigateBack();
+		},
+		delGoods(index) {
+			this.goods_list.splice(index, 1);
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.goods-ul {
+	padding-bottom: 100rpx;
+
+	.goods-li {
+		background-color: #ffffff;
+		border-bottom: 1px solid #eeeeee;
+		padding: 20rpx;
+		padding-left: 80rpx;
+		font-size: 24rpx;
+		color: #6c6c6c;
+		line-height: 50rpx;
+		position: relative;
+
+		.del-icon {
+			position: absolute;
+			top: 50%;
+			left: 20rpx;
+			transform: translateY(-50%);
+		}
+
+		.goods-name {
+			-webkit-line-clamp: 2;
+			font-size: 28rpx;
+			color: #111111;
+		}
+
+		.price {
+			font-size: 28rpx;
+			color: $uni-color-error;
+		}
+
+		.goods-num {
+			input {
+				width: 170rpx;
+				display: inline-block;
+				border: 1px solid #eeeeee;
+				line-height: 60rpx;
+				border-radius: 10rpx;
+				padding: 0 10rpx;
+				vertical-align: middle;
+				font-size: 24rpx;
+			}
+		}
+	}
+}
+.num-ul {
+	display: flex;
+	font-size: 24rpx;
+	padding-top: 10rpx;
+	.num-li {
+		flex: 4;
+		border-right: 1px solid #ecf0f7;
+		text-align: center;
+		padding: 0 10rpx;
+		&:last-child {
+			border-right: 0 none;
+		}
+		.label {
+			color: #879bba;
+		}
+		.value {
+			height: 40rpx;
+			line-height: 40rpx;
+			border-bottom: 1px solid $uni-color-primary;
+			input {
+				font-size: 24rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+			}
+		}
+	}
+}
+.detail-bottom {
+	display: block;
+	background-color: #ffffff;
+	.left-view {
+		float: left;
+		padding: 10rpx 30rpx;
+
+		.total-price {
+			color: $uni-color-error;
+			font-weight: bold;
+		}
+
+		.left-desc {
+			font-size: 24rpx;
+			color: #6c6c6c;
+		}
+	}
+
+	.right-view {
+		float: right;
+		padding: 10rpx 30rpx;
+		margin-left: 30rpx;
+
+		.btn-li {
+			width: 200rpx;
+			text-align: center;
+			line-height: 80rpx;
+			height: 80rpx;
+			background: $uni-color-primary;
+			border: 1px solid $uni-color-primary;
+			color: #ffffff;
+			border-radius: 10rpx;
+		}
+	}
+}
+</style>

+ 294 - 0
pagesT/Purchase/PurchaseReturnDetail.vue

@@ -0,0 +1,294 @@
+<template>
+	<view class="detail-view">
+		<view class="top-view clearfix">
+			<view class="float_left">
+				<text v-if="order_detail.auditStatus === 2" class="status-text">已审核</text>
+				<text v-else class="status-text">待审核</text>
+			</view>
+		</view>
+		<view class="detail-cont">
+			<view class="info-li clearfix">
+				<view class="label">退货单号</view>
+				<view class="value" @click="copy(order_detail.no)">
+					<u-icon margin-right="20" label-pos="left" :label="order_detail.no" name="copy" custom-prefix="custom-icon" size="24"></u-icon>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">源采购单号</view>
+				<view class="value" @click="copy(order_detail.originNo)">
+					<u-icon margin-right="20" label-pos="left" :label="order_detail.no" name="copy" custom-prefix="custom-icon" size="24"></u-icon>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">退货仓库</view>
+				<view class="value">{{ order_detail.warehouseName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">出库状态</view>
+				<view class="value">
+					<text v-if="order_detail.outStatus === 5" class="success-status">已出库</text>
+					<text v-else class="warning-status">未出库</text>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">采购员</view>
+				<view class="value">{{ order_detail.buyerName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">供应商</view>
+				<view class="value">{{ order_detail.supplierName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">制单人</view>
+				<view class="value">{{ order_detail.operatorName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">制单时间</view>
+				<view class="value">{{ $u.timeFormat(order_detail.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+			</view>
+			<block v-if="order_detail.auditStatus === 2">
+				<view class="info-li clearfix">
+					<view class="label">审核人</view>
+					<view class="value">{{ order_detail.auditName }}</view>
+				</view>
+				<view class="info-li clearfix">
+					<view class="label">审核时间</view>
+					<view class="value">{{ $u.timeFormat(order_detail.auditTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+				</view>
+			</block>
+			<view class="goods-title">商品清单</view>
+			<view class="goods-ul">
+				<view class="goods-li clearfix" v-for="(item, index) in order_detail.details" :key="index">
+					<view class="goods-img float_left"><image src="../../static/img/goods.png" mode="aspectFill"></image></view>
+					<view class="float_left info">
+						<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+						<view class="goods-code clearfix">
+							<view class="float_left">{{ item.goodsCode }}</view>
+							<view class="float_right">采购:{{ $utils.formatNub(item.purchaseNum) }}</view>
+						</view>
+						<view class="goods-num clearfix">
+							<view class="float_left">{{ item.unitName }};{{ item.skuName }}</view>
+							<text class="float_right">退货:{{ $utils.formatNub(item.buyerNum) }}</text>
+						</view>
+						<view class="goods-num clearfix">
+							<view class="float_left ">
+								<text class="price">{{ $utils.formattedNumber(item.buyerUnitPrice) }}</text>
+							</view>
+							<view class="float_right">
+								小计:
+								<text class="price">{{ $utils.formattedNumber(item.subtotalPrice) }}</text>
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">其他金额</view>
+				<view class="value">{{ $utils.formattedNumber(order_detail.otherAmount) }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label money-label">退货金额</view>
+				<view class="value money-value">{{ $utils.formattedNumber(order_detail.purchaseAmount) }}</view>
+			</view>
+			<view class="remark-li">
+				<view class="label">退货说明</view>
+				<view class="remark">
+					<text>{{ order_detail.remark || '无' }}</text>
+				</view>
+			</view>
+		</view>
+		<view class="detail-bottom" v-if="order_detail.auditStatus === 1">
+			<view v-if="$accessCheck($Access.PurchaseReturnOrderDelPurchaseOut)" class="handel-btn info-btn" @click="openModel('请确认是否要删除采购退货单?', '删除')">删除</view>
+			<view v-if="$accessCheck($Access.PurchaseReturnOrderEditPurchase)" class="handel-btn" @click="goPage('/pagesT/Purchase/AddPurchaseReturn?id=' + order_id)">编辑</view>
+			<view v-if="$accessCheck($Access.PurchaseReturnOrderUpdateAuditStatus)" class="handel-btn" @click="openModel('确定要审核通过该退货单吗?', '审核')">审核</view>
+		</view>
+		<u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm"></u-modal>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			model_tag: '',
+			model_show: false,
+			model_content: '',
+			order_id: 0,
+			order_detail: {}
+		};
+	},
+	onPullDownRefresh() {
+		this.getPurchaseOutInfoById();
+	},
+	computed: {
+		userInfo() {
+			return this.$store.state.userInfo;
+		}
+	},
+	onLoad(options) {
+		this.order_id = options.id;
+	},
+	onShow() {
+		this.getPurchaseOutInfoById();
+	},
+	methods: {
+		// 详情
+		getPurchaseOutInfoById() {
+			this.$u.api
+				.getPurchaseOutInfoById(this.order_id)
+				.then(res => {
+					uni.stopPullDownRefresh();
+					this.order_detail = res.data;
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		},
+		// 打开提示框
+		openModel(content, tag) {
+			this.model_content = content;
+			this.model_show = true;
+			this.model_tag = tag;
+		},
+		// 审核
+		modelConfirm() {
+			switch (this.model_tag) {
+				case '审核':
+					this.updatePurchaseOut();
+					break;
+				case '删除':
+					this.delPurchaseOut();
+					break;
+			}
+		},
+		// 审核订单
+		updatePurchaseOut() {
+			this.$u.api
+				.updatePurchaseOut(this.order_id, {
+					auditStatus: '2',
+					auditName: this.userInfo.name
+				})
+				.then(res => {
+					this.$u.toast('审核成功');
+					this.getPurchaseOutInfoById();
+				});
+		},
+		// 删除采购单
+		delPurchaseOut() {
+			this.$u.api.delPurchaseOut(this.order_id).then(res => {
+				this.$u.toast('已删除');
+				setTimeout(() => {
+					uni.navigateBack();
+				}, 2000);
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.detail-view {
+	padding-bottom: 100rpx;
+}
+.top-view {
+	background-color: $uni-color-primary;
+	height: 200rpx;
+	padding: 0 30rpx;
+	color: #ffffff;
+	font-size: 40rpx;
+	line-height: 100rpx;
+	.status-text {
+		margin-right: 10rpx;
+	}
+	.float_right {
+		font-size: 28rpx;
+	}
+}
+.detail-cont {
+	width: 710rpx;
+	margin: 0 auto;
+	background-color: #ffffff;
+	border-radius: 20rpx;
+	padding: 20rpx 0;
+	overflow: hidden;
+	transform: translateY(-80rpx);
+	.info-li {
+		padding: 0 30rpx;
+		line-height: 80rpx;
+		.label {
+			float: left;
+			color: #6c6c6c;
+		}
+		.value {
+			float: right;
+		}
+		.money-label {
+			font-weight: bold;
+		}
+		.money-value {
+			font-weight: bold;
+			font-size: 30rpx;
+		}
+	}
+	.remark-li {
+		padding: 0 30rpx;
+		.label {
+			color: #6c6c6c;
+			line-height: 60rpx;
+		}
+	}
+	.b-b {
+		border-bottom: 1px solid #eeeeee;
+	}
+	.goods-title {
+		background-color: #5e6a84;
+		line-height: 72rpx;
+		width: 644rpx;
+		margin: 30rpx auto 0;
+		color: #ffffff;
+		border-top-left-radius: 20rpx;
+		border-top-right-radius: 20rpx;
+		padding: 0 24rpx;
+		position: relative;
+		z-index: 1;
+	}
+	.goods-ul {
+		padding: 0 30rpx 30rpx;
+		box-shadow: 0px -3px 12rpx 0px #e4eaf5;
+		border-bottom: 1px solid #eeeeee;
+
+		.goods-li {
+			padding-top: 24rpx;
+			.goods-img {
+				margin-right: 20rpx;
+				image {
+					width: 150rpx;
+					height: 150rpx;
+					border-radius: 8rpx;
+					display: block;
+				}
+			}
+			.info {
+				.goods-name {
+					width: 470rpx;
+					height: 34rpx;
+					line-height: 34rpx;
+				}
+				.goods-code {
+					font-size: 24rpx;
+					padding-top: 10rpx;
+				}
+				.goods-num {
+					padding-top: 10rpx;
+					font-size: 24rpx;
+					.price {
+						font-size: 28rpx;
+						font-weight: bold;
+						color: $uni-color-error;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 222 - 0
pagesT/Purchase/PurchaseReturnOrder.vue

@@ -0,0 +1,222 @@
+<template>
+	<view v-if="$accessCheck($Access.PurchaseReturnOrderGetAllPurchaseOut)">
+		<view class="keyword-view clearfix">
+			<view class="float_left">
+				<u-search @clear="searchData()" @search="searchData()" :show-action="false" :clearabled="true" placeholder="采购退货单号" v-model="search_form.no"></u-search>
+			</view>
+			<view class="float_right" @click="openSearch"><text class="custom-icon custom-icon-shaixuan"></text></view>
+		</view>
+		<view class="list-ul">
+			<block v-for="(item, index) in purchase_list" :key="index">
+				<view v-if="$accessCheck($Access.PurchaseReturnOrderGetPurchaseOutInfoById)" class="list-li" @click="goPage(`/pagesT/Purchase/PurchaseReturnDetail?id=${item.id}`)">
+					<view class="top clearfix">
+						<view class="ellipsis float_left">{{ item.supplierName }}</view>
+						<view class="float_right">
+							<text v-if="item.auditStatus === 2" class="success-status">已审核</text>
+							<text v-else class="warning-status">待审核</text>
+							<u-icon name="arrow-right" size="28" color="#999999"></u-icon>
+						</view>
+					</view>
+					<view class="list-cont">
+						<view class="total-money">{{ $utils.formattedNumber(item.purchaseAmount) }}</view>
+						<view class="info-li" style="font-size: 28rpx; color: #111111;">{{ item.warehouseName }}</view>
+						<view class="info-li" @click.stop="copy(item.no)">
+							<text style="margin-right: 20rpx;">{{ item.no }}</text>
+							<u-icon name="copy" custom-prefix="custom-icon" size="22"></u-icon>
+						</view>
+						<view class="info-li clearfix">
+							<text class="float_left">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</text>
+							<view class="float_right">
+								<text v-if="item.outStatus === 5" class="success-status">已出库</text>
+								<text v-else class="warning-status">未出库</text>
+							</view>
+						</view>
+						<view class="info-li clearfix">
+							<text class="float_left">采购员:{{ item.buyerName }}</text>
+						</view>
+					</view>
+				</view>
+			</block>
+		</view>
+		<u-loadmore v-if="purchase_list.length" :status="load_status" />
+		<view v-else class="empty-view"><u-empty text="暂无数据" mode="list"></u-empty></view>
+		<addBtn v-if="$accessCheck($Access.PurchaseReturnOrderAddPurchaseOut)" url="/pagesT/Purchase/AddPurchaseReturn"></addBtn>
+		<u-popup v-model="search_show" mode="right">
+			<view class="search-pop">
+				<view class="form-view">
+					<u-form label-width="160rpx" label-position="left">
+						<!-- <u-form-item label="仓库">
+							<view class="clearfix form-val" @click="goPage('/pagesT/werahouse/selWerahouse')">
+								<text class="float_left ellipsis">{{ search_form.warehouseId ? warehouse_name : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('warehouseId')">
+									<u-icon :name="!search_form.warehouseId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item> -->
+						<u-form-item label-position="top" label="审核状态">
+							<text
+								v-for="(item, index) in order_status"
+								:key="index"
+								class="check-li"
+								:class="[search_form.auditStatus === item.value ? 'active' : '']"
+								@click="statusChange(item)"
+							>
+								{{ item.label }}
+							</text>
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="search-btn">
+					<view class="btn-li" @click="clearValue()">重置</view>
+					<view class="btn-li" @click="searchData">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			order_status: [{ value: 2, label: '已审核' }, { value: 1, label: '待审核' }],
+			search_show: false,
+			warehouse_name: '',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			load_status: 'nomore',
+			purchase_list: [],
+			werahouseData: '',
+			search_form: {
+				no: '',
+				auditStatus: '',
+				warehouseId: ''
+			}
+		};
+	},
+	watch: {
+		werahouseData(val) {
+			if (val) {
+				this.search_form.warehouseId = val.id;
+				this.warehouse_name = val.warehouseName;
+			}
+		}
+	},
+	onShow() {
+		this.page = 1;
+		this.searchData();
+	},
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getAllPurchaseOut();
+		}
+	},
+	onPullDownRefresh() {
+		this.searchData();
+	},
+	methods: {
+		clearValue(key) {
+			if (!key) {
+				this.search_form = {
+					no: '',
+					auditStatus: ''
+					// warehouseId: ''
+				};
+				this.searchData();
+			} else {
+				this.search_form[key] = '';
+			}
+		},
+		openSearch() {
+			this.search_show = true;
+		},
+		statusChange(row) {
+			this.search_form.auditStatus = row.value;
+		},
+		getAllPurchaseOut() {
+			this.load_status = 'loading';
+			this.$u.api
+				.getAllPurchaseOut({
+					auditStatus: this.search_form.auditStatus,
+					sourceNo: this.search_form.no,
+					page: this.page,
+					pageSize: this.pageSize
+					// warehouseId: this.search_form.warehouseId
+				})
+				.then(res => {
+					if (this.page === 1) {
+						this.purchase_list = res.data;
+					} else {
+						this.purchase_list = this.purchase_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				});
+		},
+		searchData() {
+			this.page = 1;
+			this.search_show = false;
+			this.getAllPurchaseOut();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.keyword-view {
+	position: fixed;
+	width: 100%;
+	top: 0;
+	left: 0;
+	padding: 20rpx 24rpx;
+	background-color: #ffffff;
+	z-index: 9;
+	.float_left {
+		width: 640rpx;
+	}
+	.float_right {
+		line-height: 64rpx;
+		width: 50rpx;
+		text-align: center;
+		color: #666666;
+	}
+}
+.list-ul {
+	padding-top: 100rpx;
+	.list-li {
+		width: 710rpx;
+		background-color: #ffffff;
+		margin: 20rpx auto;
+		border-radius: 20rpx;
+		padding: 30rpx 24rpx;
+		.top {
+			padding-bottom: 20rpx;
+			border-bottom: 1px solid #eeeeee;
+			.float_left {
+				width: 400rpx;
+				font-weight: bold;
+			}
+		}
+		.list-cont {
+			padding-top: 20rpx;
+			position: relative;
+			.total-money {
+				position: absolute;
+				top: 45%;
+				right: 0;
+				transform: translateY(-50%);
+				color: $uni-color-error;
+				font-weight: bold;
+			}
+			.info-li {
+				color: #6c6c6c;
+				font-size: 24rpx;
+				padding-bottom: 10rpx;
+			}
+		}
+	}
+}
+</style>

+ 141 - 0
pagesT/Purchase/Supplier.vue

@@ -0,0 +1,141 @@
+<template>
+	<view>
+		<view class="tabs-view">
+			<view class="keyword-view clearfix">
+				<view class="float_left"><u-search :show-action="false" :clearabled="true" placeholder="供应商名称" v-model="keyword"></u-search></view>
+				<view v-if="$accessCheck($Access.SupplierAddSupplier)" class="float_right" @click="goPage('/pagesT/Purchase/AddSupplier')"><u-icon name="plus" color="#333333" size="40"></u-icon></view>
+			</view>
+		</view>
+		<view class="list-ul" v-if="$accessCheck($Access.SupplierGetAllSupplier)">
+			<view class="list-li" v-for="(item, index) in supplier_list" :key="index" @click="goPage('/pagesT/Purchase/SupplierDetail?id=' + item.id)">
+				<view class="title clearfix">
+					<view class="float_left">{{ item.title }}</view>
+					<view class="float_right">
+						<text class="success-status" v-if="item.enableStatus === 5">启用</text>
+						<text class="danger-status" v-else>禁用</text>
+						<text class="custom-icon custom-icon-jinru"></text>
+					</view>
+				</view>
+				<view class="list-cont">
+					<view class="list-cont-li">编号:{{ item.code || '--' }}</view>
+					<view class="list-cont-li clearfix">
+						<view class="float_left">联系人:{{ item.realName || '--' }}</view>
+						<view class="float_right mobile" @click.stop="callPhone(item.mobile)">
+							{{ item.mobile }}
+							<u-icon name="arrow-right" size="24"></u-icon>
+						</view>
+					</view>
+					<view class="list-cont-li clearfix">地区:{{ item.area.provinceName }} {{ item.area.cityName }} {{ item.area.districtName }} {{ item.area.address }}</view>
+				</view>
+			</view>
+			<view v-if="!supplier_list.length" class="empty-view"><u-empty text="暂无数据" mode="list"></u-empty></view>
+			<u-loadmore v-if="supplier_list.length" :status="load_status" />
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			supplier_list: [],
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			tabs_current: 0,
+			keyword: ''
+		};
+	},
+	onShow() {
+		this.getAllSupplier();
+	},
+	onReachBottom() {
+		if (this.tab_current === 0) {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllSupplier();
+			}
+		}
+	},
+	onPullDownRefresh() {
+		this.getAllSupplier();
+	},
+	methods: {
+		getAllSupplier() {
+			this.$u.api
+				.getAllSupplier({
+					page: this.page,
+					pageSize: this.pageSize,
+					keyword: this.keyword
+				})
+				.then(res => {
+					uni.stopPullDownRefresh();
+					if (this.page === 1) {
+						this.supplier_list = res.data;
+					} else {
+						this.supplier_list = this.supplier_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page,this.pageSize,this.total);
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.tabs-view {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	background-color: #ffffff;
+	.keyword-view {
+		padding: 20rpx 24rpx;
+		.float_left {
+			width: 640rpx;
+		}
+		.float_right {
+			line-height: 64rpx;
+			width: 50rpx;
+			text-align: center;
+			color: #666666;
+		}
+	}
+}
+
+.list-ul {
+	padding-top: 102rpx;
+	.list-li {
+		padding: 0 24rpx 20rpx;
+		margin-top: 20rpx;
+		background-color: #ffffff;
+		.title {
+			line-height: 80rpx;
+			border-bottom: 1px solid #eeeeee;
+			.float_left {
+				font-weight: bold;
+			}
+			.float_rigth {
+				.custom-icon-jinru {
+					margin-left: 10rpx;
+					font-size: 28rpx;
+				}
+			}
+		}
+		.list-cont {
+			margin-top: 10rpx;
+			.list-cont-li {
+				line-height: 60rpx;
+				.mobile {
+					color: $uni-color-primary;
+				}
+			}
+		}
+	}
+}
+</style>

+ 154 - 0
pagesT/Purchase/SupplierDetail.vue

@@ -0,0 +1,154 @@
+<template>
+	<view>
+		<view class="detail-view" v-if="$accessCheck($Access.SupplierGetSupplierInfoById)">
+			<u-form label-width="150">
+				<view class="form-model-view">
+					<u-form-item label="供应商编号">
+						<view class="form-value">{{ supplier_detail.code }}</view>
+					</u-form-item>
+					<u-form-item label="供应商名称">
+						<view class="form-value">{{ supplier_detail.title }}</view>
+					</u-form-item>
+					<u-form-item label="联系人">
+						<view class="form-value">{{ supplier_detail.realName }}</view>
+					</u-form-item>
+					<u-form-item label="联系电话">
+						<view class="form-value mobile" @click="callPhone(supplier_detail.mobile)">
+							{{ supplier_detail.mobile }}
+							<u-icon name="arrow-right" size="28"></u-icon>
+						</view>
+					</u-form-item>
+					<u-form-item label="联系人职务">
+						<view class="form-value">{{ supplier_detail.position }}</view>
+					</u-form-item>
+					<u-form-item label="状态" v-if='$accessCheck($Access.SupplierUpdateEnableStatus)'>
+						<view class="form-value">
+							<u-switch style="transform: translateY(14rpx);" @change="enableStatusChange"
+								v-model="enable_status" :active-value="5" :inactive-value="5" size="40"></u-switch>
+						</view>
+					</u-form-item>
+				</view>
+				<view class="form-model-view">
+					<u-form-item label="所属区域" label-position="top">
+						<block v-if="supplier_detail.area">
+							{{ supplier_detail.area.provinceName }}-{{ supplier_detail.area.cityName }}-{{ supplier_detail.area.districtName }}-{{ supplier_detail.area.address }}
+						</block>
+					</u-form-item>
+				</view>
+				<view class="form-model-view">
+					<u-form-item label="开户人">
+						<view class="form-value">{{ supplier_detail.accountName || '--' }}</view>
+					</u-form-item>
+					<u-form-item label="开户银行">
+						<view class="form-value">{{ supplier_detail.bankName || '--' }}</view>
+					</u-form-item>
+					<u-form-item label="银行账号">
+						<view class="form-value">{{ supplier_detail.bankCard || '--' }}</view>
+					</u-form-item>
+				</view>
+				<view class="form-model-view">
+					<u-form-item label="备注" label-position="top">{{ supplier_detail.remark || '无' }}</u-form-item>
+				</view>
+			</u-form>
+			<view class="detail-bottom">
+				<view v-if="$accessCheck($Access.SupplierDelSupplier)" class="handel-btn info-btn"
+					@click="openModel('确定要删除该供应商吗?', '删除')">删除</view>
+				<view v-if="$accessCheck($Access.SupplierEditSupplier)" class="handel-btn"
+					@click="goPage(`/pagesT/Purchase/AddSupplier?id=${supplier_id}`)">编辑</view>
+			</view>
+			<u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm">
+			</u-modal>
+		</view>
+		<view v-else>没有权限</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				model_tag: '',
+				model_show: false,
+				enable_status: false,
+				model_content: '',
+				supplier_id: '',
+				supplier_detail: {},
+				add_form: {
+					title: '',
+					provinceCode: '',
+					cityCode: '',
+					districtCode: '',
+					address: '',
+					realName: '',
+					mobile: '',
+					enableStatus: 5,
+					sex: 0,
+					phone: '',
+					position: '',
+					email: '',
+					remark: '',
+					accountName: '',
+					bankName: '',
+					bankCard: ''
+				}
+			};
+		},
+		onLoad(options) {
+			this.supplier_id = options.id;
+			this.getSupplierInfoById();
+		},
+		onPullDownRefresh() {
+			this.getSupplierInfoById();
+		},
+		onShow() {
+			this.getSupplierInfoById();
+		},
+		methods: {
+			// 打开提示框
+			openModel(content, tag) {
+				this.model_content = content;
+				this.model_show = true;
+				this.model_tag = tag;
+			},
+			modelConfirm() {
+				switch (this.model_tag) {
+					case '删除':
+						this.delSupplier();
+						break;
+				}
+			},
+			getSupplierInfoById() {
+				this.$u.api.getSupplierInfoById(this.supplier_id).then(res => {
+					this.supplier_detail = res.data;
+					this.enable_status = res.data.enableStatus === 5;
+				});
+			},
+			enableStatusChange() {
+				this.$u.api
+					.SupplierUpdateEnableStatus(this.supplier_id, {
+						enableStatus: this.enable_status ? 5 : 4
+					})
+					.then(res => {
+						this.$u.toast('操作成功');
+						setTimeout(() => {
+							this.getSupplierInfoById();
+						}, 1500)
+					});
+			},
+			delSupplier() {
+				this.$u.api.delSupplier(this.supplier_id).then(res => {
+					this.$u.toast('已删除');
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 2000);
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss">
+	.mobile {
+		color: $uni-color-primary;
+	}
+</style>

+ 215 - 0
pagesT/Purchase/index.vue

@@ -0,0 +1,215 @@
+<template>
+	<view v-if="$accessCheck($Access.PurchaseOrderGetAllPurchase)">
+		<view class="keyword-view clearfix">
+			<view class="float_left">
+				<u-search @clear="searchData()" @search="searchData()" :show-action="false" :clearabled="true" placeholder="采购单号" v-model="search_form.no"></u-search>
+			</view>
+			<view class="float_right" @click="openSearch"><text class="custom-icon custom-icon-shaixuan"></text></view>
+		</view>
+		<view class="list-ul">
+			<block v-for="(item, index) in purchase_list" :key="index">
+				<view v-if="$accessCheck($Access.PurchaseOrderGetPurchaseInfoById)" class="list-li" @click="goPage(`/pagesT/Purchase/PurchaseDetail?id=${item.id}`)">
+					<view class="top clearfix">
+						<view class="ellipsis float_left">{{ item.supplierName }}</view>
+						<view class="float_right">
+							<text v-if="item.auditStatus === 2" class="success-status">已审核</text>
+							<text v-else class="warning-status">待审核</text>
+							<u-icon name="arrow-right" size="28" color="#999999"></u-icon>
+						</view>
+					</view>
+					<view class="list-cont">
+						<view class="total-money">{{ $utils.formattedNumber(item.purchaseAmount) }}</view>
+						<view class="info-li" style="font-size: 28rpx; color: #111111;">{{ item.warehouseName }}</view>
+						<view class="info-li" @click.stop="copy(item.no)">
+							<text style="margin-right: 20rpx;">{{ item.no }}</text>
+							<u-icon name="copy" custom-prefix="custom-icon" size="22"></u-icon>
+						</view>
+						<view class="info-li clearfix">
+							<text class="float_left">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</text>
+							<text class="float_right">采购员:{{ item.buyerName }}</text>
+						</view>
+					</view>
+				</view>
+			</block>
+		</view>
+		<u-loadmore v-if="purchase_list.length" :status="load_status" />
+		<view v-else class="empty-view"><u-empty text="暂无数据" mode="list"></u-empty></view>
+		<addBtn v-if="$accessCheck($Access.PurchaseOrderAddPurchase)" url="/pagesT/Purchase/AddPurchase"></addBtn>
+		<u-popup v-model="search_show" mode="right">
+			<view class="search-pop">
+				<view class="form-view">
+					<u-form label-width="160rpx" label-position="left">
+						<u-form-item label="仓库">
+							<view class="clearfix form-val" @click="goPage('/pagesT/werahouse/selWerahouse')">
+								<text class="float_left ellipsis">{{ search_form.warehouseId ? warehouse_name : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('warehouseId')">
+									<u-icon :name="!search_form.warehouseId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+						<u-form-item label-position="top" label="审核状态">
+							<text
+								v-for="(item, index) in order_status"
+								:key="index"
+								class="check-li"
+								:class="[search_form.auditStatus === item.value ? 'active' : '']"
+								@click="statusChange(item)"
+							>
+								{{ item.label }}
+							</text>
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="search-btn">
+					<view class="btn-li" @click="clearValue()">重置</view>
+					<view class="btn-li" @click="searchData">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			order_status: [{ value: 2, label: '已审核' }, { value: 1, label: '待审核' }],
+			search_show: false,
+			warehouse_name: '',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			load_status: 'nomore',
+			purchase_list: [],
+			werahouseData:'',
+			search_form: {
+				no: '',
+				auditStatus: '',
+				warehouseId: ''
+			}
+		};
+	},
+	watch: {
+		werahouseData(val) {
+			if (val) {
+				this.search_form.warehouseId = val.id;
+				this.warehouse_name = val.warehouseName;
+			}
+		}
+	},
+	onShow() {
+		this.searchData();
+	},
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getAllPurchase();
+		}
+	},
+	onPullDownRefresh() {
+		this.searchData();
+	},
+	methods: {
+		clearValue(key) {
+			if (!key) {
+				this.search_form = {
+					no: '',
+					auditStatus: '',
+					warehouseId: ''
+				};
+				this.searchData();
+			} else {
+				this.search_form[key] = '';
+			}
+		},
+		openSearch() {
+			this.search_show = true;
+		},
+		statusChange(row) {
+			this.search_form.auditStatus = row.value;
+		},
+		getAllPurchase() {
+			this.load_status = 'loading';
+			this.$u.api
+				.getAllPurchase({
+					auditStatus: this.search_form.auditStatus,
+					no: this.search_form.no,
+					page: this.page,
+					pageSize: this.pageSize,
+					warehouseId: this.search_form.warehouseId
+				})
+				.then(res => {
+					if (this.page === 1) {
+						this.purchase_list = res.data;
+					} else {
+						this.purchase_list = this.purchase_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				});
+		},
+		searchData() {
+			this.page = 1;
+			this.search_show = false;
+			this.getAllPurchase();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.keyword-view {
+	position: fixed;
+	width: 100%;
+	top: 0;
+	left: 0;
+	padding: 20rpx 24rpx;
+	background-color: #ffffff;
+	z-index: 9;
+	.float_left {
+		width: 640rpx;
+	}
+	.float_right {
+		line-height: 64rpx;
+		width: 50rpx;
+		text-align: center;
+		color: #666666;
+	}
+}
+.list-ul {
+	padding-top: 100rpx;
+	.list-li {
+		width: 710rpx;
+		background-color: #ffffff;
+		margin: 20rpx auto;
+		border-radius: 20rpx;
+		padding: 30rpx 24rpx;
+		.top {
+			padding-bottom: 20rpx;
+			border-bottom: 1px solid #eeeeee;
+			.float_left {
+				width: 400rpx;
+				font-weight: bold;
+			}
+		}
+		.list-cont {
+			padding-top: 20rpx;
+			position: relative;
+			.total-money {
+				position: absolute;
+				top: 45%;
+				right: 0;
+				transform: translateY(-50%);
+				color: $uni-color-error;
+				font-weight: bold;
+			}
+			.info-li {
+				color: #6c6c6c;
+				font-size: 24rpx;
+				padding-bottom: 10rpx;
+			}
+		}
+	}
+}
+</style>

+ 303 - 0
pagesT/account/AccountDetails.vue

@@ -0,0 +1,303 @@
+<template>
+	<view class="detail-view">
+		<view class="top-view clearfix">
+			<view class="float_left">
+				<text v-if="order_detail.enableStatus === 5" class="status-text">启用</text>
+				<text v-else class="status-text">禁用</text>
+			</view>
+		</view>
+		<view class="detail-cont">
+			<view class="info-li clearfix">
+				<view class="label">账户名称</view>
+				<view class="value">{{ order_detail.name }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">账户号</view>
+				<view class="value">{{ order_detail.accountNumber }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">制单时间</view>
+				<view class="value">{{ $u.timeFormat(order_detail.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">期初余额</view>
+				<view class="value">{{ $utils.formattedNumber(order_detail.money) }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<view class="label">所属店铺</view>
+				<view class="value">{{order_detail.shopName }}</view>
+			</view>
+			<view class="info-li clearfix">
+				<!-- <u-radio-group v-model="value" @change="radioGroupChange">
+					<u-radio v-for="(item, index) in list" :key="index" :name="item.name">
+						{{item.name}}
+					</u-radio>
+				</u-radio-group> -->
+				<!-- <view class="label">禁用/启用</view>
+				<view class="remark">
+					<u-switch v-model="checked"  inactive-color="#eee"></u-switch>
+				</view> -->
+
+			</view>
+			<view class="remark-li">
+				<view class="label">备注</view>
+				<view class="remark">
+					<text>{{ order_detail.remark || '无' }}</text>
+				</view>
+			</view>
+		</view>
+		<view class="detail-bottom">
+			<view v-if="$accessCheck($Access.AccountListDelAccount)&&order_detail.enableStatus === 4" class="handel-btn info-btn"
+				@click="openModel('请确认是否要删除?', '删除')">删除</view>
+			<view v-if="$accessCheck($Access.AccountListEditAccount)&&order_detail.enableStatus === 4" class="handel-btn"
+				@click="goPage('/pagesT/account/AddAcount?id=' + order_id)">编辑</view>
+			<view v-if="$accessCheck($Access.PurchaseOrderUpdateAuditStatus)" class="handel-btn"
+				@click="openModel(1, '启用')">{{order_detail.enableStatus === 4?'启用':'禁用'}}</view>
+		</view>
+		<u-modal v-model="model_show" :show-cancel-button="true" :content="model_content" @confirm="modelConfirm">
+		</u-modal>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				value: "",
+				list: [{
+						name: '禁用',
+						audito: 4
+					},
+					{
+						name: '启用',
+						audito: 5
+					},
+				],
+				model_tag: '',
+				model_show: false,
+				model_content: '',
+				order_id: 0,
+				order_detail: {}
+			};
+		},
+		onPullDownRefresh() {
+			this.getAccountInfo();
+		},
+		computed: {
+			userInfo() {
+				return this.$store.state.userInfo;
+			},
+		},
+		onLoad(options) {
+			this.order_id = options.id;
+		},
+		onShow() {
+			this.getAccountInfo();
+		},
+		methods: {
+			radioGroupChange(e) {
+				console.log(e)
+			},
+			// 详情
+			getAccountInfo() {
+				this.$u.api
+					.getAccountInfo(this.order_id)
+					.then(res => {
+						uni.stopPullDownRefresh();
+						this.order_detail = res.data;
+						console.log(res.data)
+					})
+					.catch(err => {
+						uni.stopPullDownRefresh();
+					});
+			},
+			// 打开提示框
+			openModel(content, tag) {
+				if(content===1){
+					if(this.order_detail.enableStatus===4){
+						this.model_content='您是否要启用'
+						this.model_show = true;
+						this.model_tag = tag;
+						// this.order_detail.enableStatus=5
+					}else{
+						this.model_content='您是否要禁用'
+						this.model_show = true;
+						this.model_tag = tag;
+						// this.order_detail.enableStatus=4
+					}					
+				}else{
+					this.model_content = content;
+					this.model_show = true;
+					this.model_tag = tag;
+				}
+				
+			},
+			// 审核
+			modelConfirm() {
+				if(this.order_detail.enableStatus===4){					
+					this.order_detail.enableStatus=5
+				}else{					
+					this.order_detail.enableStatus=4
+				}		
+				switch (this.model_tag) {
+					case '启用':
+						this.updateAuditStatusPurchase();
+						break;
+					case '删除':
+						this.delPurchase(this.order_id);
+						break;
+				}
+			},
+			// 审核订单
+			updateAuditStatusPurchase() {
+				this.$u.api
+					.updateAccountStatus( {
+						id: this.order_id,
+						enableStatus: this.order_detail.enableStatus,
+					})
+					.then(res => {						
+						this.$u.toast('操作成功');
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 1000);						
+					});
+			},
+			// 删除账户
+			delPurchase() {
+				this.$u.api.delAccount(this.order_id).then(res => {
+					this.$u.toast('已删除');
+					setTimeout(() => {
+						uni.navigateBack();
+					}, 2000);
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.detail-view {
+		padding-bottom: 100rpx;
+	}
+
+	.top-view {
+		background-color: $uni-color-primary;
+		height: 200rpx;
+		padding: 0 30rpx;
+		color: #ffffff;
+		font-size: 40rpx;
+		line-height: 100rpx;
+
+		.status-text {
+			margin-right: 10rpx;
+		}
+
+		.float_right {
+			font-size: 28rpx;
+		}
+	}
+
+	.detail-cont {
+		width: 710rpx;
+		margin: 0 auto;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		padding: 20rpx 0;
+		overflow: hidden;
+		transform: translateY(-80rpx);
+
+		.info-li {
+			padding: 0 30rpx;
+			line-height: 80rpx;
+
+			.label {
+				float: left;
+				color: #6c6c6c;
+			}
+
+			.value {
+				float: right;
+			}
+
+			.money-label {
+				font-weight: bold;
+			}
+
+			.money-value {
+				font-weight: bold;
+				font-size: 30rpx;
+			}
+		}
+
+		.remark-li {
+			padding: 0 30rpx;
+
+			.label {
+				color: #6c6c6c;
+				line-height: 60rpx;
+			}
+		}
+
+		.b-b {
+			border-bottom: 1px solid #eeeeee;
+		}
+
+		.goods-title {
+			background-color: #5e6a84;
+			line-height: 72rpx;
+			width: 644rpx;
+			margin: 30rpx auto 0;
+			color: #ffffff;
+			border-top-left-radius: 20rpx;
+			border-top-right-radius: 20rpx;
+			padding: 0 24rpx;
+			position: relative;
+			z-index: 1;
+		}
+
+		.goods-ul {
+			padding: 0 30rpx 30rpx;
+			box-shadow: 0px -3px 12rpx 0px #e4eaf5;
+			border-bottom: 1px solid #eeeeee;
+
+			.goods-li {
+				padding-top: 24rpx;
+
+				.goods-img {
+					margin-right: 20rpx;
+
+					image {
+						width: 150rpx;
+						height: 150rpx;
+						border-radius: 8rpx;
+						display: block;
+					}
+				}
+
+				.info {
+					.goods-name {
+						width: 470rpx;
+						height: 34rpx;
+						line-height: 34rpx;
+					}
+
+					.goods-code {
+						font-size: 24rpx;
+						padding-top: 10rpx;
+					}
+
+					.goods-num {
+						padding-top: 10rpx;
+						font-size: 24rpx;
+
+						.price {
+							font-size: 28rpx;
+							font-weight: bold;
+							color: $uni-color-error;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 297 - 0
pagesT/account/AccountManagement.vue

@@ -0,0 +1,297 @@
+<template>
+	<view>
+		<view class="tabs-view">
+			<view class='btn' @click="add">
+				<!-- <u-button type="primary" size="mini" @click="edit">+</u-button> -->
+				+
+			</view>	
+			<view class="keyword-view clearfix">
+				<view class="float_left">
+					<u-search
+						:show-action="false"
+						@clear="searchData()"
+						@search="searchData()"
+						:clearabled="true"
+						placeholder="单号/操作人"
+						v-model="search_form.no"
+					></u-search>
+				</view>
+				<view class="float_right" @click="openSel('search_show')"><text class="custom-icon custom-icon-shaixuan"></text></view>
+			</view>			
+		</view>
+		<view class="list-ul">
+			<view class="list-li clearfix" v-for="(item, index) in outgoing_list" :key="index">
+				<view class="title clearfix" @click="details(item.id)">
+					<view class="float_left" style="font-size: 28rpx;font-weight: 700;">{{ item.name || '--' }}</view>
+					<view class="float_right">
+						<span v-if="item.enableStatus === 5" class="success-status">启用</span>
+						<span v-else class=" warning-status">禁用</span>
+						<text class="custom-icon custom-icon-jinru"></text>
+					</view>
+				</view>
+				<view class="list-cont">				
+					<view class="list-cont-li">日期:{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd') }}</view>					
+					<view class="list-cont-li clearfix">账户号:{{ item.accountNumber }}</view>
+					<view class="list-cont-li clearfix">账户编码:{{ item.accountCode }}</view>					
+				</view>
+			</view>
+			<u-popup v-model="search_show" mode="right">
+				<view class="search-pop">
+					<view class="form-view">
+						<u-form label-width="160rpx" label-position="left">
+							<u-form-item label-position="top" label="制单日期">
+								<view class="date-li">
+									<picker mode="date" @change="bindDateStartChange">
+										<text class="date-li">{{ search_form.startTime ? $u.timeFormat(search_form.startTime, 'yyyy-mm-dd') : '开始日期' }}</text>
+									</picker>
+								</view>
+								<view class="date-line">-</view>
+								<view class="date-li">
+									<picker mode="date" @change="bindDateEndChange">
+										<text class="date-li">{{ search_form.endTime ? $u.timeFormat(search_form.endTime, 'yyyy-mm-dd') : '结束日期' }}</text>
+									</picker>
+								</view>
+							</u-form-item>							
+						<!-- 	<u-form-item label-position="top" label="审核状态">
+								<view style="font-size: 22rpx; color: #6c6c6c;">可多选</view>
+								<text
+									v-for="(item, index) in order_status"
+									:key="index"
+									class="check-li"
+									:class="[search_form.auditStatus.indexOf(item.value) > -1 ? 'active' : '']"
+									@click="statusChange(item)"
+								>
+									{{ item.label }}
+								</text>
+							</u-form-item> -->
+						</u-form>
+					</view>
+
+					<view class="search-btn">
+						<view class="btn-li" @click="clearValue()">重置</view>
+						<view class="btn-li" @click="searchConfirm">确定</view>
+					</view>
+				</view>
+			</u-popup>
+			<view v-if="!outgoing_list.length" class="empty-view"><u-empty text="暂无数据" mode="list"></u-empty></view>
+			<u-loadmore v-if="outgoing_list.length" :status="load_status" />
+		</view>
+	</view>
+</template>
+<script>
+export default {
+	data() {
+		return {
+			search_show: false,
+			order_status: [{ value: 5, label: '禁用' }, { value: 4, label: '启用' }],			
+			load_status: 'nomore',
+			tabs_current: 0,
+			page: 1,
+			pageSize: 10,
+			total: 0,			
+			search_form: {
+				no:"",
+				shopId: '',
+				shopName: '',
+				auditStatus: [],
+				goodsName: '', // 商品名称
+				warehouseId: '', // 仓库id
+				startTime: '', // 制单开始时间
+				endTime: '' // 制单结束时间
+			},
+			warehouse_name: '',
+			outgoing_list: [],
+			werahouseData: ''
+		};
+	},
+	watch: {
+		werahouseData(val) {
+			if (val) {
+				this.search_form.warehouseId = val.id;
+				this.warehouse_name = val.warehouseName;
+			}
+		}
+	},	
+	onShow() {
+		this.getAllAccount();
+	},
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getData();
+		}
+	},
+	onPullDownRefresh() {
+		this.searchData(); 
+	},
+	methods: {
+		details(id){
+			uni.navigateTo({
+				url:'/pagesT/account/AccountDetails?id='+id							
+			})
+		},
+		add(){
+		 uni.navigateTo({
+		 	url:'/pagesT/account/AddAcount'				
+		 })
+		},	
+		openSel(key) {
+			this[key] = true;
+		},
+		bindDateStartChange(e) {
+			this.search_form.startTime = this.$utils.timeByTimestamp(e.detail.value + ' 00:00:00');
+		},
+		bindDateEndChange(e) {
+			this.search_form.endTime = this.$utils.timeByTimestamp(e.detail.value + ' 23:59:59');
+		},
+		// 审核状态切换
+		statusChange(row) {
+			const index = this.search_form.auditStatus.indexOf(row.value);
+			if (index === -1) {
+				this.search_form.auditStatus.push(row.value);
+			} else {
+				this.search_form.auditStatus.splice(index, 1);
+			}
+		},
+		// 搜索确定
+		searchConfirm() {
+			this.search_show = false;
+			this.searchData();
+		},
+		// 重置搜索
+		clearValue(params) {
+			if (!params) {
+				this.search_form = {
+					shopId: '',
+					shopName: '',
+					auditStatus: '',
+					goodsName: '', // 商品名称
+					warehouseId: '', // 仓库id
+					startTime: '', // 制单开始时间
+					endTime: '' // 制单结束时间
+				};
+				this.searchConfirm();
+			} else {
+				this.search_form[params] = '';
+			}
+		},	
+		getAllAccount() {
+			this.load_status = 'loading';
+			this.$u.api
+				.getAllAccount({					
+					start:this.search_form.startTime,
+					end:this.search_form.endTime,
+					page: this.page,
+					pageSize: this.pageSize,					
+				})
+				.then(res => {
+					console.log(res.data)
+					if (this.page === 1) {
+						this.outgoing_list = res.data;
+					} else {
+						this.outgoing_list = this.outgoing_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				});
+		},	
+		//  判断
+		getData() {
+			this.getAllAccount();		
+		},
+		searchData() {
+			this.page = 1;
+			this.getData();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.tabs-view {
+	position: fixed;
+	width: 100%;
+	top: 0;
+	left: 0;
+	z-index: 99;
+	.btn{
+		width: 70rpx;
+		height: 70rpx;
+		position: fixed;
+		bottom: 50rpx;
+		right: 35rpx;
+		border-radius: 50%;
+		background-color: #2979FF;
+		text-align: center;
+		color: #FFFFFF;
+		vertical-align: middle;
+		font-size: 49rpx;
+		box-shadow: 0px 9rpx 76rpx 0px rgba(3, 122, 255, 0.55);
+	}
+	.keyword-view {
+		padding: 20rpx 24rpx 0;
+		background-color: #ffffff;
+		z-index: 9;
+padding-bottom: 20rpx;
+		.float_left {
+			width: 640rpx;
+		}
+
+		.float_right {
+			line-height: 64rpx;
+			width: 50rpx;
+			text-align: center;
+			color: #666666;
+		}
+	}
+}
+.list-ul {
+	padding-top: 100rpx;
+	.list-li {
+		width: 710rpx;
+		margin: 20rpx auto;
+		padding: 0 24rpx 20rpx;
+		background-color: #ffffff;
+		padding-bottom: 20rpx;
+		border-radius: 20rpx;
+		.title {
+			line-height: 80rpx;
+			border-bottom: 1px solid #eeeeee;
+			.float_left {
+				font-weight: bold;
+			}
+			.float_rigth {
+				.custom-icon-jinru {
+					margin-left: 10rpx;
+					font-size: 28rpx;
+				}
+			}
+		}
+		.list-cont {
+			margin-top: 10rpx;
+			position: relative;
+			.price {
+				position: absolute;
+				top: 50%;
+				transform: translateY(-50%);
+				right: 0;
+				font-weight: bold;
+				color: $uni-color-error;
+				.custom-icon-jinru {
+					font-size: 28rpx;
+					color: #6c6c6c;
+					font-weight: 400;
+				}
+			}
+			.list-cont-li {
+				line-height: 40rpx;
+				font-size: 24rpx;
+				color: #666666;
+				.mobile {
+					color: $uni-color-primary;
+				}
+			}
+		}
+	}
+}
+</style>

+ 301 - 0
pagesT/account/AddAcount.vue

@@ -0,0 +1,301 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="150" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+
+				<u-form-item label='所属店铺' prop="shopName">
+					<view class="clearfix form-val" @click="goPage('/pagesT/shop/selShop')">
+						<view class="float_right" @click.stop="add_form.shopId = ''">
+							<u-icon :name="!add_form.shopId ? 'arrow-right' : 'close-circle-fill'" size="28"
+								color="#999999">
+							</u-icon>
+						</view>
+						<text class="float_right ellipsis">{{ add_form.shopId ? add_form.shopName : '请选择' }}</text>
+					</view>
+				</u-form-item>
+				<u-form-item label="账户名称">
+					<view class="form-value">
+						<input v-model="add_form.name" placeholder="请输入账户名称"/>
+					</view>
+				</u-form-item>
+				<u-form-item label="账户号">
+					<view class="form-value">
+						<input v-model="add_form.accountNumber" placeholder="请输入账户号"/>
+					</view>
+				</u-form-item>
+				<u-form-item label="期初余额">
+					<view class="form-value">
+						<input v-model="add_form.money" :disabled="!!account_id" placeholder="请输入期初余额"/>
+					</view>
+				</u-form-item>
+				<u-form-item label="开户行名称" v-if="add_form.type === 3">
+					<view class="form-value">
+						<input v-model="add_form.bankName"  placeholder="请输入开户行名称"/>
+					</view>
+				</u-form-item>
+				<u-form-item label="账户类型" prop="settlementMethod">
+					<view class="float_right" @click="openMethods(index)">
+						<text>{{add_form.settlementMethod|| '请选择' }}</text>
+						<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+					</view>
+				</u-form-item>
+				<u-form-item label="备注">
+					<view class="form-value">
+						<input v-model="add_form.remark" />
+					</view>
+				</u-form-item>
+			</view>
+		</u-form>
+		<u-select @confirm="methodsConfirm" v-model="methods_show" :list="pay_type_list"></u-select>
+		<view class="detail-bottom">
+			<view class="handel-btn" @click="submit">提交订单</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				rules: {
+					shopName: [{
+						required: true,
+						message: '请选择所属店铺',
+						trigger: ['change', 'blur']
+					}],
+					settlementMethod:[
+						{
+							required: true,
+							message: '请选择账户类型',
+							trigger: ['change', 'blur']
+						}
+					]
+				},
+				add_form: {
+					isDefault: 5,
+					remark:'',
+					settlementMethod: '',
+					accountNumber: '',
+					money: '',
+					name: '',
+					enableStatus:'',
+					operatorName: '',
+					receivable: '',					
+					type:'',
+					shopId: "",
+					shopName: "",
+					bankName:'',
+					receiptRequisitionAccountDate: [{
+						collectionAmount: '',
+						preferentialAmount: '',
+						actualAmount: '',
+						settlementMethod: '',
+						remark: '',
+						accountName: "",
+						accountId: "",
+					}]
+				},
+				methods_show: false,
+				account_index: 0,
+				pay_type_list: [{
+						label: "普通账户",
+						value: 4
+					},
+					{
+						label: "支付宝账户",
+						value: 1
+					},
+					{
+						label: "微信账户",
+						value: 2
+					},
+					{
+						label: "银行账户",
+						value: 3
+					},
+				],
+				customerData: '',
+				account_id: '',
+				shopData: {},
+				AccountData: {},
+				index: ''
+			};
+		},
+		computed: {
+			userInfo() {
+				return this.$store.state.userInfo;
+			}			
+		},
+		watch: {
+			customerData(val) {
+				if (val) {
+					this.add_form.custormerId = val.id;
+					this.add_form.custormerName = val.name;
+					this.add_form.receivable = val.money;
+				}
+			},
+			// 店铺
+			shopData(val) {
+				if (val) {
+					this.add_form.shopName = val.name;
+					this.add_form.shopId = val.id;
+				}
+			},
+			AccountData(val) {
+				if (val) {
+					console.log(val);
+					this.add_form.receiptRequisitionAccountDate[this.index].accountId = val.id
+					this.add_form.receiptRequisitionAccountDate[this.index].accountName = val.name
+				}
+			}
+		},
+		onLoad(options) {
+			if (options.id) {
+				this.account_id = options.id;
+				uni.setNavigationBarTitle({
+					title: '编辑账户'
+				});
+				this.getAccountInfo();
+			} else {
+				this.add_form.operatorId = this.userInfo.userCenterId;
+				this.add_form.operatorName = this.userInfo.name;
+			}
+		},
+		methods: {
+			// 详情
+			getAccountInfo() {
+				this.$u.api.getAccountInfo(this.account_id).then(({
+					data
+				}) => {
+					this.add_form = {
+						accountNumber: data.accountNumber,
+						beginMoney:data.beginMoney,
+						enableStatus: data.enableStatus,
+						money:data.money,
+						name:data.name,
+						shopId:data.shopId,
+						shopName:data.shopName,
+						type:data.type,
+						remark:data.remark
+					};					
+				});
+			},
+			openMethods(index) {
+				console.log(index)
+				this.methods_show = true;
+				this.account_index = index;
+			},
+			methodsConfirm(arr) {
+				console.log(arr)
+				this.add_form.settlementMethod = arr[0].label;
+				this.add_form.type=arr[0].value;
+			},	
+						
+			//  添加
+			submit() {	
+					
+						const params = {
+							money:this.add_form.money,
+							bankName:this.add_form.bankName,
+							accountNumber: this.add_form.accountNumber,
+							beginMoney:this.add_form.beginMoney,
+							enableStatus: this.add_form.enableStatus,
+							name:this.add_form.name,
+							shopId:this.add_form.shopId,
+							shopName:this.add_form.shopName,
+							type:this.add_form.type,
+							remark:this.add_form.remark
+						};				
+						
+						if (this.account_id) {
+							this.$u.api.editAccount(this.account_id, params).then(res => {
+								this.$u.toast('修改成功');
+								setTimeout(() => {
+									uni.navigateBack();
+								}, 1500);
+							});
+						} else {
+							this.$u.api.addAccount(params).then(res => {
+								this.$u.toast('新增成功');
+								setTimeout(() => {
+									uni.navigateBack();
+								}, 1500);
+							});
+						}
+					
+				
+			},
+			settlementAccount(index) {
+				if (!this.add_form.shopId) {
+					this.$u.toast('必须先选择商铺');
+					return
+				}
+				this.goPage('/pagesT/account/selAccount')
+				this.index = index
+			},
+			delsettlementAccount() {
+				this.add_form.receiptRequisitionAccountDate[this.index].accountId = "";
+				this.add_form.receiptRequisitionAccountDate[this.index].accountName = "";
+			}
+		},
+		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.detail-ul {
+		.detail-li {
+			padding-left: 60rpx;
+			position: relative;
+			border-bottom: 1px solid #eeeeee;
+
+			&:last-child {
+				border-bottom: 0 none;
+			}
+
+			.del-icon {
+				position: absolute;
+				top: 50%;
+				left: 0;
+				transform: translateY(-50%);
+			}
+
+			.title {
+				line-height: 80rpx;
+			}
+
+			.money-ul {
+				border-top: 1px solid #eeeeee;
+				padding: 20rpx 0;
+				display: flex;
+
+				.money-li {
+					flex: 3;
+					border-right: 1px solid #eeeeee;
+
+					input {
+						height: 80rpx;
+						line-height: 80rpx;
+						text-align: center;
+					}
+
+					&:last-child {
+						border-right: 0 none;
+					}
+				}
+			}
+
+			.bottom {
+				border-top: 1px solid #eeeeee;
+
+				input {
+					height: 80rpx;
+					line-height: 80rpx;
+				}
+			}
+		}
+	}
+</style>

+ 99 - 0
pagesT/account/selAccount.vue

@@ -0,0 +1,99 @@
+<template>
+	<view>
+		<view class="customer-ul">
+			<view class="customer-li" v-for="(item, index) in account_list" :key="index" @click="changeSupplier(item)">
+				<view class="customer-name">{{ item.name }}</view>
+				<view class="accountNumber">{{ item.accountNumber }}</view>
+			</view>
+		</view>
+		<u-loadmore :status="load_status" />
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			keyword: '',
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			account_list: [],
+			shopId: ''
+		};
+	},
+	onLoad(options) {
+		if (options.shopId) {
+			this.shopId = options.shopId;
+		}
+		this.getAllAccount();
+	},
+	onPullDownRefresh() {
+		this.getAllAccount();
+	},
+	// 上拉加载
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getAllAccount();
+		}
+	},
+	methods: {
+		changeSupplier(item) {
+			// 选择返回上一页
+			this._prePage().AccountData = item;
+			uni.navigateBack();
+		},
+		search() {
+			this.page = 1;
+			this.getAllAccount();
+		},
+		getAllAccount() {
+			this.loading_status = 'loading';
+			this.$u.api
+				.getAllAccount({
+					page: this.page,
+					pageSize: this.pageSize,
+					enableStatus: 5,
+					shopId: this.shopId
+				})
+				.then(res => {
+					uni.stopPullDownRefresh();
+					if (this.page === 1) {
+						this.account_list = res.data;
+					} else {
+						this.account_list = this.account_list.concat(res.data);
+					}
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+					this.total = res.pageTotal;
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.customer-ul {
+	padding-bottom: 20rpx;
+	.customer-li {
+		border-bottom: 1px solid #eeeeee;
+		background-color: #ffffff;
+		border-radius: 10rpx;
+		padding: 20rpx;
+		&:last-child {
+			border-bottom: 0 none;
+		}
+		.customer-name {
+			padding-bottom: 10rpx;
+		}
+		.accountNumber {
+			font-size: 24rpx;
+			color: #999999;
+		}
+	}
+}
+</style>

+ 128 - 0
pagesT/brand/selBrand.vue

@@ -0,0 +1,128 @@
+<template>
+	<view class="selSupplier">
+		<view class="search-view">
+			<view class="input-view">
+				<input type="text" confirm-type="search" placeholder-class="input-pl" placeholder="请输入品牌名称" v-model="keyword" />
+				<u-icon class="add-icon" name="search" size="40" color="#666666" @click="search"></u-icon>
+			</view>
+		</view>
+		<view class="supplier-ul">
+			<view class="supplier-li" v-for="(item, index) in brand_list" :key="index" @click="changeBrand(item)">
+				<view class="supplier-name">{{ item.title }}</view>
+				<view class="other">
+					{{item.code}}
+				</view>
+			</view>
+		</view>
+		<u-loadmore :status="load_status" />
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			keyword: '',
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			brand_list: []
+		};
+	},
+	onLoad() {
+		this.getAllBrand();
+	},
+	onPullDownRefresh() {
+		this.getAllBrand();
+	},
+	// 上拉加载
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getAllBrand();
+		}
+	},
+	methods: {
+		changeBrand(item) {
+			// 选择供应商返回上一页
+			this._prePage().brandData = item;
+			uni.navigateBack();
+		},
+		search() {
+			this.page = 1;
+			this.getAllBrand();
+		},
+		getAllBrand() {
+			this.loading_status = 'loading';
+			this.$u.api
+				.getAllBrand({
+					page: this.page,
+					pageSize: this.pageSize,
+					keyword: this.keyword
+				})
+				.then(res => {
+					uni.stopPullDownRefresh();
+					this.total = res.pageTotal;
+					if (this.page === 1) {
+						this.brand_list = res.data;
+					} else {
+						this.brand_list = this.brand_list.concat(res.data);
+					}
+					this.load_status = this.$utils.loadStatus(this.page,this.pageSize,this.total);
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.search-view {
+	position: fixed;
+	z-index: 99;
+	top: 0;
+	left: 0;
+	width: 100%;
+	background-color: #ffffff;
+	border-bottom: 1px solid #f5f5f5;
+	padding: 20rpx 0;
+	.input-view {
+		padding: 0 24rpx;
+		input {
+			height: 60rpx;
+			line-height: 60rpx;
+			padding: 0 24rpx;
+			display: inline-block;
+			width: 580rpx;
+			border: 1px solid #f5f5f5;
+			vertical-align: middle;
+			border-radius: 8rpx;
+			background-color: #f7f8fa;
+		}
+		.add-icon {
+			margin-left: 14rpx;
+			display: inline-block;
+			vertical-align: middle;
+		}
+	}
+}
+.supplier-ul {
+	padding-top: 90rpx;
+	padding-bottom: 20rpx;
+	.supplier-li {
+		width: 702rpx;
+		margin: 0 auto;
+		background-color: #ffffff;
+		border-radius: 10rpx;
+		margin-top: 20rpx;
+		line-height: 50rpx;
+		padding: 20rpx;
+		.other {
+			font-size: 24rpx;
+		}
+	}
+}
+</style>

+ 300 - 0
pagesT/customer/AddCustomer.vue

@@ -0,0 +1,300 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="140" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="客户名称" prop="name"><u-input v-model="add_form.name" placeholder="请输入客户真实姓名" /></u-form-item>
+				<u-form-item required label="登录账号" prop="mobile"><u-input v-model="add_form.mobile" type="number" placeholder="请输入客户手机号" /></u-form-item>
+				<u-form-item required label="客户类型" prop="type">
+					<u-input @click="goPage('/pagesT/customer/selCustomerType')" class="dis-input" disabled v-model="type_name" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="账号状态" v-if="$accessCheck($Access.CustomerListUpdateCustomerStatus)">
+					<view class="form-value">
+						<u-switch style="transform: translateY(14rpx);" v-model="add_form.enableStatus" :active-value="5" :inactive-value="4" size="40"></u-switch>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="联系人"><u-input v-model="add_form.contact.name" placeholder="请输入联系人" /></u-form-item>
+				<u-form-item label="联系电话"><u-input v-model="add_form.contact.mobile" type="number" placeholder="请输入联系电话" /></u-form-item>
+				<u-form-item label="所属区域">
+					<u-input class="dis-input" @click="openSel('region_show')" v-model="region_name" disabled placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label-position="top" label="详细地址"><u-input v-model="add_form.address" type="textarea" placeholder="请输入" /></u-form-item>
+				<u-form-item label="所属商铺">
+					<u-input @click="goPage('/pagesT/shop/selShop')" class="dis-input" v-model="shop_name" disabled placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="分拣区">
+					<u-input class="dis-input" disabled @click="goPage('/pagesT/werahouse/selReservoir')" v-model="reservoir_name" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="销售部门">
+					<u-input @click="openSel('show_department')" v-model="department_name" class="dis-input" disabled placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="业务员">
+					<u-input
+						@click="goPage('/pagesT/staff/selStaff?departmentId=' + add_form.departmentId)"
+						class="dis-input"
+						disabled
+						placeholder="请选择"
+						v-model="add_form.salesManName"
+					/>
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label-position="top" label="营业执照">
+					<upload :images="add_form.extend.license ? [add_form.extend.license] : []" @handleRemove="imgRemove" @uploadSuccess="uploadSuccess" />
+				</u-form-item>
+			</view>
+			<view class="form-model-view">
+				<u-form-item label="客户生日">
+					<u-input class="dis-input" disabled @click="openSel('time_show')" v-model="birthday" placeholder="请选择" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label="备注" label-position="top"><u-input type="textarea" v-model="add_form.remark" /></u-form-item>
+			</view>
+		</u-form>
+		<view class="detail-bottom"><view class="handel-btn" @click="submit">提交</view></view>
+		<SelDeparment v-model="show_department" @confirm="departmentConfirm" @cancel="departmentCancel" />
+		<RegionSel v-model="region_show" @confirm="regionConfirm" @cancel="regionCancel" />
+		<u-picker @confirm="birthdayConfirm" mode="time" v-model="time_show"></u-picker>
+	</view>
+</template>
+
+<script>
+import upload from '@/components/qiniu/QiniuUpload.vue';
+import SelDeparment from '@/components/SelDepartment.vue';
+import RegionSel from '@/components/region/RegionSel.vue';
+export default {
+	components: { upload, SelDeparment, RegionSel },
+	data() {
+		return {
+			region_show: false,
+			time_show: false,
+			show_department: false,
+			shopData: '',
+			staffData: '',
+			reservoirData: '',
+			customerTypeData: '',
+			reservoir_name: '',
+			shop_name: '',
+			type_name: '',
+			department_name: '',
+			region_name: '',
+			birthday: '',
+			rules: {
+				name: [
+					{
+						required: true,
+						message: '请输入客户名称',
+						// 可以单个或者同时写两个触发验证方式
+						trigger: 'blur,change'
+					}
+				],
+				mobile: [
+					{
+						required: true,
+						message: '请输入登录账号',
+						// 可以单个或者同时写两个触发验证方式
+						trigger: 'blur,change'
+					}
+				]
+			},
+			isEvidence: '', // 是否必填营业执照
+			add_form: {
+				tempSave: '',
+				latitude: '',
+				longitude: '',
+				password: '',
+				area: '',
+				mobile: '',
+				enableStatus: true, // 启用状态
+				name: '',
+				code: '',
+				type: '',
+				provinceCode: '',
+				cityCode: '',
+				districtCode: '',
+				address: '',
+				managerMobile: '',
+				shopId: '', // 商铺的id
+				departmentId: '', // 部门的id
+				salesManId: '',
+				salesManCode: '',
+				salesManName: '',
+				birthday: '',
+				remark: '',
+				reservoirId: '',
+				extend: {
+					license: ''
+				},
+
+				contact: {
+					area: '',
+					name: '',
+					mobile: '',
+					provinceCode: '',
+					cityCode: '',
+					districtCode: '',
+					address: ''
+				}
+			},
+			customer_id: ''
+		};
+	},
+	watch: {
+		reservoirData(val) {
+			if (val) {
+				this.add_form.reservoirId = val.id;
+				this.reservoir_name = val.reservoirName;
+			}
+		},
+		shopData(val) {
+			if (val) {
+				this.add_form.shopId = val.id;
+				this.shop_name = val.name;
+			}
+		},
+		customerTypeData(val) {
+			if (val) {
+				this.add_form.type = val.id;
+				this.type_name = val.name;
+				this.isEvidence = val.isEvidence;
+			}
+		},
+		staffData(val) {
+			if (val) {
+				this.add_form.salesManId = val.id;
+				this.add_form.salesManCode = val.staffCode;
+				this.add_form.salesManName = val.staffName;
+			}
+		}
+	},
+	onLoad(options) {
+		if (options.id) {
+			this.customer_id = options.id;
+			uni.setNavigationBarTitle({
+				title: '修改客户信息'
+			});
+			this.getCustomerInfo();
+		}
+	},
+	methods: {
+		getCustomerInfo() {
+			this.$u.api.getCustomerInfo(this.customer_id).then(({ data }) => {
+				this.department_name = data.departmentName;
+				this.shop_name = data.shopName;
+				this.type_name = data.customerType;
+				this.reservoir_name = data.reservoirName;
+				this.region_name = data.area.provinceName + data.area.cityName + data.area.districtName;
+				this.birthday = data.birthday ? this.$u.timeFormat(data.birthday, 'yyyy-mm-dd') : '';
+				this.add_form = {
+					...data,
+					enableStatus: data.enableStatus === 5,
+					contact: data.contact[0],
+					extend: data.extend || {
+						license: ''
+					}
+				};
+			});
+		},
+		submit() {
+			this.$refs.uForm.validate(valid => {
+				if (valid) {
+					if (!this.add_form.type) {
+						this.$u.toast('请选择客户类型');
+						return;
+					}
+					if (!this.$u.test.mobile(this.add_form.mobile)) {
+						this.$u.toast('登录账号格式有误');
+						return;
+					}
+					if (this.isEvidence === 5 && !this.add_form.extend.license) {
+						this.$u.toast(`客户类型为【${this.type_name}】的客户必须【上传营业执照】`);
+						return;
+					}
+					if (!this.customer_id) {
+						this.$u.api
+							.addCustomer({
+								...this.add_form,
+								enableStatus: this.add_form.enableStatus ? 5 : 4
+							})
+							.then(res => {
+								this.$u.toast('新增成功');
+								setTimeout(res => {
+									uni.navigateBack();
+								}, 1500);
+							});
+					} else {
+						this.$u.api
+							.editCustomer(this.customer_id, {
+								...this.add_form,
+								enableStatus: this.add_form.enableStatus ? 5 : 4
+							})
+							.then(res => {
+								this.$u.toast('修改成功');
+								setTimeout(res => {
+									uni.navigateBack();
+								}, 1500);
+							});
+					}
+				}
+			});
+		},
+		regionConfirm(val) {
+			this.add_form.provinceCode = val[0].value;
+			this.add_form.cityCode = val[1].value;
+			this.add_form.districtCode = val[2].value;
+			// 联系方式
+			this.add_form.contact.provinceCode = val[0].value;
+			this.add_form.contact.cityCode = val[1].value;
+			this.add_form.contact.districtCode = val[2].value;
+			let name = '';
+			val.forEach(item => {
+				name += item.label;
+			});
+			this.region_name = name;
+		},
+		regionCancel(val) {
+			this.region_show = false;
+		},
+		departmentConfirm(val) {
+			this.add_form.departmentId = val[val.length - 1].value;
+			this.department_name = val[val.length - 1].label;
+			this.add_form.salesManId = '';
+			this.add_form.salesManCode = '';
+			this.add_form.salesManName = '';
+		},
+		departmentCancel(val) {
+			this.show_department = false;
+		},
+		openSel(key) {
+			this[key] = true;
+		},
+		// 图片上传成功
+		uploadSuccess(imgUrl) {
+			this.add_form.extend.license = imgUrl;
+		},
+		//移除图片
+		imgRemove(arr) {
+			this.add_form.extend.license = '';
+		},
+		birthdayConfirm(val) {
+			this.add_form.birthday = val.timestamp;
+			this.birthday = val.year + '-' + val.month + '-' + val.day;
+		}
+	},
+	// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
+	onReady() {
+		this.$refs.uForm.setRules(this.rules);
+	}
+};
+</script>
+
+<style></style>

+ 236 - 0
pagesT/customer/BuyLogs.vue

@@ -0,0 +1,236 @@
+<template>
+	<view>
+		<view class="keyword-view clearfix">
+			<u-search disabled @custom="clearValue" @search="searchConfirm()" action-text="重置" :clearabled="true"
+				placeholder="请选择客户" v-model="customer_name" @click="goPage('/pagesT/customer/selCustomer')"></u-search>
+		</view>
+		<view class="logs-ul">
+			<view class="logs-li clearfix" v-for="(item, index) in order_list" :key="index">
+				<view class="clearfix logs-goods">
+					<view class="float_left goods-img">
+						<image :src="item.goodsImages" mode="aspectFill"></image>
+					</view>
+					<view class="float_left goods-info">
+						<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+						<view class="date-time">
+							{{ item.unitName }};
+							<text v-for="(sku, skuI) in item.specGroup" :key="skuI">{{ sku.specValueName }};</text>
+						</view>
+						<view class="other-info">
+							<view class="info-li">单价:{{ $utils.formattedNumber(item.price) }}</view>
+							<view class="info-li">购买:{{ item.buyNum }}{{ item.unitName }}</view>
+							<view class="info-li">发货:{{ $utils.formatNub(item.outNum) }}{{ item.unitName }}</view>
+						</view>
+					</view>
+					<view class="price">{{ $utils.formattedNumber(item.totalMoney) }}</view>
+				</view>
+				<view class="bottom clearfix">
+					<view class="float_left">
+						<view class="cutomer ellipsis">{{item.customerName}}</view>
+					</view>
+					<view class="float_right">
+						<view class="date">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+					</view>
+				</view>
+			</view>
+			<u-loadmore :status="load_status" />
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				load_status: 'nomore',
+				page: 1,
+				pageSize: 10,
+				total: 0,
+				order_list: [],
+				customer_name: '',
+				customer_id: 0,
+				customerData: []
+			};
+		},
+		watch: {
+			customerData(val) {
+				if (val) {
+					this.customer_name = val.name;
+					this.customer_id = val.userCenterId;
+					this.page = 1;
+					this.searchCustomerBuyLog();
+				}
+			}
+		},
+		onLoad() {
+			this.searchCustomerBuyLog();
+		},
+		onPullDownRefresh() {
+			this.page = 1;
+			this.searchCustomerBuyLog();
+		},
+		onReachBottom() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.searchCustomerBuyLog();
+			}
+		},
+		methods: {
+			clearValue() {
+				this.customer_name = '';
+				this.customer_id = 0;
+				this.page = 1;
+				this.searchCustomerBuyLog();
+			},
+			searchConfirm(){
+				this.page = 1;
+				this.searchCustomerBuyLog();
+			},
+			searchCustomerBuyLog() {
+				let params = {
+					page: this.page,
+					pageSize: this.pageSize,
+					userCenterId: this.customer_id
+				};
+				this.$u.api.searchCustomerBuyLog(params).then(res => {
+					if (this.page === 1) {
+						this.order_list = res.data;
+					} else {
+						this.order_list = this.order_list.concat(res.data);
+					}
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
+					this.total = res.pageTotal;
+				});
+			}
+		}
+	};
+</script>
+
+<style lang="scss" scoped>
+	.keyword-view {
+		position: fixed;
+		width: 100%;
+		top: 0;
+		left: 0;
+		padding: 20rpx 24rpx;
+		background-color: #ffffff;
+		z-index: 9;
+
+		.float_left {
+			width: 640rpx;
+		}
+
+		.float_right {
+			line-height: 64rpx;
+			width: 50rpx;
+			text-align: center;
+			color: #666666;
+		}
+	}
+
+	.logs-ul {
+		padding-top: 100rpx;
+
+		.logs-li {
+			width: 710rpx;
+			margin: 20rpx auto;
+			background-color: #ffffff;
+			border-radius: 20rpx;
+			padding: 24rpx;
+
+			.logs-goods {
+				position: relative;
+
+				.price {
+					position: absolute;
+					color: $uni-color-error;
+					top: 50%;
+					right: 0;
+					transform: translateY(-50%);
+				}
+			}
+
+			.goods-img {
+				position: relative;
+				width: 120rpx;
+				height: 120rpx;
+				border-radius: 20rpx;
+				overflow: hidden;
+				margin-right: 20rpx;
+				border: 1px solid #f5f5f5;
+
+				image {
+					width: 100%;
+					height: 100%;
+					display: block;
+				}
+			}
+
+			.goods-info {
+				width: 520rpx;
+
+				.goods-name {
+					font-weight: bold;
+				}
+
+				.date-time {
+					font-size: 22rpx;
+				}
+
+				.other-info {
+					padding-top: 10rpx;
+					display: flex;
+					font-size: 22rpx;
+
+					.info-li {
+						flex: 3;
+						display: inline-block;
+						color: #6c6c6c;
+					}
+				}
+			}
+		}
+
+		.bottom {
+			padding-top: 24rpx;
+			border-top: 1px solid #eeeeee;
+			margin-top: 24rpx;
+
+			.float_left {
+				width: 320rpx;
+
+				.cutomer {
+					font-weight: bold;
+					font-size: 26rpx;
+					padding-bottom: 6rpx;
+				}
+
+
+			}
+
+			.float_right {
+				.date {
+					font-size: 22rpx;
+					color: #666666;
+				}
+
+				.btn-li {
+					display: inline-block;
+					border-radius: 10rpx;
+					margin-left: 16rpx;
+					width: 140rpx;
+					line-height: 54rpx;
+					font-size: 24rpx;
+					text-align: center;
+					border: 1px solid $uni-color-primary;
+					color: $uni-color-primary;
+
+					&:last-child {
+						background-color: $uni-color-primary;
+						color: #ffffff;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 295 - 0
pagesT/customer/CommunicationLogs.vue

@@ -0,0 +1,295 @@
+<template>
+	<view>
+		<view class="keyword-view clearfix">
+			<view class="float_left">
+				<u-search
+					disabled
+					@search="searchConfirm()"
+					:show-action="false"
+					:clearabled="true"
+					placeholder="请选择客户"
+					v-model="customer_name"
+					@click="goPage('/pagesT/customer/selCustomer')"
+				></u-search>
+			</view>
+			<view class="float_right" @click="openSearch"><text class="custom-icon custom-icon-shaixuan"></text></view>
+		</view>
+		<view class="com-ul">
+			<view class="com-li" v-for="(item, index) in order_list" :key="index">
+				<view class="cutomer-name clearfix">
+					<view class="float_left ellipsis">
+						<u-icon margin-left="10" name="account-fill" label-size="24" label-color="#2979ff" :label="item.customerName" color="#2979ff" size="28"></u-icon>
+					</view>
+					<view class="float_right staff-name">
+						{{ item.staffName }}
+						<!-- <u-icon name="dianhua" color="#2d73ed" custom-prefix="custom-icon" /> -->
+					</view>
+				</view>
+				<view class="cont">
+					<view class="content">{{ item.content }}</view>
+					<view v-if="item.picture" class="image-view"><image @click="previewImage(item.picture)" :src="item.picture" mode="aspectFill"></image></view>
+					<view class="address clearfix">
+						<view class="float_left">
+							<block v-if="item.location">
+								<u-icon name="map-fill" color="#6c6c6c" size="26"></u-icon>
+								{{ item.location }}
+							</block>
+							<text v-else style="color: #999999;">无定位信息</text>
+						</view>
+					</view>
+					<view class="time clearfix">
+						<view class="float_left">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+						<view v-if="item.managerMobile" class="float_right" @click="callPhone(item.managerMobile)">
+							<!-- 	<u-icon @click="goPage(`/pagesT/customer/CommunicationLogsAdd?id=${item.id}`)"
+								style="margin-right: 30rpx;" name="edit-pen-fill" color="#2d73ed" /> -->
+							客户电话:{{ item.managerMobile }}
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-loadmore :status="load_status" />
+		<addBtn url="/pagesT/customer/CommunicationLogsAdd"></addBtn>
+		<u-popup v-model="search_show" mode="right">
+			<view class="search-pop">
+				<view class="form-view">
+					<u-form label-width="160rpx" label-position="left">
+						<u-form-item label-position="top" label="下单日期">
+							<view class="date-li">
+								<picker mode="date" @change="bindDateStartChange">
+									<text class="date-li">{{ search_data.start ? $u.timeFormat(search_data.start, 'yyyy-mm-dd') : '开始日期' }}</text>
+								</picker>
+							</view>
+							<view class="date-line">-</view>
+							<view class="date-li">
+								<picker mode="date" @change="bindDateEndChange">
+									<text class="date-li">{{ search_data.end ? $u.timeFormat(search_data.end, 'yyyy-mm-dd') : '结束日期' }}</text>
+								</picker>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+				<view class="search-btn">
+					<view class="btn-li" @click="clearValue()">重置</view>
+					<view class="btn-li" @click="getAllCustomerCommunication()">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			load_status: 'nomore',
+			customerData: '',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			order_list: [],
+			customer_name: '',
+			customer_id: '',
+			search_show: false,
+			search_data: {
+				start: '',
+				end: ''
+			}
+		};
+	},
+	watch: {
+		customerData(val) {
+			if (val) {
+				this.customer_name = val.name;
+				this.customer_id = val.id;
+				this.page = 1;
+				this.getAllCustomerCommunication();
+			}
+		}
+	},
+	computed: {
+		staffId() {
+			return this.$store.state.userInfo.staffId;
+		},
+		isAdministrator() {
+			return this.$store.state.access.isAdministrator;
+		}
+	},
+	onShow() {
+		this.getAllCustomerCommunication();
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.getAllCustomerCommunication();
+	},
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getAllCustomerCommunication();
+		}
+	},
+	methods: {
+		clearValue() {
+			this.search_show = false;
+			this.customer_name = '';
+			this.customer_id = '';
+			this.search_data = {
+				start: '',
+				end: ''
+			};
+			this.page = 1;
+			this.getAllCustomerCommunication();
+		},
+		getAllCustomerCommunication() {
+			this.search_show = false;
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize,
+				customerId: this.customer_id,
+				start: this.search_data.start,
+				end: this.search_data.end
+			};
+			if (!this.isAdministrator) {
+				params.staffId = this.staffId;
+			}
+			this.$u.api.getAllCustomerCommunication(params).then(res => {
+				if (this.page === 1) {
+					this.order_list = res.data;
+				} else {
+					this.order_list = this.order_list.concat(res.data);
+				}
+				this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
+				this.total = res.pageTotal;
+			});
+		},
+		previewImage(image) {
+			// 预览图片
+			uni.previewImage({
+				urls: [image],
+				longPressActions: {
+					itemList: ['发送给朋友', '保存图片', '收藏'],
+					success: function(data) {
+						console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
+					},
+					fail: function(err) {
+						console.log(err.errMsg);
+					}
+				}
+			});
+		},
+		openSearch() {
+			this.search_show = true;
+		},
+		bindDateStartChange(e) {
+			this.search_data.start = this.$utils.timeByTimestamp(e.detail.value + ' 00:00:00');
+		},
+		bindDateEndChange(e) {
+			this.search_data.end = this.$utils.timeByTimestamp(e.detail.value + ' 23:59:59');
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+// .keyword-view {
+// 	position: fixed;
+// 	width: 100%;
+// 	top: 0;
+// 	left: 0;
+// 	padding: 20rpx 24rpx;
+// 	background-color: #ffffff;
+// 	z-index: 9;
+
+// 	.float_left {
+// 		width: 640rpx;
+// 	}
+
+// 	.float_right {
+// 		line-height: 64rpx;
+// 		width: 50rpx;
+// 		text-align: center;
+// 		color: #666666;
+// 	}
+// }
+.keyword-view {
+	position: fixed;
+	width: 100%;
+	top: 0;
+	left: 0;
+	padding: 20rpx 24rpx;
+	background-color: #ffffff;
+	z-index: 9;
+
+	.float_left {
+		width: 640rpx;
+	}
+
+	.float_right {
+		line-height: 64rpx;
+		width: 50rpx;
+		text-align: center;
+		color: #666666;
+	}
+}
+
+.com-ul {
+	padding-top: 100rpx;
+
+	.com-li {
+		width: 710rpx;
+		margin: 20rpx auto;
+		background-color: #ffffff;
+		padding: 20rpx 0;
+		border-radius: 20rpx;
+
+		.cutomer-name {
+			padding-bottom: 10rpx;
+			color: $uni-color-primary;
+			font-size: 24rpx;
+
+			.float_left {
+				max-width: 540rpx;
+				background-color: #ecf5ff;
+				border-top-right-radius: 20rpx;
+				border-bottom-right-radius: 20rpx;
+				padding: 0 20rpx;
+				line-height: 40rpx;
+			}
+
+			.staff-name {
+				padding-right: 20rpx;
+				line-height: 40rpx;
+			}
+		}
+
+		.cont {
+			padding: 0 20rpx;
+			line-height: 36rpx;
+
+			.content {
+				padding-bottom: 10rpx;
+			}
+
+			.image-view {
+				padding-bottom: 10rpx;
+
+				image {
+					width: 120rpx;
+					height: 120rpx;
+					border-radius: 10rpx;
+				}
+			}
+
+			.address {
+				padding-bottom: 10rpx;
+				font-size: 24rpx;
+			}
+
+			.time {
+				font-size: 24rpx;
+				color: #999999;
+			}
+		}
+	}
+}
+</style>

+ 208 - 0
pagesT/customer/CommunicationLogsAdd.vue

@@ -0,0 +1,208 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="140" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="拜访对象">
+					<u-input class="dis-input" disabled placeholder="请选择" v-model="keyword" @click="goPage('/pagesT/customer/selCustomer')" />
+					<u-icon name="arrow-right" size="24" color="#6c6c6c"></u-icon>
+				</u-form-item>
+				<u-form-item label=" " label-position="top">
+					<view style="width: 100%;">
+						<u-input height="150" maxlength="1000" v-model="content" type="textarea" />
+						<upload :sourceType="['camera']" :images="extend.license ? [extend.license] : []" @handleRemove="imgRemove" @uploadSuccess="uploadSuccess" />
+					</view>
+				</u-form-item>
+			</view>
+			<view class="address-view">
+				<u-icon name="map-fill" color="#6c6c6c" size="26"></u-icon>
+				<text class="text">{{ location || '获取位置' }}</text>
+				<u-icon @click="locationRegion" name="reload" color="#2979ff" size="28"></u-icon>
+			</view>
+			<view class="submit-btn"><button :loading="sub_loading" class="add-btn" @click="addCustomerCommunication">保存提交</button></view>
+		</u-form>
+	</view>
+</template>
+
+<script>
+import upload from '@/components/qiniu/QiniuUpload.vue';
+import amap from '@/common/amap-wx.js';
+import config from '@/common/config.js';
+export default {
+	components: {
+		upload
+	},
+	data() {
+		return {
+			content: '',
+			id: '',
+			customerId: '',
+			time: '',
+			customerData: '',
+			keyword: '',
+			location: '',
+			picture: '',
+			staff_id: '',
+			extend: {
+				license: ''
+			},
+			amapPlugin: null,
+			sub_loading: false
+		};
+	},
+	onLoad(options) {
+		this.amapPlugin = new amap.AMapWX({
+			key: config.gdKey
+		});
+		if (options.id) {
+			(this.id = options.id),
+				uni.setNavigationBarTitle({
+					title: '编辑客户拜访'
+				});
+			this.getCustomerCommunication(this.id);
+		} else {
+			this.locationRegion();
+		}
+	},
+	watch: {
+		customerData(val) {
+			if (val) {
+				this.keyword = val.name;
+				this.customerId = val.id;
+			}
+		}
+	},
+	computed: {
+		staffId() {
+			return this.$store.state.userInfo.staffId;
+		}
+	},
+	methods: {
+		// 获取详情
+		getCustomerCommunication(id) {
+			this.$u.api.getCustomerCommunication(id).then(res => {
+				this.content = res.data.content;
+				this.customerId = res.data.customerId;
+				this.staff_id = res.data.staffId;
+				this.time = res.data.createTime;
+				this.extend.license = res.data.picture;
+				this.location = res.data.location;
+				this.keyword = res.data.customerName;
+			});
+		},
+		// 新增
+		addCustomerCommunication() {
+			if (!this.keyword) {
+				this.$u.toast('请选择客户');
+				return;
+			}
+			if (!this.content) {
+				this.$u.toast('请输入内容');
+				return;
+			}
+			// if (!this.extend.license) {
+			// 	this.$u.toast('请上传拜访凭证');
+			// 	return;
+			// }
+			this.sub_loading = true;
+			if (this.id) {
+				this.$u.api
+					.updateCustomerCommunication(this.id, {
+						customerId: this.customerId,
+						staffId: this.staff_id,
+						content: this.content,
+						time: this.time,
+						location: this.location,
+						picture: this.extend.license
+					})
+					.then(res => {
+						this.sub_loading = false;
+						this.$u.toast('编辑成功');
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 500);
+					})
+					.catch(res => {
+						this.sub_loading = false;
+					});
+			} else {
+				this.$u.api
+					.addCustomerCommunication({
+						customerId: this.customerId,
+						staffId: this.staffId,
+						content: this.content,
+						time: this.time,
+						location: this.location,
+						picture: this.extend.license
+					})
+					.then(res => {
+						this.sub_loading = false;
+						this.$u.toast('提交成功');
+						setTimeout(() => {
+							uni.navigateBack();
+						}, 500);
+					})
+					.catch(res => {
+						this.sub_loading = false;
+					});
+			}
+		},
+		locationRegion() {
+			uni.showLoading({
+				title: '获取信息中'
+			});
+			this.amapPlugin.getRegeo({
+				success: data => {
+					console.log(data);
+					this.location = data[0].name;
+					uni.hideLoading();
+				},
+				fail: err => {
+					console.log('获取位置失败::', err);
+				}
+			});
+		},
+		// 图片上传成功
+		uploadSuccess(imgUrl) {
+			this.extend.license = imgUrl;
+		},
+		//移除图片
+		imgRemove(arr) {
+			this.extend.license = '';
+		}
+	}
+};
+</script>
+<style scoped lang="scss">
+.need-submit {
+	padding: 30rpx;
+	padding-top: 50rpx;
+}
+
+.add-btn {
+	width: 690upx;
+	height: 80upx;
+	font-size: 32upx;
+	color: #fff;
+	border-radius: 10upx;
+	margin: 0 auto;
+	background-color: $uni-color-primary;
+}
+
+.add-btn:after {
+	border: 0 none;
+}
+
+.address-view {
+	font-size: 24rpx;
+	background-color: #ffffff;
+	line-height: 50rpx;
+	height: 50rpx;
+	border-radius: 40rpx;
+	display: inline-block;
+	margin: 0 20rpx;
+	padding: 0 20rpx;
+	.text {
+		margin: 0 16rpx 0 8rpx;
+	}
+}
+</style>

+ 339 - 0
pagesT/customer/CustomerDetail.vue

@@ -0,0 +1,339 @@
+<template>
+	<view>
+		<view class="detail-top">
+			<u-navbar
+				title="客户详情"
+				:background="{ background: `rgba(255,255,255,${scroll_top/100})` }"
+				back-icon-color="#2D405E"
+				:title-bold="true"
+				title-color="#2D405E"
+				title-size="32"
+				:border-bottom="false"
+			></u-navbar>
+			<view class="top-view">
+				<view class="clearfix customer-main">
+					<view class="float_left main-left">
+						<view class="cu-top">
+							<text class="cu-name">{{ customer_detail.name }}</text>
+							<text class="custom-icon custom-icon-ziyuan"></text>
+							<text class="cu-mobile">{{ customer_detail.mobile }}</text>
+						</view>
+						<view class="type-view">
+							<view class="type-li primary-type" v-if="customer_detail.customerType">{{ customer_detail.customerType }}</view>
+							<view class="type-li primary-type" v-if="customer_detail.status === 2">已审核</view>
+							<view class="type-li warning-type" v-if="customer_detail.status === 1">未审核</view>
+							<view class="type-li warning-type" v-if="customer_detail.status === 0">待完善</view>
+							<view class="type-li success-type" v-if="customer_detail.enableStatus === 5">启用</view>
+							<view class="type-li danger-type" v-if="customer_detail.enableStatus === 4">禁用</view>
+						</view>
+					</view>
+					<view class="float_right avatar"><image :src="customer_detail.avatar || '../../static/img/user-re.png'" mode="aspectFill"></image></view>
+				</view>
+				<view class="other-info">
+					<view class="other-li">
+						<text class="custom-icon custom-icon-form_light"></text>
+						<text class="value">
+							编号:{{ customer_detail.code }}
+						</text>
+					</view>
+					<view class="other-li">
+						<text class="custom-icon custom-icon-lishi"></text>
+						<text class="value">
+							注册时间:
+						</text>
+						<text class="value time">
+							{{ $u.timeFormat(customer_detail.createTime) }}
+						</text>
+					</view>
+				</view>
+				<view class="bottom-info clearfix">
+					所属商铺:{{customer_detail.shopName|| '未设置'}}
+				</view>
+				<view class="bottom-info clearfix" style="margin-top: 8rpx;">
+					<view class="float_left">类型:{{customer_detail.customerType|| '未设置'}}</view>
+					<view class="float_right">业务员:{{customer_detail.salesManName|| '未设置'}}</view>
+				</view>
+			</view>
+		</view>
+		<u-sticky offset-top="140">
+			<view class="tabs-view">
+				<u-tabs-swiper
+					ref="tabs"
+					:is-scroll="false"
+					font-size="26"
+					:current="tabs_current"
+					:list="tags_list"
+					height="94"
+					@change="changeTab"
+					bg-color="transparent"
+					inactive-color="rgba(255, 255, 255, 0.6)"
+					:bar-style="{ borderRadius: '6rpx', height: '6rpx', width: '32rpx', backgroundColor: '#ffffff' }"
+					:active-item-style="{ color: '#ffffff', fontSize: '32rpx' }"
+				></u-tabs-swiper>
+			</view>
+		</u-sticky>
+		<!-- :style="{paddingTop:scroll_top>150?'150rpx':'0'}" -->
+		<view class="handel-view">
+			<view v-if="customer_id">
+				<block v-if="tabs_current === 0">
+					<!-- 浏览记录 -->
+					<Visitslogs :customerId="customer_id"></Visitslogs>
+				</block>
+				<block v-if="tabs_current === 1">
+					<!-- 购买记录 -->
+					<BuyLogs :userCenterId="customer_detail.userCenterId"></BuyLogs>
+				</block>
+				<block v-if="tabs_current === 2">
+					<!-- 跟进记录 -->
+					<CommunicationLogs :customerId="customer_id"></CommunicationLogs>
+				</block>
+				<block v-if="tabs_current === 3">
+					<!-- 账款明细 -->
+					<moneyDetail :customerId="customer_id"></moneyDetail>
+				</block>
+				<block v-if="tabs_current === 4">
+					<!-- 订单列表 -->
+					<CustomerOrder :userCenterId="customer_detail.userCenterId"></CustomerOrder>
+				</block>
+			</view>
+		</view>
+		<view class="submit-btn">
+			<viwe class="float_left" style="color: #B8C0C8;text-align: center;margin-left: 40rpx;">
+				<view @click="goPage('/pagesT/customer/AddCustomer?id=' + customer_detail.id)">
+					<u-icon
+						label-pos="bottom"
+						margin-top="10rpx"
+						name="file-text"
+						color="#B8C0C8"
+						label="完善资料"
+						label-color="#62738E"
+						label-size="20"
+						size="40"
+					></u-icon>
+				</view>
+			</viwe>
+			<view class="btn-min" @click="callPhone(customer_detail.mobile)">联系客户</view>
+			<view class="btn-min-valet-order"  @click="orderAdd()" v-if="customer_detail.status === 2 && customer_detail.enableStatus === 5">代客下单</view>
+		</view>
+	</view>
+</template>
+
+<script>
+import Visitslogs from './components/Visitslogs.vue';
+import BuyLogs from './components/BuyLogs.vue';
+import CommunicationLogs from './components/CommunicationLogs.vue';
+import CustomerOrder from './components/CustomerOrder.vue';
+import moneyDetail from './components/moneyDetail.vue';
+export default {
+	components: {
+		Visitslogs,
+		BuyLogs,
+		CommunicationLogs,
+		moneyDetail,
+		CustomerOrder
+	},
+	data() {
+		return {
+			tabs_current: 0,
+			tags_list: [
+				{
+					name: '浏览记录'
+				},
+				{
+					name: '购买记录'
+				},
+				{
+					name: '跟进记录'
+				},
+				{
+					name: '账款明细'
+				},
+				{
+					name: '订单列表'
+				}
+			],
+			customer_id: 0,
+			customer_detail: {},
+			visit_logs: [],
+			scroll_top: 0,
+			actived: ''
+		};
+	},
+	onPageScroll(e) {
+		this.scroll_top = e.scrollTop;
+	},
+	async onLoad(options) {
+		if (options.id) {
+			this.customer_id = options.id;
+		}
+	},
+	async onShow(options) {
+		await this.getCustomerInfo();
+	},
+	methods: {
+		orderAdd(item) {
+			const obj = {
+				shopId: this.customer_detail.shopId,
+				userCenterId: this.customer_detail.userCenterId,
+				customerId: this.customer_detail.id,
+				customerName: this.customer_detail.name
+			};
+			this.goPage('/pages/order/OrderAdd?customer=' + JSON.stringify(obj));
+		},
+		// 切换tabs
+		changeTab(index) {
+			this.tabs_current = index;
+		},
+		// 客户详情
+		async getCustomerInfo() {
+			await this.$u.api.getCustomerInfo(this.customer_id).then(({ data }) => {
+				this.customer_detail = data;
+			});
+		}
+	}
+};
+</script>
+<style lang="scss" scoped>
+.detail-top {
+	// background: rgba($color: #ffffff, $alpha: 0.9);
+	background: linear-gradient(270deg,#f8f8fd, #e7f7ff, #f8f8fd);
+	padding-bottom: 100rpx;
+	.top-view {
+		padding: 24rpx 40rpx 40rpx;
+		.customer-main {
+			.avatar {
+				image {
+					background-color: #FFFFFF;
+					display: block;
+					width: 88rpx;
+					height: 88rpx;
+					border-radius: 8rpx;
+					border: 2rpx solid #ffffff;
+				}
+			}
+			.main-left{
+				width: 560rpx;
+				.cu-top {
+					margin-bottom: 10rpx;
+					line-height: 45rpx;
+					.cu-name{
+						font-family: DIN-Medium;
+						display: inline-block;
+						max-width: 360rpx;
+						color: #2D405E;
+						font-size: 32rpx;
+						font-weight: 600;
+						margin-right: 24rpx;
+						vertical-align: middle;
+					}
+					.custom-icon-ziyuan{
+						font-size: 28rpx;
+						color: #000000;
+						margin-right: 4rpx;
+					}
+					.cu-mobile{
+						font-weight: 300;
+						font-family: DINPro-Regular;
+					}
+				}
+				.type-view {
+					display: flex;
+					.type-li {
+						width: 104rpx;
+						height: 36rpx;
+						border-radius: 4rpx;
+						font-size: 20rpx;
+						margin-right: 8rpx;
+						text-align: center;
+						line-height: 36rpx;
+						&.primary-type {
+							background: rgba(64, 118, 214, 0.12);
+							color: #4076d6;
+						}
+						&.warning-type {
+							background: #fdf6e8;
+							color: #fa6400;
+						}
+						&.success-type {
+							background: rgba(0, 195, 149, 0.12);
+							color: #00c395;
+						}
+						&.danger-type {
+							background: rgba(246, 119, 120, 0.12);
+							color: #f67778;
+						}
+					}
+				}
+			}
+			
+		}
+		.other-info{
+			padding-top: 22rpx;
+			font-weight: 400;
+			font-size: 24rpx;
+			color: #B8C0C8;
+			line-height: 40rpx;
+			.custom-icon{
+				font-size: 24rpx;
+				margin-right: 8rpx;
+			}
+			.time{
+				color: #2D405E;
+				font-family: DINPro-Regular;
+			}
+		}
+		.bottom-info{
+			margin-top: 24rpx;
+			.float_right{
+				color: #B8C0C8;
+			}
+		}
+	}
+}
+
+.tabs-view {
+	width: 100%;
+	border-top-left-radius: 20rpx;
+	border-top-right-radius: 20rpx;
+	background-color: #4076d6;
+	transform: translateY(-100rpx);
+}
+
+.handel-view {
+	width: 100%;
+	margin: 0 auto;
+	background-color: #ffffff;
+	transform: translateY(-100rpx);
+}
+
+.submit-btn {
+	width: 100%;
+	height: 98rpx;
+	font-size: 28rpx;
+	color: #fff;
+	font-family: PingFangSC-Medium, PingFang SC;
+
+	.btn-min {
+		float: right;
+		width: 240rpx;
+		height: 64rpx;
+		line-height: 64rpx;
+		background: #4076d6;
+		border-radius: 32rpx;
+		margin-left: 40rpx;
+	}
+
+	.btn-min-valet-order {
+		float: right;
+		width: 240rpx;
+		height: 64rpx;
+		line-height: 64rpx;
+		text-align: center;
+		background: #fff;
+		border-radius: 32rpx;
+		border: 1px solid #979797;
+		color: #2d405e;
+		margin-left: 70rpx;
+	}
+}
+</style>

+ 41 - 0
pagesT/customer/CustomerMap.vue

@@ -0,0 +1,41 @@
+<template>
+	<view>
+		<view class="charts-box">
+			<qiun-data-charts type="map" :chartData="chartData" :echartsH5="true" :echartsApp="true" background="none"
+				:animation="false" />
+		</view>
+	</view>
+</template>
+
+<script>
+	export default { 
+		data() {
+			return {
+				chartData: {
+					categories: [],
+					series: []
+				},
+			}
+		},
+		onLoad() {			
+			this.getCustomerDistributed()
+		},
+		methods: {			
+			getCustomerDistributed() {
+				this.$u.api.getCustomerDistributed().then((res) => {
+					console.log(res.data)					
+				});
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.charts-box {
+		margin: 0 auto;
+		width: 710rpx;
+		height: 530rpx;
+		padding: 24rpx 24rpx 0 0;
+		background-color: #ffffff;
+	}
+</style>

+ 413 - 0
pagesT/customer/StaffList.vue

@@ -0,0 +1,413 @@
+<template>
+	<view class="sort-box">
+		<view class="top-view">
+			<view class="search-view clearfix">
+				<!-- <u-tabs-swiper font-size="28" ref="tabs" :list="tabs_list" :is-scroll="false" :current="tabs_current"
+					@change="timeChange"></u-tabs-swiper> -->
+				<view class="title" @click="month_show = true">
+					{{time}}
+				</view>
+				<view class="title" @click="status_show = true">{{type}}</view>
+			</view>
+			<view class="thead">
+				<view class="flex1 sort-li">排名</view>
+				<view class="flex1 staff-li">销售员</view>
+				<view class="flex1 cutomer-li" @click="sortChange('dealCustomerNum')">
+					<text>成交客户</text>
+					<view class="icon-up sort-icon"
+						:class="[sortField === 'dealCustomerNum' && sort_k === 'ASC' ? 'active' : '']">
+						<u-icon name="arrow-up-fill" size="14"></u-icon>
+					</view>
+					<view class="icon-down sort-icon"
+						:class="[sortField === 'dealCustomerNum' && sort_k === 'DESC' ? 'active' : '']">
+						<u-icon name="arrow-down-fill" size="14"></u-icon>
+					</view>
+				</view>
+				<view class="flex1 sku-li" @click="sortChange('skuNum')">
+					<text>SKU数</text>
+					<view class="icon-up sort-icon"
+						:class="[sortField === 'skuNum' && sort_k === 'ASC' ? 'active' : '']">
+						<u-icon name="arrow-up-fill" size="14"></u-icon>
+					</view>
+					<view class="icon-down sort-icon"
+						:class="[sortField === 'skuNum' && sort_k === 'DESC' ? 'active' : '']">
+						<u-icon name="arrow-down-fill" size="14"></u-icon>
+					</view>
+				</view>
+				<view class="flex1" @click="sortChange('orderNum')">
+					<text>订单数</text>
+					<view class="icon-up sort-icon"
+						:class="[sortField === 'orderNum' && sort_k === 'ASC' ? 'active' : '']">
+						<u-icon name="arrow-up-fill" size="14"></u-icon>
+					</view>
+					<view class="icon-down sort-icon"
+						:class="[sortField === 'orderNum' && sort_k === 'DESC' ? 'active' : '']">
+						<u-icon name="arrow-down-fill" size="14"></u-icon>
+					</view>
+				</view>
+				<view class="flex1 sort-li" @click="sortChange('buyNum')">
+					<text>销售量</text>
+					<view class="icon-up sort-icon"
+						:class="[sortField === 'buyNum' && sort_k === 'ASC' ? 'active' : '']">
+						<u-icon name="arrow-up-fill" size="14"></u-icon>
+					</view>
+					<view class="icon-down sort-icon"
+						:class="[sortField === 'buyNum' && sort_k === 'DESC' ? 'active' : '']">
+						<u-icon name="arrow-down-fill" size="14"></u-icon>
+					</view>
+				</view>
+				<view class="flex1" @click="sortChange('dealAmount')">
+					<text>金额</text>
+					<view class="icon-up sort-icon"
+						:class="[sortField === 'dealAmount' && sort_k === 'ASC' ? 'active' : '']">
+						<u-icon name="arrow-up-fill" size="14"></u-icon>
+					</view>
+					<view class="icon-down sort-icon"
+						:class="[sortField === 'dealAmount' && sort_k === 'DESC' ? 'active' : '']">
+						<u-icon name="arrow-down-fill" size="14"></u-icon>
+					</view>
+				</view>
+			</view>
+		</view>
+
+		<ul class="cont-ul">
+			<li class="flex" v-for="(item, index) in rank_list" :key="index"
+				:class="[staffId === item.salesManId ? 'on-staff' : '']">
+				<view class="flex1 sort-li">{{ index + 1 }}</view>
+				<view class="flex1 staff-li">{{ item.salesManName }}</view>
+				<view class="flex1 cutomer-li">{{ item.dealCustomerNum }}</view>
+				<view class="flex1 sku-li">{{ item.skuNum }}</view>
+				<view class="flex1">{{ item.orderNum }}</view>
+				<view class="flex1 sort-li">{{ item.buyNum ? $utils.formatNub(item.buyNum) : 0 }}</view>
+				<view class="flex1">{{ $utils.formatNub($NP.divide(item.dealAmount, 10000), 1) }}万</view>
+			</li>
+		</ul>
+		<view class="total-view flex" v-if="rank_list.length">
+			<view class="flex1 text-li">合计:</view>
+			<view class="flex1 cutomer-li">{{ totalObj.dealCustomerNum }}</view>
+			<view class="flex1 sku-li">{{ totalObj.skuNum }}</view>
+			<view class="flex1">{{ totalObj.orderNum }}</view>
+			<view class="flex1 sort-li">{{ totalObj.buyNum ? $utils.formatNub(totalObj.buyNum) : 0 }}</view>
+			<view class="flex1">
+				{{ $utils.formatNub($NP.divide(totalObj.dealAmount, 10000), 1) }}
+				<text style="font-size: 24rpx;font-weight: 400;margin-left: 4rpx;">万</text>
+			</view>
+		</view>
+		<view v-if="!rank_list.length" class="empty-view">
+			<u-empty text="暂无数据" mode="list"></u-empty>
+		</view>
+		<u-loadmore v-if="rank_list.length" :status="load_status" />
+		<u-select @confirm="statusChange" v-model="status_show" :list="type_options"></u-select>
+		<u-select v-model="month_show" :list="tabs_list" @confirm="confirm"></u-select>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				order_status: 3,
+				order_name: '待收货',
+				time_name: '当日',
+				tabs_list: [{
+						label: '当月',
+						value: 0
+					},
+					{
+						label: '当日',
+						value: 1
+					}
+				],
+				tabs_current: 1,
+				type_options: [{
+						label: '全部',
+						value: ''
+					},
+					{
+						label: '待审核',
+						value: 2
+					},
+					{
+						label: '待出库',
+						value: 3
+					},
+					{
+						label: '待收货',
+						value: 4
+					},
+					{
+						label: '已完成',
+						value: 5
+					},
+					{
+						label: '已关闭',
+						value: 6
+					}
+				],
+				rank_list: [],
+				time_show: false,
+				status_show: false,
+				sort_k: 'DESC', //sort 排序方式 ASC 正序 DESC 倒序
+				load_status: 'nomore',
+				page: 1,
+				pageSize: 50,
+				total: 0,
+				start_time: '', //不传此参默认当天
+				end_time: '', //不传此参默认当天
+				sortField: 'dealAmount', //dealCustomerNum 成交客户数 orderNum 订单数 dealAmount 成交金额 skuNum 成交sku数
+				month_show: false,
+				time: '当日',
+				type: '待出库'
+			};
+		},
+		computed: {
+			staffId() {
+				return this.$store.state.userInfo.staffId;
+			},
+			totalObj() {
+				let totalObj = {
+					dealCustomerNum: 0,
+					skuNum: 0,
+					orderNum: 0,
+					buyNum: 0,
+					dealAmount: 0
+				};
+				this.rank_list.forEach(item => {
+					totalObj.dealCustomerNum = this.$NP.plus(totalObj.dealCustomerNum, Number(item
+						.dealCustomerNum));
+					totalObj.skuNum = this.$NP.plus(totalObj.skuNum, Number(item.skuNum));
+					totalObj.orderNum = this.$NP.plus(totalObj.orderNum, Number(item.orderNum));
+					totalObj.buyNum = this.$NP.plus(totalObj.buyNum, Number(item.buyNum));
+					totalObj.dealAmount = this.$NP.plus(totalObj.dealAmount, Number(item.dealAmount));
+				});
+				return totalObj;
+			}
+		},
+		onLoad() {
+			console.log(new Date().getDate());
+			this.salesManRank();
+		},
+		onReachBottom() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.salesManRank();
+			}
+		},
+		onPullDownRefresh() {
+			this.page = 1;
+			this.salesManRank();
+		},
+		methods: {
+			openMode(key) {
+				this[key] = true;
+			},
+			timeChange(index) {
+				this.tabs_current = index;
+				if (index === 0) {
+					this.time_name = '当月';
+					const day = new Date().getDate();
+					const funDate = this.$utils.funDate(0 - day);
+					this.start_time = this.$utils.timeByTimestamp(funDate + ' 00:00:00');
+					this.end_time = parseInt(new Date().getTime() / 1000);
+				} else {
+					this.time_name = '当日';
+					this.start_time = '';
+					this.end_time = '';
+				}
+				this.searchData();
+			},
+			sortChange(key) {
+				this.sortField = key;
+				if (this.sort_k === 'DESC') {
+					this.sort_k = 'ASC';
+				} else {
+					this.sort_k = 'DESC';
+				}
+				this.searchData();
+			},
+			searchData() {
+				this.page = 1;
+				this.salesManRank();
+			},
+			statusChange(val) {
+				this.order_status = val[0].value;
+				this.order_name = val[0].label;
+				this.type = val[0].label
+				this.searchData();
+			},
+			salesManRank() {
+				this.load_status = 'loading';
+				let arr = [];
+				if (this.order_status) {
+					arr.push(this.order_status);
+				}
+				this.$u.api
+					.salesManRank({
+						page: this.page,
+						pageSize: this.pageSize,
+						sortField: this.sortField,
+						sort: this.sort_k, //DESC
+						startTime: this.start_time,
+						endTime: this.end_time,
+						orderStatus: arr
+					})
+					.then(res => {
+						uni.stopPullDownRefresh();
+						if (this.page === 1) {
+							this.rank_list = res.data;
+						} else {
+							this.rank_list = this.rank_list.concat(res.data);
+						}
+						this.total = res.pageTotal;
+						this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+					});
+			},
+			confirm(val) {
+				this.timeChange(val[0].value)
+				this.time = val[0].label
+			}
+		}
+	};
+</script>
+style
+<style lang="scss" scoped>
+	.sort-box {
+		padding-bottom: 90rpx;
+	}
+
+	.keyword-view {
+		width: 100%;
+		padding: 20rpx 24rpx;
+		background-color: #ffffff;
+		z-index: 9;
+
+		.float_left {
+			width: 640rpx;
+		}
+
+		.float_right {
+			line-height: 64rpx;
+			width: 50rpx;
+			text-align: center;
+			color: #666666;
+		}
+	}
+
+	.cont-ul {
+		background-color: #ffffff;
+		padding-top: 140rpx;
+
+		.flex {
+			height: 70rpx;
+		}
+	}
+
+	.flex {
+		display: table;
+		width: 750rpx;
+		// line-height: 90rpx;
+		font-size: 24rpx;
+	}
+
+	.flex1 {
+		display: table-cell;
+		width: 16%;
+		text-align: center;
+		position: relative;
+		height: 100%;
+		vertical-align: middle;
+
+		&.on-staff {
+			color: $uni-color-primary;
+		}
+
+		&.staff-li {
+			width: 11%;
+		}
+
+		&.sort-li {
+			width: 11%;
+		}
+
+		&.cutomer-li {
+			width: 20%;
+		}
+
+		&.sku-li {
+			width: 18%;
+		}
+
+		.sort-icon {
+			position: absolute;
+			right: 10rpx;
+			height: 20rpx;
+			line-height: 20rpx;
+			color: #999999;
+
+			&.active {
+				color: $uni-color-primary;
+			}
+		}
+
+		.icon-up {
+			top: 10rpx;
+		}
+
+		.icon-down {
+			bottom: 18rpx;
+		}
+	}
+
+	.on-staff {
+		color: $uni-color-primary;
+	}
+
+	.top-view {
+		position: fixed;
+		width: 750rpx;
+		top: 0;
+		left: 0;
+		z-index: 9;
+
+		.thead {
+			line-height: 60rpx;
+			height: 60rpx;
+			font-size: 24rpx;
+			background-color: #f5f5f5;
+			display: flex;
+			width: 100%;
+		}
+
+		.search-view {
+			width: 100%;
+
+			.title {
+				width: 50%;
+				height: 80rpx;
+				float: left;
+				text-align: center;
+				font-size: 28rpx;
+				font-weight: bold;
+				line-height: 80rpx;
+			}
+		}
+	}
+
+	.total-view {
+		position: fixed;
+		z-index: 9;
+		bottom: 0;
+		left: 0;
+		width: 100%;
+		font-size: 28rpx;
+		line-height: 88rpx;
+		font-weight: 600;
+		background-color: #ffffff;
+		box-shadow: 0 -3rpx 32rpx 0 rgba(156, 170, 175, 0.16);
+
+		.text-li {
+			font-size: 24rpx;
+			width: 22%;
+		}
+	}
+</style>

+ 332 - 0
pagesT/customer/VisitLogs.vue

@@ -0,0 +1,332 @@
+<template>
+	<view>
+		<view class="keyword-view clearfix">
+			<u-search
+				disabled
+				@custom="clearValue"
+				@search="searchConfirm()"
+				action-text="重置"
+				:clearabled="true"
+				placeholder="请选择客户"
+				v-model="customer_name"
+				@click="goPage('/pagesT/customer/selCustomer')"
+			></u-search>
+		</view>
+		<view class="logs-ul">
+			<view class="look-li" v-for="(item, index) in order_list" :key="index">
+				<view class="goods-name">{{ item.goodsName }}</view>
+				<view class="other-info clearfix">
+					<view class="float_left"><text class="label">客户</text>{{ item.customerName }}</view>
+					<view class="float_right" @click="callPhone(item.mobile)"><u-icon name="ziyuan" custom-prefix="custom-icon" :label="item.mobile" label-color="#4076D6"></u-icon></view>
+				</view>
+				<view class="other-info">
+					<text class="label">时间</text>
+					{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}
+				</view>
+			</view>
+			<!-- <view class="logs-li clearfix" v-for="(item, index) in order_list" :key="index">
+				<view class="clearfix logs-goods">
+					<view class="float_left goods-img">
+						<image src="../../static/Tar_bar_slices/goods-fill.png" mode="aspectFill"></image>
+					</view>
+					<view class="float_left goods-info">
+						<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+						<view class="other-info">
+							<view class="info-li">购买价格:89</view>
+							<view class="info-li">购买数量:51</view>
+						</view>
+						<view class="look-time-out clearfix">
+							<view class="price float_left">¥117</view>
+							<view class="look-time float_right">
+								<view class="triangle"><text>浏览</text></view>
+								<view class="second">21s</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="bottom clearfix">
+					<view class="float_left">
+						<view class="cutomer ellipsis">{{ item.customerName }}</view>
+						<view class="date">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</view>
+					</view>
+					<view class="float_right">
+						<view class="btn-li">查看订单</view>
+						<view class="btn-li">联系客户</view>
+					</view>
+				</view>
+			</view> -->
+			<u-loadmore :status="load_status" />
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			order_list: [],
+			keyword: '',
+			customerData: '',
+			customer_name: '',
+			customer_id: ''
+		};
+	},
+	watch: {
+		customerData(val) {
+			if (val) {
+				this.customer_name = val.name;
+				this.customer_id = val.id;
+				this.page = 1;
+				this.getAllCustomerVisitsLog();
+			}
+		}
+	},
+	onLoad() {
+		this.getAllCustomerVisitsLog();
+	},
+	onPullDownRefresh() {
+		this.page = 1;
+		this.getAllCustomerVisitsLog();
+	},
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getAllCustomerVisitsLog();
+		}
+	},
+	methods: {
+		clearValue() {
+			this.customer_name = '';
+			this.customer_id = 0;
+			this.page = 1;
+			this.getAllCustomerVisitsLog();
+		},
+		searchConfirm() {
+			this.page = 1;
+			this.getAllCustomerVisitsLog();
+		},
+		getAllCustomerVisitsLog() {
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize,
+				customerId: this.customer_id
+			};
+			this.load_status = 'loading';
+			this.$u.api.getAllCustomerVisitsLog(params).then(res => {
+				if (this.page === 1) {
+					this.order_list = res.data;
+				} else {
+					this.order_list = this.order_list.concat(res.data);
+				}
+				this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
+				this.total = res.pageTotal;
+				// console.log(this.order_list);
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.keyword-view {
+	position: fixed;
+	width: 100%;
+	top: 0;
+	left: 0;
+	padding: 20rpx 24rpx;
+	background-color: #ffffff;
+	z-index: 9;
+
+	.float_left {
+		width: 640rpx;
+	}
+
+	.float_right {
+		line-height: 64rpx;
+		width: 50rpx;
+		text-align: center;
+		color: #666666;
+	}
+}
+
+.logs-ul {
+	padding-top: 100rpx;
+
+	.logs-li {
+		width: 710rpx;
+		margin: 20rpx auto;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		padding: 24rpx;
+		.goods-img {
+			position: relative;
+			width: 120rpx;
+			height: 120rpx;
+			border-radius: 20rpx;
+			overflow: hidden;
+			margin-right: 20rpx;
+			border: 1px solid #f5f5f5;
+
+			image {
+				width: 100%;
+				height: 100%;
+				display: block;
+			}
+
+			.buy-status {
+				position: absolute;
+				line-height: 30rpx;
+				height: 30rpx;
+				font-size: 20rpx;
+				text-align: center;
+				width: 100%;
+				left: 0;
+				bottom: 0;
+				background-color: $uni-color-success;
+				color: #ffffff;
+
+				&.no-buy {
+					background-color: $uni-color-error;
+				}
+			}
+		}
+
+		.goods-info {
+			width: 520rpx;
+			position: relative;
+			.goods-name {
+				font-weight: bold;
+			}
+
+			.date-time {
+				font-size: 22rpx;
+			}
+
+			.other-info {
+				padding-top: 10rpx;
+				display: flex;
+				flex-wrap: wrap;
+				font-size: 22rpx;
+
+				.info-li {
+					width: 50%;
+					display: inline-block;
+					color: #6c6c6c;
+				}
+			}
+		}
+
+		.look-time-out {
+			.price {
+				color: $uni-color-error;
+			}
+			.look-time {
+				color: #ffffff;
+				font-size: 18rpx;
+				width: 150rpx;
+				height: 40rpx;
+				line-height: 40rpx;
+				overflow: hidden;
+				background-color: $uni-color-warning;
+				position: relative;
+				border-radius: 6rpx;
+
+				.triangle {
+					text-align: center;
+					position: absolute;
+					width: 76rpx;
+					height: 0;
+					border-bottom: 40rpx solid #000000;
+					border-left: 10px solid transparent;
+					-webkit-transform: rotate(180deg);
+					transform: rotate(180deg);
+
+					text {
+						display: block;
+						transform: rotate(180deg);
+					}
+				}
+
+				.second {
+					font-size: 22rpx;
+					position: absolute;
+					right: 0;
+					width: 74rpx;
+					height: 40rpx;
+					text-align: center;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+	}
+
+	.bottom {
+		padding-top: 24rpx;
+		border-top: 1px solid #eeeeee;
+		margin-top: 24rpx;
+
+		.float_left {
+			width: 320rpx;
+
+			.cutomer {
+				font-weight: bold;
+				font-size: 26rpx;
+				padding-bottom: 6rpx;
+			}
+
+			.date {
+				font-size: 22rpx;
+				color: #666666;
+			}
+		}
+
+		.float_right {
+			.btn-li {
+				display: inline-block;
+				border-radius: 10rpx;
+				margin-left: 16rpx;
+				width: 140rpx;
+				line-height: 54rpx;
+				font-size: 24rpx;
+				text-align: center;
+				border: 1px solid $uni-color-primary;
+				color: $uni-color-primary;
+
+				&:last-child {
+					background-color: $uni-color-primary;
+					color: #ffffff;
+				}
+			}
+		}
+	}
+}
+
+.look-li {
+	width: 710rpx;
+	margin: 24rpx auto;
+	background-color: #ffffff;
+	padding: 24rpx;
+	border-radius: 8rpx;
+	.goods-name {
+		color: #2d405e;
+		font-weight: 600;
+		font-size: 30rpx;
+		padding-bottom: 20rpx;
+	}
+	.other-info {
+		line-height: 40rpx;
+		margin-top: 10rpx;
+		.label {
+			width: 82rpx;
+			font-weight: 400;
+			color: #b8c0c8;
+			margin-right: 30rpx;
+		}
+	}
+}
+</style>

+ 218 - 0
pagesT/customer/components/BuyLogs.vue

@@ -0,0 +1,218 @@
+<template>
+	<view class="rigth-view">
+		<scroll-view scroll-y="true" class="rigth-scroll" @scrolltolower="moreGoods">
+			<view class="goods-li" v-for="(item, index) in buy_logs" :key="index">
+				<view class="goods-main clearfix">
+					<image class="goods-img float_left" :src="item.goodsImages" mode="aspectFill"></image>
+					<view class="goods-info float_left ">
+						<view class="goods-name ellipsis">{{ item.goodsName }}</view>
+						<view class="goods-code">购买规格:{{ item.unitName }}</view>
+						<view class="goods-code">
+							<view class="num-ul">
+								<view class="num-li" style="margin-right: 32rpx;">购买价格:{{ item.price }}</view>
+								<view class="num-li">购买数量:{{ item.buyNum }}</view>
+								<view class="num-li price">
+									<text style="font-weight: 300;">¥</text>
+									<text style="font-size: 28rpx;">{{item.totalMoney}}</text>
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="bottom-view clearfix">
+					<view class="float_left ellipsis shop-name">{{ item.goodsCode }}</view>
+					<view class="float_right time">购买时间:{{ $u.timeFormat(item.createTime, 'mm-dd hh:MM:ss') }}</view>
+				</view>
+			</view>
+			<u-loadmore v-if="buy_logs.length" :status="load_status" />
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		userCenterId: {
+			type: [Number, String],
+			default: ''
+		}
+	},
+	data() {
+		return {
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			buy_logs: [],
+			total: 0
+		};
+	},
+	created() {
+		this.searchCustomerBuyLog();
+	},
+	methods: {
+		moreGoods() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.searchCustomerBuyLog();
+			}
+		},
+		searchCustomerBuyLog() {
+			this.load_status = 'loading';
+			this.$u.api
+				.searchCustomerBuyLog({
+					page: this.page,
+					pageSize: this.pageSize,
+					userCenterId: this.userCenterId
+				})
+				.then(res => {
+					if (this.page === 1) {
+						this.buy_logs = res.data;
+					} else {
+						this.buy_logs = this.buy_logs.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.rigth-view {
+	background-color: rgb(247, 248, 250);
+
+	.rigth-scroll {
+		width: 100%;
+		height: calc(90vh - 200rpx);
+
+		.goods-li {
+			margin: 24rpx 20rpx 0;
+			background-color: #ffffff;
+			border-radius: 8px;
+			position: relative;
+
+			.bottom-view {
+				padding: 0 24rpx;
+				line-height: 86rpx;
+				border-top: 1px solid #ecf0f7;
+				.shop-name {
+					font-weight: 600;
+				}
+				.time {
+					color: #b8c0c8;
+				}
+			}
+			.goods-main {
+				padding: 27rpx 0 20rpx 24rpx;
+				.goods-img {
+					border-radius: 14rpx;
+					width: 126rpx;
+					height: 126rpx;
+					margin-right: 16rpx;
+				}
+
+				.goods-info {
+					width: 530rpx;
+
+					.goods-name {
+						color: #2d405e;
+						font-size: 30rpx;
+						font-weight: 600;
+					}
+
+					.goods-code {
+						margin-top: 8rpx;
+						width: 100%;
+						font-size: 22rpx;
+						font-family: DINPro-Regular;
+						font-weight: 400;
+						color: #62738e;
+					}
+
+					.goods-tag {
+						padding: 10rpx 0;
+
+						.tag-li {
+							margin-right: 14rpx;
+						}
+					}
+
+					.goods-num {
+						color: #999999;
+						font-size: 22rpx;
+
+						text {
+							padding-right: 10rpx;
+						}
+					}
+				}
+			}
+
+			.num-ul {
+				.num-li {
+					float: left;
+					&.price{
+						font-weight: 600;
+						float: right;
+						color: #FA6400;
+					}
+				}
+			}
+		}
+	}
+}
+
+// .log-scroll {
+// 	height: 100vh;
+// }
+// .logs-ul {
+// 	.logs-li {
+// 		padding: 20rpx 0;
+// 		border-bottom: 1px solid #eeeeee;
+// 		.goods-img {
+// 			position: relative;
+// 			width: 100rpx;
+// 			height: 100rpx;
+// 			border-radius: 20rpx;
+// 			overflow: hidden;
+// 			margin-right: 20rpx;
+// 			image {
+// 				width: 100%;
+// 				height: 100%;
+// 				display: block;
+// 			}
+// 		}
+// 		.goods-info {
+// 			width: 460rpx;
+// 			.date-time {
+// 				font-size: 22rpx;
+// 			}
+// 			.other-info {
+// 				padding-top: 10rpx;
+// 				display: flex;
+// 				flex-wrap: wrap;
+// 				font-size: 22rpx;
+// 				.info-li {
+// 					width: 50%;
+// 					display: inline-block;
+// 					color: #6c6c6c;
+// 				}
+// 			}
+// 		}
+// 		.float_right {
+// 			.look-btn {
+// 				font-size: 20rpx;
+// 				width: 118rpx;
+// 				line-height: 40rpx;
+// 				height: 40rpx;
+// 				text-align: center;
+// 				color: #ffffff;
+// 				background-color: $uni-color-primary;
+// 				border-radius: 6rpx;
+// 				margin: 20rpx auto;
+// 			}
+// 		}
+// 	}
+// }
+</style>

+ 129 - 0
pagesT/customer/components/CommunicationLogs.vue

@@ -0,0 +1,129 @@
+<template>
+	<view>
+		<view class="total-num">
+			跟进记录<text>{{total}}</text>
+		</view>
+		<view class="com-ul">
+			<view class="com-li" v-for="(item, index) in logs_list" :key="index">
+				<view class="top clearfix">
+					<view class="float_left staffName">{{ item.staffName }}</view>
+					<view class="time float_right">{{ $u.timeFormat(item.time, 'yyyy-mm-dd hh:MM:ss') }}</view>
+				</view>
+				<view class="cont">{{ item.content }}</view>
+				<view class="picture" v-if="item.picture">
+					<image :src="item.picture" mode="aspectFill"></image>
+				</view>
+				<view class="address">{{ item.location }}</view>
+			</view>
+		</view>
+		<u-loadmore :status="load_status" @loadmore="scrolltolower" :load-text="loadText" />
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		customerId: {
+			type: [Number, String],
+			default: ''
+		}
+	},
+	data() {
+		return {
+			loadText: {
+				loadmore: '点击加载更多',
+				loading: '努力加载中',
+				nomore: '没有更多了'
+			},
+			load_status: 'nomore',
+			logs_list: [],
+			page: 1,
+			pageSize: 10,
+			total: 0
+		};
+	},
+	created() {
+		this.getAllCustomerCommunication();
+	},
+	methods: {
+		scrolltolower() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllCustomerCommunication();
+			}
+		},
+		getAllCustomerCommunication() {
+			this.load_status = 'loading';
+			this.$u.api
+				.getAllCustomerCommunication({
+					page: this.page,
+					pageSize: this.pageSize,
+					customerId: this.customerId,
+					staffId: '',
+					star: '',
+					end: ''
+				})
+				.then(res => {
+					if (this.page === 1) {
+						this.logs_list = res.data;
+					} else {
+						this.logs_list = this.logs_list.concat(res.data);
+					}
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
+					this.total = res.pageTotal;
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.log-scroll {
+	height: 100vh;
+}
+.total-num{
+	font-size: 24rpx;
+	padding: 0 40rpx;
+	line-height: 80rpx;
+	text{
+		color: #4076D6;
+		margin-left: 8rpx;
+	}
+}
+.com-ul {
+	padding: 0 40rpx;
+	.com-li {
+		margin-bottom: 30rpx;
+		padding-bottom: 30rpx;
+		border-bottom: 1px dashed #B8C0C8;
+		.top {
+			.staffName{
+				font-weight: 600;
+			}
+			.time{
+				color: #CAD0D7;
+				font-weight: 300;
+				font-size: 24rpx;
+			}
+		}
+		.cont {
+			padding: 20rpx 0;
+			line-height: 42rpx;
+		}
+		.picture{
+			image{
+				width: 300rpx;
+				border-radius: 6rpx;
+				height: 100rpx;
+				display: block;
+			}
+		}
+		.address{
+			margin-top: 16rpx;
+			color: #CAD0D7;
+			font-weight: 400;
+			font-size: 24rpx;
+		}
+	}
+}
+</style>

+ 328 - 0
pagesT/customer/components/CustomerOrder.vue

@@ -0,0 +1,328 @@
+<template>
+	<view class="rigth-view">
+		<scroll-view scroll-y class="order_ul" @scrolltolower="scrollTolowerHandel">
+			<view class="order_li" v-for="(item, index) in order_list" :key="index" @click="goPage(`/pages/order/orderInfo?userCenterId=${item.userCenterId}&id=${item.id}`)">
+				<view class="order_time clearfix">
+					<view class="float_left">
+						<view class="tag-circleRight">
+							<image v-if="item.orderMsg === '待审核'" src="../../../static/img/ic-audit.png" class="img"></image>
+							<image v-else-if="item.orderMsg === '已关闭'" src="../../../static/img/ic-Closed.png" class="img"></image>
+							<image v-else-if="item.orderMsg === '已出库'" src="../../../static/img/ic-stock.png" class="img"></image>
+							<image v-else-if="item.orderMsg === '已完成'" src="../../../static/img/ic-Completed.png" class="img"></image>
+							<image v-else-if="item.orderMsg === '待出库'" src="../../../static/img/ic-delivered.png" class="img"></image>
+							<image v-else src="../../../static/img/ic-delivered.png" class="img"></image>
+						</view>
+					</view>
+
+					<view class="float_left text ellipsis">{{ item.shopName }}</view>
+					<viwe class="float_right time">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd hh:MM:ss') }}</viwe>
+				</view>
+				<view class="order_bottom">
+					<view class="order_params">
+						订单编号
+						<text class="right-txt">{{ item.no }}</text>
+					</view>
+					<view class="order_params clearfix">
+						<text class="float_left">
+							订单来源
+							<text class="right-txt">{{ item.sourceMsg }}</text>
+						</text>
+					</view>
+					<view class="order_params clearfix">
+						<text class="float_left">
+							业务员
+							<text class="right-txt">{{ item.salesManName || '未分配' }}</text>
+						</text>
+						<view class="float_right" style="color: #FA6400;font-weight: bold;font-size: 28rpx;"><text style="font-weight: 300;font-size: 24rpx;">¥</text>{{ item.payAmount }}</view>
+					</view>
+				</view>
+			</view>
+			<u-loadmore v-if="order_list.length" :status="load_status" />
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		userCenterId: {
+			type: [Number, String],
+			default: ''
+		}
+	},
+	data() {
+		return {
+			order_list: [],
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			load_status: 'nomore'
+		};
+	},
+	created() {
+		this.getAllOrder();
+	},
+	methods: {
+		scrollTolowerHandel() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllOrder();
+			}
+		},
+		// 订单列表
+		getAllOrder() {
+			this.load_status = 'loading';
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize,
+				search: {
+					userCenterId: this.userCenterId
+				}
+			};
+			this.$u.api.getAllOrder(params).then(res => {
+				if (this.page === 1) {
+					this.order_list = res.data;
+				} else {
+					this.order_list = this.order_list.concat(res.data);
+				}
+				this.order_list = this.order_list.map(item => {
+					return {
+						...item,
+						goods_list: item.goods_list || []
+					};
+				});
+				this.load_status = this.$utils.loadStatus(this.page, this.pageSize, res.pageTotal);
+				this.total = res.pageTotal;
+			});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.rigth-view {
+	background-color: rgb(247, 248, 250);
+	.order_ul {
+		width: 100%;
+		height: calc(90vh - 226rpx);
+
+		.order_li {
+			margin: 24rpx 20rpx 0;
+			padding: 0 24rpx 30rpx;
+			background-color: #ffffff;
+			// padding-top: 16rpx;
+			border-radius: 14rpx;
+
+			.money-text {
+				color: $uni-color-error;
+				margin: 0 4rpx;
+				font-size: 28rpx;
+				font-weight: 500;
+				margin-left: 30rpx;
+			}
+
+			.order_time {
+				// background-color: #f7f8fa;
+				height: 80rpx;
+				line-height: 80rpx;
+
+				.img {
+					width: 126rpx;
+					height: 40rpx;
+					// margin-left: 24rpx;
+					vertical-align: middle;
+				}
+
+				// .txt {
+				// 	font-size: 28rpx;
+				// 	font-weight: 500;
+				// 	// margin-left: 110rpx;
+				// 	// vertical-align: middle;
+				// }
+
+				// .custom-icon-jinru {
+				// 	font-size: 28rpx;
+				// 	margin-left: 10rpx;
+				// }
+
+				.tag-circleRight {
+					// line-height: 40rpx;
+					height: 40rpx;
+					// background-color: $uni-color-primary;
+					// color: #ffffff;
+					// font-size: 24rpx;
+					// display: inline-block;
+					width: 126rpx;
+					// text-align: center;
+					// border-radius: 0 100rpx 100rpx 0;
+
+					// text {
+					// 	font-size: 28rpx;
+					// 	font-weight: bold;
+					// 	margin-left: 4rpx;
+					// }
+				}
+				.text {
+					font-size: 30rpx;
+					color: #2d405e;
+					font-family: PingFangSC-Medium, PingFang SC;
+					font-weight: 500;
+					margin-left: 24rpx;
+					margin-top: 4rpx;
+					width: 180rpx;
+				}
+				.time {
+					font-size: 24rpx;
+					color: #b8c0c8;
+					font-family: DINPro-Regular;
+					font-weight: 400;
+					margin-top: 4rpx;
+				}
+			}
+
+			.order_info {
+				padding: 30rpx;
+				font-size: 24rpx;
+				border-bottom: 1px solid #f7f8fa;
+			}
+
+			.remarks {
+				background-color: #f1f1f1;
+				padding: 0 30rpx;
+				height: 60rpx;
+				line-height: 60rpx;
+			}
+
+			.order_tip {
+				margin-left: 0rpx;
+				color: #333333;
+				height: 89rpx;
+				vertical-align: middle;
+				padding: 25rpx 40rpx;
+				font-size: 28rpx;
+				font-weight: 400;
+				background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(0, 195, 149, 0.1) 100%);
+
+				.txst {
+					font-size: 28rpx;
+					font-weight: 500;
+					color: #2d405e;
+				}
+			}
+
+			.order_pip {
+				margin-left: 0rpx;
+				color: #333333;
+				height: 89rpx;
+				vertical-align: middle;
+				padding: 25rpx 40rpx;
+				font-size: 28rpx;
+				font-weight: 400;
+				background: linear-gradient(270deg, rgba(255, 255, 255, 0) 0%, rgba(246, 119, 120, 0.1) 100%);
+
+				.txst {
+					font-size: 28rpx;
+					font-weight: 500;
+					color: #2d405e;
+				}
+			}
+
+			.order_bottom {
+				// padding: 30rpx;
+				// margin-left: 40rpx;
+				font-size: 22rpx;
+				margin-top: 4rpx;
+				font-family: PingFangSC-Regular, PingFang SC;
+				font-weight: 400;
+				color: #62738e;
+
+				.order_params {
+					margin-bottom: 8rpx;
+					// color: #999999;
+
+					.right-txt {
+						// font-size: 28rpx;
+						// font-weight: 400;
+						// color: #2D405E;
+						margin-left: 30rpx;
+					}
+
+					.float_right {
+						// color: #333333;
+					}
+				}
+
+				.printing-btn {
+					position: absolute;
+					right: 30rpx;
+					top: 50%;
+					transform: translateY(-50%);
+					text-align: center;
+
+					.custom-icon-dayin {
+						// font-size: 30rpx;
+					}
+				}
+
+				.btn {
+					display: flex;
+					justify-content: center;
+					margin-top: 30rpx;
+
+					.btn_some {
+						width: 200rpx;
+						height: 70rpx;
+						line-height: 70rpx;
+						text-align: center;
+						border-radius: 6rpx;
+					}
+
+					.btn_examine {
+						border: 1px solid #2979ff;
+						color: #2979ff;
+					}
+
+					.btn_order {
+						border: 1px solid #999999;
+						color: #999999;
+						margin-left: 30rpx;
+					}
+				}
+			}
+		}
+	}
+}
+
+// .log-scroll {
+// 	height: 100vh;
+// }
+// .order-ul {
+// 	.order-li {
+// 		padding: 20rpx 0;
+// 		padding-left: 80rpx;
+// 		position: relative;
+// 		border-bottom: 1px solid #eeeeee;
+// 		.icon {
+// 			position: absolute;
+// 			left: 20rpx;
+// 			top: 20rpx;
+// 		}
+// 		.customer {
+// 			padding-bottom: 10rpx;
+// 			.float_left {
+// 				font-size: 32rpx;
+// 				font-weight: bold;
+// 			}
+// 		}
+// 		.other {
+// 			font-size: 22rpx;
+// 			line-height: 40rpx;
+// 			.float_right {
+// 				font-size: 26rpx;
+// 				font-weight: bold;
+// 				color: $uni-color-error;
+// 			}
+// 		}
+// 	}
+// }
+</style>

+ 229 - 0
pagesT/customer/components/Visitslogs.vue

@@ -0,0 +1,229 @@
+<template>
+	<view class="rigth-view">
+		<scroll-view scroll-y="true" class="rigth-scroll" @scrolltolower="scrolltolowerMore">
+			<view class="log-li" v-for="(item, index) in visit_logs" :key="index">
+				<view class="goods-name">
+					{{ item.goodsName }}
+				</view>
+				<view class="time">
+					{{ $u.timeFormat(item.createTime, 'mm-dd hh:MM:ss') }}
+				</view>
+			</view>
+			<!-- <view class="goods-li" v-for="(item, index) in visit_logs" :key="index">
+				<view class="goods-main clearfix">
+					<image class="goods-img float_left" src="../../../static/Tar_bar_slices/goods-fill.png" mode="aspectFill"></image>
+					<view class="goods-info float_left ">
+						<view class="goods-name clearfix ellipsis">
+							<view class="ellipsis float_left" style="width: 350rpx;">{{ item.goodsName }}</view>
+							<view class="float_right browse">
+								<view class="float_left browse-left">浏览</view>
+								<view class="float_left browse-center"></view>
+								<view class="float_left browse-right">323S</view>
+							</view>
+						</view>
+						<view class="goods-code">库存:114329</view>
+						<view class="goods-code">
+							<view class="num-ul clearfix">
+								<view class="num-li" style="margin-right: 32rpx;">购买价格:212.00</view>
+								<view class="num-li">购买数量:20</view>
+								<view class="num-li price">
+									<text style="font-weight: 300;">¥</text>
+									1230123213.78
+								</view>
+							</view>
+						</view>
+					</view>
+				</view>
+				<view class="bottom-view clearfix">
+					<view class="float_left ellipsis shop-name">浏览店铺名称</view>
+					<view class="float_right time">浏览时间:{{ $u.timeFormat(item.createTime, 'mm-dd hh:MM:ss') }}</view>
+				</view>
+			</view> -->
+			<u-loadmore :status="load_status" />
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		customerId: {
+			type: [Number, String],
+			default: '',
+		}
+	},
+	data() {
+		return {
+			load_status: 'nomore',
+			visit_logs: [],
+			page: 1,
+			pageSize: 10,
+			total: 0
+		};
+	},
+	created() {
+		this.getCustomerVisitsLogInfo();
+	},
+	methods: {
+		scrolltolowerMore() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getCustomerVisitsLogInfo();
+			}
+		},
+		// 浏览记录
+		getCustomerVisitsLogInfo() {
+			this.$u.api
+				.getAllCustomerVisitsLog({
+					customerId: parseInt(this.customerId),
+					page: this.page,
+					pageSize: this.pageSize,
+				})
+				.then(({ data }) => {
+					if (this.page === 1) {
+						this.visit_logs = data;
+					} else {
+						this.visit_logs = this.visit_logs.concat(data);
+					}
+					this.total = pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.rigth-view {
+	background-color: rgb(247, 248, 250);
+	.rigth-scroll {
+		width: 100%;
+		height: calc(90vh - 100rpx);
+		.goods-li {
+			width: 710rpx;
+			margin: 24rpx auto;
+			background-color: #ffffff;
+			border-radius: 8px;
+			position: relative;
+
+			.bottom-view {
+				padding: 0 24rpx;
+				line-height: 86rpx;
+				border-top: 1px solid #ecf0f7;
+				.shop-name {
+					font-weight: 600;
+				}
+				.time {
+					color: #b8c0c8;
+				}
+			}
+
+			.goods-main {
+				padding: 27rpx 0 20rpx 24rpx;
+
+				.goods-img {
+					border-radius: 14rpx;
+					width: 126rpx;
+					height: 126rpx;
+					margin-right: 16rpx;
+				}
+
+				.goods-info {
+					width: 530rpx;
+
+					.goods-name {
+						-webkit-line-clamp: 1;
+						color: #2d405e;
+						font-size: 30rpx;
+						font-weight: 500;
+
+						.browse {
+							.browse-left {
+								border-radius: 8rpx 0 0 8rpx;
+								width: 64rpx;
+								height: 40rpx;
+								background-color: #2d405e;
+								font-size: 20rpx;
+								color: #ffffff;
+								line-height: 40rpx;
+								text-align: center;
+							}
+
+							.browse-center {
+								width: 0;
+								height: 0;
+								border-color: #2d405e #4076d6 transparent transparent;
+								border-style: solid;
+								border-width: 40rpx 10rpx 0 0;
+							}
+
+							.browse-right {
+								border-radius: 0 8rpx 8rpx 0;
+								width: 76rpx;
+								height: 40rpx;
+								background-color: #4076d6;
+								font-size: 20rpx;
+								color: #ffffff;
+								line-height: 40rpx;
+								text-align: center;
+							}
+						}
+					}
+
+					.goods-code {
+						width: 100%;
+						font-size: 22rpx;
+						font-family: DINPro-Regular;
+						font-weight: 400;
+						color: #62738e;
+						margin-top: 8rpx;
+					}
+
+					.goods-tag {
+						padding: 10rpx 0;
+
+						.tag-li {
+							margin-right: 14rpx;
+						}
+					}
+
+					.goods-num {
+						color: #999999;
+						font-size: 22rpx;
+						text {
+							padding-right: 10rpx;
+						}
+					}
+				}
+			}
+
+			.num-ul {
+				.num-li {
+					float: left;
+					&.price {
+						font-weight: 600;
+						float: right;
+						color: #fa6400;
+					}
+				}
+			}
+		}
+	}
+}
+.log-li{
+	background-color: #FFFFFF;
+	padding: 24rpx;
+	width: 710rpx;
+	margin: 24rpx auto;
+	border-radius: 8px;
+	.goods-name{
+		color: #2d405e;
+		font-size: 30rpx;
+		font-weight: 500;
+	}
+	.time{
+		padding-top: 20rpx;
+		font-size: 24rpx;
+	}
+}
+</style>

+ 165 - 0
pagesT/customer/components/moneyDetail.vue

@@ -0,0 +1,165 @@
+<template>
+	<view class="out-box">
+		<view class="time-search">
+			<view class="time-li">
+				<picker mode="date" @change="bindDateStartChange">
+					<text class="date-li">{{ start_time ? $u.timeFormat(start_time, 'yyyy-mm-dd') : '开始日期' }}</text>
+				</picker>
+			</view>
+			<view class="icon"><u-icon name="arrow-right" size="36"></u-icon></view>
+			<view class="time-li">
+				<picker mode="date" @change="bindDateendChange">
+					<text class="date-li">{{ end_time ? $u.timeFormat(end_time, 'yyyy-mm-dd') : '结束日期' }}</text>
+				</picker>
+			</view>
+		</view>
+		<view class="list-view">
+			<view class="start-time clearfix">
+				<view class="float_left">期初余额</view>
+				<view class="float_right">{{ $utils.formattedNumber(openingBalance) }}</view>
+			</view>
+			<view class="th-view">
+				<view class="th-li">应收</view>
+				<view class="th-li">实收</view>
+				<view class="th-li">应收余额</view>
+			</view>
+			<view class="td-view" v-for="(item, index) in money_list" :key="index">
+				<view class="td-li">{{ $utils.formattedNumber(item.receivableAmount) }}</view>
+				<view class="td-li">{{ $utils.formattedNumber(item.actualReceivableAmount) }}</view>
+				<view class="td-li">{{ $utils.formattedNumber(item.receivableBalance) }}</view>
+			</view>
+			<u-loadmore :status="load_status" @loadmore="loadmore" :load-text="loadText" />
+		</view>
+		<view class="start-time end-time clearfix">
+			<view class="float_left">期末余额</view>
+			<view class="float_right">{{ $utils.formattedNumber(endingBalance) }}</view>
+		</view>
+	</view>
+</template>
+
+<script>
+export default {
+	props: {
+		customerId: {
+			type: [Number, String],
+			default: ''
+		}
+	},
+	data() {
+		return {
+			loadText: {
+				loadmore: '点击加载更多',
+				loading: '努力加载中',
+				nomore: '没有更多了'
+			},
+			load_status: 'nomore',
+			start_time: '',
+			end_time: '',
+			page: 1,
+			pageSize: 10,
+			money_list: [],
+			total: 0,
+			openingBalance: 0,
+			endingBalance: 0
+		};
+	},
+	created() {
+		this.start_time = this.$utils.timeByTimestamp(this.$utils.funDate(-30) + ' 00:00:00');
+		this.end_time = parseInt(new Date().getTime() / 1000);
+		this.getAllCustomerBalanceDetail();
+	},
+	methods: {
+		loadmore() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllCustomerBalanceDetail();
+			}
+		},
+		getAllCustomerBalanceDetail() {
+			this.load_status = 'loading';
+			this.$u.api
+				.getAllCustomerBalanceDetail({
+					customerId: this.customerId,
+					end: this.end_time,
+					page: this.page,
+					pageSize: this.pageSize,
+					start: this.start_time
+				})
+				.then(res => {
+					if (this.page === 1) {
+						this.money_list = res.data;
+					} else {
+						this.money_list = this.money_list.concat(res.data);
+					}
+					//期初余额
+					this.openingBalance = res.openingBalance;
+					//期末余额
+					this.endingBalance = res.endingBalance;
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				});
+		},
+		bindDateStartChange(obj) {
+			this.start_time = this.$utils.timeByTimestamp(obj.detail.value + ' 00:00:00');
+			this.page = 1;
+			this.getAllCustomerBalanceDetail();
+		},
+		bindDateendChange(obj) {
+			this.end_time = this.$utils.timeByTimestamp(obj.detail.value + ' 23:59:59');
+			this.page = 1;
+			this.getAllCustomerBalanceDetail();
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+	.out-box{
+		width: 710rpx;
+		margin: 24rpx auto;
+	}
+.time-search {
+	line-height: 80rpx;
+	border-bottom: 1px solid #f5f5f5;
+	.time-li {
+		display: inline-block;
+		width: 334rpx;
+		text-align: center;
+		font-weight: bold;
+	}
+	.icon {
+		display: inline-block;
+	}
+}
+.start-time {
+	line-height: 80rpx;
+	font-weight: bold;
+	border-bottom: 1px solid #f5f5f5;
+	.float_right {
+		color: $uni-color-error;
+	}
+}
+.list-view {
+	.th-view {
+		display: flex;
+		line-height: 80rpx;
+		border-bottom: 1px solid #f5f5f5;
+		.th-li {
+			color: #999999;
+			flex: 3;
+			text-align: center;
+		}
+	}
+	.td-view {
+		display: flex;
+		line-height: 80rpx;
+		border-bottom: 1px solid #f5f5f5;
+		.td-li {
+			text-align: center;
+			color: $uni-color-primary;
+			flex: 3;
+			font-weight: bold;
+		}
+	}
+}
+</style>

+ 147 - 0
pagesT/customer/selCustomer.vue

@@ -0,0 +1,147 @@
+<template>
+	<view class="selSupplier">
+		<view class="search-view">
+			<u-search @custom="search()" @search="search()" @clear="search()" action-text="搜索" :clearabled="true" placeholder="客户名称/手机号" v-model="keyword"></u-search>
+		</view>
+		<view class="customer-ul">
+			<view class="customer-li" v-for="(item, index) in customer_list" :key="index" @click="changeSupplier(item)">
+				<view class="customer-name">{{ item.name }}</view>
+				<view class="other">
+					<view class="concat clearfix">
+						<text class="float_left">{{ item.customerType }}</text>
+						<view class="float_right" v-if="item.mobile">
+							<u-icon name="phone-fill" size="26"></u-icon>
+							<text class="phone-text">{{ item.mobile }}</text>
+						</view>
+					</view>
+					<view class="address">{{ item.area.provinceName }}-{{ item.area.cityName }}-{{ item.area.districtName }}-{{ item.area.address }}</view>
+				</view>
+			</view>
+		</view>
+		<u-loadmore :status="load_status" />
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			keyword: '',
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			customer_list: []
+		};
+	},
+	onLoad() {
+		this.getAllCustomer();
+	},
+	onPullDownRefresh() {
+		this.getAllCustomer();
+	},
+	// 上拉加载
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getAllCustomer();
+		}
+	},
+	methods: {
+		changeSupplier(item) {
+			// 选择供应商返回上一页
+			this._prePage().customerData = item;
+			uni.navigateBack();
+		},
+		search() {
+			this.page = 1;
+			this.getAllCustomer();
+		},
+		getAllCustomer() {
+			this.loading_status = 'loading';
+			this.$u.api
+				.getAllCustomer({
+					page: this.page,
+					pageSize: this.pageSize,
+					enableStatus: 5,
+					keyword: this.keyword,
+					status: 2
+				})
+				.then(res => {
+					uni.stopPullDownRefresh();
+					if (this.page === 1) {
+						this.customer_list = res.data;
+					} else {
+						this.customer_list = this.customer_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.search-view {
+	position: fixed;
+	z-index: 99;
+	top: 0;
+	left: 0;
+	width: 100%;
+	background-color: #ffffff;
+	border-bottom: 1px solid #f5f5f5;
+	padding: 20rpx;
+	.input-view {
+		padding: 0 24rpx;
+		input {
+			height: 60rpx;
+			line-height: 60rpx;
+			padding: 0 24rpx;
+			display: inline-block;
+			width: 580rpx;
+			border: 1px solid #f5f5f5;
+			vertical-align: middle;
+			border-radius: 8rpx;
+			background-color: #f7f8fa;
+		}
+		.add-icon {
+			margin-left: 14rpx;
+			display: inline-block;
+			vertical-align: middle;
+		}
+	}
+}
+.customer-ul {
+	padding-top: 90rpx;
+	padding-bottom: 20rpx;
+	.customer-li {
+		width: 702rpx;
+		margin: 0 auto;
+		background-color: #ffffff;
+		border-radius: 10rpx;
+		margin-top: 20rpx;
+		.customer-name {
+			padding: 0 20rpx;
+			line-height: 80rpx;
+			border-bottom: 1px solid #f5f5f5;
+		}
+		.other {
+			font-size: 24rpx;
+			padding: 10rpx 20rpx;
+			line-height: 50rpx;
+			.concat {
+				.float_right {
+					color: $uni-color-primary;
+					.phone-text {
+						margin-left: 10rpx;
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 123 - 0
pagesT/customer/selCustomerType.vue

@@ -0,0 +1,123 @@
+<template>
+	<view>
+		<view class="customer-ul">
+			<view class="customer-li" v-for="(item, index) in staff_list" :key="index" @click="changeSupplier(item)">
+				<view class="customer-name clearfix">
+					<text class="float_left">{{ item.name }}</text>
+					<view class="float_right">
+						<u-tag v-if="item.type === 1" size="mini" text="系统" mode="plain" type="primary" />
+						<u-tag style="margin-left: 10rpx;" v-if="item.defaultStatus === 5" size="mini" text="默认" mode="plain" type="success" />
+					</view>
+				</view>
+			</view>
+		</view>
+		<u-loadmore :status="load_status" />
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			keyword: '',
+			load_status: 'nomore',
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			staff_list: []
+		};
+	},
+	onLoad() {
+		this.getCustomerSourceList();
+	},
+	onPullDownRefresh() {
+		this.getCustomerSourceList();
+	},
+	// 上拉加载
+	onReachBottom() {
+		if (this.total / this.pageSize > this.page) {
+			this.page += 1;
+			this.getCustomerSourceList();
+		}
+	},
+	methods: {
+		changeSupplier(item) {
+			// 选择返回上一页
+			this._prePage().customerTypeData = item;
+			uni.navigateBack();
+		},
+		search() {
+			this.page = 1;
+			this.getCustomerSourceList();
+		},
+		getCustomerSourceList() {
+			this.loading_status = 'loading';
+			this.$u.api
+				.getCustomerSourceList({
+					page: this.page,
+					pageSize: this.pageSize
+				})
+				.then(res => {
+					uni.stopPullDownRefresh();
+					if (this.page === 1) {
+						this.staff_list = res.data;
+					} else {
+						this.staff_list = this.staff_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page,this.pageSize,this.total);
+				})
+				.catch(err => {
+					uni.stopPullDownRefresh();
+				});
+		}
+	}
+};
+</script>
+
+<style lang="scss" scoped>
+.search-view {
+	position: fixed;
+	z-index: 99;
+	top: 0;
+	left: 0;
+	width: 100%;
+	background-color: #ffffff;
+	border-bottom: 1px solid #f5f5f5;
+	padding: 20rpx 0;
+	.input-view {
+		padding: 0 24rpx;
+		input {
+			height: 60rpx;
+			line-height: 60rpx;
+			padding: 0 24rpx;
+			display: inline-block;
+			width: 580rpx;
+			border: 1px solid #f5f5f5;
+			vertical-align: middle;
+			border-radius: 8rpx;
+			background-color: #f7f8fa;
+		}
+		.add-icon {
+			margin-left: 14rpx;
+			display: inline-block;
+			vertical-align: middle;
+		}
+	}
+}
+.customer-ul {
+	padding-bottom: 20rpx;
+	.customer-li {
+		border-bottom: 1px solid #eeeeee;
+		background-color: #ffffff;
+		border-radius: 10rpx;
+		&:last-child{
+			border-bottom: 0 none;
+		}
+		.customer-name {
+			padding: 0 20rpx;
+			line-height: 100rpx;
+		}
+	}
+}
+</style>

+ 164 - 0
pagesT/driver/driver.vue

@@ -0,0 +1,164 @@
+<template>
+	<view class="selSupplier">
+		<view class="customer-ul">
+			<view class="customer-li" v-for="(item, index) in driver_list" :key="index" @click="changeData(item)">
+				<view class="customer-name">{{ item.driverName }}</view>
+				<view class="other">
+					<view class="concat clearfix">
+						<text class="float_left">{{ item.plateNumber }}</text>
+						<view class="float_right">
+							<u-icon name="phone-fill" size="26"></u-icon>
+							<text class="phone-text">{{ item.phone }}</text>
+						</view>
+					</view>
+				</view>
+			</view>
+			<u-loadmore :status="load_status" />
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				driver_list: [],
+				page: 1,
+				pageSize: 10,
+				total: 0,
+				load_status: 'nomore',
+			};
+		},
+		onLoad() {
+			this.getAllDriver()
+		},
+		onPullDownRefresh() {
+			this.getAllDriver()
+		},
+		// 上拉加载
+		onReachBottom() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getAllDriver()
+			}
+		},
+		methods: {
+			getAllDriver() {
+				this.$u.api.getAllDriver({
+					page: this.page,
+					pageSize: this.pageSize,
+					state: 5,
+				}).then(res => {
+					uni.stopPullDownRefresh();
+					if (this.page === 1) {
+						this.driver_list = res.data;
+					} else {
+						this.driver_list = this.driver_list.concat(res.data);
+					}
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				})
+			},
+			changeData(item) {
+				// 选择返回上一页
+				this._prePage().driverData = item;
+				uni.navigateBack();
+			},
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+	.search-view {
+		position: fixed;
+		z-index: 99;
+		top: 0;
+		left: 0;
+		width: 100%;
+		background-color: #ffffff;
+		border-bottom: 1px solid #f5f5f5;
+		padding: 20rpx 0;
+
+		.input-view {
+			padding: 0 24rpx;
+
+			input {
+				height: 60rpx;
+				line-height: 60rpx;
+				padding: 0 24rpx;
+				display: inline-block;
+				width: 580rpx;
+				border: 1px solid #f5f5f5;
+				vertical-align: middle;
+				border-radius: 8rpx;
+				background-color: #f7f8fa;
+			}
+
+			.add-icon {
+				margin-left: 14rpx;
+				display: inline-block;
+				vertical-align: middle;
+			}
+		}
+	}
+
+	.bottom-view {
+		z-index: 99;
+		width: 100%;
+		position: fixed;
+		left: 0;
+		bottom: 0;
+		line-height: 90rpx;
+		color: #ffffff;
+		background-color: $uni-color-primary;
+		text-align: center;
+	}
+
+	.customer-ul {
+		padding-bottom: 20rpx;
+
+		.customer-li {
+			width: 702rpx;
+			margin: 0 auto;
+			background-color: #ffffff;
+			border-radius: 10rpx;
+			margin-top: 20rpx;
+
+			.customer-name {
+				padding: 0 20rpx;
+				line-height: 80rpx;
+				border-bottom: 1px solid #f5f5f5;
+			}
+
+			.other {
+				font-size: 24rpx;
+				padding: 10rpx 20rpx;
+				line-height: 50rpx;
+				position: relative;
+
+				.check-tag {
+					position: absolute;
+					left: 20rpx;
+					top: 50%;
+					transform: translateY(-50%);
+					font-size: 40rpx;
+					color: #999999;
+
+					.custom-icon-xuanze_xuanzhong {
+						color: $uni-color-primary;
+					}
+				}
+
+				.concat {
+					.float_right {
+						color: $uni-color-primary;
+
+						.phone-text {
+							margin-left: 10rpx;
+						}
+					}
+				}
+			}
+		}
+	}
+</style>

+ 187 - 0
pagesT/goods/AddGoodsclassification.vue

@@ -0,0 +1,187 @@
+<template>
+	<view class="detail-view">
+		<u-form label-width="140" :model="add_form" ref="uForm">
+			<view class="form-model-view">
+				<u-form-item required label="分类名称">
+					<u-input type="text" v-model="form.title" placeholder="分类名称" />
+				</u-form-item>
+				<u-form-item label="上级分类">
+					<view class="float_right" @click="this.$refs.tkitree._show();">
+						<text v-if="category_name">{{ category_name }}</text>
+						<text class="input-pl" v-else>请选择上级分类</text>
+					</view>
+					<view slot="right">
+						<u-icon name="arrow-down-fill" size="24"></u-icon>
+					</view>
+				</u-form-item>
+				<u-form-item label="分类图片" label-position="top">
+					<upload :images="form.images" @handleRemove="imgRemove" @uploadSuccess="uploadSuccess" />
+				</u-form-item>
+				<u-form-item label="一级分类广告图片" label-position="top">
+					<upload :images="form.adImage" @handleRemove="uploadAdRemove" @uploadSuccess="uploadAdSuccess" />
+				</u-form-item>
+				<u-form-item label="分类排序" prop="name">
+					<u-input type="text" v-model="form.sort" placeholder="请输入分类排序" />
+				</u-form-item>
+				<u-form-item label="是否显示">
+					<view class="form-value">
+						<u-switch style="transform: translateY(14rpx);" @change="switchChange" v-model="enableStatus"
+							:active-value="5" :inactive-value="4" size="40"></u-switch>
+					</view>
+				</u-form-item>
+			</view>
+		</u-form>
+		<view class="detail-bottom">
+			<u-button :loading='loading' class="handel-btn" type="primary" @click="addCategory">提交</u-button>
+		</view>
+		<tki-tree ref="tkitree" :selectParent="true" :range="cate_list" rangeKey="title" @confirm="cateConfirm">
+		</tki-tree>
+	</view>
+</template>
+
+<script>
+	import tkiTree from '@/components/tki-tree/tki-tree.vue';
+	import upload from '@/components/qiniu/QiniuUpload.vue';
+	export default {
+		components: {
+			tkiTree,
+			upload
+		},
+		data() {
+			return {
+				form: {
+					code: "",
+					images: '',
+					sort: "",
+					title: "",
+					pid: "",
+					enableStatus: 5,
+					link: "",
+					adImage: '',
+				},
+				cate_list: [],
+				category_name: '', //分类名称
+				enableStatus: true,
+				id: '',
+				loading: false
+			};
+		},
+		onLoad(options) {
+			if (options.id) {
+				this.id = options.id,
+					uni.setNavigationBarTitle({
+						title: '编辑分类'
+					})
+				this.getCategoryInfoById()
+			}
+			this.getAllCategory();
+		},
+		methods: {
+			//  获取所有商品分类
+			getAllCategory() {
+				this.$u.api.getAllCategory({
+					enableStatus: 5
+				}).then(res => {
+					this.cate_list = res.data;
+				});
+			},
+			cateConfirm(arr) {
+				this.category_name = arr[0].title;
+				this.form.pid = arr[0].id;
+				this.form.link = arr[0].parents.map(item => item.id).join(',') + ',' + arr[0].id;
+			},
+			// 分类图片上传成功
+			uploadSuccess(imgUrl) {
+				if (this.form.images.length > 0) {
+					this.$u.toast('图片只能添加一张')
+					return
+				}
+				this.form.images = []
+				this.form.images.push(imgUrl);
+			},
+			//移除分类图片
+			imgRemove(arr) {
+				this.form.images = '';
+			},
+			// 一级分类图片上传成功
+			uploadAdSuccess(imgUrl) {
+				if (this.form.adImage.length > 0) {
+					this.$u.toast('图片只能添加一张')
+					return
+				}
+				this.form.adImage = []
+				this.form.adImage.push(imgUrl);
+			},
+			//移除一级分类图片
+			uploadAdRemove(arr) {
+				this.form.adImage = '';
+			},
+			switchChange(val) {
+				this.form.enableStatus = val;
+				console.log(this.form.enableStatus);
+			},
+			addCategory() {
+				if (!this.form.title.trim()) {
+					this.$u.toast('分类名称不能为空')
+					return
+				}
+				this.loading = true
+				try {
+					if (this.id) {
+						if (this.form.images) {
+							this.form.images = this.form.images[0]
+						}
+						if (this.form.adImage) {
+							this.form.adImage = this.form.adImage[0]
+						}
+						this.$u.api.editCategory(this.id, {
+							...this.form
+						}).then(res => {
+							this.$u.toast('编辑成功')
+							setTimeout(() => {
+								uni.navigateBack()
+							}, 500)
+						})
+					} else {
+						this.$u.api.addCategory({
+							...this.form
+						}).then(res => {
+							this.$u.toast('新增成功')
+							setTimeout(() => {
+								uni.navigateBack()
+							}, 500)
+						})
+					}
+					this.loading = false
+				} catch {
+					this.loading = false
+				}
+			},
+			getCategoryInfoById() {
+				this.$u.api.getCategoryInfoById(this.id).then(res => {
+					this.form = res.data
+					if (this.form.images) {
+						let images = []
+						images.push(res.data.images)
+						this.form.images = images
+					} else {
+						this.form.images = []
+					}
+					if (this.form.adImage) {
+						let adImage = []
+						adImage.push(res.data.adImage)
+						this.form.adImage = adImage
+					}
+					if (this.form.enableStatus === 4) {
+						this.enableStatus = false
+					}
+					this.category_name = res.data.ptitle
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+
+</style>

+ 377 - 0
pagesT/goods/BaseGoodslist.vue

@@ -0,0 +1,377 @@
+<template>
+	<view>
+		<view class="keyword-view clearfix">
+			<view class="float_left">
+				<u-search @clear="searchList" @search="searchList" :show-action="false" :clearabled="true" placeholder="商品名称/编码/条码" v-model="keyword"></u-search>
+			</view>
+			<view v-if="$accessCheck($Access.BaseDataListSearch)" class="float_right" @click="openSel('search_show')"><text class="custom-icon custom-icon-shaixuan"></text></view>
+		</view>
+		<view class="main-view clearfix">
+			<view class="left-view float_left">
+				<scroll-view scroll-y="true" class="left-scroll">
+					<view class="cate-li" :class="[!category_id ? 'cate-on' : '']" @click="changeCate(0)">全部</view>
+					<view class="cate-li" v-for="(item, index) in category_list" :key="index" @click="changeCate(item.id)" :class="[category_id === item.id ? 'cate-on' : '']">
+						{{ item.title }}
+					</view>
+				</scroll-view>
+			</view>
+			<view class="rigth-view float_left">
+				<scroll-view scroll-y="true" class="rigth-scroll" @scrolltolower="moreGoods" :scroll-top="scrollTop">
+					<view class="goods-li" v-for="(item, index) in goods_list" :key="index">
+						<view class="goods-main clearfix">
+							<image class="goods-img float_left" :src="item.images[0]" mode="aspectFill"></image>
+							<view class="goods-info float_left">
+								<view class="goods-name ellipsis">{{ item.title }}</view>
+								<view class="goods-code">{{ item.code }}</view>
+								<view class="goods-tag">
+									<u-tag class="tag-li" mode="plain" size="mini" :text="item.categoryTitle" />
+									<u-tag class="tag-li" size="mini" :text="item.enableStatus === 5 ? '启用' : '禁用'" />
+									<u-tag class="tag-li" v-if="item.brandTitle" size="mini" type="success" :text="item.brandTitle" />
+								</view>
+							</view>
+						</view>
+						<view class="handel-btn">
+							<view class="btn-li" v-if="$accessCheck($Access.BaseDataListUpdateEnableStatus)" @click="updateEnableStatusGoods(item)">
+								{{ item.enableStatus === 5 ? '禁用' : '启用' }}
+							</view>
+							<view class="btn-li" @click="goPage('/pagesT/goods/addGoods?id=' + item.id)" v-if="$accessCheck($Access.EditBaseData)">编辑</view>
+							<view v-if="$accessCheck($Access.BaseDataListDetail)" class="btn-li" @click="goPage('/pages/goods/goodsDetail?id=' + item.id)">查看</view>
+							<!-- <view class="btn-li" @click="goPage('/pages/goods/goodsDetail?id=' + item.id)">发布</view> -->
+						</view>
+					</view>
+					<u-loadmore v-if="goods_list.length" :status="load_status" />
+					<view v-if="!goods_list.length" class="empty-view"><u-empty text="暂无商品" mode="favor"></u-empty></view>
+				</scroll-view>
+			</view>
+		</view>
+		<addBtn v-if="$accessCheck($Access.AddBaseData)" url="/pagesT/goods/addGoods"></addBtn>
+		<u-popup v-model="search_show" mode="right">
+			<view class="search-pop">
+				<view class="form-view">
+					<u-form label-width="160rpx" label-position="left">
+						<u-form-item label-position="top" label="销售状态">
+							<text
+								v-for="(item, index) in status_list"
+								:key="index"
+								class="check-li"
+								:class="[enableStatus === item.value ? 'active' : '']"
+								@click="statusChange(item)"
+							>
+								{{ item.label }}
+							</text>
+						</u-form-item>
+						<u-form-item label="品牌">
+							<view class="clearfix form-val" @click="goPage('/pagesT/brand/selBrand')">
+								<text class="float_left ellipsis">{{ brandId ? brand_name : '请选择' }}</text>
+								<view class="float_right" @click.stop="clearValue('brandId')">
+									<u-icon :name="!brandId ? 'arrow-right' : 'close-circle-fill'" size="28" color="#999999"></u-icon>
+								</view>
+							</view>
+						</u-form-item>
+					</u-form>
+				</view>
+
+				<view class="search-btn">
+					<view class="btn-li" @click="clearValue()">重置</view>
+					<view class="btn-li" @click="searchList">确定</view>
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			load_status: 'nomore',
+			tab_current: 0,
+			status_list: [
+				{
+					label: '启用',
+					value: 5
+				},
+				{
+					label: '禁用',
+					value: 4
+				}
+			],
+			category_list: [], // 分类列表
+			category_id: '', // 分类id
+			auditStatus: 2, // 审核状态
+			isOption: '', // 是否是自选商品
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			goods_list: [],
+			brandId: '', //品牌
+			brand_name: '',
+			keyword: '', //关键词
+			enableStatus: '', //上下架
+			brandData: {},
+			search_show: false,
+			scrollTop: -1
+		};
+	},
+	watch: {
+		brandData(val) {
+			if (val.id) {
+				this.brandId = val.id;
+				this.brand_name = val.title;
+			}
+		}
+	},
+	onLoad() {
+		this.getAllCategory();
+	},
+	onShow() {
+		this.page = 1;
+		this.getData();
+	},
+	methods: {
+		updateEnableStatusGoods(row) {
+			uni.showModal({
+				title: '提示',
+				content: `确定要${row.enableStatus === 5 ? '禁用' : '启用'}该商品吗?`,
+				success: res => {
+					if (res.confirm) {
+						this.$u.api
+							.updateEnableStatusGoods({
+								enableStatus: row.enableStatus === 5 ? 4 : 5,
+								id: [row.id]
+							})
+							.then(res => {
+								this.$u.toast('操作成功');
+								this.searchList();
+							});
+					}
+				}
+			});
+		},
+		//  获取所有商品分类
+		getAllCategory() {
+			this.$u.api
+				.getAllCategory({
+					enableStatus: 5
+				})
+				.then(res => {
+					this.category_list = res.data;
+				});
+		},
+		// 切换分类
+		changeCate(id) {
+			this.scrollTop = 0;
+			this.$nextTick(() => {
+				this.scrollTop = -1;
+			});
+			this.category_id = id;
+			this.searchList();
+		},
+		// 滚动到底部,触发上拉加载
+		moreGoods() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getData();
+			}
+		},
+		searchList() {
+			this.search_show = false;
+			this.page = 1;
+			this.getData();
+		},
+		// 判断当前使用方法为列表接口还是搜索引擎接口 获取列表数据
+		getData() {
+			// 搜索参数规整
+			const obj = {
+				keyword: this.keyword,
+				brandId: this.brandId,
+				categoryPath: this.category_id,
+				enableStatus: this.enableStatus
+			};
+			const isKey = this.$utils.isSerch(obj);
+			if (isKey) {
+				this.searchGoods();
+			} else {
+				this.getAllGoodsBasic();
+			}
+		},
+		// 获取商品列表
+		getAllGoodsBasic() {
+			this.load_status = 'loading';
+			let params = {
+				page: this.page,
+				pageSize: this.pageSize
+			};
+			this.$u.api.getAllGoodsBasic(params).then(res => {
+				if (this.page === 1) {
+					this.goods_list = res.data;
+				} else {
+					this.goods_list = this.goods_list.concat(res.data);
+				}
+				this.total = res.pageTotal;
+				this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+			});
+		},
+		// 商品搜索
+		searchGoods() {
+			this.load_status = 'loading';
+			let params = {
+				keyword: this.keyword,
+				brandId: this.brandId,
+				categoryPath: this.category_id,
+				enableStatus: this.enableStatus,
+				page: this.page,
+				pageSize: this.pageSize
+			};
+			this.$u.api.searchGoods(params).then(res => {
+				if (this.page === 1) {
+					this.goods_list = res.data;
+				} else {
+					this.goods_list = this.goods_list.concat(res.data);
+				}
+				this.total = res.pageTotal;
+				this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+			});
+		},
+		statusChange(val) {
+			this.enableStatus = val;
+		},
+		clearValue(key) {
+			if (!key) {
+				this.keyword = '';
+				this.brandId = '';
+				this.category_id = '';
+				this.enableStatus = '';
+				this.searchList();
+			} else {
+				this[key] = '';
+			}
+		},
+		openSel(key) {
+			this[key] = true;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.keyword-view {
+	background-color: #ffffff;
+	padding: 20rpx 24rpx;
+	.float_left {
+		width: 640rpx;
+	}
+	.float_right {
+		line-height: 64rpx;
+		width: 50rpx;
+		text-align: center;
+		color: #666666;
+	}
+}
+.main-view {
+	.left-view {
+		width: 168rpx;
+		background-color: #f7f8fa;
+		.left-scroll {
+			width: 100%;
+			height: calc(100vh - 106rpx);
+			.cate-li {
+				line-height: 90rpx;
+				padding-left: 36rpx;
+				color: #666666;
+			}
+			.cate-on {
+				background-color: #ffffff;
+				color: #000000;
+				position: relative;
+				&::before {
+					content: '';
+					display: block;
+					width: 6rpx;
+					height: 20rpx;
+					background-color: $uni-color-primary;
+					position: absolute;
+					left: 14rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+	}
+	.rigth-view {
+		width: calc(100% - 168rpx);
+		background-color: #ffffff;
+		.rigth-scroll {
+			width: 100%;
+			height: calc(100vh - 106rpx);
+			.goods-li {
+				padding: 20rpx;
+				border-bottom: 1px solid #f5f5f5;
+				position: relative;
+				.goods-main {
+					.goods-img {
+						border-radius: 10rpx;
+						width: 156rpx;
+						height: 156rpx;
+						margin-right: 20rpx;
+					}
+					.goods-info {
+						width: 366rpx;
+						.goods-name {
+							-webkit-line-clamp: 1;
+						}
+						.goods-code {
+							font-size: 24rpx;
+							padding-top: 6rpx;
+						}
+						.goods-tag {
+							padding: 10rpx 0;
+							.tag-li {
+								margin-right: 14rpx;
+							}
+						}
+						.goods-num {
+							color: #999999;
+							font-size: 22rpx;
+							text {
+								padding-right: 10rpx;
+							}
+						}
+					}
+				}
+				.handel-btn {
+					display: flex;
+					.btn-li {
+						font-size: 24rpx;
+						line-height: 50rpx;
+						flex: 3;
+						text-align: center;
+						border: 1px solid #dddddd;
+						margin: 20rpx 10rpx 0;
+						border-radius: 8rpx;
+					}
+				}
+				.more-btn {
+					position: absolute;
+					right: 20rpx;
+					bottom: -120rpx;
+					background-color: #ffffff;
+					border-radius: 10rpx;
+					padding: 0 20rpx;
+					z-index: 9;
+					box-shadow: 0px 3px 24rpx rgba(0, 0, 0, 0.1);
+					.more-btn-li {
+						font-size: 24rpx;
+						line-height: 60rpx;
+						text-align: center;
+						border-bottom: 1px solid #f5f5f5;
+						&:last-child {
+							border: 0 none;
+						}
+					}
+				}
+			}
+		}
+	}
+}
+</style>

+ 535 - 0
pagesT/goods/GoodsbyWarehouse.vue

@@ -0,0 +1,535 @@
+<template>
+	<view>
+		<view class="search-view">
+			<u-search
+				@custom="searchList()"
+				@search="searchList()"
+				@clear="searchList()"
+				action-text="搜索"
+				:clearabled="true"
+				placeholder="请输入商品名称"
+				v-model="keyword"
+			></u-search>
+		</view>
+		<view class="main-view clearfix">
+			<view class="left-view float_left">
+				<scroll-view scroll-y="true" class="left-scroll">
+					<view class="cate-li" :class="[!category_id ? 'cate-on' : '']" @click="changeCate(0)">全部</view>
+					<view
+						class="cate-li ellipsis"
+						v-for="(item, index) in category_list"
+						:key="index"
+						@click="changeCate(item.id)"
+						:class="[category_id === item.id ? 'cate-on' : '']"
+					>
+						{{ item.title }}
+					</view>
+				</scroll-view>
+			</view>
+			<view class="rigth-view float_left">
+				<scroll-view scroll-y="true" @scrolltolower="scrolltolower" class="rigth-scroll" :scroll-top="scrollTop">
+					<view class="goods-li" v-for="(item, index) in goods_list" :key="index">
+						<view class="add-btn">
+							<text @click="addGoods(index)" v-if="item.buyNum === 0" class="custom-icon custom-icon-xinzeng"></text>
+							<u-number-box v-else :min="0" :index="index" @change="buyNumChange" :value="item.buyNum"></u-number-box>
+						</view>
+						<view class="goods-main clearfix">
+							<image class="goods-img float_left" :src="item.images[0]" mode="aspectFill"></image>
+							<view class="goods-info float_left">
+								<view class="goods-name ellipsis">{{ item.materielName }}</view>
+								<view class="goods-code">{{ item.materielCode }}</view>
+								<view class="goods-code">
+									{{ item.unitName }};
+									<text v-for="(sku, skuI) in item.specGroup" :key="skuI">{{ sku.specValueName }};</text>
+								</view>
+								<view class="num-ul">
+									<view class="num-li">
+										<view class="label">库存量</view>
+										{{ $utils.formatNub(item.inventoryNum) }}{{ item.unitName }}
+									</view>
+									<view class="num-li">
+										<view class="label">平均成本</view>
+										¥{{ $utils.formatNub(item.costPrice) }}
+									</view>
+									<view class="num-li">
+										<view class="label">总成本</view>
+										¥{{ $utils.formatNub(item.total) }}
+									</view>
+								</view>
+								<view class="goods-tag"><u-tag class="tag-li" mode="plain" size="mini" :text="item.categoryName" /></view>
+							</view>
+						</view>
+					</view>
+					<u-loadmore :status="load_status" />
+				</scroll-view>
+			</view>
+		</view>
+		<view class="bottom-view clearfix">
+			<view class="float_left" @click="openPop">
+				<view class="shop-icon-view"><u-icon name="shopping-cart-fill" class="uicon" color="#ffffff" size="40"></u-icon></view>
+				<text>共{{ add_goods.length }}个商品</text>
+			</view>
+			<view class="float_right"><u-button type="primary" size="medium" @click="addGoodsTo">选好了</u-button></view>
+		</view>
+		<u-popup v-model="sel_pop" mode="bottom">
+			<view class="sel-goods-pop">
+				<view class="pop-tit clearfix">
+					<view class="float_left">本次已选商品</view>
+					<view class="float_right" @click="clearGoods">
+						<text class="custom-icon custom-icon-shanchu"></text>
+						<text>清空</text>
+					</view>
+				</view>
+				<scroll-view class="goods-ul" scroll-y>
+					<view class="goods-li" v-for="(item, index) in add_goods" :key="index">
+						<view class="goods-name">{{ item.title }}</view>
+						<view class="goods-code clearfix">{{ item.code }}</view>
+						<view class="goods-code clearfix">
+							<view class="float_left">
+								{{ item.unitName }};
+								<block v-if="item.specGroup">
+									<text v-for="(sku, skuI) in item.specGroup" :key="skuI">{{ sku.specValueName }};</text>
+								</block>
+								<text v-else>{{ item.specGropName }}</text>
+							</view>
+							<view class="float_right"><u-number-box :min="0" :index="index" @change="addBuyNumChange" :value="item.buyNum"></u-number-box></view>
+						</view>
+						<text class="custom-icon custom-icon-shanchu" @click="delGoods(index)"></text>
+					</view>
+					<view style="padding-top: 100rpx;" v-if="!add_goods.length"><u-empty text="未选择商品" mode="data"></u-empty></view>
+				</scroll-view>
+				<view class="btn-view" @click="addGoodsTo">选好了</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+export default {
+	data() {
+		return {
+			sel_pop: false, //已选商品
+			load_status: 'nomore',
+			activeName: 'all',
+			keyword: '',
+			is_more: false,
+			page: 1,
+			pageSize: 10,
+			total: 0,
+			category_list: [], // 分类列表
+			category_id: '', // 分类id
+			auditStatus: 2, // 审核状态
+			goods_list: [],
+			add_goods: [],
+			sel_goods_id: [],
+			goods_detail: {},
+			isRevealSku: 4, // 5 只显示基本单位 4:主辅助单位都显示
+			shopId: '',
+			scrollTop: -1,
+			warehouseId: ''
+		};
+	},
+	onLoad(options) {
+		this.warehouseId = options.id;
+		this.add_goods = uni.getStorageSync('warehouseGoods').map(item => {
+			return {
+				...item,
+				title: item.materielName,
+				code: item.materielCode
+			};
+		});
+		console.log(this.add_goods)
+		this.getAllCategory();
+		this.getInventoryByWarehouseId();
+	},
+
+	methods: {
+		clearGoods() {
+			this.add_goods = [];
+		},
+		openPop() {
+			this.sel_pop = true;
+		},
+		addGoodsTo() {
+			this._prePage().warehouseGoods = this.add_goods;
+			uni.navigateBack();
+		},
+		// 滚动到底部,触发上拉加载
+		scrolltolower() {
+			if (this.total / this.pageSize > this.page) {
+				this.page += 1;
+				this.getInventoryByWarehouseId();
+			}
+		},
+		buyNumChange({ value, index }) {
+			let target = this.$u.deepClone(this.goods_list);
+			target[index].buyNum = value;
+			let addGoods = this.$u.deepClone(this.add_goods);
+			const goodsI = addGoods.findIndex(item => item.skuId === target[index].skuId);
+			if (!Number(value)) {
+				addGoods.splice(goodsI, 1);
+			} else {
+				addGoods[goodsI].buyNum = value;
+			}
+			this.add_goods = addGoods;
+			this.goods_list = target;
+		},
+		addBuyNumChange({ value, index }) {
+			let target = this.$u.deepClone(this.goods_list);
+			let addGoods = this.$u.deepClone(this.add_goods);
+			const goodsI = target.findIndex(item => item.skuId === addGoods[index].skuId);
+			if (!Number(value)) {
+				addGoods.splice(goodsI, 1);
+			} else {
+				addGoods[index].buyNum = value;
+			}
+			if (goodsI > -1) {
+				target[goodsI].buyNum = value;
+			}
+			this.add_goods = addGoods;
+			this.goods_list = target;
+		},
+		delGoods(index) {
+			let target = this.$u.deepClone(this.goods_list);
+			const goodsI = target.findIndex(item => item.skuId === this.add_goods[index].skuId);
+			if (goodsI > -1) {
+				target[goodsI].buyNum = 0;
+			}
+			this.goods_list = target;
+			this.add_goods.splice(index, 1);
+		},
+		// 获取商品列表
+		getInventoryByWarehouseId() {
+			this.load_status = 'loading';
+			this.$u.api
+				.getInventoryByWarehouseId({
+					page: this.page,
+					pageSize: this.pageSize,
+					warehouseId: this.warehouseId,
+					categoryId: this.category_id
+				})
+				.then(res => {
+					const list = res.data.map(item => {
+						const goods = this.add_goods.find(agoods => agoods.skuId === item.skuId);
+						return {
+							...item,
+							buyNum: goods ? (goods.buyNum||goods.num) : 0
+						};
+					});
+					if (this.page === 1) {
+						this.goods_list = list;
+					} else {
+						this.goods_list = this.goods_list.concat(list);
+					}
+					// console.log(res.data)
+					this.total = res.pageTotal;
+					this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
+				});
+		},
+		//  获取所有商品分类
+		getAllCategory() {
+			this.$u.api
+				.getAllCategory({
+					enableStatus: 5
+				})
+				.then(res => {
+					this.category_list = res.data;
+				});
+		},
+		// 切换分类
+		changeCate(id) {
+			this.scrollTop = 0;
+			this.$nextTick(() => {
+				this.scrollTop = -1;
+			});
+			this.category_id = id;
+			this.page = 1;
+			this.searchList();
+		},
+		searchList() {
+			this.page = 1;
+			this.getInventoryByWarehouseId();
+		},
+		addGoods(index) {
+			const target = this.$u.deepClone(this.goods_list);
+			const isindex = this.add_goods.findIndex(item => item.skuId === target[index].skuId);
+			if (isindex === -1) {
+				target[index].buyNum = 1;
+				this.add_goods.push(target[index]);
+			} else {
+				this.add_goods[isindex].buyNum += target[index].buyNum;
+			}
+			this.goods_list = target;
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.bottom-view {
+	box-shadow: 0px 2px 12rpx rgba(0, 0, 0, 0.2);
+	position: fixed;
+	width: 100%;
+	padding: 20rpx;
+	bottom: 0;
+	left: 0;
+	background-color: #ffffff;
+
+	.float_left {
+		line-height: 70rpx;
+
+		.shop-icon-view {
+			display: inline-block;
+			width: 60rpx;
+			height: 60rpx;
+			border-radius: 100%;
+			background-color: $uni-color-primary;
+			text-align: center;
+			line-height: 60rpx;
+			vertical-align: middle;
+			margin-right: 20rpx;
+
+			.uicon {
+				display: inline-block;
+				margin-top: 6rpx;
+			}
+		}
+	}
+}
+
+.search-view {
+	background-color: #ffffff;
+	padding: 20rpx;
+	.input-view {
+		padding: 0 24rpx;
+		input {
+			height: 60rpx;
+			line-height: 60rpx;
+			padding: 0 24rpx;
+			margin: 0 auto;
+			width: 620rpx;
+			border: 1px solid #f5f5f5;
+			vertical-align: middle;
+			border-radius: 8rpx;
+			background-color: #f7f8fa;
+		}
+	}
+
+	.search-other {
+		display: flex;
+		border-bottom: 1px solid #f5f5f5;
+
+		.search-li {
+			flex: 2;
+			text-align: center;
+			font-size: 24rpx;
+			line-height: 80rpx;
+
+			.arrow-down {
+				margin-left: 10rpx;
+			}
+		}
+	}
+}
+
+.main-view {
+	.left-view {
+		width: 168rpx;
+		background-color: #f7f8fa;
+
+		.left-scroll {
+			width: 100%;
+			height: calc(100vh - 214rpx);
+
+			.cate-li {
+				line-height: 90rpx;
+				padding-left: 36rpx;
+				color: #666666;
+			}
+
+			.cate-on {
+				background-color: #ffffff;
+				color: #000000;
+				position: relative;
+
+				&::before {
+					content: '';
+					display: block;
+					width: 6rpx;
+					height: 20rpx;
+					background-color: $uni-color-primary;
+					position: absolute;
+					left: 14rpx;
+					top: 50%;
+					transform: translateY(-50%);
+				}
+			}
+		}
+	}
+
+	.rigth-view {
+		width: calc(100% - 168rpx);
+		background-color: #ffffff;
+
+		.rigth-scroll {
+			width: 100%;
+			height: calc(100vh - 214rpx);
+
+			.goods-li {
+				padding: 20rpx;
+				border-bottom: 1px solid #f5f5f5;
+				position: relative;
+
+				.add-btn {
+					position: absolute;
+					right: 20rpx;
+					bottom: 20rpx;
+					.custom-icon {
+						color: #ffffff;
+						font-size: 32rpx;
+						display: block;
+						width: 46rpx;
+						height: 46rpx;
+						text-align: center;
+						line-height: 46rpx;
+						background-color: $uni-color-primary;
+						border-radius: 100%;
+					}
+				}
+				.add-on {
+					background-color: #999999;
+				}
+
+				.goods-main {
+					.goods-img {
+						border-radius: 10rpx;
+						width: 156rpx;
+						height: 156rpx;
+						margin-right: 20rpx;
+					}
+
+					.goods-info {
+						width: 366rpx;
+						.num-ul {
+							display: flex;
+							padding-top: 20rpx;
+							.num-li {
+								font-size: 24rpx;
+								line-height: 36rpx;
+								flex: 3;
+								text-align: center;
+								position: relative;
+								font-weight: bold;
+								.label {
+									font-weight: 400;
+									color: #999999;
+								}
+								&::after {
+									display: block;
+									content: '';
+									position: absolute;
+									width: 1px;
+									height: 60rpx;
+									top: 50%;
+									transform: translateY(-50%);
+									right: 0;
+									background-color: #eeeeee;
+								}
+								&:last-child {
+									&::after {
+										display: block;
+										content: '';
+										position: absolute;
+										width: 1px;
+										height: 50rpx;
+										top: 50%;
+										transform: translateY(-50%);
+										right: 0;
+										background-color: transparent;
+									}
+								}
+							}
+						}
+						.goods-name {
+							-webkit-line-clamp: 1;
+						}
+
+						.goods-code {
+							font-size: 24rpx;
+							padding-top: 6rpx;
+						}
+
+						.goods-tag {
+							padding: 10rpx 0;
+
+							.tag-li {
+								margin-right: 14rpx;
+							}
+						}
+
+						.goods-num {
+							color: #999999;
+							font-size: 22rpx;
+
+							text {
+								padding-right: 10rpx;
+							}
+						}
+					}
+				}
+			}
+		}
+	}
+}
+.sel-goods-pop {
+	padding-bottom: 1px;
+	.pop-tit {
+		line-height: 70rpx;
+		background-color: #f5f5f5;
+		padding: 0 24rpx;
+		.float_right {
+			font-size: 24rpx;
+			color: #666666;
+			.custom-icon-shanchu {
+				font-size: 26rpx;
+				margin-right: 10rpx;
+			}
+		}
+	}
+	.goods-ul {
+		min-height: 400rpx;
+		max-height: 600rpx;
+		.goods-li {
+			padding: 24rpx;
+			position: relative;
+			border-bottom: 1px solid #f5f5f5;
+			.goods-name {
+				width: 660rpx;
+			}
+			.goods-code {
+				padding-top: 10rpx;
+				font-size: 24rpx;
+				color: #999999;
+			}
+			.custom-icon-shanchu {
+				position: absolute;
+				right: 24rpx;
+				top: 24rpx;
+				width: 40rpx;
+				height: 40rpx;
+				color: $uni-color-error;
+			}
+		}
+	}
+	.btn-view {
+		width: 680rpx;
+		height: 70rpx;
+		line-height: 70rpx;
+		border-radius: 10rpx;
+		background-color: $uni-color-primary;
+		color: #ffffff;
+		text-align: center;
+		margin: 20rpx auto;
+	}
+}
+</style>

+ 584 - 0
pagesT/goods/addGoods.vue

@@ -0,0 +1,584 @@
+<template>
+	<view class="add-goods">
+		<u-form :model="form" ref="goodsForm" label-width="160">
+			<view class="form-title">基本信息</view>
+			<view class="form-cont">
+				<u-form-item required label="商品相册" label-position="top"><upload :images="form.images" @handleRemove="imgRemove" @uploadSuccess="uploadSuccess" /></u-form-item>
+				<u-form-item required label="商品名称"><u-input input-align="right" v-model="form.title" /></u-form-item>
+				<u-form-item required label="商品分类">
+					<view class="form-main" @click="openSel('cate_show')">
+						<text v-if="category_name">{{ category_name }}</text>
+						<text class="input-pl" v-else>请选择商品分类</text>
+					</view>
+					<view slot="right"><u-icon name="arrow-down-fill" size="24"></u-icon></view>
+				</u-form-item>
+				<u-form-item label="商品品牌">
+					<view class="form-main" @click="goPage('/pagesT/brand/selBrand')">
+						<text v-if="brand_name">{{ brand_name }}</text>
+						<text class="input-pl" v-else>请选择品牌</text>
+					</view>
+					<view slot="right"><u-icon name="arrow-down-fill" size="24"></u-icon></view>
+				</u-form-item>
+				<u-form-item label="商品卖点"><u-input input-align="right" v-model="form.describe" /></u-form-item>
+				<u-form-item label="抄码商品">
+					<view class="form-value">
+						<u-switch style="transform: translateY(14rpx);" @change="switchChange" v-model="isEq" :active-value="5" :inactive-value="4" size="40"></u-switch>
+					</view>
+				</u-form-item>
+				<u-form-item label="保质期">
+					<u-input input-align="right" v-model="form.expireTime" />
+					<view slot="right">天</view>
+				</u-form-item>
+				<!-- <u-form-item label="货架编码"><u-input input-align="right" v-model="form.storage" /></u-form-item> -->
+				<u-form-item label="禁止销售店铺" label-position="top">
+					<view class="top-value">
+						<u-tag class="tag-li" v-for="(item, index) in no_sales_shop" :key="index" :text="item.name" closeable type="primary" @close="deletShop(index)" />
+						<u-button size="mini" @click="selShop">
+							<u-icon name="plus" margin-right="20"></u-icon>
+							新增
+						</u-button>
+					</view>
+				</u-form-item>
+				<u-form-item label="关键词" label-position="top">
+					<view class="top-value">
+						<u-tag class="tag-li" v-for="(item, index) in form.tag" :key="index" :text="item" closeable type="primary" @close="deletTag(index)" />
+						<u-button size="mini" @click="openSel('tag_show')">
+							<u-icon name="plus" margin-right="20"></u-icon>
+							新增
+						</u-button>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="form-title">规格明细</view>
+			<view class="form-cont">
+				<u-form-item required label="基本单位">
+					<view class="form-main" @click="openSel('m_unit_show')">
+						<text v-if="master_unit">{{ master_unit }}</text>
+						<text class="input-pl" v-else>请选择基本单位</text>
+					</view>
+					<view slot="right"><u-icon name="arrow-down-fill" size="24"></u-icon></view>
+				</u-form-item>
+				<u-form-item label="辅助单位" label-position="top">
+					<view class="top-value">
+						<block v-for="(item, index) in form.unitData" :key="index">
+							<u-tag
+								class="tag-li"
+								v-if="item.isMaster === 4"
+								:text="'1' + item.unitName + '=' + item.conversion + master_unit"
+								:closeable="isEditSpec === 5 || isEq"
+								type="primary"
+								@close="deletUnit(index, item)"
+							/>
+						</block>
+						<u-button v-if="!isEq || (isEq && form.unitData.length < 1)" size="mini" @click="openSel('unit_show')">
+							<u-icon name="plus" margin-right="20"></u-icon>
+							新增
+						</u-button>
+					</view>
+				</u-form-item>
+				<u-form-item label="商品规格">
+					<view @click="editSku" slot="right" style="font-size: 28rpx; color: #007AFF;">
+						<u-icon name="edit-pen" size="28"></u-icon>
+						<text style="margin-left: 10rpx;">编辑</text>
+					</view>
+				</u-form-item>
+			</view>
+			<view class="form-title">商品详情</view>
+			<view class="form-cont"><editorW :html="form.description" @editInput="editInput"></editorW></view>
+		</u-form>
+		<view class="submit-btn"><view class="btn-min" @click="submit">提交发布</view></view>
+		<u-popup v-model="tag_show" border-radius="10" mode="center">
+			<view class="pop-model">
+				<view class="pop-tit">新增关键词</view>
+				<input :focus="true" type="text" confirm-type="done" @confirm="tagConfirm" placeholder-class="input-pl" placeholder="请输入" v-model="tag_key" />
+				<u-button type="primary" size="medium" @click="tagConfirm">确定</u-button>
+			</view>
+		</u-popup>
+		<u-popup v-model="unit_show" mode="center" border-radius="10">
+			<view class="pop-model">
+				<view class="pop-tit">新增辅助单位</view>
+				<view class="unit-model-main">
+					<text>1</text>
+					<view class="sel-view" @click="openSel('fz_unit_show')">
+						<text v-if="pop_unit_obj.label">{{ pop_unit_obj.label }}</text>
+						<text class="input-pl" v-else>请选择</text>
+					</view>
+					=
+					<input class="uni-num-input" type="digit" v-model="conversion" />
+					<text>{{ master_unit }}</text>
+				</view>
+				<view class="confirm-btn" @click="unitPopConfirm">确定</view>
+			</view>
+		</u-popup>
+		<tki-tree ref="tkitree" :selectParent="true" :range="cate_list" rangeKey="title" @confirm="cateConfirm"></tki-tree>
+		<u-select v-model="m_unit_show" mode="single-column" value-name="id" label-name="unitName" :list="unit_options" @confirm="unitConfirm"></u-select>
+		<u-select z-index="10080" v-model="fz_unit_show" mode="single-column" value-name="id" label-name="unitName" :list="unit_options" @confirm="unitPopSelConfirm"></u-select>
+	</view>
+</template>
+
+<script>
+import editorW from '@/components/editor/editor.vue';
+import upload from '@/components/qiniu/QiniuUpload.vue';
+import tkiTree from '@/components/tki-tree/tki-tree.vue';
+export default {
+	components: { editorW, upload, tkiTree },
+	data() {
+		return {
+			isEq: false,
+			shopData: '',
+			conversion: '', //辅助单位换算比例
+			master_unit: '', //基本单位
+			pop_unit_obj: {}, // 弹窗辅助单位
+			tag_show: false, //新增关键词弹窗
+			tag_key: '', // 新增关键词
+			brandData: {}, //品牌数据
+			brand_name: '', //品牌名称
+			category_name: '', //分类名称
+			unit_options: [], //计量单位
+			copy_unit_options: [], //计量单位
+			expressType_list: [
+				{
+					label: '包邮',
+					value: 1
+				},
+				{
+					label: '运费模版',
+					value: 2
+				},
+				{
+					label: '统一运费',
+					value: 3
+				}
+			],
+			unit_show: false, // 新增辅助弹窗
+			cate_show: false, // 商品分类弹窗
+			m_unit_show: false, // 单位弹窗
+			fz_unit_show: false,
+			brand_list: [],
+			cate_list: [],
+			no_sales_shop: [],
+			origin_unit_obj: [],
+			isEditSpec: 5, // 5 表示此商品从未采购过,允许用户随意编辑单位和属性;4 表示商品已经采购过,隐藏添加属性按钮,避免skuid重组
+			form: {
+				delUnitIds: [], // 辅助单位删除delUnitIds (unitId)
+				delSpecSkuIds: [], // 属性删除delSpecSkuIds(这个用id)
+				title: '', //商品名称
+				storage: '', //货架编码
+				specType: 1, // 是否启用多规格 1单规格 2多规格
+				specGroup: [], //多规格数据
+				specMultiple: '', //多规格明细
+				unitData: [], //计量单位
+				describe: '', //商品卖点
+				code: '', //商品code
+				barCode: '', //商品条码
+				weight: '', //商品重量
+				categoryId: '', //分类ID
+				categoryPath: '', //分类路径
+				assistCategoryPath: '', //副分类
+				assistCategoryId: '',
+				expireTime: '', //保质期
+				brandId: '', //品牌ID
+				tag: [], //关键词
+				description: '', //商品详情
+				noSalesShop: '', //不销售店铺ID
+				images: [], //商品图片
+				enableStatus: 5, //是否上架
+				isStore: false, //是否是商户后台上传商品
+				isEq: 4, //超码商品 4否 5是
+				merchantId: '', //商户ID
+				salesShop: ''
+			}
+		};
+	},
+	watch: {
+		brandData(val) {
+			if (val.id) {
+				this.form.brandId = val.id;
+				this.brand_name = val.title;
+			}
+		},
+		shopData(val) {
+			if (val) {
+				this.no_sales_shop = val;
+			}
+		}
+	},
+	onLoad(options) {
+		if (options.id) {
+			this.goods_id = options.id;
+			this.getGoodsBasicInfoById();
+			uni.setNavigationBarTitle({
+				title: '编辑商品资料'
+			});
+		}
+
+		this.getAllCategory();
+		this.getAllUnit();
+	},
+	methods: {
+		selShop() {
+			let selId = '';
+			if (this.no_sales_shop.length) {
+				selId = JSON.stringify(this.no_sales_shop.map(item => item.id));
+			}
+			this.goPage('/pagesT/shop/selShop?check=1&selId=' + selId);
+		},
+		switchChange(val) {
+			this.form.isEq = val;
+			// if(this.isEditSpec !== 4 &&val){
+			// 	this.form.unitData = [];
+			// 	this.master_unit = '';
+			// }
+		},
+		cateConfirm(arr) {
+			this.category_name = arr[0].title;
+			this.form.categoryId = arr[0].id;
+			if (arr[0].parents.length) {
+				this.form.categoryPath = arr[0].parents.map(item => item.id).join(',') + ',' + arr[0].id;
+			} else {
+				this.form.categoryPath = arr[0].id;
+			}
+		},
+		editInput(val) {
+			this.form.description = val;
+		},
+		// 获取商品详情
+		getGoodsBasicInfoById() {
+			this.$u.api.getGoodsBasicInfoById(this.goods_id).then(({ data }) => {
+				this.isEditSpec = data.isEditSpec;
+				// 备份
+				this.origin_unit_obj = this.$u.deepClone(data.unitData);
+				this.form = {
+					title: data.title, //商品名称
+					storage: data.storage, //货架编码
+					specType: data.specType, // 是否启用多规格 1单规格 2多规格
+					specGroup: data.specGroup, //多规格数据
+					specMultiple: data.specMultiple, //多规格明细
+					unitData: data.unitData, //计量单位
+					describe: data.describe, //商品卖点
+					code: data.code, //商品code
+					barCode: data.barCode, //商品条码
+					weight: data.weight, //商品重量
+					categoryId: data.categoryId, //分类ID
+					categoryPath: data.categoryPath, //分类路径
+					expireTime: data.expireTime, //保质期
+					brandId: data.brandId, //品牌ID
+					tag: data.tag ? data.tag.split(',') : [], //关键词
+					description: data.description, //商品详情
+					noSalesShop: data.noSalesShop, //不销售店铺ID
+					images: data.images, //商品图片
+					enableStatus: data.enableStatus, //是否上架
+					isStore: false, //是否是商户后台上传商品
+					isEq: data.isEq,
+					salesShop: data.salesShop,
+					delUnitIds: [], // 辅助单位删除delUnitIds (unitId)
+					delSpecSkuIds: [], // 属性删除delSpecSkuIds(这个用id)
+					assistCategoryId: data.assistCategoryId,
+					assistCategoryPath: data.assistCategoryPath
+				};
+				this.isEq = data.isEq === 5;
+				this.no_sales_shop = data.noSalesShopNames
+					? data.noSalesShopNames.split(',').map((item, index) => {
+							const id = data.noSalesShop.split(',')[index];
+							return {
+								name: item,
+								id: id
+							};
+					  })
+					: [];
+				this.category_name = data.categoryTitle;
+				this.brand_name = data.brandTitle;
+				const masterUnit = data.unitData.find(item => item.isMaster === 5).unitName;
+				this.master_unit = masterUnit;
+			});
+		},
+		// 辅助单位删除
+		deletUnit(index, row) {
+			if (!!this.goods_id) {
+				this.form.delUnitIds.push(row.unitId);
+			}
+			this.form.unitData.splice(index, 1);
+		},
+		//基本单位选择
+		unitConfirm(arr) {
+			// 编辑页面把删除 的单位ID存储下来
+			if (!!this.goods_id) {
+				const unitData = this.$u.deepClone(this.origin_unit_obj);
+				this.form.delUnitIds = unitData.map(item => item.unitId);
+				if (this.form.specType === 1) {
+					const specMultiple = this.$u.deepClone(this.form.specMultiple);
+					this.form.delSpecSkuIds = specMultiple.map(item => item.id);
+				}
+			}
+			// 重置单位
+			this.form.unitData = [];
+			this.master_unit = arr[0].label;
+			const unit = {
+				isDefault: 4,
+				isMaster: 5,
+				weight: '',
+				unitName: arr[0].label,
+				unitId: arr[0].value,
+				barCode: ''
+			};
+			this.form.unitData.unshift(unit);
+		},
+		editSku() {
+			if (!this.master_unit) {
+				this.$u.toast('请先选择基本单位');
+				return;
+			}
+			if (this.form.specType === 1) {
+				this.goPage('/pages/goods/sku?specType=' + this.form.specType + '&unitData=' + JSON.stringify(this.form.unitData));
+			} else {
+				this.goPage(
+					'/pages/goods/sku?specType=' +
+						this.form.specType +
+						'&unitData=' +
+						JSON.stringify(this.form.unitData) +
+						'&specMultiple=' +
+						JSON.stringify(this.form.specMultiple) +
+						'&specGroup=' +
+						JSON.stringify(this.form.specGroup)
+				);
+			}
+		},
+		openSel(key) {
+			if (key === 'unit_show') {
+				if (!this.master_unit) {
+					this.$u.toast('请先选择基本单位');
+					return;
+				}
+			} else if (key === 'cate_show') {
+				this.$refs.tkitree._show();
+				return;
+			} else if (key === 'm_unit_show') {
+				if (this.isEditSpec === 4) {
+					return;
+				}
+				// 抄码商品主单位只能选择KG
+				if (this.isEq) {
+					this.unit_options = this.copy_unit_options.filter(item => item.unitName === 'KG');
+				} else {
+					this.unit_options = this.$u.deepClone(this.copy_unit_options);
+				}
+			} else if (key === 'fz_unit_show') {
+				if (this.isEq) {
+					this.unit_options = this.copy_unit_options.filter(item => item.unitName === '件');
+				} else {
+					this.unit_options = this.$u.deepClone(this.copy_unit_options);
+				}
+			}
+			this[key] = true;
+		},
+		// 新增关键词确定
+		tagConfirm() {
+			this.tag_show = false;
+			this.form.tag.push(this.tag_key);
+			this.tag_key = '';
+		},
+		deletTag(index) {
+			this.form.tag.splice(index, 1);
+		},
+		deletShop(index) {
+			this.no_sales_shop.splice(index, 1);
+		},
+		// 图片上传成功
+		uploadSuccess(imgUrl) {
+			this.form.images.push(imgUrl);
+		},
+		//移除图片
+		imgRemove(arr) {
+			this.form.images = arr;
+		},
+		//  获取所有商品分类
+		getAllCategory() {
+			this.$u.api
+				.getAllCategory({
+					enableStatus: 5
+				})
+				.then(res => {
+					this.cate_list = res.data;
+				});
+		},
+		reduceCate(list) {
+			list.forEach(item => {
+				if (!item.children) {
+					item.children = [
+						{
+							id: '',
+							title: '全部'
+						}
+					];
+				} else {
+					item.children = this.reduceCate(item.children);
+				}
+			});
+			return list;
+		},
+		getAllUnit() {
+			this.$u.api
+				.getAllUnit({
+					page: 1,
+					pageSize: 99
+				})
+				.then(res => {
+					// 备份一份单位数据
+					this.copy_unit_options = this.$u.deepClone(res.data);
+					this.unit_options = res.data;
+				});
+		},
+		unitPopSelConfirm(arr) {
+			if (arr[0].label === this.master_unit) {
+				this.$u.toast('辅助单位不能与基本单位用同一个');
+				return;
+			}
+			const index = this.form.unitData.findIndex(item => item.unitName === arr[0].label);
+			if (index > -1) {
+				this.$u.toast('该单位已被选择');
+				return;
+			}
+			this.pop_unit_obj = arr[0];
+		},
+		unitPopConfirm() {
+			if (!this.conversion) {
+				this.$u.toast('请输入换算比例');
+				return;
+			}
+			this.unit_show = false;
+			this.form.unitData.push({
+				unitName: this.pop_unit_obj.label,
+				isMaster: 4,
+				unitId: this.pop_unit_obj.value,
+				conversion: this.conversion,
+				weight: '',
+				isDefault: 4,
+				barCode: ''
+			});
+			this.conversion = '';
+			this.pop_unit_obj = {};
+		},
+
+		// 提交发布
+		submit() {
+			if (!this.form.images.length) {
+				this.$u.toast('请至少选择一张商品图片');
+				return;
+			}
+			if (!this.form.title) {
+				this.$u.toast('请输入商品名称');
+				return;
+			}
+			if (!this.form.categoryId) {
+				this.$u.toast('请选择商品分类');
+				return;
+			}
+			if (!this.form.unitData.length) {
+				this.$u.toast('请选择基本单位');
+				return;
+			}
+			// 做延迟处理是为了获取富文本框中的值
+			setTimeout(() => {
+				if (this.no_sales_shop.length) {
+					this.form.noSalesShop = this.no_sales_shop.map(item => item.id).join(',');
+				}
+				if (this.goods_id) {
+					this.$u.api
+						.editGoodsBasic(this.goods_id, {
+							...this.form,
+							tag: this.form.tag ? this.form.tag.join(',') : '',
+							specMultiple: this.form.specType === 1 ? [] : this.form.specMultiple,
+							specGroup: this.form.specType === 1 ? [] : this.form.specGroup
+						})
+						.then(res => {
+							this.$u.toast('修改成功');
+							uni.navigateBack();
+						});
+				} else {
+					this.$u.api.addGoodsBasic({ ...this.form, tag: this.form.tag ? this.form.tag.join(',') : '' }).then(res => {
+						this.$u.toast('新增成功');
+						uni.navigateBack();
+					});
+				}
+			}, 200);
+		}
+	}
+};
+</script>
+
+<style scoped lang="scss">
+.add-goods {
+	padding-bottom: 120rpx;
+	.form-title {
+		line-height: 90rpx;
+		font-weight: 700;
+		padding: 0 24rpx;
+	}
+	.form-cont {
+		padding: 0 24rpx;
+		background-color: #ffffff;
+		.form-value {
+			text-align: right;
+			width: 100%;
+		}
+		.top-value {
+			text-align: left;
+			width: 100%;
+		}
+		.form-main {
+			text-align: right;
+			.input-pl {
+				color: #c0c4cc;
+				font-size: 28rpx;
+			}
+		}
+	}
+}
+.pop-model {
+	padding: 0 30rpx 20rpx;
+	text-align: center;
+	input {
+		border: 1px solid #f5f5f5;
+		line-height: 70rpx;
+		height: 70rpx;
+		margin-bottom: 20rpx;
+	}
+	.pop-tit {
+		line-height: 70rpx;
+	}
+	.confirm-btn {
+		width: 80%;
+		display: block;
+		background-color: $uni-color-primary;
+		text-align: center;
+		color: #ffffff;
+		line-height: 70rpx;
+		height: 70rpx;
+		border-radius: 10rpx;
+		margin: 0 auto;
+	}
+	.unit-model-main {
+		margin-bottom: 30rpx;
+		margin-top: 10rpx;
+		width: 600rpx;
+		line-height: 70rpx;
+		input {
+			display: inline-block;
+			vertical-align: middle;
+			width: 200rpx;
+			margin: 0 10rpx;
+		}
+		.sel-view {
+			margin: 0 10rpx;
+			display: inline-block;
+			vertical-align: middle;
+			width: 200rpx;
+			height: 70rpx;
+			border: 1px solid #f5f5f5;
+		}
+	}
+}
+.tag-li {
+	margin-right: 20rpx;
+}
+</style>

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