zhangqiOMG 2 years ago
parent
commit
44febf1abf
41 changed files with 523 additions and 136 deletions
  1. 6 0
      Eservice/api/http.js
  2. 4 0
      app.js
  3. 3 1
      app.json
  4. 1 1
      packageA/borrow/detail.js
  5. 1 1
      packageA/invoice/detail.js
  6. 2 1
      packageA/market/detail.json
  7. 8 4
      packageA/market/detail.wxml
  8. 2 2
      packageA/market/modules/list/index.wxml
  9. 1 1
      packageA/orderForm/detail.js
  10. 1 0
      packageA/orderForm/index.wxml
  11. 16 12
      packageA/orderForm/modules/product/index.js
  12. 0 1
      packageA/orderForm/modules/product/index.wxml
  13. 0 1
      packageA/orderForm/modules/progress/index.wxml
  14. 53 53
      packageA/remitVoucher/detail.js
  15. 2 3
      packageA/shipment/detail.js
  16. 1 1
      packageA/tool/index.wxml
  17. 52 1
      packageA/tool/modules/list/index.js
  18. 19 16
      packageA/tool/modules/list/index.scss
  19. 10 4
      packageA/tool/modules/list/index.wxml
  20. 2 5
      packageA/toolBill/detail.js
  21. 0 4
      packageA/toolBill/index.js
  22. 1 1
      pages/login/modules/agreement.js
  23. 60 0
      pages/tabbar/mine/address/index.js
  24. 5 0
      pages/tabbar/mine/address/index.json
  25. 0 0
      pages/tabbar/mine/address/index.scss
  26. 7 0
      pages/tabbar/mine/address/index.wxml
  27. 11 0
      pages/tabbar/mine/address/modules/list/index.js
  28. 4 0
      pages/tabbar/mine/address/modules/list/index.json
  29. 35 0
      pages/tabbar/mine/address/modules/list/index.scss
  30. 15 0
      pages/tabbar/mine/address/modules/list/index.wxml
  31. 121 0
      pages/tabbar/mine/address/update.js
  32. 3 0
      pages/tabbar/mine/address/update.json
  33. 26 0
      pages/tabbar/mine/address/update.scss
  34. 5 0
      pages/tabbar/mine/address/update.wxml
  35. 1 0
      pages/tabbar/mine/index.scss
  36. 12 2
      pages/tabbar/mine/index.wxml
  37. 13 10
      select/product/index.js
  38. 4 1
      select/product/index.scss
  39. 3 3
      select/product/index.wxml
  40. 7 7
      static/font-icon.wxss
  41. 6 0
      utils/Http.js

+ 6 - 0
Eservice/api/http.js

