Kaynağa Gözat

销售订单

xiaohaizhao 3 yıl önce
ebeveyn
işleme
04e38e6d0e
42 değiştirilmiş dosya ile 542 ekleme ve 315 silme
  1. 7 9
      app.json
  2. 0 0
      packageA/orderForm/add/add.js
  3. 0 0
      packageA/orderForm/add/add.json
  4. 0 0
      packageA/orderForm/add/add.scss
  5. 0 0
      packageA/orderForm/add/add.skeleton.wxml
  6. 0 0
      packageA/orderForm/add/add.skeleton.wxss
  7. 0 0
      packageA/orderForm/add/add.wxml
  8. 1 1
      packageA/orderForm/add/float/index.js
  9. 0 0
      packageA/orderForm/add/float/index.json
  10. 0 0
      packageA/orderForm/add/float/index.scss
  11. 0 0
      packageA/orderForm/add/float/index.wxml
  12. 2 6
      packageA/orderForm/detail.js
  13. 2 2
      packageA/orderForm/detail.json
  14. 184 0
      packageA/orderForm/index.js
  15. 1 2
      packageA/orderForm/index.json
  16. 183 0
      packageA/orderForm/index.scss
  17. 0 1
      packageA/orderForm/index.wxml
  18. 0 0
      packageA/orderForm/modules/list/index.js
  19. 0 0
      packageA/orderForm/modules/list/index.json
  20. 0 0
      packageA/orderForm/modules/list/index.scss
  21. 0 0
      packageA/orderForm/modules/list/index.wxml
  22. 2 2
      packageA/orderForm/modules/product/index.js
  23. 0 0
      packageA/orderForm/modules/product/index.json
  24. 1 0
      packageA/orderForm/modules/product/index.scss
  25. 0 0
      packageA/orderForm/modules/product/index.wxml
  26. 0 0
      packageA/orderForm/modules/product/list/index.js
  27. 0 0
      packageA/orderForm/modules/product/list/index.json
  28. 0 0
      packageA/orderForm/modules/product/list/index.scss
  29. 0 0
      packageA/orderForm/modules/product/list/index.wxml
  30. 0 0
      packageA/orderForm/modules/progress/index.js
  31. 0 0
      packageA/orderForm/modules/progress/index.json
  32. 0 0
      packageA/orderForm/modules/progress/index.scss
  33. 0 0
      packageA/orderForm/modules/progress/index.wxml
  34. 79 0
      packageA/orderForm/modules/setBrand/index.js
  35. 0 0
      packageA/orderForm/modules/setBrand/index.json
  36. 0 0
      packageA/orderForm/modules/setBrand/index.scss
  37. 21 0
      packageA/orderForm/modules/setBrand/index.wxml
  38. 0 188
      pages/index/orderForm/index.js
  39. 0 12
      pages/index/orderForm/index.scss
  40. 0 1
      pages/index/orderForm/modules/product/index.scss
  41. 57 70
      pages/index/orderForm/modules/setBrand/index.js
  42. 2 21
      pages/index/orderForm/modules/setBrand/index.wxml

+ 7 - 9
app.json

@@ -12,18 +12,15 @@
     "pages/teams/addRole",
     "pages/teams/addRole",
     "pages/tabbar/mine/address/index",
     "pages/tabbar/mine/address/index",
     "pages/tabbar/mine/address/update",
     "pages/tabbar/mine/address/update",
-    "pages/index/index"
+    "pages/index/index",
+    "pages/index/orderForm/modules/setBrand/index"
   ],
   ],