@@ -1,8 +1,14 @@
 var app = getApp(); //引入全局app.js,我们可以在globalData中定义一些公用的数据,比如baseUrl、token
 
 const request = function (url = "", options) {
+<<<<<<< HEAD
   const baseUrl = "http://61.164.207.46:8000/yos/rest/index" + url;
   // const baseUrl = "http://122.226.136.204:8082/yos/rest/index" + url;
+=======
+  // const baseUrl = "http://61.164.207.46:8000/yos/rest/index" + url;
+  const baseUrl = "http://122.226.136.204:8082/yos/rest/index" + url;
+  // const baseUrl = "https://oms.idcgroup.com.cn:8079/yos/rest/index" + url;
+>>>>>>> 6d50bfc48456f82407384374f3ff23da1be150a5
   options.data.accesstoken = wx.getStorageSync('userMsg').token
   return new Promise((resolve, reject) => {
     wx.request({

+ 4 - 0
app.js

@@ -57,6 +57,10 @@ App({
             that: null, //保存this
             callback: function () {}
         },
+<<<<<<< HEAD
         host:"http://61.164.207.46:8000"
+=======
+        host: "https://oms.idcgroup.com.cn:8079"
+>>>>>>> 6d50bfc48456f82407384374f3ff23da1be150a5
     }
 })

+ 3 - 1
app.json

@@ -11,7 +11,9 @@
     "pages/tabbar/mine/changePassword/index",
     "pages/teams/index",
     "pages/teams/addUsers",
-    "pages/teams/addRole"
+    "pages/teams/addRole",
+    "pages/tabbar/mine/address/index",
+    "pages/tabbar/mine/address/update"
   ],
   "subpackages": [
     {

+ 1 - 1
packageA/borrow/detail.js

@@ -354,7 +354,7 @@ Page({
         let page = getCurrentPages().find(v => v.__route__ == 'packageA/borrow/index');
         let content = JSON.parse(JSON.stringify(page.data.content));
         content.pageNumber = 1;
-        content.pageSize = page.data.list.length <= 20 ? page.data.list.length + 3 : page.data.list.length;
+        content.pageSize = (page.data.content.pageNumber - 1) * page.data.content.pageSize;
         _Http.basic({
             "id": 20230114105002,
             content

+ 1 - 1
packageA/invoice/detail.js

@@ -198,7 +198,7 @@ Page({
         let page = getCurrentPages().find(v => v.__route__ == 'packageA/invoice/index');
         let content = JSON.parse(JSON.stringify(page.data.content));
         content.pageNumber = 1;
-        content.pageSize = page.data.content.pageNumber * page.data.content.pageSize;
+        content.pageSize = (page.data.content.pageNumber - 1) * page.data.content.pageSize;
         _Http.basic({
             "id": 20221216143103,
             "version": 1,

+ 2 - 1
packageA/market/detail.json

@@ -1,5 +1,6 @@
 {
   "usingComponents": {
-    "Float": "../shopping/modules/float"
+    "Float": "../shopping/modules/float",
+    "Yl_Files": "/components/Yl_Files/index"
   }
 }

+ 8 - 4
packageA/market/detail.wxml

@@ -37,7 +37,8 @@
 		选择商品
 	</view>
 	<view class="product-box">
-		<navigator url="#" class="product {{itemno===item.itemno?'active':''}}" wx:for="{{rows}}" wx:key="itemno" bindtap="changeItemno" data-item="{{item}}">{{item.model}}</navigator>
+		<navigator url="#" class="product {{itemno===item.itemno?'active':''}}" wx:for="{{rows}}" wx:key="itemno" bindtap="changeItemno" data-item="{{item}}">{{item.model}}
+		</navigator>
 	</view>
 </view>
 <van-tabs custom-class='tabs' title-active-color='var(--assist)' color='var(--assist)'>
@@ -58,7 +59,8 @@
 		</view>
 	</van-tab>
 	<van-tab title="产品资料">
-		<Yl_Empty />
+		<Yl_Files files="{{files}}" />
+		<Yl_Empty wx:if="{{detail.attinfos.length==0}}" />
 	</van-tab>
 </van-tabs>
 
@@ -69,7 +71,9 @@
 		<picker wx:if="{{detail.tradefield.length>=2}}" range='{{detail.tradefield}}' range-key='tradefield' bindchange='storage'>
 			<van-button custom-class='but' bindtap="clickBut">加入购物车</van-button>
 		</picker>
-		<van-button wx:else custom-class='but' bindtap="clickBut">加入购物车</van-button>
-	</view><!-- 购物车按钮 -->
+		<van-button wx:else custom-class='but' bindtap="clickBut">加入购物车
+		</van-button>
+	</view>
+	<!-- 购物车按钮 -->
 	<Float id="Float" />
 </block>

+ 2 - 2
packageA/market/modules/list/index.wxml

@@ -13,8 +13,8 @@
 			<view style="background: #FA8C16;">
 				{{item.brandname}}
 			</view>
-			<view wx:for="{{item.tag1}}" style="background: #FF3B30;">
-				{{item}}
+			<view wx:if="{{item.tradefield}}" style="background: #FF3B30;">
+				{{item.tradefield}}
 			</view>
 		</view>
 		<view class="price">

+ 1 - 1
packageA/orderForm/detail.js

@@ -581,7 +581,7 @@ Page({
         let page = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/index');
         let content = JSON.parse(JSON.stringify(page.data.content));
         content.pageNumber = 1;
-        content.pageSize = page.data.content.pageNumber * page.data.content.pageSize;
+        content.pageSize = (page.data.content.pageNumber - 1) * page.data.content.pageSize;
         _Http.basic({
             "id": this.data.userrole == '业务员' ? 20221111145202 : 20221224180302,
             content

+ 1 - 0
packageA/orderForm/index.wxml

@@ -15,6 +15,7 @@
 </view>
 <Yl_ListBox id='ListBox' bind:getlist='getList'>
     <List list="{{list}}" userrole="{{userrole}}" />
+    <view style="height: 20px;" />
 </Yl_ListBox>
 <!-- 新建浮动按钮 -->
 <Float />

+ 16 - 12
packageA/orderForm/modules/product/index.js

@@ -188,18 +188,22 @@ Component({
         },
         /* 去添加产品 */
         addProduct() {
-            let detail = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/detail').data.detail;
-            let id = ''
+            let detail = getCurrentPages().find(v => v.__route__ == 'packageA/orderForm/detail').data.detail,
+                id = '',
+                query = "&newprice=contractprice";
             switch (detail.type) {
                 case '项目订单':
-                    id = 20230103155002
+                    id = 20230103155002;
                     break;
                 case '促销订单':
-                    id = 20230107182302
+                    id = 20230107182302;
                     break;
-                default:
-                    //标准、工具
-                    id = 20221109153502
+                case '工具订单':
+                    id = 20221109153502;
+                    query = '';
+                    break;
+                case '标准订单':
+                    id = 20221109153502;
                     break;
             }
             wx.navigateTo({
@@ -208,16 +212,16 @@ Component({
 					"content": {
 						nocache:true,
 						"sa_orderid": this.data.sa_orderid, //订单ID
-						"pageNumber": 1,
-						"pageTotal": 1,
 						"total": 0,
-						"pageSize": 20,
 						"where": {
 							"condition": ""
 						}
 					}
-				})}`
+				})+query}`
             });
+            this.setData({
+                type: detail.type
+            })
             getApp().globalData.handleSelect = this.handleSelect.bind(this);
         },
         /* 处理新增产品 */
@@ -236,7 +240,7 @@ Component({
                                     sa_orderitemsid: 0,
                                     "itemid": v.itemid, //商品ID
                                     "qty": 1, //数量
-                                    price: v.contractprice
+                                    price: this.data.type == '工具订单' ? v.marketprice : v.contractprice
                                 }
                             })
                         }

+ 0 - 1
packageA/orderForm/modules/product/index.wxml

@@ -11,5 +11,4 @@
     </navigator>
   </view>
 </view>
-
 <List list='{{list}}' disabled='{{disabled}}' bindchangeProduct='changeProduct' binddeleteItem="deleteItem" />

+ 0 - 1
packageA/orderForm/modules/progress/index.wxml

@@ -1,6 +1,5 @@
 <view class="progress">
     <view class="count">共有{{total}}条记录</view>
-
     <navigator url="#" wx:for="{{list}}" wx:key="rowindex">
         <view class="time">
             {{item.actiondate}}

+ 53 - 53
packageA/remitVoucher/detail.js

@@ -16,7 +16,7 @@ Page({
 			}
 			return value;
 		},
-		show:false,
+		show: false,
 		tabsList: [{
 			label: "详细信息",
 			icon: "icon-tabchanpin"
@@ -51,18 +51,18 @@ Page({
 			let tabbarsList = []
 			if (res.data.status == '新建') tabbarsList = [{
 				label: "编辑",
-            	icon: "icon-dibu-bianji"
-			},{
+				icon: "icon-dibu-bianji"
+			}, {
 				label: "提交",
-            	icon: "icon-tijiao",
-			},{
+				icon: "icon-tijiao",
+			}, {
 				label: "删除",
 				icon: "icon-guanlian-shanchu"
 			}]
 			if (res.data.status == '提交') tabbarsList = [{
 				label: "审核",
 				icon: "icon-shenhe"
-			},{
+			}, {
 				label: "退回",
 				icon: "icon-a-fanshenhetuihui"
 			}]
@@ -94,7 +94,7 @@ Page({
 			}, {
 				label: "经销商简称",
 				value: data.enterprisename
-			},{
+			}, {
 				label: "回款归属月份",
 				value: data.period
 			}, {
@@ -126,33 +126,33 @@ Page({
 		})
 	},
 	/* 审核选择弹出框关闭 */
-	onClose () {
+	onClose() {
 		this.setData({
 			show: false
 		})
 	},
 	/* 审核提交 */
-	async checkSubmit ({
+	async checkSubmit({
 		detail
 	}) {
 		let res = await _Http.basic({
-			 "id": "20221226153304",
+			"id": "20221226153304",
 			"content": {
-				"sa_paybillid":this.data.sa_paybillid,
-				"period":getTime.formatTime(new Date(detail), '-').split(' ')[0]
+				"sa_paybillid": this.data.sa_paybillid,
+				"period": getTime.formatTime(new Date(detail), '-').split(' ')[0]
 			}
 		})
 		console.log(res);
 		if (res.msg == '成功') {
 			this.setData({
-				show:false
+				show: false
 			})
 			this.getDetail(true)
 		}
 	},
 	tabbarOnClick({
-        detail
-    }) {
+		detail
+	}) {
 		switch (detail.label) {
 			case "编辑":
 				wx.navigateTo({
@@ -169,7 +169,7 @@ Page({
 						if (confirm) _Http.basic({
 							"id": "20221226153204",
 							"content": {
-								"sa_paybillid":this.data.sa_paybillid
+								"sa_paybillid": this.data.sa_paybillid
 							}
 						}).then(res => {
 							wx.showToast({
@@ -188,11 +188,11 @@ Page({
 				break;
 			case "审核":
 				wx.showToast({
-					title:'请选择回款日期',
-					icon:'none'
+					title: '请选择回款日期',
+					icon: 'none'
 				})
 				this.setData({
-					show:true
+					show: true
 				})
 				break;
 			case "退回":
@@ -203,9 +203,9 @@ Page({
 						confirm
 					}) => {
 						if (confirm) _Http.basic({
-							"id":20221227110104,
+							"id": 20221227110104,
 							"content": {
-								sa_paybillid:this.data.sa_paybillid
+								sa_paybillid: this.data.sa_paybillid
 							}
 						}).then(res => {
 							wx.showToast({
@@ -220,35 +220,35 @@ Page({
 				})
 				break;
 			case "删除":
-			wx.showModal({
-				title: '提示',
-				content: `是否删除该凭证?`,
-				complete: ({
-					confirm
-				}) => {
-					if (confirm) _Http.basic({
-						"id":20221226153104,
-						"content": {
-							sa_paybillids:[this.data.sa_paybillid]
-						}
-					}).then(res => {
-						wx.showToast({
-							title: res.msg == '成功' ? `已删除该凭证` : res.msg,
-							icon: "none"
-						});
-						if (res.msg == '成功') {
-							setTimeout(() => {
-								wx.navigateBack()
-								getCurrentPages()[getCurrentPages().length - 2].getList(true)
-							},300)
-						}
-					})
-				}
-			})
-			break;
-        }
+				wx.showModal({
+					title: '提示',
+					content: `是否删除该凭证?`,
+					complete: ({
+						confirm
+					}) => {
+						if (confirm) _Http.basic({
+							"id": 20221226153104,
+							"content": {
+								sa_paybillids: [this.data.sa_paybillid]
+							}
+						}).then(res => {
+							wx.showToast({
+								title: res.msg == '成功' ? `已删除该凭证` : res.msg,
+								icon: "none"
+							});
+							if (res.msg == '成功') {
+								setTimeout(() => {
+									wx.navigateBack()
+									getCurrentPages()[getCurrentPages().length - 2].getList(true)
+								}, 300)
+							}
+						})
+					}
+				})
+				break;
+		}
 	},
-	onInput (detail) {
+	onInput(detail) {
 
 	},
 	//tabs 切换
@@ -257,8 +257,8 @@ Page({
 	}) {
 		this.setData({
 			tabsActive: detail
-        });
-        console.log(this.data.tabsActive);
+		});
+		console.log(this.data.tabsActive);
 		this.partialRenewal();
 	},
 	//局部数据更新 tabs
@@ -271,7 +271,7 @@ Page({
 					pageNumber,
 					pageTotal
 				} = Component.data.content,
-                id = this.data.detail.sa_paybillid;
+				id = this.data.detail.sa_paybillid;
 			if (total == null || init) {
 				Component.getList(id, init);
 			} else if (pageNumber < pageTotal) {
@@ -287,7 +287,7 @@ Page({
 		let page = getCurrentPages().find(v => v.__route__ == 'packageA/remitVoucher/index');
 		let content = JSON.parse(JSON.stringify(page.data.content));
 		content.pageNumber = 1;
-		content.pageSize = page.data.list.length;
+		content.pageSize = (page.data.content.pageNumber - 1) * page.data.content.pageSize;
 		_Http.basic({
 			"id": 20230111141104,
 			content

+ 2 - 3
packageA/shipment/detail.js

@@ -163,13 +163,12 @@ Page({
         this.partialRenewal();
     },
     onUnload() {
-        console.log("更新列表数据")
         let page = getCurrentPages().find(v => v.__route__ == 'packageA/shipment/index');
         let content = JSON.parse(JSON.stringify(page.data.content));
         content.pageNumber = 1;
-        content.pageSize = page.data.list.length;
+        content.pageSize = (page.data.content.pageNumber - 1) * page.data.content.pageSize;
         _Http.basic({
-            "id": 20230111141104,
+            "id": wx.getStorageSync('userrole') == '业务员' ? 20221122132804 : 20230111141104,
             content
         }).then(res => {
             console.log("更新订单列表", res)

+ 1 - 1
packageA/tool/index.wxml

@@ -5,7 +5,7 @@
 <Tabs wx:for="{{typeList}}" active="{{item.active}}" wx:key="{{index}}" rowIndex="{{index}}" list="{{item.list}}" bind:onChange="typeChange" name='itemclassname' box-class='brand-box' tab-class='brand-tab-class' active-class='brand-active-class' />
 <view class="division" />
 <Yl_ListBox id='ListBox' bind:getlist='getList'>
-	<List list="{{list}}" />
+	<List list="{{list}}" userrole='{{userrole}}' />
 </Yl_ListBox>
 <!-- 筛选条件 -->
 <Yl_Filtrate id='Filtrate' list="{{filter}}" bind:handle="handleFilter" dateRange='{{false}}' />

+ 52 - 1
packageA/tool/modules/list/index.js

@@ -1,5 +1,56 @@
+const _Http = getApp().globalData.http;
+
 Component({
   properties: {
-    list: Array
+    list: Array,
+    userrole: String
+  },
+  options: {
+    addGlobalClass: true
+  },
+  methods: {
+    showTips() {
+      wx.showToast({
+        title: '请选择领域添加',
+        icon: "none"
+      })
+    },
+    addToCart(e) {
+      let {
+        item
+      } = e.currentTarget.dataset;
+      _Http.basic({
+        "id": 20220924095102,
+        "content": {
+          "sa_brandid": item.brand[0].sa_brandid, //品牌id
+          "itemid": item.itemid, //货品id
+          "qty": 1, //数量
+          "itemno": item.itemno, //货品编号
+          tradefield: item.tradefield[e.detail.value || 0].tradefield || ''
+        },
+      }).then(res => {
+        console.log("加入购物车", res)
+        if (res.msg != '成功') return wx.showToast({
+          title: res.msg,
+          icon: "none"
+        });
+
+        _Http.basic({
+          "id": 20220927093202,
+          "content": {}
+        }, false).then(res => {
+          console.log("购物车数量", res)
+          getApp().globalData.num = res.data.num;
+          if (this.data.userrole == '经销商') getCurrentPages()[getCurrentPages().length - 1].selectComponent("#Float").setNum(res.data.num)
+          setTimeout(() => {
+            wx.showToast({
+              title: '加入成功',
+              icon: "none",
+              icon: "none"
+            });
+          }, 200);
+        });
+      })
+    }
   }
 })

+ 19 - 16
packageA/tool/modules/list/index.scss

@@ -1,4 +1,5 @@
 .product {
+	position: relative;
 	display: flex;
 	width: 100vw;
 	padding: 20rpx 30rpx;
@@ -68,26 +69,28 @@
 		}
 
 		.price {
-			display: flex;
-			width: 100%;
 			height: 40rpx;
-			align-items: center;
-			justify-content: space-between;
+			line-height: 40rpx;
 			margin-top: 14rpx;
-
-			view {
-				font-size: 28rpx;
-				font-family: PingFang SC-Medium, PingFang SC;
-				font-weight: 550;
-				color: #3874F6;
-			}
-
-			text {
-				font-size: 24rpx;
-				color: #888888;
-			}
+			font-size: 28rpx;
+			font-family: PingFang SC-Medium, PingFang SC;
+			font-weight: 550;
+			color: #3874F6;
 		}
 	}
+
+	.icon-gouwuche {
+		position: absolute;
+		height: 80rpx;
+		line-height: 90rpx;
+		width: 120rpx;
+		border-radius: 8rpx;
+		font-size: 28rpx;
+		color: #FA8C16;
+		bottom: 6rpx;
+		right: 0rpx;
+		text-align: center;
+	}
 }
 
 .line-1 {

+ 10 - 4
packageA/tool/modules/list/index.wxml

@@ -1,4 +1,5 @@
-<navigator class="product" url="/packageA/market/detail?id={{item.sa_itemgroupid}}&itemno={{item.itemno}}&istool=1" wx:for="{{list}}" wx:key="index">
+<!-- /packageA/market/detail?id={{item.sa_itemgroupid}}&itemno={{item.itemno}}&istool=1 -->
+<view class="product" wx:for="{{list}}" wx:key="index">
     <view class="image-box">
         <van-image width="100%" wx:if="{{item.attinfos[0]}}" height="100%" fit="cover" src="{{item.attinfos[0].subfiles[0].url}}" use-loading-slot use-error-slot lazy-load>
             <van-loading slot="loading" type="spinner" size="20" vertical />
@@ -19,10 +20,15 @@
         </view>
         <view class="price">
             <view>
-                ¥ {{item.gradeprice}}
+                ¥ {{item.marketprice}}/{{item.unitname}}
             </view>
-            <text>× {{item.unitname}}</text>
         </view>
+        <block wx:if="{{userrole!='业务员'}}">
+            <picker wx:if="{{item.tradefield.length>=2}}" range='{{item.tradefield}}' range-key='tradefield' data-item="{{item}}" bindchange='addToCart'>
+                <navigator url="#" class="iconfont icon-gouwuche" bindtap="showTips" />
+            </picker>
+            <navigator url="#" class="iconfont icon-gouwuche" data-item="{{item}}" bindtap="addToCart" />
+        </block>
     </view>
-</navigator>
+</view>
 <Yl_Empty wx:if="{{list.length === 0}}" />

+ 2 - 5
packageA/toolBill/detail.js

@@ -270,16 +270,13 @@ Page({
 		this.partialRenewal();
 	},
 	onUnload() {
-		return; 
 		console.log("更新列表数据")
 		let page = getCurrentPages().find(v => v.__route__ == 'packageA/toolBill/index');
 		let content = JSON.parse(JSON.stringify(page.data.content));
-
 		content.pageNumber = 1;
-		content.pageSize = page.data.list.length + 3;
-
+		content.pageSize = (page.data.content.pageNumber - 1) * page.data.content.pageSize;
 		_Http.basic({
-			"id": 20230111141104,
+			"id": 20230105161503,
 			content
 		}).then(res => {
 			console.log("更新订单列表", res)

+ 0 - 4
packageA/toolBill/index.js

@@ -85,10 +85,6 @@ Page({
         });
         this.getList(true);
     },
-    onShow(){
-        // thisgetList
-        this.getList(true);
-    },
     onReady() {
         this.setListHeight()
     },

+ 1 - 1
pages/login/modules/agreement.js

@@ -29,7 +29,7 @@ Component({
                 title: '加载中...',
             })
             wx.downloadFile({
-                url: 'https://mdyossys.obs.cn-east-3.myhuaweicloud.com/resources/%E7%BE%8E%E5%A4%A7CRM%E5%B0%8F%E7%A8%8B%E5%BA%8F%E9%9A%90%E7%A7%81%E4%BF%9D%E6%8A%A4%E6%8C%87%E5%BC%95.docx',
+                url: 'https://yossys80658.obs.cn-east-2.myhuaweicloud.com/system/E%E8%AE%A2%E5%8D%95%E9%9A%90%E7%A7%81%E4%BF%9D%E6%8A%A4.docx',
                 success: (res) => {
                     wx.openDocument({
                         filePath: res.tempFilePath,

+ 60 - 0
pages/tabbar/mine/address/index.js

@@ -0,0 +1,60 @@
+const _Http = getApp().globalData.http;
+Page({
+  data: {
+    "content": {
+      nocache: true,
+      sys_enterpriseid: "",
+      pageNumber: 1,
+      pageTotal: 1,
+      "where": {
+        "condition": "",
+        "workaddress": 1
+      }
+    }
+  },
+  onLoad(options) {
+    this.setData({
+      "content.sys_enterpriseid": options.id
+    })
+    this.getList(true);
+  },
+  /* 获取产品 */
+  getList(init = false) {
+    if (init.detail != undefined) init = init.detail;
+    let content = this.data.content;
+    if (init) content.pageNumber = 1;
+    if (content.pageNumber > content.pageTotal) return;
+    _Http.basic({
+      "id": "20221009155803",
+      content
+    }).then(res => {
+      console.log("我的地址列表", res)
+      this.selectComponent('#ListBox').RefreshToComplete();
+      if (res.msg != '成功') return wx.showToast({
+        title: res.msg,
+        icon: "none",
+        mask: true
+      });
+      content.pageNumber = res.pageNumber + 1;
+      content.pageTotal = res.pageTotal;
+      this.setData({
+        list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+      })
+    })
+  },
+  /* 开始搜索 */
+  onSearch({
+    detail
+  }) {
+    if (detail == this.data.content.where.condition) return;
+    this.data.content.where.condition = detail;
+    this.getList(true);
+  },
+  onClear(e) {
+    this.data.content.where.condition = "";
+    this.getList(true);
+  },
+  onReady() {
+    this.selectComponent("#ListBox").setHeight(".top", this);
+  }
+})

+ 5 - 0
pages/tabbar/mine/address/index.json

@@ -0,0 +1,5 @@
+{
+  "usingComponents": {
+    "List": "./modules/list/index"
+  }
+}

+ 0 - 0
pages/tabbar/mine/address/index.scss


+ 7 - 0
pages/tabbar/mine/address/index.wxml

@@ -0,0 +1,7 @@
+<van-search class="top" value="{{ content.where.condition }}" use-action-slot placeholder="请输入搜索关键词" bind:search="onSearch" bind:clear='onClear'>
+	<navigator url="/pages/tabbar/mine/address/update?id={{content.sys_enterpriseid}}" slot="action">添加地址</navigator>
+</van-search>
+<Yl_ListBox id='ListBox' bind:getlist='getList'>
+	<view style="height: 20rpx;" />
+	<List list="{{list}}" />
+</Yl_ListBox>

+ 11 - 0
pages/tabbar/mine/address/modules/list/index.js

@@ -0,0 +1,11 @@
+Component({
+  properties: {
+    list: Array
+  },
+  data: {
+
+  },
+  methods: {
+
+  }
+})

+ 4 - 0
pages/tabbar/mine/address/modules/list/index.json

@@ -0,0 +1,4 @@
+{
+  "component": true,
+  "usingComponents": {}
+}

+ 35 - 0
pages/tabbar/mine/address/modules/list/index.scss

@@ -0,0 +1,35 @@
+.item {
+    width: 100vw;
+    margin-bottom: 20rpx;
+    background-color: #ffffff;
+
+    .content {
+        position: relative;
+        padding: 20rpx 30rpx;
+        padding-top: 0;
+        box-sizing: border-box;
+
+        .num {
+            height: 40rpx;
+            line-height: 40rpx;
+            font-size: 28rpx;
+            color: #333333;
+            padding: 20rpx 0 10rpx;
+            font-weight: 700;
+        }
+
+        .exp {
+            line-height: 34rpx;
+            font-size: 24rpx;
+            margin-bottom: 8rpx;
+            color: #999999;
+        }
+    }
+}
+
+/* 文本行数限制 */
+.line-1 {
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
+}

+ 15 - 0
pages/tabbar/mine/address/modules/list/index.wxml

@@ -0,0 +1,15 @@
+<view class="item" wx:for="{{list}}" wx:key="index">
+	<navigator url="#" class="content">
+		<view class="num">
+			{{item.name}} {{item.phonenumber}}
+		</view>
+		<view class="exp">
+			省市县:{{(item.province + item.city + item.county)||" --"}}
+		</view>
+		<view class="exp">
+			地址:{{item.address|| ' --'}}
+		</view>
+	</navigator>
+</view>
+
+<Yl_Empty wx:if="{{list.length==0}}" />

+ 121 - 0
pages/tabbar/mine/address/update.js

@@ -0,0 +1,121 @@
+const _Http = getApp().globalData.http;
+let sys_enterpriseid = null;
+Page({
+    data: {
+        form: [{
+            label: "联系人",
+            error: false,
+            errMsg: "",
+            type: "text",
+            value: "",
+            placeholder: "请填写",
+            valueName: "name",
+            required: true,
+            checking: "base"
+        }, {
+            label: "手机号",
+            error: false,
+            errMsg: "",
+            type: "number",
+            value: "",
+            placeholder: "联系人手机号码",
+            valueName: "phonenumber",
+            required: true,
+            checking: "phone"
+        }, {
+            label: "省市县",
+            error: false,
+            errMsg: "",
+            type: "region",
+            value: [],
+            placeholder: "省,市,县",
+            valueName: "region",
+            required: true
+        }, {
+            label: "详细地址",
+            error: false,
+            errMsg: "",
+            type: "textarea",
+            value: "",
+            placeholder: "例: 科创园11栋1103室",
+            valueName: "address",
+            required: true,
+            checking: "base"
+        }, {
+            label: "备注",
+            error: false,
+            errMsg: "",
+            type: "textarea",
+            value: "",
+            placeholder: "地址说明",
+            valueName: "remarks",
+            required: false,
+            checking: "base"
+        }],
+        disabled: true
+    },
+    onLoad(options) {
+        sys_enterpriseid = options.id
+    },
+    submit() {
+        let content = Object.assign({
+            "contactsid": 0,
+            sys_enterpriseid,
+            sex: "男",
+            "name": "",
+            "depname": "",
+            "position": "",
+            "isleader": 1,
+            "birthday": "",
+            "phonenumber": "",
+            "email": "",
+            "address": "",
+            "remarks": "",
+            "workaddress": 1,
+            "isdefault": 0
+        }, this.selectComponent("#Form").submit());
+        content.province = content.region[0] || "";
+        content.city = content.region[1] || "";
+        content.county = content.region[2] || "";
+        delete(content.region);
+        _Http.basic({
+            id: 20221009155703,
+            content
+        }).then(res => {
+            console.log("新建地址", res)
+            wx.showToast({
+                title: res.msg != '成功' ? res.msg : "添加成功",
+                icon: "none",
+                mask: true
+            });
+            if (res.msg == '成功') setTimeout(() => {
+                wx.navigateBack();
+                let page = getCurrentPages().find(v => v.route == 'pages/tabbar/mine/address/index');
+                if (page) {
+                    let content = JSON.parse(JSON.stringify(page.data.content));
+                    content.pageNumber = 1;
+                    content.pageSize = (page.data.content.pageNumber - 1) * (page.data.content.pageSize || 20);
+                    _Http.basic({
+                        "id": "20221009155803",
+                        content
+                    }).then(res => {
+                        if (res.msg == '成功') page.setData({
+                            list: res.data
+                        })
+                    })
+                }
+            }, 500)
+
+
+
+        })
+    },
+    /* 表单是否填写完成 */
+    onConfirm({
+        detail
+    }) {
+        this.setData({
+            disabled: detail
+        })
+    },
+})

+ 3 - 0
pages/tabbar/mine/address/update.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 26 - 0
pages/tabbar/mine/address/update.scss

@@ -0,0 +1,26 @@
+.footer {
+	display: flex;
+	justify-content: center;
+	padding: 0 30rpx;
+	position: fixed;
+	width: 100vw;
+	height: 130rpx;
+	background: #FFFFFF;
+	box-shadow: 0px -4rpx 16rpx 2rpx rgba(150, 157, 165, 0.16);
+	bottom: 0;
+	box-sizing: border-box;
+	z-index: 9999;
+	padding-top: 10rpx;
+
+	.but {
+		width: 690rpx;
+		height: 90rpx;
+		background: var(--warning);
+		border-radius: 16rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC-Bold, PingFang SC;
+		font-weight: bold;
+		color: #fff;
+	}
+
+}

+ 5 - 0
pages/tabbar/mine/address/update.wxml

@@ -0,0 +1,5 @@
+<Yl_Field id='Form' form="{{form}}" bind:onConfirm='onConfirm' />
+
+<view class="footer">
+	<van-button custom-class='but' bind:click="submit" disabled='{{disabled}}'>保存地址</van-button>
+</view>

+ 1 - 0
pages/tabbar/mine/index.scss

@@ -53,6 +53,7 @@
     background-color: #fff;
     margin-top: 40rpx;
     border-radius: 16rpx;
+    overflow: hidden;
 
     .item {
         width: 100%;

+ 12 - 2
pages/tabbar/mine/index.wxml

@@ -14,7 +14,17 @@
 </view>
 
 <view class="operating">
-
+    <navigator class="item" wx:if="{{userMsg.enterprise.sys_enterpriseid}}" url="/pages/tabbar/mine/address/index?id={{userMsg.enterprise.sys_enterpriseid}}">
+        <view class="con">
+            <view class="label">
+                <text class="iconfont icon-a-wodemendianxinxidizhi" style="color: #085CDF;" />
+                我的地址
+            </view>
+            <view class="item-right">
+                <van-icon size='30rpx' name="arrow" />
+            </view>
+        </view>
+    </navigator>
     <navigator class="item" url="{{item.name=='团队管理'?item.path+'?auth='+teamAuth:item.path}}" wx:for="{{pathList}}">
         <view class="con">
             <view class="label">
@@ -43,7 +53,7 @@
             </view>
         </view>
     </navigator>
-    
+
 </view>
 <view style="width: 100vw;text-align: center;margin-top: 200rpx;">
     <van-button custom-class='out-login' color="#CCC" bindtap="outLogin" plain>退出登录</van-button>

+ 13 - 10
select/product/index.js

@@ -11,20 +11,22 @@ Page({
 		showName: "itemname"
 	},
 	onLoad(options) {
-		if (options.item) {
-			let item = JSON.parse(options.item);
+		if (options.params) {
+			let params = JSON.parse(options.params);
+			if (!params.content.pageNumber || !params.content.pageTotal) {
+				params.content.pageNumber = 1;
+				params.content.pageTotal = 1;
+			}
 			this.setData({
-				item,
-				params: item.params
+				params
 			});
-		}
-		if (options.params) this.setData({
-			params: JSON.parse(options.params)
-		});
+		};
 		this.setData({
 			radio: options.radio ? true : false,
 			idname: options.idname || this.data.idname,
 			showName: options.showName || this.data.showName,
+			newPrice: options.newprice || "marketprice", //红色价格
+			oldPrice: options.oldprice || "oldprice" //对比老价格
 		});
 		this.getList()
 	},
@@ -49,13 +51,14 @@ Page({
 					value.cover = image ? image.cover : "";
 				}
 				value.gradeprice && (value.gradeprice = (value.gradeprice - 0).toFixed(2));
+				value.marketprice && (value.marketprice = (value.marketprice - 0).toFixed(2));
 				value.price && (value.price = (value.price - 0).toFixed(2));
 				value.oldprice && (value.oldprice = (value.oldprice - 0).toFixed(2));
+				value.contractprice && (value.contractprice = (value.contractprice - 0).toFixed(2));
 				value.brandName = value.brand.map(name => name.brandname)
 				value.tradefields = value.tradefield.map(name => name.tradefield)
 				return value;
 			})
-
 			this.setData({
 				'params.content.pageNumber': res.pageNumber + 1,
 				'params.content.pageTotal': res.pageTotal,
@@ -139,6 +142,6 @@ Page({
 	onUnload() {
 		//回收数据
 		getApp().globalData.handleSelect = null;
-		
+
 	}
 })

+ 4 - 1
select/product/index.scss

@@ -1,4 +1,5 @@
 @import "./index.skeleton.wxss";
+
 page {
 	height: 100vh;
 	overflow: hidden;
@@ -107,8 +108,10 @@ page {
 		line-height: 72rpx;
 
 		text {
-			display: inline-block;
 			width: 50%;
+			display: inline-block;
+			box-sizing: border-box;
+			padding: 4rpx;
 		}
 	}
 }

+ 3 - 3
select/product/index.wxml

@@ -24,13 +24,13 @@
                     领域:{{item.tradefields}}
                 </view>
                 <view class="price line-1">
-                    价格:<text class="num">¥{{item.marketprice}}元</text><text wx:if="{{item.marketprice<item.oldprice}}" style="text-decoration:line-through; color:#999;">/{{item.oldprice}}</text>
+                    价格:<text class="num">¥{{item[newPrice]}}元</text><text wx:if="{{item[newPrice]<item[oldPrice]}}" style="text-decoration:line-through; color:#999;">/{{item[oldPrice]}}</text>
                 </view>
             </view>
         </view>
         <view class="bot">
-            <text>型号:{{item.model||' --'}}</text>
-            <text>规格:{{item.spec||' --'}}</text>
+            <text style="padding-left:0;" class="line-1">型号:{{item.model||' --'}}</text>
+            <text class="line-1">规格:{{item.spec||' --'}}</text>
         </view>
     </navigator>
     <view wx:if="{{!radio}}" style="height: 130rpx;" />

+ 7 - 7
static/font-icon.wxss

@@ -2,9 +2,9 @@
 
 @font-face {
   font-family: "iconfont"; /* Project id 3830173 */
-  src: url('//at.alicdn.com/t/c/font_3830173_11m2ocmmf9gh.woff2?t=1675318503223') format('woff2'),
-       url('//at.alicdn.com/t/c/font_3830173_11m2ocmmf9gh.woff?t=1675318503223') format('woff'),
-       url('//at.alicdn.com/t/c/font_3830173_11m2ocmmf9gh.ttf?t=1675318503223') format('truetype');
+  src: url('//at.alicdn.com/t/c/font_3830173_6rnbwvxgkvh.woff2?t=1677303238642') format('woff2'),
+       url('//at.alicdn.com/t/c/font_3830173_6rnbwvxgkvh.woff?t=1677303238642') format('woff'),
+       url('//at.alicdn.com/t/c/font_3830173_6rnbwvxgkvh.ttf?t=1677303238642') format('truetype');
 }
 
 .iconfont {
@@ -15,6 +15,10 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-a-wodemendianxinxidizhi:before {
+  content: "\e64b";
+}
+
 .icon-a-biaoqianlanzhiku:before {
   content: "\e608";
 }
@@ -215,10 +219,6 @@
   content: "\e64a";
 }
 
-.icon-xiaoxigundong:before {
-  content: "\e674";
-}
-
 .icon-E-dingdanxitong:before {
   content: "\e675";
 }

+ 6 - 0
utils/Http.js

@@ -1,6 +1,12 @@
+<<<<<<< HEAD
 // const baseUrl = "https://meida.cnyunl.com/yos/rest/index";
 const baseUrl = "http://61.164.207.46:8000/yos/rest/index";
 // const baseUrl = "http://122.226.136.204:8082/yos/rest/index";
+=======
+// const baseUrl = "http://61.164.207.46:8000/yos/rest/index";
+const baseUrl = "http://122.226.136.204:8082/yos/rest/index";
+// const baseUrl = "https://oms.idcgroup.com.cn:8079/yos/rest/index";
+>>>>>>> 6d50bfc48456f82407384374f3ff23da1be150a5
 
 class HTTP {
     request({