-  "subpackages": [
-    {
+  "subpackages": [{
       "root": "packageA",
       "root": "packageA",
       "pages": [
       "pages": [
         "options/index",
         "options/index",
         "market/detail",
         "market/detail",
-        "orderForm/index",
         "orderForm/detail",
         "orderForm/detail",
-        "orderForm/add/add",
-        "orderForm/modules/setBrand/index",
         "shipment/index",
         "shipment/index",
         "shipment/detail",
         "shipment/detail",
         "account/index",
         "account/index",
@@ -45,7 +42,9 @@
         "market/selected/index",
         "market/selected/index",
         "dispatchBill/index",
         "dispatchBill/index",
         "dispatchBill/detail",
         "dispatchBill/detail",
-        "activity/selectProduct/index"
+        "activity/selectProduct/index",
+        "orderForm/index",
+        "orderForm/add/add"
       ]
       ]
     },
     },
     {
     {
@@ -113,8 +112,7 @@
     "color": "#000000",
     "color": "#000000",
     "selectedColor": "#000000",
     "selectedColor": "#000000",
     "backgroundColor": "#000000",
     "backgroundColor": "#000000",
-    "list": [
-      {
+    "list": [{
         "pagePath": "pages/tabbar/home/index"
         "pagePath": "pages/tabbar/home/index"
       },
       },
       {
       {

+ 0 - 0
pages/index/orderForm/add/add.js → packageA/orderForm/add/add.js


+ 0 - 0
pages/index/orderForm/add/add.json → packageA/orderForm/add/add.json


+ 0 - 0
pages/index/orderForm/add/add.scss → packageA/orderForm/add/add.scss


+ 0 - 0
pages/index/orderForm/add/add.skeleton.wxml → packageA/orderForm/add/add.skeleton.wxml


+ 0 - 0
pages/index/orderForm/add/add.skeleton.wxss → packageA/orderForm/add/add.skeleton.wxss


+ 0 - 0
pages/index/orderForm/add/add.wxml → packageA/orderForm/add/add.wxml


+ 1 - 1
pages/index/orderForm/add/float/index.js → packageA/orderForm/add/float/index.js

@@ -17,7 +17,7 @@ Component({
         /* 挑选新增订单类型 */
         /* 挑选新增订单类型 */
         onSelect() {
         onSelect() {
             return wx.navigateTo({
             return wx.navigateTo({
-                url: '/pages/index/orderForm/add/add?type=标准订单',
+                url: '/packageA/orderForm/add/add?type=标准订单',
             })
             })
             this.setData({
             this.setData({
                 actionShow: true
                 actionShow: true

+ 0 - 0
pages/index/orderForm/add/float/index.json → packageA/orderForm/add/float/index.json


+ 0 - 0
pages/index/orderForm/add/float/index.scss → packageA/orderForm/add/float/index.scss


+ 0 - 0
pages/index/orderForm/add/float/index.wxml → packageA/orderForm/add/float/index.wxml


+ 2 - 6
packageA/orderForm/detail.js

@@ -521,11 +521,7 @@ Page({
         })
         })
     },
     },
     onUnload() {
     onUnload() {
-        let page = getCurrentPages().find(v => v.__route__ == "pages/index/index")
-        if (page) {
-            let model = page.selectComponent("#OrderForm");
-            console.log(model)
-            model.updateList && model.updateList()
-        }
+        let page = getCurrentPages().find(v => v.__route__ == "packageA/orderForm/index")
+        if (page) page.updateList && page.updateList()
     }
     }
 })
 })

+ 2 - 2
packageA/orderForm/detail.json

@@ -1,7 +1,7 @@
 {
 {
     "usingComponents": {
     "usingComponents": {
-        "Product": "/pages/index/orderForm/modules/product/index",
+        "Product": "./modules/product/index",
         "Yl_Attachment": "/components/Yl_Attachment/index",
         "Yl_Attachment": "/components/Yl_Attachment/index",
-        "Progress": "/pages/index/orderForm/modules/progress/index"
+        "Progress": "./modules/progress/index"
     }
     }
 }
 }

+ 184 - 0
packageA/orderForm/index.js

@@ -0,0 +1,184 @@
+const _Http = getApp().globalData.http;
+import currency from "../../utils/currency";
+let content = null,
+  downCount = null;
+Page({
+  data: {
+    CustomBar: getApp().globalData.CustomBar,
+    filtratelist: [{
+      label: "品牌",
+      index: null,
+      showName: "brandname", //显示字段
+      valueKey: "brandname", //返回Key
+      selectKey: "brandname", //传参 代表选着字段 不传参返回整个选择对象
+      value: "", //选中值
+      list: []
+    }, {
+      label: "领域",
+      index: null,
+      showName: "tradefield", //显示字段
+      valueKey: "tradefield", //返回Key
+      selectKey: "tradefield", //传参 代表选着字段 不传参返回整个选择对象
+      value: "", //选中值
+      list: []
+    }]
+  },
+  onLoad(options) {
+    content = {
+      nocache: true,
+      "isExport": 0,
+      "pageNumber": 1,
+      "pageTotal": 1,
+      pageSize: 20,
+      "where": {
+        "condition": "",
+        "status": "",
+        "brandname": "",
+        "tradefield": ""
+      }
+    };
+    this.getList()
+    this.getBrand()
+    this.getDomain()
+  },
+  /* 获取产品 */
+  getList(init = false) {
+    if (init.detail != undefined) init = init.detail;
+    if (init) content.pageNumber = 1;
+    if (content.pageNumber > content.pageTotal) return;
+    this.setListHeight();
+    _Http.basic({
+      "id": 20221224180302,
+      content
+    }).then(res => {
+      console.log("订单列表", res)
+      this.selectComponent('#ListBox').RefreshToComplete();
+      /* 格式化价格 */
+      if (res.data.length != 0) res.data = res.data.map(v => {
+        v.defaultamount = currency(v.defaultamount, {
+          symbol: "¥",
+          precision: 2
+        }).format();
+        return v
+      })
+      content.pageNumber = res.pageNumber + 1
+      content.pageTotal = res.pageTotal
+      this.setData({
+        list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
+        total: res.total,
+        amount: currency(res.tips.amount, {
+          symbol: "¥",
+          precision: 2
+        }).format()
+      })
+    })
+  },
+  /* 更新列表 */
+  updateList() {
+    let params = JSON.parse(JSON.stringify(content));
+    params.pageSize = (params.pageNumber - 1) * params.pageSize;
+    params.pageNumber = 1;
+    _Http.basic({
+      "id": 20221224180302,
+      content: params
+    }).then(res => {
+      console.log("订单列表", res)
+      if (res.msg != '成功') return;
+      /* 格式化价格 */
+      if (res.data.length != 0) res.data = res.data.map(v => {
+        v.defaultamount = currency(v.defaultamount, {
+          symbol: "¥",
+          precision: 2
+        }).format();
+        return v
+      })
+      this.setData({
+        list: res.data,
+        total: res.total,
+        amount: currency(res.tips.amount, {
+          symbol: "¥",
+          precision: 2
+        }).format()
+      })
+    })
+  },
+  /* 切换tabs */
+  tabsChange(e) {
+    let status = "";
+    switch (e.detail.title) {
+      case '全部':
+        status = "";
+        break;
+      case '待确认':
+        status = "交期待确认";
+        break;
+      default:
+        status = e.detail.title
+        break;
+    }
+    content.where.status = status;
+    this.getList(true);
+  },
+  /* 搜索 */
+  onSearch({
+    detail
+  }) {
+    content.where.condition = detail;
+    this.getList(true)
+  },
+  /* 获取品牌 */
+  getBrand() {
+    _Http.basic({
+      "id": 20220924163702,
+      "content": {
+        "pageSize": 9999,
+      }
+    }, false).then(res => {
+      console.log("查询品牌", res)
+      if (res.msg == '成功') this.setData({
+        "filtratelist[0].list": res.data
+      });
+    })
+  },
+  /* 获取领域 */
+  getDomain() {
+    _Http.basic({
+      "id": 20221223141802,
+      "content": {
+        "pageNumber": 1,
+        "pageSize": 9999,
+        "where": {
+          "condition": ""
+        }
+      }
+    }, false).then(res => {
+      console.log("获取领域", res)
+      if (res.msg == '成功') this.setData({
+        "filtratelist[1].list": res.data
+      });
+    })
+  },
+  /* 设置页面高度 */
+  setListHeight() {
+    this.selectComponent("#ListBox").setHeight(".tips", this);
+  },
+  showModal(e) {
+    this.setData({
+      modalName: e.currentTarget.dataset.target
+    })
+  },
+  hideModal(e) {
+    this.setData({
+      modalName: null
+    })
+  },
+  handleFiltrate({
+    detail
+  }) {
+    content.where.brandname = detail.brandname;
+    content.where.tradefield = detail.tradefield;
+    downCount = setTimeout(() => {
+      this.getList(true);
+    }, 300);
+  }
+})

+ 1 - 2
pages/index/orderForm/index.json → packageA/orderForm/index.json

@@ -1,7 +1,6 @@
 {
 {
-  "component": true,
   "usingComponents": {
   "usingComponents": {
-    "Filtrate": "../market/modules/filtrate/index",
+    "Filtrate": "../../pages/index/market/modules/filtrate/index",
     "List": "./modules/list/index",
     "List": "./modules/list/index",
     "Float": "./add/float/index"
     "Float": "./add/float/index"
   }
   }

+ 183 - 0
packageA/orderForm/index.scss

@@ -0,0 +1,183 @@
+.search-right {
+	padding: 0 10rpx !important;
+}
+
+.tips {
+	width: 750rpx;
+	text-align: center;
+	height: 64rpx;
+	line-height: 64rpx;
+	background: #FFEFD9;
+	font-size: 28rpx;
+	font-family: PingFang SC-Semibold, PingFang SC;
+	font-weight: 600;
+	color: #FA8C16;
+}
+
+page {
+	width: 100vw;
+	overflow: hidden;
+}
+
+.groud {
+	width: 100%;
+	padding: 30rpx;
+	border-bottom: 1px solid #DDDDDD;
+
+	.label {
+		height: 40rpx;
+		font-size: 28rpx;
+		font-family: PingFang SC-Regular, PingFang SC;
+		color: #333333;
+	}
+
+	.content {
+		display: flex;
+		flex-wrap: wrap;
+		width: 100%;
+
+
+
+		.but {
+			width: 188rpx;
+			height: 72rpx;
+			background: #F5F5F5;
+			border-radius: 8rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			color: #333333;
+			box-sizing: border-box;
+			margin-right: 20rpx;
+			margin-top: 20rpx;
+			padding: 0;
+		}
+
+		.active {
+			border: 1px solid #3874F6;
+			color: #3874F6;
+			font-weight: bold;
+			background-color: #F5F5F5;
+		}
+	}
+
+	.time {
+		.partition {
+			margin-right: 20rpx;
+			display: flex;
+			align-items: center;
+		}
+
+		.tbox {
+			width: 220rpx;
+			height: 72rpx;
+			text-align: center;
+			line-height: 72rpx;
+			background: #F5F5F5;
+			border-radius: 8rpx;
+			font-size: 28rpx;
+			font-family: PingFang SC-Regular, PingFang SC;
+			color: #333333;
+			box-sizing: border-box;
+			margin-right: 20rpx;
+			margin-top: 20rpx;
+		}
+	}
+}
+
+.DrawerPage {
+	position: fixed;
+	width: 100vw;
+	height: 100vh;
+	left: 0vw;
+	background-color: #f1f1f1;
+	transition: all 0.4s;
+}
+
+.DrawerPage.show {
+	transform: scale(0.9, 0.9);
+	left: 85vw;
+	box-shadow: 0 0 60rpx rgba(0, 0, 0, 0.2);
+	transform-origin: 0;
+}
+
+.DrawerWindow {
+	position: absolute;
+	width: 85vw;
+	height: 100vh;
+	left: 0;
+	top: 0;
+	transform: scale(0.9, 0.9) translateX(-100%);
+	opacity: 0;
+	pointer-events: none;
+	transition: all 0.4s;
+}
+
+.DrawerWindow.show {
+	transform: scale(1, 1) translateX(0%);
+	opacity: 1;
+	pointer-events: all;
+}
+
+.DrawerClose {
+	position: absolute;
+	width: 40vw;
+	height: 100vh;
+	right: 0;
+	top: 0;
+	color: transparent;
+	padding-bottom: 30rpx;
+	display: flex;
+	align-items: flex-end;
+	justify-content: center;
+	background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.6));
+	letter-spacing: 5px;
+	font-size: 50rpx;
+	opacity: 0;
+	pointer-events: none;
+	transition: all 0.4s;
+}
+
+.DrawerClose.show {
+	opacity: 1;
+	pointer-events: all;
+	width: 15vw;
+	color: #fff;
+}
+
+.DrawerPage .cu-bar.tabbar .action button.icon {
+	width: 64rpx;
+	height: 64rpx;
+	line-height: 64rpx;
+	margin: 0;
+	display: inline-block;
+}
+
+.DrawerPage .cu-bar.tabbar .action .cu-avatar {
+	margin: 0;
+}
+
+.DrawerPage .nav {
+	flex: 1;
+}
+
+.DrawerPage .nav .cu-item.cur {
+	border-bottom: 0;
+	position: relative;
+}
+
+.DrawerPage .nav .cu-item.cur::after {
+	content: "";
+	width: 10rpx;
+	height: 10rpx;
+	background-color: currentColor;
+	position: absolute;
+	bottom: 10rpx;
+	border-radius: 10rpx;
+	left: 0;
+	right: 0;
+	margin: auto;
+}
+
+.DrawerPage .cu-bar.tabbar .action {
+	flex: initial;
+}

+ 0 - 1
pages/index/orderForm/index.wxml → packageA/orderForm/index.wxml

@@ -27,7 +27,6 @@
     <text class="cuIcon-pullright"></text>
     <text class="cuIcon-pullright"></text>
 </view>
 </view>
 <scroll-view scroll-y class="DrawerWindow  {{modalName=='viewModal'?'show':''}}">
 <scroll-view scroll-y class="DrawerWindow  {{modalName=='viewModal'?'show':''}}">
-    <view style="height:{{CustomBar}}px" />
     <view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg bg-white">
     <view class="cu-list menu card-menu margin-top-xl margin-bottom-xl shadow-lg bg-white">
         <Filtrate list='{{filtratelist}}' bindhandle='handleFiltrate' />
         <Filtrate list='{{filtratelist}}' bindhandle='handleFiltrate' />
     </view>
     </view>

+ 0 - 0
pages/index/orderForm/modules/list/index.js → packageA/orderForm/modules/list/index.js


+ 0 - 0
pages/index/orderForm/modules/list/index.json → packageA/orderForm/modules/list/index.json


+ 0 - 0
pages/index/orderForm/modules/list/index.scss → packageA/orderForm/modules/list/index.scss


+ 0 - 0
pages/index/orderForm/modules/list/index.wxml → packageA/orderForm/modules/list/index.wxml


+ 2 - 2
pages/index/orderForm/modules/product/index.js → packageA/orderForm/modules/product/index.js

@@ -1,6 +1,6 @@
 const _Http = getApp().globalData.http,
 const _Http = getApp().globalData.http,
-    file = require("../../../../../utils/FormatTheAttachment"),
-    currency = require("../../../../../utils/currency");
+    file = require("../../../../utils/FormatTheAttachment"),
+    currency = require("../../../../utils/currency");
 let queue = [],
 let queue = [],
     downCounter = null,
     downCounter = null,
     sa_orderid = 0,
     sa_orderid = 0,

+ 0 - 0
pages/index/orderForm/modules/product/index.json → packageA/orderForm/modules/product/index.json


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

@@ -0,0 +1 @@
+@import "../../../../static/common-head.scss";

+ 0 - 0
pages/index/orderForm/modules/product/index.wxml → packageA/orderForm/modules/product/index.wxml


+ 0 - 0
pages/index/orderForm/modules/product/list/index.js → packageA/orderForm/modules/product/list/index.js


+ 0 - 0
pages/index/orderForm/modules/product/list/index.json → packageA/orderForm/modules/product/list/index.json


+ 0 - 0
pages/index/orderForm/modules/product/list/index.scss → packageA/orderForm/modules/product/list/index.scss


+ 0 - 0
pages/index/orderForm/modules/product/list/index.wxml → packageA/orderForm/modules/product/list/index.wxml


+ 0 - 0
pages/index/orderForm/modules/progress/index.js → packageA/orderForm/modules/progress/index.js


+ 0 - 0
pages/index/orderForm/modules/progress/index.json → packageA/orderForm/modules/progress/index.json


+ 0 - 0
pages/index/orderForm/modules/progress/index.scss → packageA/orderForm/modules/progress/index.scss


+ 0 - 0
pages/index/orderForm/modules/progress/index.wxml → packageA/orderForm/modules/progress/index.wxml


+ 79 - 0
packageA/orderForm/modules/setBrand/index.js

@@ -0,0 +1,79 @@
+const _Http = getApp().globalData.http;
+Page({
+  data: {
+    skeletonShow: false,
+    loading: false,
+    sa_brandid: null,
+    tradefield: null,
+    brandList: [],
+    domainList: []
+  },
+  onLoad(options) {
+    console.log(options)
+    _Http.basic({
+      "id": 20230105144102,
+      "content": {
+        nocache: true,
+        "sa_orderid": options.id
+      }
+    }).then(res => {
+      console.log(res)
+      this.setData({
+        brandList: res.data.brands,
+        domainList: res.data.tradefields,
+      })
+    })
+  },
+  /* 选择品牌 */
+  onSelectBrand(e) {
+    let {
+      item
+    } = e.currentTarget.dataset;
+    if (this.data.sa_brandid == item.sa_brandid) return;
+    this.setData({
+      sa_brandid: item.sa_brandid
+    })
+  },
+  /* 选择领域 */
+  onSelect(e) {
+    let {
+      item
+    } = e.currentTarget.dataset;
+    if (this.data.tradefield == item.tradefield) return;
+    this.setData({
+      tradefield: item.tradefield
+    })
+  },
+  submit() {
+    if (this.data.loading) return;
+    this.setData({
+      loading: true
+    })
+    _Http.basic({
+      "id": 20221108111402,
+      content: {
+        sa_orderid: 0,
+        sa_accountclassid: 0,
+        rec_contactsid: 0,
+        pay_enterpriseid: 0,
+        "sa_brandid": this.data.sa_brandid, //品牌ID
+        "type": "标准订单", //订单类型
+        "tradefield": this.data.tradefield, //必选
+      }
+    }).then(res => {
+      this.setData({
+        loading: false
+      })
+      console.log("创建标准订单", res);
+      wx.showToast({
+        title: res.msg != '成功' ? res.msg : '创建成功',
+        icon: "none"
+      });
+      if (res.msg == '成功') setTimeout(() => {
+        wx.redirectTo({
+          url: '/packageA/orderForm/detail?id=' + res.data.sa_orderid,
+        });
+      }, 500)
+    })
+  }
+})

+ 0 - 0
pages/index/orderForm/modules/setBrand/index.json → packageA/orderForm/modules/setBrand/index.json


+ 0 - 0
pages/index/orderForm/modules/setBrand/index.scss → packageA/orderForm/modules/setBrand/index.scss


+ 21 - 0
packageA/orderForm/modules/setBrand/index.wxml

@@ -0,0 +1,21 @@
+<view class="groud">
+	<view class="label">
+		选择品牌
+	</view>
+	<view class="content">
+		<van-button custom-class='but {{item.sa_brandid==sa_brandid?"active":""}}' wx:for="{{brandList}}" wx:key="sa_brandid" data-item="{{item}}" bindtap="onSelectBrand">{{item.brandname}}</van-button>
+	</view>
+</view>
+<view class="groud">
+	<view class="label">
+		选择领域
+	</view>
+	<view class="content">
+		<van-button custom-class='but {{item.tradefield==tradefield?"active":""}}' wx:for="{{domainList}}" wx:key="sys_enterprise_tradefieldid" data-item="{{item}}" bindtap="onSelect">{{item.tradefield}}</van-button>
+	</view>
+</view>
+<!-- 底部 -->
+<view style="height: 150rpx;" />
+<view class="footer">
+	<van-button custom-class='but' loading='{{loading}}' loading-text='创建中...' bindtap="submit">创建订单</van-button>
+</view>

+ 0 - 188
pages/index/orderForm/index.js

@@ -1,188 +0,0 @@
-const _Http = getApp().globalData.http;
-import currency from "../../../utils/currency";
-let content = {
-		nocache: true,
-		"isExport": 0,
-		"pageNumber": 1,
-		"pageTotal": 1,
-		pageSize: 20,
-		"where": {
-			"condition": "",
-			"status": "",
-			"brandname": "",
-			"tradefield": ""
-		}
-	},
-	downCount = null;
-Component({
-	data: {
-		CustomBar: getApp().globalData.CustomBar,
-		filtratelist: [{
-			label: "品牌",
-			index: null,
-			showName: "brandname", //显示字段
-			valueKey: "brandname", //返回Key
-			selectKey: "brandname", //传参 代表选着字段 不传参返回整个选择对象
-			value: "", //选中值
-			list: []
-		}, {
-			label: "领域",
-			index: null,
-			showName: "tradefield", //显示字段
-			valueKey: "tradefield", //返回Key
-			selectKey: "tradefield", //传参 代表选着字段 不传参返回整个选择对象
-			value: "", //选中值
-			list: []
-		}]
-	},
-	options: {
-		addGlobalClass: true
-	},
-	methods: {
-		init() {
-			this.getList()
-			this.getBrand()
-			this.getDomain()
-		},
-		/* 获取产品 */
-		getList(init = false) {
-			if (init.detail != undefined) init = init.detail;
-			if (init) content.pageNumber = 1;
-			if (content.pageNumber > content.pageTotal) return;
-			this.setListHeight();
-			_Http.basic({
-				"id": 20221224180302,
-				content
-			}).then(res => {
-				console.log("订单列表", res)
-				this.selectComponent('#ListBox').RefreshToComplete();
-				/* 格式化价格 */
-				if (res.data.length != 0) res.data = res.data.map(v => {
-					v.defaultamount = currency(v.defaultamount, {
-						symbol: "¥",
-						precision: 2
-					}).format();
-					return v
-				})
-				content.pageNumber = res.pageNumber + 1
-				content.pageTotal = res.pageTotal
-				this.setData({
-					list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data),
-					total: res.total,
-					amount: currency(res.tips.amount, {
-						symbol: "¥",
-						precision: 2
-					}).format()
-				})
-			})
-		},
-		/* 更新列表 */
-		updateList() {
-			let params = JSON.parse(JSON.stringify(content));
-			params.pageSize = (params.pageNumber - 1) * params.pageSize;
-			params.pageNumber = 1;
-			_Http.basic({
-				"id": 20221224180302,
-				content:params
-			}).then(res => {
-				console.log("订单列表", res)
-				if (res.msg != '成功') return;
-				/* 格式化价格 */
-				if (res.data.length != 0) res.data = res.data.map(v => {
-					v.defaultamount = currency(v.defaultamount, {
-						symbol: "¥",
-						precision: 2
-					}).format();
-					return v
-				})
-				this.setData({
-					list: res.data,
-					total: res.total,
-					amount: currency(res.tips.amount, {
-						symbol: "¥",
-						precision: 2
-					}).format()
-				})
-			})
-		},
-		/* 切换tabs */
-		tabsChange(e) {
-			let status = "";
-			switch (e.detail.title) {
-				case '全部':
-					status = "";
-					break;
-				case '待确认':
-					status = "交期待确认";
-					break;
-				default:
-					status = e.detail.title
-					break;
-			}
-			content.where.status = status;
-			this.getList(true);
-		},
-		/* 搜索 */
-		onSearch({
-			detail
-		}) {
-			content.where.condition = detail;
-			this.getList(true)
-		},
-		/* 获取品牌 */
-		getBrand() {
-			_Http.basic({
-				"id": 20220924163702,
-				"content": {
-					"pageSize": 9999,
-				}
-			}, false).then(res => {
-				console.log("查询品牌", res)
-				if (res.msg == '成功') this.setData({
-					"filtratelist[0].list": res.data
-				});
-			})
-		},
-		/* 获取领域 */
-		getDomain() {
-			_Http.basic({
-				"id": 20221223141802,
-				"content": {
-					"pageNumber": 1,
-					"pageSize": 9999,
-					"where": {
-						"condition": ""
-					}
-				}
-			}, false).then(res => {
-				console.log("获取领域", res)
-				if (res.msg == '成功') this.setData({
-					"filtratelist[1].list": res.data
-				});
-			})
-		},
-		/* 设置页面高度 */
-		setListHeight() {
-			this.selectComponent("#ListBox").setHeight(".tips", this);
-		},
-		showModal(e) {
-			this.setData({
-				modalName: e.currentTarget.dataset.target
-			})
-		},
-		hideModal(e) {
-			this.setData({
-				modalName: null
-			})
-		},
-		handleFiltrate({
-			detail
-		}) {
-			content.where.brandname = detail.brandname;
-			content.where.tradefield = detail.tradefield;
-			downCount = setTimeout(() => {
-				this.getList(true);
-			}, 300);
-		}
-	}
-})

+ 0 - 12
pages/index/orderForm/index.scss

@@ -1,12 +0,0 @@
-@import"../market/index.scss";
-.tips {
-	width: 750rpx;
-	text-align: center;
-	height: 64rpx;
-	line-height: 64rpx;
-	background: #FFEFD9;
-	font-size: 28rpx;
-	font-family: PingFang SC-Semibold, PingFang SC;
-	font-weight: 600;
-	color: #FA8C16;
-}

+ 0 - 1
pages/index/orderForm/modules/product/index.scss

@@ -1 +0,0 @@
-@import "../../../../../static/common-head.scss";

+ 57 - 70
pages/index/orderForm/modules/setBrand/index.js

@@ -1,79 +1,66 @@
-const _Http = getApp().globalData.http;
+// pages/index/orderForm/modules/setBrand/index.js
 Page({
 Page({
+
+  /**
+   * 页面的初始数据
+   */
   data: {
   data: {
-    skeletonShow: false,
-    loading: false,
-    sa_brandid: null,
-    tradefield: null,
-    brandList: [],
-    domainList: []
+
   },
   },
+
+  /**
+   * 生命周期函数--监听页面加载
+   */
   onLoad(options) {
   onLoad(options) {
-    console.log(options)
-    _Http.basic({
-      "id": 20230105144102,
-      "content": {
-        nocache: true,
-        "sa_orderid": options.id
-      }
-    }).then(res => {
-      console.log(res)
-      this.setData({
-        brandList: res.data.brands,
-        domainList: res.data.tradefields,
-      })
-    })
+
   },
   },
-  /* 选择品牌 */
-  onSelectBrand(e) {
-    let {
-      item
-    } = e.currentTarget.dataset;
-    if (this.data.sa_brandid == item.sa_brandid) return;
-    this.setData({
-      sa_brandid: item.sa_brandid
-    })
+
+  /**
+   * 生命周期函数--监听页面初次渲染完成
+   */
+  onReady() {
+
   },
   },
-  /* 选择领域 */
-  onSelect(e) {
-    let {
-      item
-    } = e.currentTarget.dataset;
-    if (this.data.tradefield == item.tradefield) return;
-    this.setData({
-      tradefield: item.tradefield
-    })
+
+  /**
+   * 生命周期函数--监听页面显示
+   */
+  onShow() {
+
   },
   },
-  submit() {
-    if (this.data.loading) return;
-    this.setData({
-      loading: true
-    })
-    _Http.basic({
-      "id": 20221108111402,
-      content: {
-        sa_orderid: 0,
-        sa_accountclassid: 0,
-        rec_contactsid: 0,
-        pay_enterpriseid: 0,
-        "sa_brandid": this.data.sa_brandid, //品牌ID
-        "type": "标准订单", //订单类型
-        "tradefield": this.data.tradefield, //必选
-      }
-    }).then(res => {
-      this.setData({
-        loading: false
-      })
-      console.log("创建标准订单", res);
-      wx.showToast({
-        title: res.msg != '成功' ? res.msg : '创建成功',
-        icon: "none"
-      });
-      if (res.msg == '成功') setTimeout(() => {
-        wx.redirectTo({
-          url: '/packageA/orderForm/detail?id=' + res.data.sa_orderid,
-        });
-      }, 500)
-    })
+
+  /**
+   * 生命周期函数--监听页面隐藏
+   */
+  onHide() {
+
+  },
+
+  /**
+   * 生命周期函数--监听页面卸载
+   */
+  onUnload() {
+
+  },
+
+  /**
+   * 页面相关事件处理函数--监听用户下拉动作
+   */
+  onPullDownRefresh() {
+
+  },
+
+  /**
+   * 页面上拉触底事件的处理函数
+   */
+  onReachBottom() {
+
+  },
+
+  /**
+   * 用户点击右上角分享
+   */
+  onShareAppMessage() {
+
   }
   }
 })
 })

+ 2 - 21
pages/index/orderForm/modules/setBrand/index.wxml

@@ -1,21 +1,2 @@
-<view class="groud">
-	<view class="label">
-		选择品牌
-	</view>
-	<view class="content">
-		<van-button custom-class='but {{item.sa_brandid==sa_brandid?"active":""}}' wx:for="{{brandList}}" wx:key="sa_brandid" data-item="{{item}}" bindtap="onSelectBrand">{{item.brandname}}</van-button>
-	</view>
-</view>
-<view class="groud">
-	<view class="label">
-		选择领域
-	</view>
-	<view class="content">
-		<van-button custom-class='but {{item.tradefield==tradefield?"active":""}}' wx:for="{{domainList}}" wx:key="sys_enterprise_tradefieldid" data-item="{{item}}" bindtap="onSelect">{{item.tradefield}}</van-button>
-	</view>
-</view>
-<!-- 底部 -->
-<view style="height: 150rpx;" />
-<view class="footer">
-	<van-button custom-class='but' loading='{{loading}}' loading-text='创建中...' bindtap="submit">创建订单</van-button>
-</view>
+<!--pages/index/orderForm/modules/setBrand/index.wxml-->
+<text>pages/index/orderForm/modules/setBrand/index.wxml</text>