liukang 2 years ago
parent
commit
afe365912a
56 changed files with 6556 additions and 93 deletions
  1. 2 0
      components/custom-tab-bar/custom-tab-bar.vue
  2. 20 11
      manifest.json
  3. 161 1
      pages.json
  4. 590 26
      pages/good/add.vue
  5. 299 0
      pages/good/manager.vue
  6. 126 0
      pages/good/options.vue
  7. 247 0
      pages/good/setting.vue
  8. 248 0
      pages/good/spec.vue
  9. 8 0
      pages/mine/message/detail.vue
  10. 8 0
      pages/mine/message/index.vue
  11. 8 0
      pages/mine/message/list.vue
  12. 39 9
      pages/mine/service/address/address.vue
  13. 332 0
      pages/mine/service/detail.vue
  14. 1 1
      pages/mine/service/feed/history.vue
  15. 781 0
      pages/mine/service/purOrder/detail.vue
  16. 316 0
      pages/mine/service/purOrder/list.vue
  17. 223 0
      pages/mine/service/purOrder/msg.vue
  18. 44 0
      pages/mine/service/rule.vue
  19. 3 3
      pages/mine/wallet/withdraw.vue
  20. 301 0
      pages/order/list.vue
  21. 352 0
      pages/order/orderDetail.vue
  22. 240 0
      pages/order/refund.vue
  23. 373 0
      pages/order/refundDetail.vue
  24. 300 0
      pages/order/send.vue
  25. 356 4
      pages/release/ocean/ocean.vue
  26. 366 4
      pages/release/production/production.vue
  27. 228 13
      pages/release/purchase/purchase.vue
  28. 366 4
      pages/release/waixie/waixie.vue
  29. 179 8
      pages/tabbar/index/index.vue
  30. 38 8
      pages/tabbar/mine/mine.vue
  31. BIN
      static/images/common/biyanjing.png
  32. BIN
      static/images/common/check.png
  33. BIN
      static/images/common/close_icon.png
  34. BIN
      static/images/common/copy.png
  35. BIN
      static/images/common/delete.png
  36. BIN
      static/images/common/down2.png
  37. BIN
      static/images/common/down_icon.png
  38. BIN
      static/images/common/edit_icon.png
  39. BIN
      static/images/common/img_bq1.png
  40. BIN
      static/images/common/img_bq2.png
  41. BIN
      static/images/common/popu_close.png
  42. BIN
      static/images/common/saoyisao.png
  43. BIN
      static/images/common/select1.png
  44. BIN
      static/images/common/select2.png
  45. BIN
      static/images/common/tele.png
  46. BIN
      static/images/common/top_bg.png
  47. BIN
      static/images/common/upload_img.png
  48. BIN
      static/images/common/upload_img2.png
  49. BIN
      static/images/common/yanjing.png
  50. BIN
      static/images/mine/address_icon.png
  51. BIN
      static/images/mine/edit.png
  52. BIN
      static/images/mine/orderType1.png
  53. BIN
      static/images/mine/orderType2.png
  54. BIN
      static/images/mine/orderType3.png
  55. BIN
      static/images/mine/orderType4.png
  56. 1 1
      static/js/api.js

+ 2 - 0
components/custom-tab-bar/custom-tab-bar.vue

@@ -77,7 +77,9 @@
 				this.show = false
 			},
 			toOrder(url) {
+				this.close()
 				$api.jump(url)
+				
 			},
 			toTab(index) {
 				if(index == 1) {

+ 20 - 11
manifest.json

@@ -23,27 +23,36 @@
             /* android打包配置 */
             "android" : {
                 "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
-                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
+                    "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
+                    "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ]
             },
             /* ios打包配置 */
             "ios" : {},
             /* SDK配置 */
-            "sdkConfigs" : {}
+            "sdkConfigs" : {
+                "maps" : {},
+                "payment" : {
+                    "alipay" : {
+                        "__platform__" : [ "ios" ]
+                    },
+                    "weixin" : {
+                        "__platform__" : [ "ios" ],
+                        "appid" : "",
+                        "UniversalLinks" : ""
+                    }
+                }
+            }
         }
     },
     /* 快应用特有相关 */

+ 161 - 1
pages.json

@@ -90,11 +90,121 @@
 		    "style" :                                                                                    
 		    {
 		        "navigationBarTitleText": "添加商品",
-		        "enablePullDownRefresh": false
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		    
+		},
+		{
+		    "path" : "pages/good/manager",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "管理商品",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
 		    }
 		    
 		},
 		{
+		    "path" : "pages/good/spec",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "设置规格",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		},
+		{
+		    "path" : "pages/good/options",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "添加型号",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		},
+		{
+		    "path" : "pages/good/setting",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "设置价格和库存",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		},
+		{
+		    "path" : "pages/order/list",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff",
+				"navigationStyle": "custom"
+		    }
+		},
+		{
+		    "path" : "pages/order/orderDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "订单详情",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		},
+		{
+		    "path" : "pages/order/send",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "立即发货",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		},
+		{
+		    "path" : "pages/order/refund",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "退款/售后",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		},
+		{
+		    "path" : "pages/order/refundDetail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "订单详情",
+		        "enablePullDownRefresh": false,
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		},
+		{
+		    "path" : "pages/mine/service/purOrder/list",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "采购订单",
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		    
+		},
+		{
+		    "path" : "pages/mine/service/purOrder/detail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "订单详情",
+				"navigationBarBackgroundColor": "#fff",
+				"navigationStyle": "custom"
+		    }
+		},
+		{
+		    "path" : "pages/mine/service/purOrder/msg",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "报价详情",
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		},
+		{
 		    "path" : "pages/mine/service/feed/feed",
 		    "style" :                                                                                    
 		    {
@@ -194,6 +304,26 @@
 		    
 		},
 		{
+		    "path" : "pages/mine/service/detail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "商家详情",
+				// "navigationStyle": "custom" 
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		    
+		},
+		{
+		    "path" : "pages/mine/service/rule",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "平台规则",
+				// "navigationStyle": "custom" 
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		    
+		},
+		{
 		    "path" : "pages/mine/wallet/add",
 		    "style" :                                                                                    
 		    {
@@ -232,6 +362,36 @@
 				"navigationBarBackgroundColor": "#fff"
 		    }
 		    
+		},
+		{
+		    "path" : "pages/mine/message/index",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "消息",
+				// "navigationStyle": "custom" 
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		    
+		},
+		{
+		    "path" : "pages/mine/message/list",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "",
+				// "navigationStyle": "custom" 
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		    
+		},
+		{
+		    "path" : "pages/mine/message/detail",
+		    "style" :                                                                                    
+		    {
+		        "navigationBarTitleText": "消息详情",
+				// "navigationStyle": "custom" 
+				"navigationBarBackgroundColor": "#fff"
+		    }
+		    
 		}
     ],
 	"tabBar": {

+ 590 - 26
pages/good/add.vue

@@ -1,27 +1,591 @@
-<template>
-	<view class="content">
-		
-	</view>
-</template>
-
-<script>
-	import $api from '@/static/js/api.js'
-	var that = ''
-	export default {
-		data() {
-			return {
-				
-			}
-		},
-		onLoad() {
-			that = this
-		},
-		methods: {
-			
-		},
-	}
-</script>
-
-<style lang="scss" scoped>
-	.content {}
+<template>
+	<view class="content">
+		<view class="box">
+			<view class="title requ">图片和标题</view>
+			<view class="upload">
+				<u-upload :fileList="fileList1" :accept='accept' @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="9" width="166rpx" height="166rpx">
+					<image src="/static/images/common/upload_img.png" class="upload_img1"></image>
+				</u-upload>
+			</view>
+			<u-textarea v-model="name" border="none" placeholder="标题示例:【现货】夏季新款 韩版碎花雪纺连衣裙" count maxlength="100"></u-textarea>
+		</view>
+		<view class="box">
+			<view class="box_item hflex acenter jbetween">
+				<view class="box_left requ">规格</view>
+				<view class="hflex acenter" @click="addSpec">
+					<view class="box_right text_blue" v-if="items == ''">+新增规格</view>
+					<view class="box_right text_blue" v-else>共{{items.length}}个规格</view>
+					<u-icon name="arrow-right" size="12" color="#617BFE"></u-icon>
+				</view>
+			</view>
+			<view class="box_item hflex acenter jbetween">
+				<view class="box_left requ">价格和库存</view>
+				<view class="hflex acenter">
+					<view class="box_right" v-if="items == ''">未设置</view>
+					<view class="box_right" v-else>已设置</view>
+					<u-icon name="arrow-right" size="12" color="#ACACAC"></u-icon>
+				</view>
+			</view>
+			<view class="box_item hflex acenter jbetween">
+				<view class="box_left requ">类目</view>
+				<view class="hflex acenter" @click="open">
+					<view class="box_right" v-if="cateids == ''">请选择商品类目</view>
+					<view class="box_right" v-else>{{cate}}</view>
+					<u-icon name="arrow-right" size="12" color="#ACACAC"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="box_item hflex acenter jbetween">
+				<view class="box_left">物流配送</view>
+				<view class="hflex acenter">
+					<view class="box_right">快递发货</view>
+					<u-icon name="arrow-right" size="12" color="#ACACAC"></u-icon>
+				</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="title">商品详情</view>
+			<u-textarea v-model="content" border="none" placeholder="描述一下商品特色吧~" ></u-textarea>
+			<view class="title">图片/视频</view>
+			<view class="upload">
+				<u-upload :fileList="fileList2" :accept='accept' @afterRead="afterRead" @delete="deletePic" name="2" multiple :maxCount="9" width="200rpx" height="200rpx">
+					<image src="/static/images/common/upload_img.png" class="upload_img2"></image>
+				</u-upload>
+			</view>
+		</view>
+		<view class="box" style="margin-bottom: 186rpx;">
+			<view class="box_item hflex acenter jbetween">
+				<view class="box_left">商品状态</view>
+				<view class="hflex acenter">
+					<block v-for="(item,index) in radioList" :key="index">
+						<view class="hflex acenter" style="padding-left: 32rpx;" @click="changeRadio(index)">
+							<image src="/static/images/common/select1.png" style="width: 36rpx;height: 36rpx;" v-if="active !== index"></image>
+							<image src="/static/images/common/select2.png" style="width: 36rpx;height: 36rpx;" v-else></image>
+							<view class="radio_text">{{item.name}}</view>
+						</view>
+					</block>
+				</view>
+			</view>
+		</view>
+		<view class="bottom">
+			<view class="btn hflex acenter jcenter" @click="create" v-if="id == ''">创建商品</view>
+			<view class="btn_group hflex acenter jbetween" v-else>
+				<view class="btn1 hflex acenter jcenter" @click="dele">删除</view>
+				<view class="btn2 hflex acenter jcenter" @click="save">保存</view>
+			</view>
+		</view>
+		<u-popup :show="cate_show" :round="10" mode="bottom" @close="close">
+			<view class="popu">
+				<view class="popu_top hflex acenter jbetween">
+					<view></view>
+					<view class="popu_title">选择类目</view>
+					<image src="/static/images/common/close_icon.png" style="width: 28rpx;height: 28rpx;" @click="close"></image>
+				</view>
+				<view class="center">
+					<view class="menuList hflex acenter jbetween">
+						<scroll-view scroll-y="true" class="menu_left">
+							<view class="vflex">
+								<block v-for="(item,index) in cateList" :key="index">
+									<view class="left_item hflex acenter jcenter" :class="index == left_active? 'left_active':''">{{item.name}}</view>
+								</block>
+							</view>
+						</scroll-view>
+						<scroll-view scroll-y="true" class="menu_right">
+							<view class="vflex">
+								<block v-for="(item,index) in cateList[left_active].sub" :key="index">
+									<view class="right_item hflex acenter jbetween" @click="selectItem(index)">
+										<view class="item_text hflex acenter jcenter" :class="index == right_active? 'right_active':''">{{item.name}}</view>
+										<image src="/static/images/common/check.png" style="width: 36rpx;height: 36rpx;" v-if="index == right_active"></image>
+									</view>
+								</block>
+							</view>
+						</scroll-view>
+					</view>
+				</view>
+				<view class="popu_bottom">
+					<view class="btn hflex acenter jcenter"@click="sure">确定</view>
+					
+				</view>
+			</view>
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import $api, { info } from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				fileList1: [],
+				fileList2: [],
+				cateList: [],
+				left_active: 0,
+				right_active: -1,
+				name: '',
+				accept: ['image','video'],
+				content: '',
+				radioList: [
+					{
+						name: '上架售卖'
+					},
+					{
+						name: '暂不上架'
+					}
+				],
+				active: 0,
+				items: '',
+				cover: '',
+				slider: '',
+				content: '',
+				status: 1,
+				cateids: '',
+				cate: '',
+				spec: '',
+				stock_total: 0,
+				price_selling: '',
+				cate_show: false,
+				id: '',
+			}
+		},
+		onLoad(options) {
+			that = this
+			if(options.data) {
+				that.items = JSON.parse(options.data)
+				that.spec = options.spec
+				for(var i=0;i<that.items.length;i++) {
+					that.stock_total += Number(that.items[i].stock_total)
+				}
+				that.price_selling = that.items[0].price_selling
+			}
+			if(options.id) {
+				that.id = options.id
+				that.getData()
+			}
+			that.getCate()
+		},
+		methods: {
+			getData() {
+				$api.req({
+					url: '/data/api.business.Goods/goods_details',
+					method: 'POST',
+					data: {
+						goods_id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						console.log(res);
+						that.cover = res.data.cover
+						var imgList = res.data.cover.split('|')
+						for(var i=0;i<imgList.length;i++) {
+							var data = {
+								url: imgList[i]
+							}
+							that.fileList1.push(data)
+						}
+						that.name = res.data.name
+						that.items = res.data.item
+						that.cateids = res.data.cateids
+						for(var i=0;i<that.cateList.length;i++) {
+							for(var j=0;j<that.cateList[i].sub.length;j++) {
+								if(that.cateList[i].sub[j].id == that.cateids) {
+									that.cate = that.cateList[i].name + '-' + that.cateList[i].sub[j].name
+								}
+							}
+						}
+						that.content = res.data.content
+						that.slider = res.data.slider
+						imgList = res.data.slider.split('|')
+						for(var i=0;i<imgList.length;i++) {
+							var data = {
+								url: imgList[i]
+							}
+							that.fileList2.push(data)
+						}
+						that.status = res.data.status
+						that.stock_total = res.data.stock_total
+						that.price_selling = res.data.price_selling
+						if(that.status == 1) {
+							that.active = 0
+						} else {
+							that.active = 1
+						}
					}
+				})
+			},
+			getCate() {
+				$api.req({
+					url: '/data/api.business.Goods/getCate'
+				}, function(res) {
+					if(res.code == 1) {
+						that.cateList = res.data
+					}
+				})
+			},
+			// 删除图片
+			deletePic(event) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
+			// 新增图片
+			async afterRead(event) {
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						// status: 'uploading',
+						// message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						// status: 'success',
+						type: result.type,
+						url: result.url
+					}))
+					fileListLen++
+				}
+				console.log(that.fileList1);
+			},
+			uploadFilePromise(url) {
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: $api.config.baseUrl + '/data/api.auth.Center/upload', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						header: {
+							'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+							'api-name': 'iosapp'
+						},
+						formData: {
+							user: 'test'
+						},
+						success: (res) => {
+							setTimeout(() => {
+								var data = JSON.parse(res.data)
+								console.log('data:',data);
+								var type = data.data.key.split('.')
+								if(type[1] == 'mp4') {
+									that.$set(data.data,'type','video')
+								} else {
+									that.$set(data.data,'type','image')
+								}
+								resolve(data.data)
+							}, 1000)
+						}
+					});
+				})
+			},
+			changeRadio(index) {
+				that.active = index
+				if(that.active == 0) {
+					that.status = 1
+				} else {
+					that.status = 0
+				}
+			},
+			addSpec() {
+				$api.jump('/pages/good/spec?items=' + JSON.stringify(that.items))
+			},
+			open() {
+				that.cate_show = true
+			},
+			selectItem(index) {
+				that.right_active = index
+			},
+			sure() {
+				that.cateids = that.cateList[that.left_active].sub[that.right_active].id
+				that.cate = that.cateList[that.left_active].name + '-' + that.cateList[that.left_active].sub[that.right_active].name
+				that.close()
+			},
+			close() {
+				that.cate_show = false
+			},
+			create() {
+				console.log(that.fileList1);
+				for(var i=0;i<that.fileList1.length;i++) {
+					that.cover += that.fileList1[i].url + '|'
+				}
+				for(var i=0;i<that.fileList2.length;i++) {
+					that.slider += that.fileList2[i].url + '|'
+				}
+				that.cover = that.cover.substr(0,that.cover.length - 1)
+				that.slider = that.slider.substr(0,that.slider.length - 1)
+				$api.req({
+					url: '/data/api.business.Goods/goods_add',
+					method: 'POST',
+					data: {
+						name: that.name,
+						cateids: that.cateids,
+						cover: that.cover,
+						slider: that.slider,
+						content: that.content,
+						stock_total: that.stock_total,
+						price_selling: that.price_selling,
+						status: that.status,
+						spec: that.spec,
+						items: JSON.stringify(that.items)
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api,info(res.info)
+						$api.jump('/pages/tabbar/index/index',3)
+					}
+				})
+			},
+			save() {
+				for(var i=0;i<that.fileList1.length;i++) {
+					that.cover += that.fileList1[i].url + '|'
+				}
+				for(var i=0;i<that.fileList2.length;i++) {
+					that.slider += that.fileList2[i].url + '|'
+				}
+				that.cover = that.cover.substr(0,that.cover.length - 1)
+				that.slider = that.slider.substr(0,that.slider.length - 1)
+				$api.req({
+					url: '/data/api.business.Goods/goods_add',
+					method: 'POST',
+					data: {
+						goods_id: that.id,
+						name: that.name,
+						cateids: that.cateids,
+						cover: that.cover,
+						slider: that.slider,
+						content: that.content,
+						stock_total: that.stock_total,
+						price_selling: that.price_selling,
+						status: that.status,
+						items: JSON.stringify(that.items)
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api,info(res.info)
+						$api.jump('/pages/tabbar/index/index',3)
+					}
+				})
+			},
+			dele() {
+				$api.req({
+					url: '/data/api.business.Goods/del_goods',
+					method: 'POST',
+					data: {
+						goods_id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info) 
+						$api.jump('/pages/tabbar/index/index',3)
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content::v-deep {
+		background: #F5F5F5;
+		.box {
+			width: 100%;
+			background: #FFFFFF;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			margin-top: 20rpx;
+			.title {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 42rpx;
+				margin: 28rpx 0 20rpx;
+			}
+			.requ {
+				position: relative;
+			}
+			.requ:before {
+				content: '*';
+				top: 0;
+				left: -15rpx;
+				position: absolute;
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #FF3636;
+				
+			}
+			.upload {
+				margin-bottom: 20px;
+				.upload_img1 {
+					width: 124rpx;
+					height: 124rpx;
+				}
+				
+				.upload_img2 {
+					width: 200rpx;
+					height: 200rpx;
+				}
+				
+			}
+			.u-textarea {
+				padding: 0 !important;
+			}
+			.box_item {
+				padding: 28rpx 0;
+				border-bottom: 1rpx solid #F5F5F5;
+				.box_left {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.box_right {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #ACACAC;
+					line-height: 42rpx;
+					padding-right: 10rpx;
+				}
+				.text_blue {
+					color: #617BFE;
+				}
+				.radio_text {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+					padding-left: 12rpx;
+				}
+			}
+		}
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			position: fixed;
+			bottom: 0;
+			z-index: 99;
+			.btn {
+				width: 690rpx;
+				height: 84rpx;
+				background: #5471FF;
+				border-radius: 46rpx;
+				margin: 8rpx auto 0;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 50rpx;
+			}
+			.btn_group {
+				width: 100%;
+				box-sizing: border-box;
+				padding: 8rpx 30rpx 0;
+				.btn1 {
+					width: 330rpx;
+					height: 84rpx;
+					border-radius: 46rpx;
+					border: 1rpx solid #5471FF;
+					font-size: 32rpx;
+					font-weight: 500;
+					color: #5471FF;
+					line-height: 50rpx;
+				}
+				.btn2 {
+					width: 330rpx;
+					height: 84rpx;
+					background: #5471FF;
+					border-radius: 46rpx;
+					font-size: 32rpx;
+					font-weight: 500;
+					color: #FFFFFF;
+					line-height: 50rpx;
+				}
+			}
+		}
+		.popu {
+			background: #FFFFFF;
+			border-radius: 40rpx 40rpx 0px 0px;
+			// border: 2rpx solid #979797;
+			.popu_top {
+				width: 690rpx;
+				margin: 0 auto;
+				padding: 44rpx 0 28rpx;
+				border-bottom: 1px solid #F7F7F7;
+				.popu_title {
+					font-size: 36rpx;
+					font-weight: 500;
+					color: #222222;
+					line-height: 50rpx;
+				}
+			}
+			.center {
+				margin: 0 0 188rpx;
+				.menuList {
+					width: 100%;
+					.menu_left {
+						width: 180rpx;
+						height: 850rpx;
+						background: #F5F5F5;
+						border-radius: 0px 28rpx 0px 0px;
+						.left_item {
+							font-size: 28rpx;
+							font-weight: 400;
+							color: #222222;
+							line-height: 40rpx;
+							padding: 30rpx 0;
+						}
+						.left_active {
+							color: #506DFF;
+							background: #fff;
+						}
+					}
+					.menu_right {
+						width: 570rpx;
+						height: 850rpx;
+						background: #FFFFFF;
+						.right_item {
+							padding: 30rpx 30rpx 30rpx 64rpx;
+							.item_text {
+								font-size: 30rpx;
+								font-weight: 400;
+								color: #393939;
+								line-height: 42rpx;
+							}
+							.right_active {
+								color: #5B77FF;
+							}
+						}
+						.tabs_text {
+							width: 80rpx;
+							height: 56rpx;
+							background: #FFFFFF;
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #393939;
+							line-height: 28rpx;
+						}
+					}
+				}
+			}
+			.popu_bottom {
+				width: 100%;
+				height: 166rpx;
+				background: #FFFFFF;
+				position: fixed;
+				bottom: 0;
+				z-index: 99;
+				.btn {
+					width: 690rpx;
+					height: 84rpx;
+					background: #5471FF;
+					border-radius: 46rpx;
+					margin: 8rpx auto 0;
+					font-size: 36rpx;
+					font-weight: 500;
+					color: #FFFFFF;
+					line-height: 50rpx;
+				}
+				
+			}
+		}
+	}
 </style>

+ 299 - 0
pages/good/manager.vue

@@ -0,0 +1,299 @@
+<template>
+	<view class="content">
+		<view class="tabs">
+			<u-tabs :list="tabs" @click="clickTab" lineWidth="0" :scrollable="false" :activeStyle="{color:'#222222',fontSize: '30rpx'}" :inactiveStyle="{color: '#888888'}">
+			</u-tabs>
+		</view>
+		<view class="center">
+			<block v-for="(item,index) in pageList" :key="index">
+				<view class="box hflex acenter">
+					<u-checkbox-group @change="checkboxChange(index)">
+						<u-checkbox :checked="item.check" shape="circle"></u-checkbox>
+					</u-checkbox-group>
+					<image :src="item.cover" class="img"></image>
+					<view class="right">
+						<view class="item_name">{{item.name}}</view>
+						<view class="item_price">¥<span style="font-size: 32rpx;">{{item.price_selling}}</span></view>
+						<view class="item_stock">库存{{item.stock_total}}</view>
+					</view>
+				</view>
+			</block>
+		</view>
+		<view class="bottom hflex jbetween">
+			<view class="hflex">
+				<u-checkbox-group @change="checkboxChange2" placement="column">
+					<u-checkbox shape="circle"></u-checkbox>
+				</u-checkbox-group>
+				<view class="left_text">全选</view>
+			</view>
+			<view class="hflex">
+				<view class="count_text" v-show="count !== 0">共计{{count}}件</view>
+				<view class="btn hflex acenter jcenter" :class="count == 0?'btn1':''" v-if="tab_active == 0" @click="lower">一键下架</view>
+				<view class="btn hflex acenter jcenter" :class="count == 0?'btn1':''" v-if="tab_active == 1" @click="shelves">一键上架</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				tabs: [
+					{
+						index: 0,
+						status: 1,
+						name: '售卖中',
+						badge: {
+							value: 0,
+							bgColor: '#393939',
+							color: '#FFFFFF'
+						}
+					},
+					{
+						index: 1,
+						status: 0,
+						name: '已下架',
+						badge: {
+							value: 0,
+							bgColor: '#393939',
+							color: '#FFFFFF'
+						}
+					},
+					{
+						index: 2,
+						status: 2,
+						name: '已售罄',
+						badge: {
+							value: 0,
+							bgColor: '#393939',
+							color: '#FFFFFF'
+						}
+					}
+				],
+				tab_active: 0,
+				pageList: [],
+				count:0,
+				checkAll: false,
+				page: 1,
+				limit: 10,
+				total: 10
+			}
+		},
+		onLoad() {
+			that = this
+			that.getList()
+		},
+		methods: {
+			getList() {
+				$api.req({
+					url: '/data/api.business.Goods/goods_list',
+					data: {
+						name: '',
+						status: that.tabs[that.tab_active].status,
+						cateids: '',
+						page: that.page
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						for (var i=0;i<that.tabs.length;i++) {
+							that.$set(that.tabs[i].badge,'value',res.data.count[i+1])
+						}
+						if(that.page == 1) {
+							that.pageList = res.data.list.list
+						} else {
+							that.pageList = that.pageList.concat(res.data.list.list)
+						}
+						that.total = res.data.list.page.total
+						that.limit = res.data.list.page.limit
+					}
+				})
+			},
+			clickTab(e) {
+				var index = e.index
+				for(var i=0;i<that.tabs.length;i++) {
+					if (that.tabs[i].index == index) {
+						that.$set(that.tabs[i].badge,"bgColor",'#FF383F')
+						that.$set(that.tabs[i].badge,"color",'#FFFFFF')
+					} else {
+						that.$set(that.tabs[i].badge,"bgColor",'#EDEDED')
+						that.$set(that.tabs[i].badge,"color",'#888888')
+					}
+				}
+				that.tab_active = e.index
+				that.page = 1
+				that.pageList = []
+				that.getList()
+			},
+			checkboxChange(index) {
+				if(that.pageList[index].check) {
+					that.$set(that.pageList[index],'check',false)
+					that.count -= 1 
+				} else {
+					that.$set(that.pageList[index],'check',true)
+					that.count += 1 
+				}
+			},
+			checkboxChange2() {
+				that.checkAll = !that.checkAll
+				for(var i=0;i<that.pageList.length;i++) {
+					if(that.checkAll) {
+						that.$set(that.pageList[i],'check',true)
+						that.count = that.pageList.length
+					} else {
+						that.$set(that.pageList[i],'check',false)
+						that.count = 0
+					}
+				}
+			},
+			lower() {
+				var goods_id = ''
+				for(var i=0;i<that.pageList.length;i++) {
+					if(that.pageList[i].check) {
+						goods_id += that.pageList[i].id + ','
+					}
+				}
+				goods_id = goods_id.substr(0,goods_id.length - 1)
+				$api.req({
+					url: '/data/api.business.Goods/lower',
+					method: 'POST',
+					data: {
+						goods_id: goods_id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+						that.getList()
+					}
+				})
+			},
+			shelves() {
+				var goods_id = ''
+				for(var i=0;i<that.pageList.length;i++) {
+					if(that.pageList[i].check) {
+						goods_id += that.pageList[i].id + ','
+					}
+				}
+				goods_id = goods_id.substr(0,goods_id.length - 1)
+				$api.req({
+					url: '/data/api.business.Goods/shelves',
+					method: 'POST',
+					data: {
+						goods_id: goods_id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+						that.getList()
+					}
+				})
+			},
+			onReachBottom() {
+				if (Number(that.page) * Number(that.limit) >= Number(that.total)) {
+					$api.info("没有更多了")
+				} else {
+					that.page++
+					that.getList()
+				}
+				
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content::v-deep {
+		background: #F4F4F4;
+		.tabs {
+			width: 100%;
+			height: 80rpx;
+			background: #ffffff;
+		}
+		.center {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.box {
+				background: #FFFFFF;
+				border-radius: 24px;
+				margin-top: 20rpx;
+				width: 100%;
+				box-sizing: border-box;
+				padding: 20rpx;
+				.img {
+					width: 164rpx;
+					height: 164rpx;
+					border-radius: 16rpx;
+					margin: 0 16rpx 0 20rpx;
+				}
+				.right {
+					.item_name {
+						font-size: 30rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 42rpx;
+						padding: 10rpx 0 18rpx;
+					}
+					.item_price {
+						font-size: 24rpx;
+						font-weight: bold;
+						color: #FF383F;
+						line-height: 28rpx;
+					}
+					.item_stock {
+						font-size: 24rpx;
+						font-weight: 400;
+						color: #9B9B9B;
+						line-height: 34rpx;
+						padding: 14rpx 0 8rpx;
+					}
+				}
+			}
+			.box:nth-last-child(1) {
+				margin-bottom: 186rpx;
+			}
+		}
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			position: fixed;
+			bottom: 0;
+			z-index: 99;
+			box-sizing: border-box;
+			padding: 18rpx 30rpx 0;
+			.u-checkbox-group--column {
+				padding-top: 20rpx;
+			}
+			.left_text {
+				font-size: 26rpx;
+				padding-left: 8rpx;
+				font-weight: 400;
+				color: #393939;
+				line-height: 80rpx;
+			}
+			.count_text {
+				font-size: 28rpx;
+				font-weight: 400;
+				color: #393939;
+				line-height: 80rpx;
+			}
+			.btn {
+				width: 216rpx;
+				height: 80rpx;
+				background: #506EFF;
+				border-radius: 40rpx;
+				margin-left: 20rpx;
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 40rpx;
+			}
+			.btn1 {
+				background: #AAAAAA;
+			}
+		}
+	}
+</style>

+ 126 - 0
pages/good/options.vue

@@ -0,0 +1,126 @@
+<template>
+	<view class="content">
+		<view class="vflex box">
+			<block v-for="(item,index) in options" :key="index">
+				<view class="hflex acenter jbetween" style="padding: 26rpx 0;">
+					<view class="left">型号</view>
+					<u-input v-model="item.name" border="none" placeholder="请输入"></u-input>
+					<image src="/static/images/common/delete.png" style="width: 40rpx;height: 40rpx;" @click="delOptions(index)"></image>
+				</view>
+			</block>
+			<view class="add hflex acenter jcenter" @click="add">添加型号</view>
+		</view>
+		<view class="bottom">
+			<view class="btn hflex acenter jcenter" @click="save">
+				保存
+			</view>	
+		</view>	
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				index: '',
+				options: [
+					{
+						check: true,
+						show: true,
+						name: '',
+						group: ''
+					}
+				],
+				group: '',
+			}
+		},
+		onLoad(options) {
+			that = this
+			that.index = options.index
+			if(options.data) {
+				that.options = JSON.parse(options.data)
+			}
+			that.options[0].group = options.group
+			that.group = options.group
+			console.log(options);
+		},
+		methods: {
+			add() {
+				var data = {
+					name: '',
+					check: true,
+					show: true,
+					group: that.group
+				}
+				that.options.push(data)
+			},
+			save() {
+				let pages = getCurrentPages();
+				let prevPage = pages[pages.length - 2];
+				that.$set(prevPage.$vm._data.specList[that.index],'list',that.options)
+				// prevPage.$vm._data.specList[that.index].options = that.options
+				$api.jump(-1)
+			},
+			delOptions(index) {
+				that.options.splice(index,1)
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content::v-deep {
+		.box {
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.left {
+				font-size: 28rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 40rpx;
+			}
+			.u-input {
+				width: 530rpx;
+				height: 88rpx;
+				background: #F5F5F5;
+				border-radius: 12rpx;
+				padding: 0 20rpx !important;
+				margin: 0 14rpx 0 20rpx;
+			}
+			.add {
+				margin: 102rpx auto 186rpx;
+				width: 390rpx;
+				height: 84rpx;
+				border-radius: 42rpx;
+				border: 2rpx solid #5471FF;
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #5471FF;
+				line-height: 42rpx;
+			}
+		}
+		
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			box-sizing: border-box;
+			padding: 8rpx 30rpx 0;
+			position: fixed;
+			bottom: 0;
+			z-index: 99;
+			.btn {
+				width: 100%;
+				height: 84rpx;
+				background: #5471FF;
+				border-radius: 46rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 50rpx;
+			}
+		}
+	}
+</style>

+ 247 - 0
pages/good/setting.vue

@@ -0,0 +1,247 @@
+<template>
+	<view class="content">
+		<view class="center">
+			<view class="title">共{{pageList.length}}个型号:{{title}}</view>
+			<block v-for="(item,index) in pageList" :key="index">
+				<view class="box">
+					<view class="box_title cell">{{item.goods_spec}}</view>
+					<view class="hflex acenter jbetween cell">
+						<view class="left">价格</view>
+						<u-input v-model="item.price_selling" border="none" placeholder="请填写商品价格"></u-input>
+					</view>
+					<view class="hflex acenter jbetween cell">
+						<view class="left">库存</view>
+						<u-input v-model="item.stock_total " border="none" placeholder="请填写商品库存"></u-input>
+					</view>
+					<view class="hflex acenter cell">
+						<view class="left">图片</view>
+						<view class="img">
+							<image src="/static/images/common/upload_img2.png" class="upload_img1" @click="uploadImg(index)" v-if="item.sku_image == ''"></image>
+							<image :src="item.sku_image" class="upload_img1" @click="uploadImg(index)" v-else></image>
+							<image src="/static/images/common/close.png" class="img_close" v-if="item.sku_image !== ''" @click="closeImg(index)"></image>
+						</view>
+					</view>
+					<view class="hflex acenter jbetween cell">
+						<view class="left">是否售卖</view>
+						<u-switch v-model="item.status" activeColor="#81be6a" ></u-switch>
+					</view>
+				</view>
+			</block>
+		</view>
+		<view class="bottom">
+			<view class="btn hflex acenter jcenter" @click="save">
+				保存
+			</view>	
+		</view>	
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				specList: [],
+				pageList: [],
+				title: '',
+			}
+		},
+		onLoad(options) {
+			that = this
+			that.specList = JSON.parse(options.data)
+			that.getList()
+		},
+		methods: {
+			getList() {
+				var list = []
+				var list2 = []
+				for(var i=0;i<that.specList.length;i++) {
+					that.title += that.specList[i].name + '、'
+					for(var j=0;j<that.specList[i].list.length;j++) {
+						var data = {
+							type: i,
+							name: that.specList[i].list[j].name,
+							group: that.specList[i].list[j].group,
+						}
+						list.push(data)
+					}
+				}
+				that.title = that.title.substr(0,that.title.length - 1)
+				if(that.specList.length == 2) {
+					for(var i=0;i<list.length;i++) {
+						for(var j=i+1;j<list.length;j++) {
+							if(list[i].type !== list[j].type) {
+								var data = {
+									goods_spec: list[i].group + '::' + list[i].name+';;' + list[j].group + '::' + list[j].name,
+									stock_total : '',
+									price_selling : '',
+									sku_image : '',
+									status : false
+								}
+								list2.push(data)
+							}
+						}
+					}
+				} 
+				if(that.specList.length == 1) {
+					for(var i=0;i<list.length;i++) {
+						var data = {
+							goods_spec: list[i].group+ '::' + list[i].name,
+							stock_total : '',
+							price_selling : '',
+							sku_image : '',
+							status : false
+						}
+						list2.push(data)
+					}
+				}
+				if(that.specList.length == 3) {
+					console.log(that.specList);
+					for(var i=0;i<that.specList[0].list.length;i++) {
+						for(var j=0;j<that.specList[1].list.length;j++) {
+							for(var k=0;k<that.specList[2].list.length;k++) {
+								var data = {
+									goods_spec: that.specList[0].list[i].group+ '::' + that.specList[0].list[i].name+';;'+ that.specList[1].list[j].group+ '::' +  that.specList[1].list[j].name + ';;' + that.specList[2].list[k].group+ '::' +  that.specList[2].list[k].name,
+									stock_total : '',
+									price_selling : '',
+									sku_image : '',
+									status : false
+								}
+								list2.push(data)
+							}
+						}
+					}
+				}
+				that.pageList = list2
+			},
+			uploadImg(index) {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album','camera'], //从相册选择
+					success: function (res) {
+						const tempFilePaths = res.tempFilePaths
+						uni.uploadFile({
+							url: $api.config.baseUrl + '/data/api.auth.Center/upload',
+							filePath: tempFilePaths[0],
+							name: 'file',
+							header: {
+								'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+								'api-name': 'iosapp'
+							},
+							// formData: {
+							// 	'user': 'test'
+							// },
+							success: (res) => {
+								const data = JSON.parse(res.data)
+								if (data.code == 1) {
+									that.pageList[index].sku_image = data.data.url
+									
+								}
+							}
+						});
+					}
+				});
+			},
+			closeImg(index) {
+				that.pageList[index].sku_image = ""
+			},
+			save() {
+				for(var i=0;i<that.pageList.length;i++) {
+					if(that.pageList[i].status) {
+						that.pageList[i].status = 1
+					} else {
+						that.pageList[i].status = 2
+					}
+				}
+				$api.jump('/pages/good/add?data=' + JSON.stringify(that.pageList) + '&spec=' + JSON.stringify(that.specList))
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content::v-deep {
+		.center {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.title {
+				font-size: 28rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 40rpx;
+				padding: 28rpx 0 0;
+			}
+			.box {
+				background: #F5F5F5;
+				border-radius: 12px;
+				margin-top: 24rpx;
+				padding: 0 20rpx 24rpx;
+				.box_title {
+					font-size: 28rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 40rpx;
+				}
+				.cell {
+					padding: 24rpx 0 4rpx;
+					.left {
+						width: 130rpx;
+						font-size: 28rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 40rpx;
+					}
+					.u-input {
+						width: 500rpx;
+						height: 64rpx;
+						background: #FFFFFF;
+						border-radius: 8rpx;
+						padding: 0 20rpx !important;
+					}
+					.img {
+						position: relative;
+						.upload_img1 {
+							width: 140rpx;
+							height: 140rpx;
+						}
+						.img_close {
+							position: absolute;
+							width: 28rpx;
+							height: 28rpx;
+							right: 0;
+							top: 0;
+						}
+					}
+					
+				}
+			}
+			.box:nth-last-child(1) {
+				margin-bottom: 186rpx;
+			}
+		}
+		
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			box-sizing: border-box;
+			padding: 8rpx 30rpx 0;
+			position: fixed;
+			bottom: 0;
+			z-index: 99;
+			.btn {
+				width: 100%;
+				height: 84rpx;
+				background: #5471FF;
+				border-radius: 46rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 50rpx;
+			}
+		}
+	}
+</style>

+ 248 - 0
pages/good/spec.vue

@@ -0,0 +1,248 @@
+<template>
+	<view class="content">
+		<view class="top" v-if="specList.length == 0">
+			<view class="add hflex acenter jcenter" @click="open(-1)">添加规格分类</view>	
+		</view>	
+		<view class="top1" v-else>
+			<block v-for="(item,index) in specList" :key="index">
+				<view class="box">
+					<view class="hflex acenter jbetween box-top">
+						<view class="hflex acenter">
+							<view class="name">{{item.name}}</view>
+							<image src="/static/images/common/edit_icon.png" style="width: 28rpx;height: 28rpx;" @click="open(index)"></image>
+						</view>
+						<view class="hflex acenter" @click="delSpec(index)">
+							<image src="/static/images/common/delete.png" style="width: 28rpx;height: 28rpx;"></image>
+							<view class="right">删除</view>
+						</view>
+					</view>
+					<view class="hflex acenter fwrap" style="padding: 32rpx 0;">
+						<block v-for="(item2,index2) in item.list" :key="index2">
+							<view class="options hflex acenter">
+								<view class="text">{{item2.name}} | </view>
+								<image src="/static/images/common/close_icon.png" style="width: 28rpx;height: 28rpx;" @click="delOptions(index,index2)"></image>
+							</view>
+						</block>
+						<view class="options hflex acenter">
+							<view class="text text_blue" @click="add(index,item.name)">+添加规格选项</view>
+						</view>
+					</view>
+				</view>
+			</block>
+			<view class="add hflex acenter jcenter" @click="open(-1)">添加规格分类</view>
+		</view>
+		<view class="bottom">
+			<view class="btn hflex acenter jcenter" @click="next">
+				下一步
+			</view>	
+		</view>	
+		<u-popup :show="show" :round="10" mode="center" @close="close">
+			<view class="popu">
+				<view class="popu_title">添加规格分类</view>	
+				<u-input v-model="name" border="none" shape="circle" placeholder="请输入"></u-input>
+				<view class="hflex acenter jcenter btn_group">
+					<view class="left_btn" @click="close">取消</view>	
+					<view class="right_btn" @click="save">保存</view>
+				</view>	
+			</view>	
+		</u-popup>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				specList: [],
+				options: [],
+				show: false,
+				name: '',
+				edit: false,
+				editIndex: 0,
+			}
+		},
+		onLoad(options) {
+			that = this
+		},
+		methods: {
+			open(index) {
+				if(index == -1) {
+					that.edit = false
+				} else {
+					that.edit = true
+					that.editIndex = index
+				}
+				that.show = true
+			},
+			close() {
+				that.show = false
+			},
+			save() {
+				var data = {
+					name: that.name
+				}
+				if(that.edit) {
+					that.$set(that.specList[that.editIndex],'name',that.name)
+				} else {
+					that.specList.push(data)
+				}
+				that.name = ''
+				that.close()
+			},
+			delSpec(index) {
+				that.specList.splice(index,1)
+			},
+			delOptions(index,index2) {
+				that.specList[index].options.splice(index2,1)
+			},
+			add(index,name) {
+				var url = ''
+				if(that.specList[index].options) {
+					url = '/pages/good/options?index='+index+'&data='+JSON.stringify(that.specList[index].options) + '&group=' + name
+				} else {
+					url = '/pages/good/options?index='+index + '&group=' + name
+				}
+				$api.jump(url)
+			},
+			next() {
+				$api.jump('/pages/good/setting?data=' + JSON.stringify(that.specList))
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content::v-deep {
+		.top {
+			width: 100%;
+			min-height: calc(100vh - 166rpx);
+			
+		}
+		.top1 {
+			width: 100%;
+			min-height: calc(100vh - 166rpx);
+			background: #F5F5F5;
+			.box {
+				width: 100%;
+				margin-top: 20rpx;
+				box-sizing: border-box;
+				padding: 0 30rpx;
+				background: #FFFFFF;
+				.box-top {
+					width: 100%;
+					padding: 24rpx 0;
+					border-bottom: 1rpx solid #F5F5F5;
+					.name {
+						font-size: 30rpx;
+						font-weight: 500;
+						color: #222222;
+						line-height: 42rpx;
+						padding-right: 12rpx;
+					}
+					.right {
+						font-size: 24rpx;
+						font-weight: 400;
+						color: #8F8F8F;
+						line-height: 34rpx;
+						padding-left: 12rpx;
+					}
+				}
+				.options {
+					background: #F5F5F5;
+					border-radius: 28px;
+					padding: 10rpx 32rpx;
+					margin: 0 20rpx 32rpx 0;
+					.text {
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 36rpx;
+					}
+					.text_blue {
+						color: #5471FF;
+					}
+				}
+			}
+		}
+		.add {
+			margin: 102rpx auto 186rpx;
+			width: 390rpx;
+			height: 84rpx;
+			border-radius: 42rpx;
+			border: 2rpx solid #5471FF;
+			font-size: 30rpx;
+			font-weight: 400;
+			color: #5471FF;
+			line-height: 42rpx;
+		}
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			box-sizing: border-box;
+			padding: 8rpx 30rpx 0;
+			position: fixed;
+			bottom: 0;
+			z-index: 99;
+			.btn {
+				width: 100%;
+				height: 84rpx;
+				background: #5471FF;
+				border-radius: 46rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 50rpx;
+			}
+		}
+		.popu {
+			width: 590rpx;
+			background: #FFFFFF;
+			border-radius: 28rpx;
+			box-sizing: border-box;
+			padding: 0 10rpx;
+			.popu_title {
+				width: 100%;
+				font-size: 32rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 44rpx;
+				text-align: center;
+				padding: 48rpx 0;
+			}
+			.u-input {
+				width: 490rpx;
+				height: 80rpx;
+				background: #F5F5F5;
+				border-radius: 40rpx;
+				margin: 0 auto;
+				padding: 0 32rpx !important;
+			}
+			.btn_group {
+				width: 100%;
+				margin-top: 56rpx;
+				border-top: 1rpx solid #F5F5F5;
+				padding: 0 0;
+				.left_btn {
+					width: 50%;
+					padding: 28rpx 108rpx;
+					border-right: 1rpx solid #F5F5F5;
+					font-size: 32rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 44rpx;
+				}
+				.right_btn {
+					width: 50%;
+					padding: 0 108rpx;
+					font-size: 32rpx;
+					font-weight: 400;
+					color: #5471FF;
+					line-height: 44rpx;
+				}
+			}
+		}
+	}
+</style>

+ 8 - 0
pages/mine/message/detail.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
pages/mine/message/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 8 - 0
pages/mine/message/list.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 39 - 9
pages/mine/service/address/address.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="list" v-if="pageList.length > 0">
 			<block v-for="(item,index) in pageList" :key="index">
-				<view class="item">
+				<view class="item" @click="selectAddr(item)">
 					<view class="hflex acenter">
 						<view class="item_name">{{item.name}}</view>
 						<view class="item_phone">{{item.phone}}</view>
@@ -56,12 +56,17 @@
 				del_show: false,
 				del_id: '',
 				page: 1,
-				total: 1
+				limit: 10,
+				total: 1,
+				select: '',
 			}
 		},
-		onLoad() {
+		onLoad(options) {
 			that = this
-			
+			if(options.select) {
+				that.select = options.select
+				that.id = options.id
+			}
 		},
 		onShow() {
 			that.getAddress()
@@ -76,8 +81,13 @@
 					}
 				}, function(res) {
 					if(res.code == 1) {
-						that.pageList = res.data.list
+						if(that.page == 1) {
+							that.pageList = res.data.list
+						} else {
+							that.pageList = that.pageList.concat(res.data.list)
+						}
 						that.total = res.data.page.total
+						that.limit = res.data.page.limit
 					}
 				})
 			},
@@ -115,6 +125,27 @@
 			edit(index) {
 				$api.jump('/pages/mine/service/address/add?index=' + index + '&id=' + that.pageList[index].id)
 			},
+			selectAddr(item) {
+				if(that.select !== '') {
+					var pages = getCurrentPages()
+					var prePage = pages[pages.length - 2]
+					if(that.select == 'send') {
+						prePage.$vm.send_addr = item.name+','+item.phone+' ' + item.province + ' ' + item.city + ' ' + item.area + ' ' + item.address
+						prePage.$vm.return_addr = {
+							name: item.name,
+							phone: item.phone,
+							province: item.province,
+							city: item.city,
+							area: item.area,
+							address: item.address,
+							id: item.id
+						}
+						// $api.jump('/pages/order/send?item='+JSON.stringify(item) + '&send=1&id='+ that.id,2)
+					}
+					$api.jump(-1)
+				}
+ 				
+			},
 			close() {
 				that.del_show = false
 			},
@@ -135,12 +166,11 @@
 				})
 			},
 			onReachBottom() {
-				console.log("到底了");
-				if (that.page == that.total) {
+				if (Number(that.page) * Number(that.limit) >= Number(that.total)) {
 					$api.info("没有更多了")
 				} else {
-					this.page++
-					this.getAddress()
+					that.page++
+					that.getAddress()
 				}
 				
 			}

+ 332 - 0
pages/mine/service/detail.vue

@@ -0,0 +1,332 @@
+<template>
+	<view class="content">
+		<view class="box hflex acenter">
+			<view class="img_box">
+				<image :src="pageData.head_img" class="img"></image>
+				<view class="img_bottom hflex acenter jcenter" @click="replace">点击替换</view>
+			</view>
+			<view class="vflex img_right">
+				<view class="top_title">{{pageData.company}}</view>
+				<view class="hflex acenter jbetween">
+					<view class="addr">{{pageData.address}}</view>
+					<image src="/static/images/mine/address_icon.png" style="width: 44rpx;height: 44rpx;"></image>
+				</view>
+			</view>
+		</view>
+		<view class="box">
+			<view class="box_top hflex acenter jbetween">
+				<view class="title">商家信息</view>
+				<view class="hflex acenter" @click="edit">
+					<view class="top_text">可编辑</view>
+					<image src="/static/images/mine/edit.png" style="width: 36rpx;height: 36rpx;"></image>
+				</view>
+			</view>
+			<view class="cell hflex acenter">
+				<view class="left">联系人</view>
+				<u-input v-model="pageData.contact_name" border="none" :disabled="!is_edit" disabledColor="#fff"></u-input>
+			</view>
+			<view class="cell hflex acenter">
+				<view class="left">联系电话</view>
+				<u-input v-model="pageData.contact_phone" border="none" :disabled="!is_edit" disabledColor="#fff"></u-input>
+			</view>
+			<view class="cell">
+				<view class="left">商家简介</view>
+				<u-textarea v-model="pageData.intro" :disabled="!is_edit"></u-textarea >
+			</view>
+			<view class="cell">
+				<view class="left">图片及视频</view>
+			</view>
+			<view class="imgs" v-if="!is_edit">
+				<block v-for="(item,index) in pageData.imgs_videos" :key="index">
+					<image :src="item.url" class="img" v-if="item.type == 'image'"></image>
+					<video :src="item.url" class="img" v-if="item.type == 'video'"></video>
+				</block>
+			</view>
+			<view class="imgs" v-else>
+				<u-upload :fileList="pageData.imgs_videos" :accept='accept' @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="9" width="200rpx" height="200rpx">
+					<image src="/static/images/common/upload_img.png" style="width: 200rpx;height: 200rpx;"></image>
+				</u-upload>
+			</view>
+		</view>
+		<view class="box">
+			<view class="title">营业执照</view>
+			<view class="cell">
+				<image :src="pageData.business_img" class="bus_img"></image>
+			</view>
+		</view>
+		<view class="btn hflex acenter jcenter" @click="save">
+			保存
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				pageData: {},
+				is_edit: false,
+				accept: ['image','video'],
+			}
+		},
+		onLoad() {
+			that = this
+			that.getData()
+		},
+		methods: {
+			getData() {
+				var pages = getCurrentPages()
+				var prePage = pages[pages.length - 2]
+				that.pageData = prePage.$vm.user.merchant
+				for(var i=0;i<that.pageData.imgs_videos.length;i++) {
+					if(!that.pageData.imgs_videos[i].type) {
+						var img = that.pageData.imgs_videos[i].split('.')
+						var type = ''
+						console.log(img);
+						if(img[img.length - 1] == 'mp4') {
+							type = 'video'
+						} else if(img[img.length - 1] == 'jpg' || img[img.length - 1] == 'png' || img[img.length - 1] == 'jpeg' || img[img.length - 1] == 'gif') {
+							type = 'image'
+						}
+						var data = {
+							type: type,
+							url: that.pageData.imgs_videos[i]
+						}
+						that.pageData.imgs_videos.splice(i,1,data)
+					}
+				}
+				console.log(that.pageData);
+			},
+			replace() {
+				uni.chooseImage({
+					count: 1, //默认9
+					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
+					sourceType: ['album','camera'], //从相册选择
+					success: function (res) {
+						// console.log(JSON.stringify(res.tempFilePaths));
+						const tempFilePaths = res.tempFilePaths
+						uni.uploadFile({
+							url: $api.config.baseUrl + '/data/api.auth.Center/upload',
+							filePath: tempFilePaths[0],
+							name: 'file',
+							header: {
+								'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+								'api-name': 'iosapp'
+							},
+							formData: {
+								'user': 'test'
+							},
+							success: (res) => {
+								const data = JSON.parse(res.data)
+								if (data.code == 1) {
+									that.pageData.head_img = data.data.url
+								}
+							}
+						});
+					}
+				});
+			},
+			edit() {
+				that.is_edit = true
+			},
+			// 删除图片
+			deletePic(event) {
+				that.pageData.imgs_videos.splice(event.index, 1)
+			},
+			// 新增图片
+			async afterRead(event) {
+				let lists = [].concat(event.file)
+				let fileListLen = that.pageData.imgs_videos.length
+				lists.map((item) => {
+					that.pageData.imgs_videos.push({
+						...item,
+						// status: 'uploading',
+						// message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = that.pageData.imgs_videos[fileListLen]
+					that.pageData.imgs_videos.splice(fileListLen, 1, Object.assign(item, {
+						// status: 'success',
+						type: result.type,
+						url: result.url
+					}))
+					fileListLen++
+				}
+			},
+			uploadFilePromise(url) {
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: $api.config.baseUrl + '/data/api.auth.Center/upload', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						header: {
+							'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+							'api-name': 'iosapp'
+						},
+						formData: {
+							user: 'test'
+						},
+						success: (res) => {
+							setTimeout(() => {
+								var data = JSON.parse(res.data)
+								console.log('data:',data);
+								var type = data.data.key.split('.')
+								if(type[1] == 'mp4') {
+									that.$set(data.data,'type','video')
+								} else {
+									that.$set(data.data,'type','image')
+								}
+								resolve(data.data)
+							}, 1000)
+						}
+					});
+				})
+			},
+			save() {
+				var imgs_videos = ""
+				for(var i=0;i<that.pageData.imgs_videos.length;i++) {
+					imgs_videos+=that.pageData.imgs_videos[i].url + ','
+				}
+				imgs_videos = imgs_videos.substr(0,imgs_videos.length - 1)
+				$api.req({
+					url: '/data/api.business.User/edit',
+					method: 'POST',
+					data: {
+						head_img: that.pageData.head_img,
+						contact_name: that.pageData.contact_name,
+						contact_phone: that.pageData.contact_phone,
+						intro: that.pageData.intro,
+						imgs_videos: imgs_videos
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+						$api.jump(-1)
+					}
+				})
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content::v-deep {
+		background: #F5F5F5;
+		padding: 0 30rpx;
+		.box {
+			width: 100%;
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			box-sizing: border-box;
+			padding: 28rpx 20rpx;
+			margin-top: 20rpx;
+			.img_box {
+				width: 112rpx;
+				height: 112rpx;
+				border-radius: 16rpx;
+				overflow: hidden;
+				margin-right: 20rpx;
+				position: relative;
+				.img {
+					width: 100%;
+					height: 100%;
+				}
+				.img_bottom {
+					position: absolute;
+					bottom: 0;
+					left: 0;
+					width: 100%;
+					height: 36rpx;
+					background: rgba(0,0,0,0.5);
+					border-radius: 0px 0px 16rpx 16rpx;
+					font-size: 20rpx;
+					font-weight: 400;
+					color: #FFFFFF;
+					line-height: 28rpx;
+				}
+			}
+			.img_right {
+				width: calc(100% - 132rpx);
+				.top_title {
+					width: 100%;
+					font-size: 36rpx;
+					font-weight: 600;
+					color: #222222;
+					line-height: 50px;
+				}
+				.addr {
+					width: 424rpx;
+					font-size: 24rpx;
+					font-weight: 400;
+					color: #777777;
+					line-height: 28rpx;
+				}
+			}
+			.box_top {
+				padding: 0 0 24rpx;
+				border-bottom: 1rpx solid #F5F5F5;
+				.title {
+					font-size: 32rpx;
+					font-weight: 600;
+					color: #222222;
+					line-height: 44rpx;
+				}
+				.top_text {
+					font-size: 22rpx;
+					font-weight: 400;
+					color: #656565;
+					line-height: 32rpx;
+				}
+			}
+			.cell {
+				padding: 32rpx 0 0;
+				.left {
+					width: 150rpx;
+					font-size: 28rpx;
+					font-weight: 400;
+					color: #333333;
+					line-height: 40rpx;
+				}
+				.u-textarea {
+					margin-top: 24rpx;
+					background: #F5F5F5;
+					border-radius: 24rpx;
+					padding: 20rpx;
+					box-sizing: border-box;
+				}
+				.bus_img {
+					width: 100%;
+					height: 348rpx;
+					border-radius: 16rpx;
+				}
+			}
+			.imgs {
+				padding: 32rpx 0 0;
+				.img {
+					width: 200rpx;
+					height: 200rpx;
+					border-radius: 20rpx;
+					margin: 0 14rpx 20rpx 0;
+				}
+				.img:nth-child(3n+3) {
+					margin: 0 0 20rpx;
+				}
+			}
+		}
+		.btn {
+			width: 100%;
+			height: 84rpx;
+			background: #506DFF;
+			border-radius: 42rpx;
+			margin: 56rpx 0 68rpx;
+			font-size: 36rpx;
+			font-weight: 600;
+			color: #FFFFFF;
+			line-height: 50rpx;
+		}
+	}
+</style>

+ 1 - 1
pages/mine/service/feed/history.vue

@@ -26,6 +26,7 @@
 				pageList: [
 				],
 				total: 1,
+				limit: 10,
 				page: 1,
 			}
 		},
@@ -42,7 +43,6 @@
 					}
 				}, function(res) {
 					if(res.code == 1) {
-						console.log(res.data);
 						that.pageList = res.data
 						// that.total = res.data.length()
 					}

+ 781 - 0
pages/mine/service/purOrder/detail.vue

@@ -0,0 +1,781 @@
+<template>
+	<view class="content">
+		<view class="top">
+			<u-navbar title="订单详情" :autoBack="true" bgColor="rgba(0,0,0,0)" @leftClick="leftClick" :placeholder="true" :titleStyle="titleStyle"></u-navbar>
+			<view class="title" v-if="pageData.status == 1">暂无报价</view>
+			<view class="title" v-if="pageData.status == 2">已有报价</view>
+			<view class="title" v-if="pageData.status == 3 && pageData.tab !== 1">已匹配</view>
+			<view class="hflex acenter jbetween" v-if="pageData.status == 3 && pageData.tab == 1">
+				<view class="title">已匹配</view>
+				<view class="top_down hflex acenter jcenter" @click="select">
+					<image src="/static/images/common/down2.png" style="width: 36rpx;height: 36rpx;"></image>
+					<view class="">下载附件</view>
+				</view>
+			</view>
+		</view>
+		<view class="center">
+			<view class="box">
+				<view class="title">商品明细</view>
+				<block v-for="(item,index) in pageData.items">
+					<view class="item_bg">
+						<view class="item_name">{{item.name}}</view>
+						<view class="text_style1" v-if="tab !== '4'">规格:{{item.spec}}  数量:{{item.number}}桶</view>
+						<view class="text_style1" v-else>数量/吨位:{{item.weight}}</view>
+						<view v-if="item.enclosure">
+							<block v-for="(item2,index2) in item.enclosure" :key="index2">
+								<view class="hflex acenter jbetween enclo">
+									<view class="enclo_name">{{item2.filename}}</view>
+									<view class="enclo_down hflex acenter jcenter" @click="open(index,index2)">
+										<image src="/static/images/common/down_icon.png" style="width: 20rpx;height: 20rpx;"></image>
+										<view>下载附件</view>
+									</view>
+								</view>
+							</block>
+						</view>
+						<view class="text_style1" v-if="item.price">原采购价:<span class="price">¥{{item.price}}</span></view>
+						<view class="text_style1" v-if="item.standard">质量标准:{{item.standard}}</view>
+						<view class="hflex acenter jcenter" v-if="pageData.status == 1 && tab == '1'">
+							<view class="item_btn hflex acenter jcenter">暂无报价</view>
+						</view>
+						<view class="hflex acenter jbetween offer_bg" v-if="pageData.status == 2 && tab == '1'">
+							<view class="bg_left">已有报价•{{item.offers.length}}条</view>
+							<view class="hflex acenter" @click="showOffer(index)">
+								<view class="top_text">{{!item.show?'展开':'隐藏'}}</view>
+								<u-icon name="arrow-up" color="#555555" size="20rpx" v-if="item.show"></u-icon>
+								<u-icon name="arrow-down" color="#555555" size="20rpx" v-else></u-icon>
+							</view>
+						</view>
+						<view class="vflex" v-if="item.show">
+							<block v-for="(item2,index2) in item.offers" :key="index2">
+								<view class="offer_bg">
+									<view class="hflex acenter jbetween">
+										<view class="offer-user hflex acenter">
+											<image :src="item2.user.headimg" class="offer_avatar"></image>
+											<view class="user_name">{{item2.user.nickname}}</view>
+											<view class="renz hflex acenter jcenter">已认证</view>
+										</view>
+										<view class="offer_price">
+											报价:<span style="font-size: 36rpx;">¥{{item2.amount}}</span>
+										</view>
+									</view>
+									<view class="hflex acenter jbetween offer_center">
+										<view class="tele">联系电话:{{item2.user.phone}}</view>
+										<image src="/static/images/common/tele.png" style="width: 32rpx; height: 32rpx;" @click="tele(item2.user.phone)"></image>
+									</view>
+									<view class="hflex acenter jend offer_bottom">
+										<view class="bottom_btn1 hflex acenter jcenter" @click="toDetail(item2.user.id)">查看详情</view>
+										<view class="bottom_btn1 bottom_btn2 hflex acenter jcenter" @click="match(item2.id)">匹配订单</view>
+									</view>
+								</view>
+							</block>
+						</view>
+						<view class="offer_bg" v-if="tab == '1' && pageData.status == 3">
+							<view class="hflex acenter jbetween">
+								<view class="offer-user hflex acenter">
+									<image :src="pageData.offers[0].user.headimg" class="offer_avatar"></image>
+									<view class="user_name">{{pageData.offers[0].user.nickname}}</view>
+									<view class="renz hflex acenter jcenter">已认证</view>
+								</view>
+								<view class="offer_price">
+									报价:<span style="font-size: 36rpx;">¥{{pageData.offers[0].amount}}</span>
+								</view>
+							</view>
+							<view class="hflex acenter jbetween offer_center">
+								<view class="tele">联系电话:{{pageData.offers[0].user.phone}}</view>
+								<image src="/static/images/common/tele.png" style="width: 32rpx; height: 32rpx;" @click="tele(pageData.offers[0].user.phone)"></image>
+							</view>
+							<view class="hflex acenter jend offer_bottom">
+								<view class="bottom_btn1 hflex acenter jcenter" @click="toDetail(pageData.offers[0].user.id)">查看详情</view>
+								<view class="bottom_btn1 hflex acenter jcenter" @click="toDetail(pageData.offers[0].user.id)">联系接单人</view>
+								<view class="bottom_btn1 bottom_btn2 hflex acenter jcenter">提醒完成</view>
+							</view>
+						</view>
+					</view>
+				</block>
+				<view class="cell">
+					<view class="right" v-if="pageData.standard_tech">生产技术标准:<span class="left">{{pageData.standard_tech}}</span></view>
+				</view>
+				<view class="cell">
+					<view class="right" v-if="pageData.standard_check">生产验收标准:<span class="left">{{pageData.standard_check}}</span></view>
+				</view>
+				<view class="title">图片/视频</view>
+				<view class="hflex acenter fwrap" v-if="tab == '1'">
+					<block v-for="(item,index) in pageData.images" :key="index">
+						<image v-if="item.type == 'image'" :src="item.src" class="img"></image>
+						<video v-else :src="item.src"  class="img"></video>
+					</block>
+				</view>
+				<view class="hflex acenter fwrap" v-else>
+					<block v-for="(item,index) in pageData.file" :key="index">
+						<image v-if="item.type == 'image'" :src="item.src" class="img"></image>
+						<video v-else :src="item.src"  class="img"></video>
+					</block>
+				</view>
+				<view class="hflex acenter cell">
+					<view class="left">交货地址:</view>
+					<view class="right">{{pageData.post_address}}</view>
+				</view>
+				<view class="hflex acenter cell">
+					<view class="left">交货日期:</view>
+					<view class="right">{{pageData.post_time}}</view>
+				</view>
+				<view class="hflex acenter cell">
+					<view class="left">发布时间:</view>
+					<view class="right">{{pageData.create_time}}</view>
+				</view>
+			</view>
+			<view class="box" v-if="pageData.status == 2 && tab !== '1'">
+				<view class="hflex acenter jbetween cell2">
+					<view class="bg_left">已有报价•{{pageData.offers.length}}条</view>
+					<view class="hflex acenter" @click="showOffer2">
+						<view class="top_text">{{!show?'展开':'隐藏'}}</view>
+						<u-icon name="arrow-up" color="#555555" size="20rpx" v-if="show"></u-icon>
+						<u-icon name="arrow-down" color="#555555" size="20rpx" v-else></u-icon>
+					</view>
+				</view>
+				<view class="vflex box_bg" v-if="show">
+					<block v-for="(item2,index2) in pageData.offers" :key="index2">
+						<view class="offer_bg">
+							<view class="hflex acenter jbetween">
+								<view class="offer-user hflex acenter">
+									<image :src="item2.user.headimg" class="offer_avatar"></image>
+									<view class="user_name">{{item2.user.nickname}}</view>
+									<view class="renz hflex acenter jcenter">已认证</view>
+								</view>
+								<view class="offer_price">
+									报价:<span style="font-size: 36rpx;">¥{{item2.amount}}</span>
+								</view>
+							</view>
+							<view class="hflex acenter jbetween offer_center">
+								<view class="tele">联系电话:{{item2.user.phone}}</view>
+								<image src="/static/images/common/tele.png" style="width: 32rpx; height: 32rpx;" @click="tele(item2.user.phone)"></image>
+							</view>
+							<view class="hflex acenter jend offer_bottom">
+								<view class="bottom_btn1 hflex acenter jcenter" @click="toDetail(item2.user.id)">查看详情</view>
+								<view class="bottom_btn1 bottom_btn2 hflex acenter jcenter" @click="match(item2.id)">匹配订单</view>
+							</view>
+						</view>
+					</block>
+				</view>
+				
+			</view>
+			<view class="box" v-if="tab !== '1' && pageData.status == 3">
+				<view class="bg_left cell2">接单人详情</view>
+				<view class="box_bg">
+					<view class="offer_bg">
+						<view class="hflex acenter jbetween">
+							<view class="offer-user hflex acenter">
+								<image :src="pageData.offers[0].user.headimg" class="offer_avatar"></image>
+								<view class="user_name">{{pageData.offers[0].user.nickname}}</view>
+								<view class="renz hflex acenter jcenter">已认证</view>
+							</view>
+							<view class="offer_price">
+								报价:<span style="font-size: 36rpx;">¥{{pageData.offers[0].amount}}</span>
+							</view>
+						</view>
+						<view class="hflex acenter jbetween offer_center">
+							<view class="tele">联系电话:{{pageData.offers[0].user.phone}}</view>
+							<image src="/static/images/common/tele.png" style="width: 32rpx; height: 32rpx;" @click="tele(pageData.offers[0].user.phone)"></image>
+						</view>
+						<view class="hflex acenter jend offer_bottom">
+							<view class="bottom_btn1 hflex acenter jcenter" @click="toDetail(pageData.offers[0].user.id)">查看详情</view>
+							<view class="bottom_btn1 hflex acenter jcenter" @click="toDetail(pageData.offers[0].user.id)">联系接单人</view>
+							<view class="bottom_btn1 bottom_btn2 hflex acenter jcenter">提醒完成</view>
+						</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		
+		<view class="bottom hflex jend" v-if="pageData.status !== 3">
+			<view class="btn1 hflex acenter jcenter" @click="cancel(pageData.id)">取消订单</view>
+			<view class="btn1 btn2 hflex acenter jcenter" @click="edit(pageData.id)">编辑订单</view>
+		</view>
+		<u-popup :show="down_show" mode="center" @close="close">
+			<view class="popu">
+				<view class="popu_top hflex acenter jbetween">
+					<view></view>
+					<view class="popu_title">下载文件</view>
+					<image src="/static/images/common/close_icon.png" style="width: 32rpx;height: 32rpx;" @click="close"></image>
+				</view>
+				<view class="file_bg hflex acenter">
+					<image :src="pageData.items[index1].enclosure?pageData.items[index1].enclosure[index2].icon:''" class="file_icon"></image>
+					<view class="file_name">{{pageData.items[index1].enclosure?pageData.items[index1].enclosure[index2].filename:''}}</view>
+				</view>
+				<view class="btn_group hflex acenter jbetween">
+					<view class="left_btn hflex acenter jcenter" @click="copy(pageData.items[index1].enclosure?pageData.items[index1].enclosure[index2].fileurl:'')">复制链接</view>
+					<view class="right_btn hflex acenter jcenter" @click="down(pageData.items[index1].enclosure?pageData.items[index1].enclosure[index2].fileurl:'')">下载文件</view>
+				</view>
+				<view class="hflex acenter jcenter text_blue" @click="see(pageData.items[index1].enclosure?pageData.items[index1].enclosure[index2].fileurl:'')">预览文件></view>
+			</view>
+		</u-popup>
+		<u-popup :show="select_show" mode="center" @close="close" v-if="pageData.staus==1"></u-popup>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				titleStyle: {
+					fontSize: '36rpx',
+					color: '#FFFFFF'
+				},
+				id: '',
+				tab: '',
+				pageData: {},
+				show: false,
+				down_show: false,
+				index1: 0,
+				index2: 0,
+				select_show: false,
+			}
+		},
+		onLoad(options) {
+			that = this
+			that.id = options.id
+			that.tab = options.tab
+			that.getData() 
+		},
+		methods: {
+			leftClick() {
+				console.log('leftClick');
+			},
+			getData() {
+				$api.req({
+					url: '/data/api.business.Purchase/show',
+					data: {
+						tab: that.tab,
+						id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.pageData = res.data
+					}
+				})
+			},
+			showOffer(index) {
+				if(that.pageData.items[index].show) {
+					that.$set(that.pageData.items[index],'show',false)
+				} else {
+					that.$set(that.pageData.items[index],'show',true)
+				}
+			},
+			showOffer2() {
+				that.show = !that.show
+			},
+			open(index1,index2) {
+				that.index1 = index1
+				that.index2 = index2
+				that.down_show = true
+			},
+			close() {
+				that.down_show = false
+				that.select_show = false
+			},
+			select() {
+				that.select_show = true
+			},
+			down(url) {
+				uni.downloadFile({
+				  url: url, //仅为示例,并非真实的资源
+				  success (res) {
+				    // 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
+				    if (res.statusCode === 200) {
+						const filePath = res.tempFilePath
+						uni.saveFile({
+							tempFilePath: filePath,
+							success: function(res) {
+								console.log(res);
+								that.close()
+								that.see(res.savedFilePath)
+							}
+						})
+				    }
+				  }
+				})
+			},
+			see(url) {
+				uni.downloadFile({
+				  // 示例 url,并非真实存在
+				  url: url,
+				  showMenu: true,
+				  success: function (res) {
+				    const filePath = res.tempFilePath
+				    uni.openDocument({
+				      filePath: filePath,
+				      success: function (res) {
+				        console.log('打开文档成功')
+				      }
+				    })
+				  }
+				})
+			},
+			copy(value) {
+				uni.setClipboardData({
+					data: value,
+					success: function () {
+						$api.info('复制成功')
+					}
+				});
+			},
+			tele(value) {
+				uni.makePhoneCall({
+					phoneNumber: value
+				});
+			},
+			toDetail(id) {
+				$api.jump('/pages/mine/service/purOrder/msg?id=' + that.id + '&userid=' + id + '&tab=' + that.tab) 
+			},
+			match(id) {
+				$api.req({
+					url: '/data/api.business.Purchase/match',
+					method: 'POST',
+					data: {
+						tab: that.tab,
+						id: that.id,
+						offer_id: id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+						that.getData()
+					}
+				})
+			},
+			cancel(id) {
+				$api.req({
+					url: '/data/api.business.Purchase/cancel',
+					data: {
+						tab:that.tab,
+						id: id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+						that.getList()
+					}
+				})
+			},
+			edit(id) {
+				var url = ''
+				switch(that.tab) {
+					case '1' :
+						url = '/pages/release/purchase/purchase?id=' + id;
+						break;
+					case '2' :
+						url = '/pages/release/production/production?id=' +id;
+						break;
+					case '3' :
+						url = '/pages/release/waixie/waixie?id=' +id;
+						break;
+					case '4':
+						url = '/pages/release/ocean/ocean?id=' +id;
+						break;
+				}
+				$api.jump(url)
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		background: #F4F4F4;
+		position: relative;
+		.top {
+			width: 100%;
+			height: 520rpx;
+			background: url('/static/images/common/top_bg.png') no-repeat;
+			background-size: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.title {
+				padding: 24rpx 0;
+				font-size: 44rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 60rpx;
+			}
+			.top_down {
+				padding: 0 16rpx;
+				height: 52rpx;
+				border-radius: 26rpx;
+				border: 1rpx solid #FFFFFF;
+				font-size: 24rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 34rpx;
+			}
+		}
+		.center {
+			position: absolute;
+			left: 0;
+			top: 196rpx;
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.box {
+				width: 100%;
+				background: #FFFFFF;
+				border-radius: 20px;
+				box-sizing: border-box;
+				padding: 0 20rpx 12rpx;
+				margin-top: 20rpx;
+				.title {
+					font-size: 30rpx;
+					font-weight: 500;
+					color: #222222;
+					line-height: 42rpx;
+					padding: 28rpx 0;
+				}
+				.item_bg {
+					width: 100%;
+					background: #F4F4F4;
+					border-radius: 16rpx;
+					box-sizing: border-box;
+					padding: 0 20rpx 13rpx;
+					margin-bottom: 20rpx;
+					.item_name {
+						font-size: 30rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 42rpx;
+						padding: 20rpx 0 14rpx;
+					}
+					.text_style1 {
+						font-size: 24rpx;
+						font-weight: 400;
+						color: #888888;
+						line-height: 34rpx;
+						padding-bottom: 16rpx;
+					}
+					.price {
+						font-size: 28rpx;
+						font-weight: 400;
+						color: #555555;
+						line-height: 30rpx;
+					}
+					.item_btn {
+						width: 160rpx;
+						height: 52rpx;
+						border-radius: 32rpx;
+						border: 1rpx solid #979797;
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #222222;
+						margin: 10rpx 0 24rpx;
+					}
+					.offer_bg {
+						width: 100%;
+						background: #FFFFFF;
+						border-radius: 16rpx;
+						width: 100%;
+						box-sizing: border-box;
+						padding: 20rpx;
+						margin-bottom: 20rpx;
+						.bg_left {
+							font-size: 26rpx;
+							font-weight: 500;
+							color: #222222;
+							line-height: 36rpx;
+						}
+						.top_text {
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #555555;
+							line-height: 28rpx;
+						}
+						.offer-user {
+							padding: 20rpx 0 16rpx;
+							.offer_avatar {
+								width: 72rpx;
+								height: 72rpx;
+								border-radius: 50%;
+							}
+							.user_name {
+								font-size: 28rpx;
+								font-weight: 400;
+								color: #222222;
+								line-height: 40rpx;
+								padding: 0 16rpx;
+							}
+							.renz {
+								height: 28rpx;
+								background: #506DFF;
+								border-radius: 14rpx;
+								font-size: 16rpx;
+								font-weight: 400;
+								color: #FFFFFF;
+								line-height: 22rpx;
+								padding: 0 12rpx;
+							}
+						}
+						.offer_price {
+							font-size: 24rpx;
+							font-weight: 400;
+							color: #FF4646;
+							line-height: 34rpx;
+						}
+						.offer_center {
+							padding: 0 0 20rpx;
+							border-bottom: 1rpx solid #F4F4F4;
+							.tele {
+								font-size: 22rpx;
+								font-weight: 400;
+								color: #666666;
+								line-height: 32rpx;
+							}
+						}
+						.offer_bottom {
+							padding: 20rpx 0 0;
+							.bottom_btn1 {
+								margin-left: 20rpx;
+								// width: 132rpx;
+								height: 48rpx;
+								border-radius: 26rpx;
+								border: 1rpx solid #506DFF;
+								font-size: 22rpx;
+								font-weight: 400;
+								color: #506DFF;
+								line-height: 32rpx;
+								padding: 0 22rpx;
+							}
+							.bottom_btn2 {
+								background: #506DFF;
+								color: #FFFFFF;
+							}
+						}
+					}
+					.enclo {
+						padding: 20rpx 0;
+						border-top: 1rpx solid #ECECEC;
+						.enclo_name {
+							font-size: 24rpx;
+							font-weight: 400;
+							color: #333333;
+							line-height: 34rpx;
+						}
+						.enclo_down {
+							padding: 12rpx 16rpx;
+							border-radius: 22rpx;
+							border: 1px solid #506DFF;
+							font-size: 16rpx;
+							font-weight: 400;
+							color: #506DFF;
+							line-height: 22rpx;
+						}
+					}
+				}
+				.img {
+					width: 200rpx;
+					height: 200rpx;
+					border-radius: 16rpx;
+					margin: 0 14rpx 20rpx 0;
+				}
+				.img:nth-child(3n+3) {
+					margin: 0 0 20rpx 0;
+				}
+				.cell {
+					margin: 0 0 24rpx;
+					.left {
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #888888;
+						line-height: 36rpx;
+					}
+					.right {
+						font-size: 26rpx;
+						font-family: PingFangSC-Regular, PingFang SC;
+						font-weight: 400;
+						color: #333333;
+						line-height: 36rpx;
+					}
+				}
+				.cell2 {
+					padding: 20rpx 0;
+					.bg_left {
+						font-size: 26rpx;
+						font-weight: 500;
+						color: #222222;
+						line-height: 36rpx;
+					}
+					.top_text {
+						font-size: 20rpx;
+						font-weight: 400;
+						color: #555555;
+						line-height: 28rpx;
+					}
+				}
+				.box_bg {
+					.offer_bg {
+						width: 100%;
+						background: #F4F4F4;
+						border-radius: 16rpx;
+						width: 100%;
+						box-sizing: border-box;
+						padding: 20rpx;
+						margin-bottom: 20rpx;
+						
+					}
+					
+					.offer-user {
+						padding: 20rpx 0 16rpx;
+						.offer_avatar {
+							width: 72rpx;
+							height: 72rpx;
+							border-radius: 50%;
+						}
+						.user_name {
+							font-size: 28rpx;
+							font-weight: 400;
+							color: #222222;
+							line-height: 40rpx;
+							padding: 0 16rpx;
+						}
+						.renz {
+							height: 28rpx;
+							background: #506DFF;
+							border-radius: 14rpx;
+							font-size: 16rpx;
+							font-weight: 400;
+							color: #FFFFFF;
+							line-height: 22rpx;
+							padding: 0 12rpx;
+						}
+					}
+					.offer_price {
+						font-size: 24rpx;
+						font-weight: 400;
+						color: #FF4646;
+						line-height: 34rpx;
+					}
+					.offer_center {
+						padding: 0 0 20rpx;
+						border-bottom: 1rpx solid #F4F4F4;
+						.tele {
+							font-size: 22rpx;
+							font-weight: 400;
+							color: #666666;
+							line-height: 32rpx;
+						}
+					}
+					.offer_bottom {
+						padding: 20rpx 0 0;
+						.bottom_btn1 {
+							margin-left: 20rpx;
+							// width: 132rpx;
+							padding: 0 22rpx;
+							height: 48rpx;
+							border-radius: 26rpx;
+							border: 1rpx solid #506DFF;
+							font-size: 22rpx;
+							font-weight: 400;
+							color: #506DFF;
+							line-height: 32rpx;
+						}
+						.bottom_btn2 {
+							background: #506DFF;
+							color: #FFFFFF;
+						}
+					}
+				}
+			}
+			.box:nth-last-child(1) {
+				margin-bottom: 186rpx;
+			}
+		}
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			position: fixed;
+			bottom: 0;
+			z-index: 99;
+			box-sizing: border-box;
+			padding: 12rpx 30rpx 0;
+			.btn1 {
+				width: 200rpx;
+				height: 76rpx;
+				border-radius: 42rpx;
+				border: 1rpx solid #979797;
+				font-size: 32rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 44rpx;
+				margin-left: 40rpx;
+			}
+			.btn2 {
+				border: 1px solid #506DFF;
+				color: #506DFF;
+			}
+		}
+	.popu {
+			width: 630rpx;
+			background: #FFFFFF;
+			border-radius: 24rpx;
+			margin: 0 auto;
+			box-sizing: border-box;
+			padding: 0 40rpx;
+			.popu_top {
+				padding: 32rpx 0 40rpx;
+				.popu_title {
+					font-size: 36rpx;
+					font-weight: 500;
+					color: #333333;
+					line-height: 50rpx;
+				}
+			}
+			.file_bg {
+				width: 550rpx;
+				height: 100rpx;
+				background: #F4F4F4;
+				border-radius: 16rpx;
+				margin: 0 0 42rpx;
+			}
+			.file_icon {
+				width: 48rpx;
+				height: 60rpx;
+			}
+			.file_name {
+				padding-left: 14rpx;
+				font-size: 28rpx;
+				font-weight: 400;
+				color: #333333;
+				line-height: 40rpx;
+			}
+			.btn_group {
+				width: 100%;
+				.left_btn {
+					width: 260rpx;
+					height: 76rpx;
+					background: #ECEFFE;
+					border-radius: 40rpx;
+					font-size: 30rpx;
+					font-weight: 500;
+					color: #506DFF;
+					line-height: 42rpx;
+				}
+				.right_btn {
+					width: 260rpx;
+					height: 76rpx;
+					background: #506DFF;
+					border-radius: 40rpx;
+					font-size: 30rpx;
+					font-weight: 500;
+					color: #FFFFFF;
+					line-height: 42rpx;
+				}
+			}
+			.text_blue {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #506DFF;
+				line-height: 42rpx;
+				padding: 28rpx 0 46rpx;
+			}
+		}
+	}
+</style>

+ 316 - 0
pages/mine/service/purOrder/list.vue

@@ -0,0 +1,316 @@
+<template>
+	<view class="content">
+		<view class="tabs">
+			<u-tabs :list="tabs" @click="changeTabs" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" lineColor="#506DFF" lineWidth="48rpx" lineHeight='8rpx' :scrollable="false"></u-tabs>
+		</view>
+		<view class="tabs2">
+			<u-tabs :list="tabList" @click="changeTabs2" :activeStyle="activeStyle2" :inactiveStyle="inactiveStyle2"lineWidth="0" lineHeight='0' :scrollable="false"></u-tabs>
+		</view>
+		<view class="vflex">
+			<block v-for="(item,index) in pageList" :key="index">
+				<view class="box" @click="toDetail(item.id)">
+					<view class="top hflex acenter jbetween">
+						<view class="hflex acenter" v-if="item.tab == 1">
+							<image src="/static/images/mine/orderType1.png" class="icon_type"></image>
+							<view class="top_title">采购订单</view>
+						</view>
+						<view class="hflex acenter" v-if="item.tab == 2">
+							<image src="/static/images/mine/orderType2.png" class="icon_type"></image>
+							<view class="top_title">生产订单</view>
+						</view>
+						<view class="hflex acenter" v-if="item.tab == 3">
+							<image src="/static/images/mine/orderType3.png" class="icon_type"></image>
+							<view class="top_title">外协订单</view>
+						</view>
+						<view class="hflex acenter" v-if="item.tab == 4">
+							<image src="/static/images/mine/orderType4.png" class="icon_type"></image>
+							<view class="top_title">海运订单</view>
+						</view>
+						
+						<view class="top_right1 hflex acenter jcenter" v-if="item.status == 1">未报价</view>
+						<view class="top_right1 top_right2 hflex acenter jcenter" v-if="item.status == 2">已报价</view>
+						<view class="top_right1 top_right3 hflex acenter jcenter" v-if="item.status == 3">已匹配</view>
+					</view>
+					<view class="center">
+						<block v-for="(item2,index2) in item.items">
+							<view class="items">
+								<view class="items_name">{{item2.name}}</view>
+								<view class="hflex acenter items_spec" v-if="item.tab != 4">
+									<view>规格:{{item2.spec}} </view>
+									<view style="padding-left: 20rpx;">采购数量:{{item2.number}}吨</view>
+								</view>
+								<view class="hflex acenter items_spec" v-else>
+									<view>数量/吨位:{{item2.weight}} </view>
+								</view>
+							</view>
+						</block>
+					</view>
+					<view class="bottom hflex acenter jbetween">
+						<view class="bottom_left">{{item.create_time}}</view>
+						<view class="hflex acenter" v-if="item.status != 3">
+							<view class="btn1 hflex acenter jcenter" @click.stop="cancel(item.id)">取消订单</view>
+							<view class="btn1 btn2 hflex acenter jcenter" @click.stop="edit(item.id)">编辑订单</view>
+						</view>
+						<view class="hflex" v-else>
+							<view class="btn1 btn2 hflex acenter jcenter">提醒完成</view>
+						</view>
+					</view>
+				</view>
+			</block>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				tabs: [
+					{
+						name: '全部'
+					},
+					{
+						name: '未报价'
+					},
+					{
+						name: '已报价'
+					},
+					{
+						name: '已匹配'
+					}
+				],
+				activeStyle: {
+					fontSize: '32rpx',
+					color: '#222222',
+				},
+				inactiveStyle: {
+					color: '#333333',
+				},
+				status: 0,
+				tabList: [
+					{
+						name: '采购订单',
+					},
+					{
+						name: '生产订单',
+					},
+					{
+						name: '外协订单',
+					},
+					{
+						name: '海运订单',
+					}
+				],
+				activeStyle2: {
+					width: '148rpx',
+					height: '60rpx',
+					borderRadius: '42rpx',
+					fontSize: '26rpx',
+					textAlign: 'center',
+					lineHeight: '60rpx',
+					background: '#E7EBF7',
+					color: '#506DFF'
+				},
+				inactiveStyle2: {
+					width: '148rpx',
+					height: '60rpx',
+					borderRadius: '42rpx',
+					fontSize: '26rpx',
+					textAlign: 'center',
+					lineHeight: '60rpx',
+					background: '#E9E9E9',
+					color: '#333333',
+				},
+				tab: 1,
+				page: 1,
+				limit: 10,
+				pageList: []
+			}
+		},
+		onLoad() {
+			that = this
+			that.getList()
+		},
+		methods: {
+			
+			getList() {
+				$api.req({
+					url: '/data/api.business.Purchase/list',
+					data: {
+						page: that.page,
+						limit: that.limit,
+						status: that.status,
+						tab: that.tab
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						if(that.page == 1) {
+							that.pageList = res.data.data
+						} else {
+							that.pageList = that.pageList.concat(res.data.data)
+						}
+						that.total = res.data.total
+					}
+				})
+			},
+			changeTabs(e) {
+				that.status = e.index
+				that.page = 1
+				that.pageList = []
+				that.getList()
+			},
+			changeTabs2(e) {
+				that.tab = e.index + 1
+				that.page = 1
+				that.pageList = []
+				that.getList()
+			},
+			cancel(id) {
+				$api.req({
+					url: '/data/api.business.Purchase/cancel',
+					data: {
+						tab:that.tab,
+						id: id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+						that.getList()
+					}
+				})
+			},
+			edit(id) {
+				var url = ''
+				switch(that.tab) {
+					case 1 :
+						url = '/pages/release/purchase/purchase?id=' + id;
+						break;
+					case 2 :
+						url = '/pages/release/production/production?id=' +id;
+						break;
+					case 3 :
+						url = '/pages/release/waixie/waixie?id=' +id;
+						break;
+					case 4 :
+						url = '/pages/release/ocean/ocean?id=' +id;
+						break;
+				}
+				$api.jump(url)
+			},
+			toDetail(id) {
+				$api.jump('/pages/mine/service/purOrder/detail?id=' + id + '&tab=' + that.tab)
+			},
+			onReachBottom() {
+				if (Number(that.page) * Number(that.limit) >= Number(that.total)) {
+					$api.info("没有更多了")
+				} else {
+					that.page++
+					that.getList()
+				}
+				
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		background: #F4F4F4;
+		.tabs {
+			width: 100%;
+			height: 80rpx;
+			background: #fff;
+		}
+		.tabs2 {
+			padding: 24rpx 0 28rpx;
+		}
+		.box {
+			background: #FFFFFF;
+			border-radius: 20rpx;
+			margin-bottom: 20rpx;
+			box-sizing: border-box;
+			padding: 0 20rpx;
+			.top {
+				padding: 30rpx 0 0;
+				.icon_type {
+					width: 32rpx;
+					height: 32rpx;
+					margin-right: 12rpx;
+				}
+				.top_title {
+					font-size: 30rpx;
+					font-weight: 500;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.top_right1 {
+					width: 96rpx;
+					height: 40rpx;
+					background: #FFF4E8;
+					border-radius: 4rpx;
+					font-size: 22rpx;
+					font-weight: 400;
+					color: #FBA94E;
+				}
+				.top_right2 {
+					background: #E7EBF7;
+					color: #506DFF;
+				}
+				.top_right3 {
+					background: #E6F7E8;
+					color: #4AB256;
+				}
+			}
+			.center {
+				width: 100%;
+				.items {
+					padding: 24rpx 0;
+					border-bottom: 1rpx solid #F4F4F4;
+					.items_name {
+						font-size: 28rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 40rpx;
+						padding-bottom: 16rpx;
+					}
+					.items_spec {
+						width: auto;
+						font-size: 24rpx;
+						font-weight: 400;
+						color: #999999;
+						box-sizing: border-box;
+						padding: 6rpx 16rpx;
+						background: #F4F4F4;
+						border-radius: 8rpx;
+					}
+				}
+			}
+			.bottom {
+				width: 100%;
+				padding: 24rpx 0;
+				.bottom_left {
+					font-size: 24rpx;
+					font-weight: 400;
+					color: #777777;
+					line-height: 30rpx;
+				}
+				.btn1 {
+					width: 152rpx;
+					height: 60rpx;
+					border-radius: 32rpx;
+					border: 1px solid #979797;
+					font-size: 28rpx;
+					font-weight: 400;
+					color: #444444;
+				}
+				.btn2 {
+					color: #506DFF;
+					border: 1px solid #506DFF;
+					margin-left: 20rpx;
+				}
+			}
+		}
+	}
+</style>

+ 223 - 0
pages/mine/service/purOrder/msg.vue

@@ -0,0 +1,223 @@
+<template>
+	<view class="content">
+		<!-- <view class="top">
+			<view class="top_title">当前报价</view>
+			<view class="vflex">
+				<block v-for="(item,index) in offer.list" :key="index">
+					<view class="top_item hflex acenter">
+						<view class="item_label">第{{index + 1}}次报价</view>
+						<view class="text_red">{{item.price}}</view>
+					</view>
+				</block>
+			</view>
+			<view class="top_title">图片及资质证明图片</view>
+			<block v-for="(item,index) in offer.imgs" :key="index">
+				<view class="hflex acenter">
+					<image :src="item" class="img"></image>
+				</view>
+			</block>
+		</view> -->
+		<view class="list" id="list">
+			<block v-for="(item,index) in pageList" :key="index">
+				<view class="hflex acenter jend item" v-if="item.uuid2 == userId">
+					<view class="message">{{item.content}}</view>
+					<image :src="item.user?item.user.headimg:''" class="headimg"></image>
+				</view>
+				<view class="hflex acenter item" v-else>
+					<image :src="item.user.headimg" class="headimg"></image>
+					<view class="message message_left">{{item.content}}</view>
+				</view>
+			</block>
+		</view>
+		<view class="bottom hflex jbetween">
+			<view class="bottom_left">
+				<u-input v-model="message" shape="circle" placeholder="请输入信息..." border="none"></u-input>
+			</view>
+			<view class="bottom_btn hflex acenter jcenter" @click="send">立即回复</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				offer: {},
+				message: '',
+				pageList: [],
+				type: '',
+				id: '',
+				offer_id: '',
+				userId: '',
+				tab: '',
+			}
+		},
+		onLoad(options) {
+			that = this
+			that.id = options.id
+			that.tab = options.tab
+			that.userId = options.userid
+			that.getList()
+			that.scrollToBottom()
+		},
+		methods: {
+			getList() {
+				$api.req({
+					url: '/data/api.business.Purchase/msg_get',
+					data: {
+						id: that.id,
+						tab: that.tab,
+						user_id: that.userId
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.pageList = res.data
+					}
+				})
+			},
+			send() {
+				if(that.message == "") {
+					$api.info('不能发送空的内容')
+				} else {
+					$api.req({
+						url: '/data/api.business.Purchase/msg_send',
+						method: 'POST',
+						data: {
+							id: that.id,
+							tab: that.tab,
+							user_id: that.userId,
+							content: that.message
+						}
+					}, function(res) {
+						if(res.code == 1) {
+							that.message = ""
+							that.getList()
+						} 
+					})
+				}
+			},
+			scrollToBottom() {
+				uni.createSelectorQuery().select('#list').boundingClientRect(function(rect){
+				  // 使页面滚动到底部
+				  console.log("页面的高度",rect)
+				  uni.pageScrollTo({
+					scrollTop: rect.bottom
+				  })
+				}).exec()
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content::v-deep {
+		background: #F4F4F4;
+		.top {
+			width: 100%;
+			// height: 300px;
+			background: #FFFFFF;
+			box-shadow: 0px 4rpx 32rpx 0px rgba(0,0,0,0.04);
+			border-radius: 0px 0px 28rpx 28rpx;
+			box-sizing: border-box;
+			padding: 24rpx 30rpx 0;
+			.top_title {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #222222;
+				line-height: 40rpx;
+				padding-bottom: 24rpx;
+			}
+			.top_item {
+				width: 100%;
+				height: 76rpx;
+				background: #F4F4F4;
+				border-radius: 16rpx;
+				margin-bottom: 20rpx;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				.item_label {
+					font-size: 24rpx;
+					font-weight: 500;
+					color: #777777;
+					line-height: 34rpx;
+					padding-right: 28rpx;
+				}
+				.text_red {
+					font-size: 28rpx;
+					font-weight: 400;
+					color: #FF3636;
+					line-height: 34rpx;
+				}
+			}
+			.img {
+				width: 220rpx;
+				height: 220rpx;
+				border-radius: 16rpx;
+				margin: 0 16rpx 24rpx 0;
+			}
+			.img:nth-child(3n+3) {
+				margin: 0 0 24rpx;
+			}
+		}
+		.list {
+			width: 100%;
+			margin-bottom: 186rpx;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.item {
+				margin-top: 32rpx;
+				.message {
+					max-width: 480rpx;
+					background: #FFFFFF;
+					border-radius: 4rpx 24rpx 24rpx 24rpx;
+					box-sizing: border-box;
+					padding: 18rpx 20rpx;
+					font-size: 26rpx;
+					font-weight: 400;
+					color: #444444;
+					line-height: 36rpx;
+					margin: 0 20rpx 0 0;
+				}
+				.message_left {
+					margin: 0 0 0 20rpx;
+					border-radius: 24rpx 4rpx 24rpx 24rpx;
+				}
+				.headimg {
+					width: 68rpx;
+					height: 68rpx;
+					border-radius: 50%;
+				}
+			}
+		}
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			position: fixed;
+			bottom: 0;
+			z-index: 999;
+			box-sizing: border-box;
+			padding: 16rpx 30rpx 0;
+			background: #FFFFFF;
+			.bottom_left {
+				width: 490rpx;
+				height: 72rpx;
+				.u-input {
+					height: 100%;
+					background: #F4F4F4;
+					padding: 0 32rpx !important;
+				}
+			}
+			.bottom_btn {
+				width: 180rpx;
+				height: 72rpx;
+				background: #506DFF;
+				border-radius: 36rpx;
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+			}
+		}
+	}
+</style>

+ 44 - 0
pages/mine/service/rule.vue

@@ -0,0 +1,44 @@
+<template>
+	<view class="content">
+		<view class="box">
+			<u-parse :content="text"></u-parse>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				text: ''
+			}
+		},
+		onLoad() {
+			that = this
+			that.getData()
+		},
+		methods: {
+			getData() {
+				$api.req({
+					url: '/data/api.auth.Center/getplatformrules',
+					method: 'POST',
+				}, function(res) {
+					if(res.code ==1) {
+						that.text = res.data.platform_rules
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		padding: 30rpx;
+		.box {
+			width: 100%;
+		}
+	}
+</style>

+ 3 - 3
pages/mine/wallet/withdraw.vue

@@ -75,15 +75,15 @@
 				bank: [
 				],
 				active: 0,
-				max_money: '',
-				min_money: '',
+				max_money: 10000,
+				min_money: 1,
 				show: false
 			}
 		},
 		onLoad() {
 			that = this 
 			that.getList()
-			that.getData()
+			// that.getData()
 		},
 		methods: {
 			getList() {

+ 301 - 0
pages/order/list.vue

@@ -0,0 +1,301 @@
+<template>
+	<view class="content">
+		<u-navbar title="" @leftClick="leftClick" :autoBack="true" :placeholder="true" >
+			<view slot="center">
+				<u-search placeholder="商品名、单号、下单人" :showAction="false" v-model="order_name"></u-search>
+			</view>
+		</u-navbar>
+		<view class="tabs">
+			<u-tabs :list="tabList" @click="changeTab" :scrollable="false" :current="status - 1" lineWidth="0" :activeStyle="{
+				fontSize: '30rpx',color: '#222222'
+			}" :inactiveStyle="{
+				fontSize: '30rpx',color: '#888888'
+			}"></u-tabs>
+		</view>
+		<view class="center">
+			<block v-for="(item,index) in pageList" :key="index">
+				<view class="box" @click="toDetail(item.id)">
+					<view class="top hflex acenter jbetween">
+						<view class="order-no">订单号<span style="color: #333">{{item.order_no}}</span></view>
+						<view class="text_blue" v-if="item.status == 0">已取消</view>
+						<view class="text_blue" v-if="item.status == 1">等待买家付款</view>
+						<view class="text_blue" v-if="item.status == 2">等待买家付款</view>
+						<view class="text_blue" v-if="item.status == 3">等待买家付款</view>
+						<view class="text_blue" v-if="item.status == 4">买家已付款</view>
+						<view class="text_blue" v-if="item.status == 5">等待买家收货</view>
+						<view class="text_blue" v-if="item.status == 6">已完成</view>
+					</view>
+					<view class="time">下单时间:{{item.create_at}}</view>
+					<view class="good">
+						<block v-for="(item2,index2) in item.goods_item" :key="index2">
+							<view class="hflex acenter" style="margin-top: 20rpx;">
+								<image :src="item2.goods_cover" class="img"></image>
+								<view class="good_center">
+									<view class="name text_hide">{{item2.goods_name}}</view>
+									<view class="spec">{{item2.goods_spec}}</view>
+								</view>
+								<view class="vflex jend">
+									<view class="price">¥<span style="font-size: 30rpx;">{{item2.price_selling}}</span></view>
+									<view class="num">X{{item2.stock_sales}}</view>
+								</view>
+							</view>
+						</block>
+						<view class="hflex jend">
+							<view class="good_bottom">共{{item.goods_item.length}}件商品 实付款¥<span class="bottom_price">{{item.payment_amount}}</span></view>
+						</view>
+					</view>
+					<view class="box_bottom hflex jend">
+						<view class="btn1 hflex acenter jcenter" @click.stop="chat">联系买家</view>
+						<view class="btn1 btn2 hflex acenter jcenter" v-if="item.status==4" @click.stop="send(item.id)">立即发货</view>
+					</view>
+				</view>
+			</block>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				order_name: '',
+				status: 1,
+				tabList: [
+					{
+						name: '全部',
+						status: 1,
+						
+					},
+					{
+						name: '待支付',
+						status: 2,
+						badge: {
+							value: 0,
+							shape: 'horn',
+						}
+					},
+					{
+						name: '待发货',
+						status: 3,
+						badge: {
+							value: 0,
+							shape: 'horn',
+						}
+					},
+					{
+						name: '待收货',
+						status: 4,
+						badge: {
+							value: 0,
+							shape: 'horn',
+						}
+					}
+				],
+				page: 1,
+				limit: 10,
+				total: 1,
+				pageList: [],
+			}
+		},
+		onLoad(options) {
+			that = this
+			that.status = Number(options.status)
+			that.getList()
+			that.getNum()
+		},
+		methods: {
+			leftClick() {
+			},
+			getNum() {
+				$api.req({
+					url: '/data/api.business.Order/order_statistics'
+				}, function(res) {
+					if(res.code == 1) {
+						for(var i=1;i<that.tabList.length;i++) {
+							that.tabList[i].badge.value = res.data[i - 1]
+						}
+					}
+				})
+			},
+			getList() {
+				$api.req({
+					url: '/data/api.business.Order/order_list',
+					method: 'POST',
+					data: {
+						page: that.page,
+						order_name: that.order_name,
+						status: that.status
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						if(that.page == 1) {
+							that.pageList = res.data.list
+						} else {
+							that.pageList = that.pageList.concat(res.data.list)
+						}
+						that.total = res.data.page.total
+						that.limit = res.data.page.limit
+					}
+				})
+			},
+			changeTab(e) {
+				that.status = e.status
+				that.page = 1
+				that.pageList = []
+				that.getList()
+			},
+			toDetail(id) {
+				$api.jump('/pages/order/orderDetail?id=' + id)
+			},
+			chat() {
+				
+			},
+			send(id) {
+				$api.jump('/pages/order/send?id=' + id)
+			},
+			onReachBottom() {
+				if (Number(that.page) * Number(that.limit) >= Number(that.total)) {
+					$api.info("没有更多了")
+				} else {
+					that.page++
+					that.getList(that.cid)
+				}
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content::v-deep {
+		.tabs {
+			.u-tabs__wrapper__nav__item[data-v-0de61367] {
+				position: relative;
+				.u-badge {
+					position: absolute;
+					top: 18rpx;
+					right: 14rpx;
+					// width: 28rpx;
+					height: 20rpx;
+				}
+			}
+			
+		}
+		.center {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			min-height: calc(100vh - 176rpx);
+			background: #F4F4F4;
+			.box {
+				background: #FFFFFF;
+				border-radius: 20px;
+				width: 100%;
+				margin: 20rpx 0 0;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				.top {
+					padding: 24rpx 0 14rpx;
+					.order-no {
+						font-size: 24rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 30rpx;
+					}
+					.text_blue {
+						font-size: 24rpx;
+						font-weight: 500;
+						color: #506DFF;
+						line-height: 34rpx;
+					}
+				}
+				.time {
+					font-size: 24rpx;
+					font-weight: 400;
+					color: #555555;
+					line-height: 34rpx;
+					padding: 0 0 24rpx;
+				}
+				.good {
+					width: 100%;
+					padding: 24rpx 0 20rpx;
+					border-top: 1rpx solid #F4F4F4;
+					border-bottom: 1rpx solid #F4F4F4;
+					.img {
+						width: 180rpx;
+						height: 180rpx;
+					}
+					.good_center {
+						margin: 0 20rpx;
+						width: 338rpx;
+						.name {
+							font-size: 30rpx;
+							font-weight: 400;
+							color: #222222;
+							line-height: 42rpx;
+							padding-bottom: 20rpx;
+						}
+						.spec {
+							width: 288rpx;
+							background: #F5F5F5;
+							border-radius: 12rpx;
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #888888;
+							line-height: 28rpx;
+							box-sizing: border-box;
+							padding: 12rpx;
+						}
+					}
+					.price {
+						font-size: 20rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 24rpx;
+						padding: 0 0 16rpx;
+					}
+					.num {
+						font-size: 24rpx;
+						font-weight: 500;
+						color: #888888;
+						line-height: 28rpx;
+					}
+					.good_bottom {
+						font-size: 22rpx;
+						font-weight: 400;
+						color: #272727;
+						line-height: 32rpx;
+						padding: 26rpx 0 0;
+					}
+					.bottom_price {
+						font-size: 32rpx;
+						color: #222222;
+						font-weight: bold;
+						line-height: 24px;
+						line-height: 24px;
+					}
+				}
+				.box_bottom {
+					padding: 24rpx 0;
+					.btn1 {
+						width: 180rpx;
+						height: 60rpx;
+						border-radius: 36rpx;
+						border: 1rpx solid #787878;
+						font-size: 28rpx;
+						font-weight: 400;
+						color: #5D5D5D;
+						line-height: 40rpx;
+						margin-left: 24rpx;
+					}
+					.btn2 {
+						background: #506DFF;
+						border: none;
+						color: #FFFFFF;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 352 - 0
pages/order/orderDetail.vue

@@ -0,0 +1,352 @@
+<template>
+	<view class="content">
+		<view class="top">
+			<view class="hflex acenter">
+				<!-- <view class="state">{{pageData.status}}</view> -->
+				<view class="state" v-if="pageData.status == 0">已取消</view>
+				<view class="state" v-if="pageData.status == 1">预订单</view>
+				<view class="state" v-if="pageData.status == 2">等待买家付款</view>
+				<view class="state" v-if="pageData.status == 3">等待买家付款</view>
+				<view class="state" v-if="pageData.status == 4">买家已付款</view>
+				<view class="state" v-if="pageData.status == 5">等待买家收货</view>
+				<view class="state" v-if="pageData.status == 6">已完成</view>
+				<view class="state" v-if="pageData.status == 7">退款中</view>
+				<view class="state" v-if="pageData.status == 8">已退款</view>
+				<view class="hflex acenter blue_bg2" v-if="pageData.status == 2">
+					<view class="blue_bg">剩余付款时间</view>
+					<view class="hflex acenter">
+						<u-count-down autoStart :time="time" format="mm:ss" @change="onChange">
+							<view class="time">
+								<!-- <text class="time__item">{{ timeData.hours>10?timeData.hours:'0'+timeData.hours}}&nbsp;小时</text> -->
+								<text class="time__item">{{ timeData.minutes>=10?timeData.minutes:'0'+timeData.minutes }}&nbsp;分钟</text>
+								<text class="time__item">{{ timeData.seconds>=10?timeData.seconds:'0'+timeData.seconds }}&nbsp;秒</text>
+							</view>
+						</u-count-down>
+					</view>
+				</view>
+				
+			</view>
+			<view class="subTitle" v-if="pageData.status == 0">{{pageData.cancel_remark}}</view>
+			<view class="subTitle" v-if="pageData.status == 4">已付款,等待商家发货</view>
+			<view class="subTitle" v-if="pageData.status == 5">已发货,等待买家确认收货</view>
+		</view>
+		<view class="center">
+			<view class="box">
+				<view class="box_title">发货信息</view>
+				<view class="hflex jbetween cell" >
+					<view class="left">收货信息</view>
+					<view class="right">{{pageData.user_address.address_name}} , {{pageData.user_address.address_phone}} , {{pageData.user_address.address_province}}{{pageData.user_address.address_city}}{{pageData.user_address.address_area}}{{pageData.user_address.address_content}}</view>
+				</view>
+				<view class="hflex jbetween cell" v-if="pageData.status == 5">
+					<view class="left">物流单号</view>
+					<view class="right hflex acenter">
+						<view> {{pageData.express_no}}</view>
+						<image src="/static/images/common/copy.png" style="width: 28rpx;height: 28rpx;" @click="copy(pageData.express_no)"></image>
+					</view>
+				</view>
+			</view>
+			<view class="box">
+				<view class="box_title">买家信息</view>
+				<view class="hflex jbetween cell">
+					<view class="left">买家昵称</view>
+					<view class="right">{{pageData.user.nickname}}</view>
+				</view>
+				<view class="hflex jbetween cell">
+					<view class="left">联系电话</view>
+					<view class="right">{{pageData.user.phone}}</view>
+				</view>
+			</view>
+			<view class="box">
+				<view class="box_title">商品信息</view>
+				<view >
+					<block v-for="(item,index) in pageData.goods_item" :key="index">
+						<view class="items hflex acenter">
+							<image :src="item.goods_cover" class="item-img"></image>
+							<view class="item-right">
+								<view class="hflex acenter jbetween">
+									<view class="item_name text_hide">{{item.goods_name}}</view>
+									<view class="item_price">¥<span style="font-size: 30rpx;">{{item.price_selling}}</span></view>
+								</view>
+								<view class="hflex jbetween" style="padding: 20rpx 0 0;">
+									<view class="norm">{{item.goods_spec}}</view>
+									<view class="left_text">X{{item.stock_sales}}</view>
+								</view>
+							</view>
+						</view>
+					</block>
+				</view>
+				<view class="hflex acenter jbetween cell">
+					<view class="left" style="color: #888888;">运费</view>
+					<view class="right" style="color: #888888;">¥0.00</view>
+				</view>
+				<view class="hflex jend cell">
+					<view class="right">
+						共{{pageData.goods_item.length}}件商品 实付款¥<span style="font-size: 32rpx;color: #222;">{{pageData.payment_amount}}</span>
+					</view>
+				</view>
+			</view> 
+			<view class="box">
+				<view class="box_title">订单信息</view>
+				<view class="hflex jbetween cell">
+					<view class="left">订单编号</view>
+					<view class="hflex acenter">
+						<view class="right">{{pageData.order_no}} </view>
+						<view class="right1" @click="copy(pageData.order_no)"> | 复制</view>
+					</view>
+				</view>
+				<view class="hflex jbetween cell">
+					<view class="left">下单时间</view>
+					<view class="right">{{pageData.create_at}}</view>
+				</view>
+				<view class="hflex jbetween cell" v-if="pageData.status == 4 || pageData.status == 5 || pageData.status == 6">
+					<view class="left">付款时间</view>
+					<view class="right">{{pageData.payment_datetime}}</view>
+				</view>
+				<view class="hflex jbetween cell" v-if="pageData.status == 4 || pageData.status == 5 || pageData.status == 6">
+					<view class="left">支付方式</view>
+					<view class="right">{{pageData.payment_type}}</view>
+				</view>
+				<view class="hflex jbetween cell" v-if="pageData.status == 5 || pageData.status == 6">
+					<view class="left">发货时间</view>
+					<view class="right">{{pageData.user_address.send_datetime}}</view>
+				</view>
+			</view>
+		</view>
+		<view class="bottom hflex acenter jend">
+			<view class="btn1 btn2 hflex acenter jcenter" v-if="pageData.status == 0 ||pageData.status == 2 || pageData.status == 3">联系买家</view>
+			<view class="hflex acenter jend" v-if="pageData.status == 4">
+				<view class="btn1 hflex acenter jcenter">联系买家</view>
+				<view class="btn1 btn2 hflex acenter jcenter" @click="send(pageData.id)">立即发货</view>
+			</view>
+			<view class="btn1 hflex acenter jcenter" v-if="pageData.status == 5 ||pageData.status == 6">联系买家</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				id: '',
+				pageData: {},
+				time: 0,
+				timeData: {},
+			}
+		},
+		onLoad(options) {
+			that = this
+			that.id = options.id
+			that.getData()
+		},
+		methods: {
+			getData() {
+				$api.req({
+					url: '/data/api.business.Order/order_info',
+					method: 'POST',
+					data: {
+						order_id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.pageData = res.data
+						that.pageData.user_address.address_name = that.pageData.user_address.address_name.slice(0,1)+ '**'
+						that.pageData.user_address.address_phone = '***********'
+						that.pageData.user_address.address_content = that.pageData.user_address.address_content.slice(0,5) + '******'
+						that.pageData.user.phone = that.pageData.user.phone.substring(0,3)+"****"+that.pageData.user.phone.substring(7);
+						that.computTime()
+					}
+				})
+			},
+			// 倒计时
+			onChange(e) {
+				that.timeData = e
+			},
+			// 计算倒计时
+			computTime() {
+				var date = new Date(that.pageData.create_at).getTime() + ( 30 * 60 * 1000);
+				var nowDate = new Date().getTime()
+				that.time = date - nowDate
+			},
+			copy(value) {
+				uni.setClipboardData({
+					data: value,
+					success: function () {
+						$api.info('复制成功')
+					}
+				});
+			},
+			send(id) {
+				$api.jump('/pages/order/send?id=' + id)
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		background: #F4F4F4;
+		.top {
+			width: 100%;
+			padding: 20rpx 30rpx 24rpx;
+			.state {
+				font-size: 36rpx;
+				font-weight: bold;
+				color: #222222;
+				line-height: 50rpx;
+				padding-right: 24rpx;
+			}
+			.blue_bg {
+				// width: 124rpx;
+				padding: 0 14rpx;
+				height: 32rpx;
+				background: #506DFF;
+				border-radius: 18rpx 0px 18rpx 18rpx;
+				font-size: 16rpx;
+				text-align: center;
+				font-weight: 400;
+				color: #FFFFFF;
+				line-height: 32rpx;
+			}
+			.blue_bg2 {
+				// width: 256rpx;
+				padding: 0 14rpx;
+				height: 32rpx;
+				background: #E7EBFF;
+				border-radius: 18rpx;
+				font-size: 16rpx;
+				font-weight: bold;
+				color: #222222;
+				line-height: 32rpx;
+			}
+			.time {
+				padding-left: 16rpx;
+			}
+			.subTitle {
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #888888;
+				line-height: 34rpx;
+			}
+		}
+		.center {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.box {
+				width: 100%;
+				background: #FFFFFF;
+				border-radius: 20rpx;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				margin-top: 20rpx;
+				.box_title {
+					font-size: 32rpx;
+					font-weight: 600;
+					color: #222222;
+					line-height: 44rpx;
+					padding: 28rpx 0 24rpx;
+				}
+				.cell {
+					padding-bottom: 24rpx;
+					.left {
+						width: 240rpx;
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 36rpx;
+					}
+					.right {
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #555555;
+						line-height: 36rpx;
+					}
+					.right1 {
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 36rpx;
+					}
+				}
+				.items {
+					padding: 20rpx 0 32rpx;
+					border-bottom: 1rpx solid #F4F4F4;
+					.item-img {
+						width: 160rpx;
+						height: 160rpx;
+						border-radius: 24rpx;
+					}
+					.item-right {
+						width:calc(100% - 160rpx);
+						padding-left: 20rpx;
+						.item_name {
+							font-size: 30rpx;
+							font-weight: 400;
+							color: #222222;
+							line-height: 42rpx;
+						}
+						.item_price {
+							font-size: 20rpx;
+							font-weight: 600;
+							color: #222222;
+							line-height: 24rpx;
+						}
+						.norm {
+							width: 288rpx;
+							// height: 42px;
+							background: #F5F5F5;
+							border-radius: 12rpx;
+							box-sizing: border-box;
+							padding: 12rpx;
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #888888;
+							line-height: 28rpx;
+						}
+						.left_text {
+							font-size: 24rpx;
+							font-weight: 500;
+							color: #888888;
+							line-height: 28rpx;
+						}
+					}
+				}
+				.items:nth-last-child(1) {
+					border: none;
+				}
+			}
+			.box:nth-last-child(1) {
+				margin-bottom: 186rpx;
+			}
+		}
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			position: fixed;
+			z-index: 99;
+			bottom: 0;
+			.btn1 {
+				width: 208rpx;
+				height: 76rpx;
+				border-radius: 38rpx;
+				border: 1rpx solid #787878;
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 42rpx;
+				margin-left: 20rpx;
+			}
+			.btn2 {
+				background: #506DFF;
+				border: none;
+				color: #FFFFFF;
+			}
+		}
+	
+	}
+</style>

+ 240 - 0
pages/order/refund.vue

@@ -0,0 +1,240 @@
+<template>
+	<view class="content">
+		<view class="center">
+			<block v-for="(item,index) in pageList" :key="index">
+				<view class="box" @click="toDetail(item.id)">
+					<view class="top hflex acenter jbetween">
+						<view class="order-no">订单号<span style="color: #333">{{item.order_no}}</span></view>
+						<view class="text_red" v-if="item.status == 7">未退款</view>
+						<view class="text_blue" v-if="item.status == 8">已退款</view>
+					</view>
+					<view class="time">下单时间:{{item.create_at}}</view>
+					<view class="good">
+						<block v-for="(item2,index2) in item.goods_item" :key="index2">
+							<view class="hflex acenter good_item">
+								<image :src="item2.goods_cover" class="img"></image>
+								<view class="good_center">
+									<view class="name text_hide">{{item2.goods_name}}</view>
+									<view class="spec">{{item2.goods_spec}}</view>
+								</view>
+								<view class="vflex jend">
+									<view class="price">¥<span style="font-size: 30rpx;">{{item2.price_selling}}</span></view>
+									<view class="num">X{{item2.stock_sales}}</view>
+								</view>
+							</view>
+						</block>
+						<view class="hflex jend">
+							<view class="good_bottom">共{{item.goods_item.length}}件商品 实付款¥<span class="bottom_price">{{item.payment_amount}}</span></view>
+						</view>
+					</view>
+					<view class="box_bottom hflex jend" v-if="item.status == 7">
+						<view class="btn1 hflex acenter jcenter" @click.stop="refuse(item.id,2)">拒绝申请</view>
+						<view class="btn1 btn2 hflex acenter jcenter" @click.stop="refuse(item.id,2)">同意退款</view>
+					</view>
+					<view class="box_bottom hflex jend" v-if="item.status == 8">>
+						<view class="btn1 hflex acenter jcenter" @click.stop="dele(item.id)">删除记录</view>
+						<view class="btn1 btn2 hflex acenter jcenter" @click.stop="toDetail(item.id)">查看详情</view>
+					</view>
+				</view>
+			</block>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				pageList: [],
+				page: 1,
+				limit: 10,
+				total: 1,
+			}
+		},
+		onLoad() {
+			that = this
+			that.getList()
+		},
+		methods: {
+			getList() {
+				$api.req({
+					url: '/data/api.business.Order/refund_list',
+					data: {
+						page: that.page
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						if(that.page == 1) {
+							that.pageList = res.data.list
+						} else {
+							that.pageList = that.pageList.concat(res.data.list)
+						}
+						that.total = res.data.page.total
+						that.limit = res.data.page.limit
+					}
+				})
+			},
+			refuse(id,type) {
+				$api.req({
+					url: '/data/api.business.Order/examine_refund',
+					method: 'POST',
+					data: {
+						order_id: id,
+						type: type
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+						that.page = 1
+						that.getList()
+					}
+				})
+			},
+			toDetail(id) {
+				$api.jump('/pages/order/refundDetail?id=' + id)
+			},
+			onReachBottom() {
+				if (Number(that.page) * Number(that.limit) >= Number(that.total)) {
+					$api.info("没有更多了")
+				} else {
+					that.page++
+					that.getList(that.cid)
+				}
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		.center {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			min-height: calc(100vh - 176rpx);
+			background: #F4F4F4;
+			.box {
+				background: #FFFFFF;
+				border-radius: 20px;
+				width: 100%;
+				margin: 20rpx 0 0;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				.top {
+					padding: 24rpx 0 14rpx;
+					.order-no {
+						font-size: 24rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 30rpx;
+					}
+					.text_red {
+						font-size: 24rpx;
+						font-weight: 400;
+						color: #FF2020;
+						line-height: 34rpx;
+					}
+					.text_blue {
+						font-size: 24rpx;
+						font-weight: 500;
+						color: #506DFF;
+						line-height: 34rpx;
+					}
+				}
+				.time {
+					font-size: 24rpx;
+					font-weight: 400;
+					color: #555555;
+					line-height: 34rpx;
+					padding: 0 0 24rpx;
+				}
+				.good {
+					width: 100%;
+					padding: 24rpx 0 20rpx;
+					border-top: 1rpx solid #F4F4F4;
+					border-bottom: 1rpx solid #F4F4F4;
+					.good_item {
+						padding-bottom: 32rpx;
+					}
+					.good_item:nth-last-child(1) {
+						padding-bottom: 0;
+					}
+					.img {
+						width: 180rpx;
+						height: 180rpx;
+					}
+					.good_center {
+						margin: 0 20rpx;
+						width: 338rpx;
+						.name {
+							font-size: 30rpx;
+							font-weight: 400;
+							color: #222222;
+							line-height: 42rpx;
+							padding-bottom: 20rpx;
+						}
+						.spec {
+							width: 288rpx;
+							background: #F5F5F5;
+							border-radius: 12rpx;
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #888888;
+							line-height: 28rpx;
+							box-sizing: border-box;
+							padding: 12rpx;
+						}
+					}
+					.price {
+						font-size: 20rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 24rpx;
+						padding: 0 0 16rpx;
+					}
+					.num {
+						font-size: 24rpx;
+						font-weight: 500;
+						color: #888888;
+						line-height: 28rpx;
+					}
+					.good_bottom {
+						font-size: 22rpx;
+						font-weight: 400;
+						color: #272727;
+						line-height: 32rpx;
+						padding: 26rpx 0 0;
+					}
+					.bottom_price {
+						font-size: 32rpx;
+						color: #222222;
+						font-weight: bold;
+						line-height: 24px;
+						line-height: 24px;
+					}
+				}
+				.box_bottom {
+					padding: 24rpx 0;
+					.btn1 {
+						width: 180rpx;
+						height: 60rpx;
+						border-radius: 36rpx;
+						border: 1rpx solid #787878;
+						font-size: 28rpx;
+						font-weight: 400;
+						color: #5D5D5D;
+						line-height: 40rpx;
+						margin-left: 24rpx;
+					}
+					.btn2 {
+						background: #506DFF;
+						border: none;
+						color: #FFFFFF;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 373 - 0
pages/order/refundDetail.vue

@@ -0,0 +1,373 @@
+<template>
+	<view class="content">
+		<view class="top">
+			<view class="hflex acenter">
+				<!-- <view class="state">{{pageData.status}}</view> -->
+				<view class="state" v-if="pageData.refund_status == 1">请处理退货退款申请</view>
+				<view class="state" v-if="pageData.refund_status == 2 || pageData.refund_statue == 3">等待买家寄回商品</view>
+				<view class="state" v-if="pageData.refund_status == 4">买家已寄回商品</view>
+			</view>
+			<view class="subTitle" v-if="pageData.refund_status == 1">如果您同意,请点击"同意退货",将正确地址给买家</view>
+			<view class="subTitle" v-if="pageData.refund_status == 2 || pageData.refund_statue == 3">您已同意退货退款申请,等待买家寄回商品</view>
+			<view class="top_bg" v-if="pageData.refund_status == 4">
+				<view class="hflex acenter jbetween top_cell">
+					<view class="left">快递公司</view>
+					<view class="left">{{pagedata.express_name}}</view>
+				</view>
+				<view class="hflex acenter jbetween top_cell">
+					<view class="left">快递单号</view>
+					<view class="hflex acenter">
+						<view class="left">{{pagedata.express_no}} | </view>
+						<view class="left" @click="copy(pagedata.express_no)">复制</view>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="center">
+			<view class="box">
+				<view class="box_title">买家信息</view>
+				<view class="hflex jbetween cell">
+					<view class="left">买家昵称</view>
+					<view class="right">{{pageData.user.nickname}}</view>
+				</view>
+				<view class="hflex jbetween cell">
+					<view class="left">联系电话</view>
+					<view class="right">{{pageData.user.phone}}</view>
+				</view>
+			</view>
+			<view class="box">
+				<view class="box_title">退款信息</view>
+				<view >
+					<block v-for="(item,index) in pageData.goods_item" :key="index">
+						<view class="items hflex acenter">
+							<image :src="item.goods_cover" class="item-img"></image>
+							<view class="item-right">
+								<view class="hflex acenter jbetween">
+									<view class="item_name text_hide">{{item.goods_name}}</view>
+									<view class="item_price">¥<span style="font-size: 30rpx;">{{item.price_selling}}</span></view>
+								</view>
+								<view class="hflex jbetween" style="padding: 20rpx 0 0;">
+									<view class="norm">{{item.goods_spec}}</view>
+									<view class="left_text">X{{item.stock_sales}}</view>
+								</view>
+							</view>
+						</view>
+					</block>
+				</view>
+				<view class="hflex acenter jbetween cell">
+					<view class="left">退款状态</view>
+					<view class="right text-red" v-if="pageData.refund_status == 1">待商家处理</view>
+					<view class="right text-red" v-else>已同意退款</view>
+				</view>
+				<view class="hflex acenter jbetween cell">
+					<view class="left">退款原因</view>
+					<view class="right">{{pageData.refund_reason}}</view>
+				</view>
+				<view class="hflex acenter jbetween cell">
+					<view class="left">退款金额</view>
+					<view class="right">¥<span style="font-size: 32rpx;color: #222;">{{pageData.refund_money}}</span></view>
+				</view>
+				<view class="hflex acenter jbetween cell">
+					<view class="left">申请时间</view>
+					<view class="right">{{pageData.refund_time}}</view>
+				</view>
+				<view class="hflex acenter jbetween cell">
+					<view class="left">订单编号</view>
+					<view class="hflex acenter">
+						<view class="right">{{pageData.order_no}} | </view>
+						<view class="right" @click="copy(pageData.order_no)">复制</view>
+					</view>
+				</view>
+			</view> 
+			<view class="box">
+				<view class="box_title">申请信息</view>
+				<view class="hflex jbetween cell">
+					<view class="left">是否收货</view>
+					<view class="right">{{pageData.goods_status}}</view>
+				</view>
+				<view class="hflex jbetween cell">
+					<view class="left">售后类型</view>
+					<view class="right">{{pageData.refund_type}}</view>
+				</view>
+				<view class="hflex jbetween cell">
+					<view class="left">售后说明</view>
+					<view class="right">{{pageData.refund_desc}}</view>
+				</view>
+				<view class="hflex cell">
+					<view class="left">图片凭证</view>
+					<view class="hflex acenter img_list">
+						<block v-for="(item,index) in pageData.refund_nr" :key="index">
+							<image :src="item" class="refund_img"></image>
+						</block>
+					</view>
+				</view>
+			</view>
+		</view>
+		<view class="bottom hflex acenter jend" v-if="pageData.refund_status == 1 || pageData.refund_statue == 4">
+			<view class="btn1 btn2 hflex acenter jcenter" v-if="pageData.refund_status == 4">确认收货</view>
+			<view class="hflex acenter jend" v-if="pageData.refund_status == 1">
+				<view class="btn1 hflex acenter jcenter" @click="apply(2)">拒绝申请</view>
+				<view class="btn1 btn2 hflex acenter jcenter" @click="apply(1)">同意退款</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				id: '',
+				pageData: {},
+				time: 0,
+				timeData: {},
+			}
+		},
+		onLoad(options) {
+			that = this
+			that.id = options.id
+			that.getData()
+		},
+		methods: {
+			getData() {
+				$api.req({
+					url: '/data/api.business.Order/order_info',
+					method: 'POST',
+					data: {
+						order_id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.pageData = res.data
+						that.pageData.user_address.address_name = that.pageData.user_address.address_name.slice(0,1)+ '**'
+						that.pageData.user_address.address_phone = '***********'
+						that.pageData.user_address.address_content = that.pageData.user_address.address_content.slice(0,5) + '******'
+						that.pageData.user.phone = that.pageData.user.phone.substring(0,3)+"****"+that.pageData.user.phone.substring(7);
+					}
+				})
+			},
+			copy(value) {
+				uni.setClipboardData({
+					data: value,
+					success: function () {
+						$api.info('复制成功')
+					}
+				});
+			},
+			apply(type) {
+				$api.req({
+					url: '/data/api.business.Order/examine_refund',
+					method: 'POST',
+					data: {
+						order_id: that.id,
+						type: type
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.getData()
+					}
+				})
+			}
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		background: #F4F4F4;
+		.top {
+			width: 100%;
+			padding: 20rpx 30rpx 24rpx;
+			.state {
+				font-size: 36rpx;
+				font-weight: bold;
+				color: #222222;
+				line-height: 50rpx;
+				padding-right: 24rpx;
+			}
+			.blue_bg {
+				// width: 124rpx;
+				padding: 0 14rpx;
+				height: 32rpx;
+				background: #506DFF;
+				border-radius: 18rpx 0px 18rpx 18rpx;
+				font-size: 16rpx;
+				text-align: center;
+				font-weight: 400;
+				color: #FFFFFF;
+				line-height: 32rpx;
+			}
+			.blue_bg2 {
+				// width: 256rpx;
+				padding: 0 14rpx;
+				height: 32rpx;
+				background: #E7EBFF;
+				border-radius: 18rpx;
+				font-size: 16rpx;
+				font-weight: bold;
+				color: #222222;
+				line-height: 32rpx;
+			}
+			.time {
+				padding-left: 16rpx;
+			}
+			.subTitle {
+				font-size: 24rpx;
+				font-weight: 400;
+				color: #888888;
+				line-height: 34rpx;
+			}
+			.top_bg {
+				width: 100%;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				background: #F4F4F4;
+				border-radius: 20rpx;
+				.top_cell {
+					padding: 24rpx 0;
+					.left {
+						font-size: 28rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 40rpx;
+					}
+				}
+			}
+		}
+		.center {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.box {
+				width: 100%;
+				background: #FFFFFF;
+				border-radius: 20rpx;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				margin-top: 20rpx;
+				.box_title {
+					font-size: 32rpx;
+					font-weight: 600;
+					color: #222222;
+					line-height: 44rpx;
+					padding: 28rpx 0 24rpx;
+				}
+				.cell {
+					padding-bottom: 24rpx;
+					.left {
+						width: 140rpx;
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 36rpx;
+					}
+					.right {
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #555555;
+						line-height: 36rpx;
+					}
+					.text-red {
+						color: #FF2020;
+					}
+					.right1 {
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 36rpx;
+					}
+					.img_list {
+						.refund_img {
+							width: 156rpx;
+							height: 156rpx;
+							border-radius: 16rpx;
+							margin: 0 18rpx 20rpx 0;
+						}
+						.refund_img:nth-child(3n+3) {
+							margin: 0 0 20rpx;
+						}
+					}
+					
+				}
+				.items {
+					padding: 20rpx 0 32rpx;
+					border-bottom: 1rpx solid #F4F4F4;
+					.item-img {
+						width: 160rpx;
+						height: 160rpx;
+						border-radius: 24rpx;
+					}
+					.item-right {
+						width:calc(100% - 160rpx);
+						padding-left: 20rpx;
+						.item_name {
+							font-size: 30rpx;
+							font-weight: 400;
+							color: #222222;
+							line-height: 42rpx;
+						}
+						.item_price {
+							font-size: 20rpx;
+							font-weight: 600;
+							color: #222222;
+							line-height: 24rpx;
+						}
+						.norm {
+							width: 288rpx;
+							// height: 42px;
+							background: #F5F5F5;
+							border-radius: 12rpx;
+							box-sizing: border-box;
+							padding: 12rpx;
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #888888;
+							line-height: 28rpx;
+						}
+						.left_text {
+							font-size: 24rpx;
+							font-weight: 500;
+							color: #888888;
+							line-height: 28rpx;
+						}
+					}
+				}
+				.items:nth-last-child(1) {
+					border: none;
+				}
+			}
+			.box:nth-last-child(1) {
+				margin-bottom: 186rpx;
+			}
+		}
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			position: fixed;
+			z-index: 99;
+			bottom: 0;
+			.btn1 {
+				width: 208rpx;
+				height: 76rpx;
+				border-radius: 38rpx;
+				border: 1rpx solid #787878;
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 42rpx;
+				margin-left: 20rpx;
+			}
+			.btn2 {
+				background: #506DFF;
+				border: none;
+				color: #FFFFFF;
+			}
+		}
+	
+	}
+</style>

+ 300 - 0
pages/order/send.vue

@@ -0,0 +1,300 @@
+<template>
+	<view class="content">
+		<view class="center">
+			<view class="box">
+				<view>
+					<view class="box_no">订单号:<span style="font-weight: 600;">{{pageData.order_no}}</span></view>
+					<block v-for="(item,index) in pageData.goods_item" :key="index">
+						<view class="items hflex acenter">
+							<image :src="item.goods_cover" class="item-img"></image>
+							<view class="item-right">
+								<view class="hflex acenter jbetween">
+									<view class="item_name text_hide">{{item.goods_name}}</view>
+									<view class="item_price">¥<span style="font-size: 30rpx;">{{item.price_selling}}</span></view>
+								</view>
+								<view class="hflex jbetween" style="padding: 20rpx 0 0;">
+									<view class="norm">{{item.goods_spec}}</view>
+									<view class="left_text">X{{item.stock_sales}}</view>
+								</view>
+							</view>
+						</view>
+					</block>
+					<view class="addr hflex jbetween">
+						<view class="addr_left">{{address}}</view>
+						<image src="/static/images/common/biyanjing.png" style="width: 32rpx;height: 32rpx;" v-if="!address_show" @click="showAddr"></image>
+						<image src="/static/images/common/yanjing.png" style="width: 32rpx;height: 32rpx;" v-else @click="showAddr"></image>
+					</view>
+				</view>
+			</view>
+			<view class="box">
+				<view class="cell2 hflex acenter jbetween">
+					<view class="left">运单号</view>
+					<u-input v-model="express_no" border="none" placeholder="请输入运单号或扫码获取"></u-input>
+					<image src="/static/images/common/saoyisao.png" style="width: 32rpx;height: 32rpx;" @click="scan"></image>
+				</view>
+				<view class="cell2 hflex acenter jbetween">
+					<view class="left">物流公司</view>
+					<u-input v-model="express_name" border="none" placeholder="请输入物流公司"></u-input>
+					<view></view>
+				</view>
+			</view>
+			<view class="box">
+				<view class="hflex jbetween cell3" @click="selectAddr('send')">
+					<view class="label">发货地址</view>
+					<view class="hflex acenter">
+						<view class="text">{{send_addr}}</view>
+						<u-icon name="arrow-right" size="12" color="#888"></u-icon>
+					</view>
+				</view> 
+				<view class="hflex jbetween cell3" @click="selectAddr('send')">
+					<view class="label">退货地址</view>
+					<view class="hflex acenter">
+						<view class="text">{{send_addr}}</view>
+						<u-icon name="arrow-right" size="12" color="#888"></u-icon>
+					</view>
+				</view> 
+			</view>
+		</view>
+		<view class="bottom">
+			<view class="btn hflex acenter jcenter" @click="send">立即发货</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import $api from '@/static/js/api.js'
+	var that = ''
+	export default {
+		data() {
+			return {
+				id: '',
+				pageData: {},
+				address: '',
+				address_show: false,
+				express_no: '',
+				express_name:'',
+				send_addr: '',
+				return_addr: {}
+			}
+		},
+		onLoad(options) {
+			that = this
+			that.id = options.id
+			that.getData()
+		},
+		methods: {
+			getData() {
+				$api.req({
+					url: '/data/api.business.Order/order_info',
+					method: 'POST',
+					data: {
+						order_id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.pageData = res.data
+						if(that.address_show) {
+							that.address = that.pageData.user_address.address_name+ ',' + that.pageData.user_address.address_phone +',' +that.pageData.user_address.address_province+that.pageData.user_address.address_city+that.pageData.user_address.address_area+ that.pageData.user_address.address_content
+						} else {
+							that.address = that.pageData.user_address.address_name.slice(0,1)+ '**,' +'***********,' +that.pageData.user_address.address_province+that.pageData.user_address.address_city+that.pageData.user_address.address_area+ that.pageData.user_address.address_content.slice(0,5) + '******'
+						}
+					}
+				})
+			},
+			showAddr() {
+				that.address_show = !that.address_show
+				if(that.address_show) {
+					that.address = that.pageData.user_address.address_name+ ',' + that.pageData.user_address.address_phone +',' +that.pageData.user_address.address_province+that.pageData.user_address.address_city+that.pageData.user_address.address_area+ that.pageData.user_address.address_content
+				} else {
+					that.address = that.pageData.user_address.address_name.slice(0,1)+ '**,' +'***********,' +that.pageData.user_address.address_province+that.pageData.user_address.address_city+that.pageData.user_address.address_area+ that.pageData.user_address.address_content.slice(0,5) + '******'
+				}
+			},
+			scan() {
+				uni.scanCode({
+					success: function (res) {
+						that.express_no = res.result
+						// console.log('条码类型:' + res.scanType);
+						// console.log('条码内容:' + res.result);
+					}
+				});
+			},
+			selectAddr(select) {
+				$api.jump('/pages/mine/service/address/address?select=' + select)
+			},
+			send() {
+				$api.req({
+					url: '/data/api.business.Order/order_send',
+					method: 'POST',
+					data: {
+						order_no: that.pageData.order_no,
+						send_number: that.express_no,
+						company_name: that.express_name,
+						name: that.return_addr.name,
+						phone: that.return_addr.phone,
+						province: that.return_addr.province,
+						city: that.return_addr.city,
+						area: that.return_addr.area,
+						address: that.return_addr.address,
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+						$api.jump(-1)
+					}
+				})
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.content {
+		background: #F4F4F4;
+		.center {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			.box {
+				margin-top: 20rpx;
+				width: 100%;
+				box-sizing: border-box;
+				padding: 0 20rpx;
+				background: #FFFFFF;
+				border-radius: 20rpx;
+				.box_no {
+					padding: 28rpx 0;
+					font-size: 26rpx;
+					font-weight: 400;
+					color: #333333;
+					line-height: 36rpx;
+				}
+				.cell {
+					padding-bottom: 24rpx;
+					.left {
+						width: 240rpx;
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #222222;
+						line-height: 36rpx;
+					}
+					.right {
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #555555;
+						line-height: 36rpx;
+					}
+					.right1 {
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 36rpx;
+					}
+				}
+				.items {
+					padding: 20rpx 0 32rpx;
+					border-bottom: 1rpx solid #F4F4F4;
+					.item-img {
+						width: 160rpx;
+						height: 160rpx;
+						border-radius: 24rpx;
+					}
+					.item-right {
+						width:calc(100% - 160rpx);
+						padding-left: 20rpx;
+						.item_name {
+							font-size: 30rpx;
+							font-weight: 400;
+							color: #222222;
+							line-height: 42rpx;
+						}
+						.item_price {
+							font-size: 20rpx;
+							font-weight: 600;
+							color: #222222;
+							line-height: 24rpx;
+						}
+						.norm {
+							width: 288rpx;
+							// height: 42px;
+							background: #F5F5F5;
+							border-radius: 12rpx;
+							box-sizing: border-box;
+							padding: 12rpx;
+							font-size: 20rpx;
+							font-weight: 400;
+							color: #888888;
+							line-height: 28rpx;
+						}
+						.left_text {
+							font-size: 24rpx;
+							font-weight: 500;
+							color: #888888;
+							line-height: 28rpx;
+						}
+					}
+				}
+				.addr {
+					padding: 24rpx 0 26rpx;
+					.addr_left {
+						width: 492rpx;
+						font-size: 26rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 36rpx;
+					}
+				}
+				.cell2 {
+					padding: 28rpx 0;
+					border-bottom: 1rpx solid #F4F4F4;
+					.left {
+						width: 186rpx;
+						font-size: 30rpx;
+						font-weight: 600;
+						color: #333333;
+						line-height: 42rpx;
+					}
+				}
+				.cell2:nth-last-child(1) {
+					border: none;
+				}
+				.cell3 {
+					padding: 36rpx 0 32rpx;
+					.label {
+						width: 186rpx;
+						font-size: 30rpx;
+						font-weight: 600;
+						color: #333333;
+						line-height: 42rpx;
+					}
+					.text {
+						font-size: 28rpx;
+						font-weight: 400;
+						color: #333333;
+						line-height: 40rpx;
+					}
+				}
+			}
+		}
+		.bottom {
+			width: 100%;
+			height: 166rpx;
+			background: #FFFFFF;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			position: fixed;
+			z-index: 99;
+			bottom: 0; 
+			.btn {
+				margin-top: 16rpx;
+				width: 100%;
+				height: 84rpx;
+				background: #506DFF;
+				border-radius: 42rpx;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #FFFFFF;
+				line-height: 50rpx;
+			}
+		}
+	}
+</style>

+ 356 - 4
pages/release/ocean/ocean.vue

@@ -1,6 +1,71 @@
 <template>
 	<view class="content">
+		<view class="title">订单信息</view>
+		<view class="box">
+			<view class="box_item hflex acenter">
+				<view class="left">联系人</view>
+				<u-input v-model="name" border="none" placeholder="请输入联系人姓名"></u-input>
+			</view>
+			<view class="box_item hflex acenter">
+				<view class="left">联系电话</view>
+				<u-input v-model="phone" border="none" placeholder="请输入手机号"></u-input>
+			</view>
+		</view>
+		<view class="hflex acenter jbetween" style="padding-right: 30rpx;">
+			<view class="title">商品信息</view>
+			<view class="hflex acenter " @click="addGood">
+				<image src="/static/images/common/add_icon2.png" style="width: 36rpx;height: 36rpx;"></image>
+				<view class="add_text">添加</view>
+			</view>
+		</view>
+		<block v-for="(item,index) in items">
+			<view class="box">
+				<view class="box_item hflex acenter">
+					<view class="left">商品{{index + 1}}</view>
+					<u-input v-model="item.name" border="none" placeholder="请输入标题"></u-input>
+				</view>
+				<view class="box_item hflex acenter">
+					<view class="left">数量/吨位</view>
+					<u-input v-model="item.weight" border="none" placeholder="请输入商品数量"></u-input>
+				</view>
+				
+				<view class="hflex acenter jend">
+					<view class="dte_btn hflex acenter jcenter" @click="delGood(index)">删除</view>
+				</view>
+			</view>
+		</block>
 		
+		<view class="box">
+			<view class="box_item hflex acenter" @click="showTime">
+				<view class="left">包装形式</view>
+				<u-input v-model="form" border="none" disabled disabledColor="#fff" placeholder="去选择" suffixIcon="arrow-right"></u-input>
+			</view>
+			<view class="box_item hflex acenter">
+				<view class="left">到货码头</view>
+				<u-input v-model="wharf_to" border="none" placeholder="请输入装货码头"></u-input>
+			</view>
+			<view class="box_item hflex acenter">
+				<view class="left">到港码头</view>
+				<u-input v-model="wharf_for" border="none" placeholder="请输入到港码头"></u-input>
+			</view>
+		</view>
+		<view class="box">
+			<view class="box_title">图片/视频</view>
+			<u-upload :fileList="fileList1" :accept='accept' @beforeRead="open" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="9" width="200rpx" height="200rpx"></u-upload>
+		</view>
+		<view class="btn hflex acenter jcenter" @click="release">立即发布</view>
+		<u-popup :show="show_time" :round="10" mode="bottom" @close="close">
+			<view class="popu">
+				<image src="/static/images/common/popu_close.png" class="close" @click="close"></image>
+				<view class="popu_title">选择包装形式(可多选)</view>
+				<view class="hflex acenter fwrap">
+					<block v-for="(item,index) in formList" :key="index">
+						<view class="popu_item hflex acenter jcenter" :class="active.indexOf(index) !== -1?'active':''" @click="select(index)">{{item}}</view>
+					</block>
+				</view>
+				<view class="btn hflex acenter jcenter" @click="sure">确定</view>
+			</view>
+		</u-popup>
 	</view>
 </template>
 
@@ -10,18 +75,305 @@
 	export default {
 		data() {
 			return {
-				
+				name: '',
+				phone: '',
+				items: [
+					{
+						name: '',
+						weight: '',
+						
+					}
+				],
+				good: {
+					name: '',
+					weight: '',
+					
+				},
+				accept: ['image','video'],
+				fileList1: [],
+				form: '',
+				formList: ['散装','货柜','整船'],
+				active: [],
+				wharf_to: '',
+				wharf_for: '',
+				show_time: false,
+				id: '',
 			}
 		},
-		onLoad() {
+		onLoad(options) {
 			that = this
+			if(options.id) {
+				that.id = options.id
+				that.getData()
+			}
 		},
 		methods: {
-			
+			getData() {
+				$api.req({
+					url: '/data/api.business.Purchase/show',
+					data: {
+						tab: 4,
+						id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.name = res.data.real_name
+						that.phone = res.data.mobile
+						that.items = res.data.items
+						that.fileList1 = res.data.file
+						that.form = res.data.form
+						that.wharf_to = res.data.wharf_to
+						that.wharf_for = res.data.wharf_for
+					}
+				})
+			},
+			showTime() {
+				that.show_time = true
+			},
+			close() {
+				that.show_time = false
+			},
+			select(index) {
+				for(var i=0;i<that.active.length;i++) {
+					if(index == that.active[i]) {
+						that.active.splice(i,1)
+						return;
+					}
+				}
+				that.active.push(index)
+			},
+			sure() {
+				for(var i=0;i<that.active.length;i++) {
+					that.form += that.formList[that.active[i]] + ','
+				}
+				that.form = that.form.substring(0,that.form.length - 1)
+				that.close()
+			},
+			// 删除图片
+			deletePic(event) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
+			// 新增图片
+			async afterRead(event) {
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						// status: 'uploading',
+						// message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						// status: 'success',
+						type: result.type,
+						url: result.url
+					}))
+					fileListLen++
+				}
+				console.log(that.fileList1);
+			},
+			uploadFilePromise(url) {
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: $api.config.baseUrl + '/data/api.auth.Center/upload', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						header: {
+							'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+							'api-name': 'iosapp'
+						},
+						formData: {
+							user: 'test'
+						},
+						success: (res) => {
+							setTimeout(() => {
+								var data = JSON.parse(res.data)
+								console.log('data:',data);
+								var type = data.data.key.split('.')
+								if(type[1] == 'mp4') {
+									that.$set(data.data,'type','video')
+								} else {
+									that.$set(data.data,'type','image')
+								}
+								resolve(data.data)
+							}, 1000)
+						}
+					});
+				})
+			},
+			addGood() {
+				that.items.push(that.good)
+			},
+			delGood(index) {
+				that.items.splice(index,1)
+			},
+			release() {
+				var images = []
+				var image = {}
+				for(var i=0;i<that.fileList1.length;i++) {
+					image = {
+						type: that.fileList1[i].type,
+						src: that.fileList1[i].url,
+						url: that.fileList1[i].url
+					}
+					images.push(image)
+				}
+				$api.req({
+					url: '/data/api.business.Purchase/ocean_order',
+					method: 'POST',
+					data: {
+						id: that.id,
+						real_name: that.name,
+						mobile: that.phone,
+						form: that.form,
+						wharf_to: that.wharf_to,
+						wharf_for: that.wharf_for,
+						file: JSON.stringify(images),
+						item: JSON.stringify(that.items)
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+					}
+				})
+			}
 		},
 	}
 </script>
 
 <style lang="scss" scoped>
-	.content {}
+	.content::v-deep {
+		background: #F5F5F5;
+		.title {
+			font-size: 30rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 42rpx;
+			padding: 24rpx 0 14rpx 30rpx;
+		}
+		.add_text {
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 40rpx;
+			padding-left: 2rpx;
+		}
+		.box {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			background: #fff;
+			margin-bottom: 20rpx;
+			.box_title {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #222222;
+				line-height: 40rpx;
+				padding: 24rpx 0 20rpx;
+			}
+			.box_item {
+				padding: 28rpx 0;
+				border-bottom: 1rpx solid #F5F5F5;
+				.left {
+					width: 156rpx;
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.center {
+					width: calc(100% - 276rpx);
+				}
+				.right {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #5471FF;
+					line-height: 42rpx;
+				}
+				
+			}
+			.box_item1 {
+				padding: 28rpx 0;
+				.left {
+					// width: 156rpx;
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.u-textarea {
+					margin: 28rpx 0 0;
+					border: none;
+					background: #F5F5F5;
+					border-radius: 16rpx;
+				}
+			}
+			.dte_btn {
+				width: 132rpx;
+				height: 52rpx;
+				margin: 30rpx 0;
+				border-radius: 26rpx;
+				border: 1rpx solid #D3D3D3;
+				font-size: 26rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 36rpx;
+			}
+		}
+		.btn {
+			margin: 28rpx auto;
+			width: 690rpx;
+			height: 84rpx;
+			background: #5471FF;
+			border-radius: 46rpx;
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+		}
+		.popu {
+			box-sizing: border-box;
+			padding: 36rpx 30rpx;
+			position: relative;
+			width: 100%;
+			// height: 520rpx;
+			background: #FFFFFF;
+			border-radius: 40rpx 40rpx 0px 0px;
+			.close {
+				position: absolute;
+				width: 48rpx;
+				height: 48rpx;
+				right: 30rpx;
+				top: -60rpx;
+			}
+			.popu_title {
+				width: 100%;
+				text-align: center;
+				padding: 0 0 36rpx 0;
+				font-size: 36rpx;
+				font-weight: 500;
+				color: #222222;
+				line-height: 50rpx;
+			}
+			.popu_item {
+				height: 60rpx;
+				background: #F3F3F7;
+				border-radius: 34rpx;
+				padding: 0 66rpx;
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #222222;
+				margin: 28rpx 28rpx 0 0;
+			}
+			.active {
+				background: #E7EBFF;
+				border: 1px solid #5471FF;
+				color: #5471FF;
+			}
+		}
+		
+	}
 </style>

+ 366 - 4
pages/release/production/production.vue

@@ -1,6 +1,76 @@
 <template>
 	<view class="content">
+		<view class="title">订单信息</view>
+		<view class="box">
+			<view class="box_item hflex acenter">
+				<view class="left">联系人</view>
+				<u-input v-model="name" border="none" placeholder="请输入联系人姓名"></u-input>
+			</view>
+			<view class="box_item hflex acenter">
+				<view class="left">联系电话</view>
+				<u-input v-model="phone" border="none" placeholder="请输入手机号"></u-input>
+			</view>
+		</view>
+		<view class="hflex acenter jbetween" style="padding-right: 30rpx;">
+			<view class="title">商品信息</view>
+			<view class="hflex acenter " @click="addGood">
+				<image src="/static/images/common/add_icon2.png" style="width: 36rpx;height: 36rpx;"></image>
+				<view class="add_text">添加</view>
+			</view>
+		</view>
+		<block v-for="(item,index) in items">
+			<view class="box">
+				<view class="box_item hflex acenter">
+					<view class="left">商品{{index + 1}}</view>
+					<u-input v-model="item.name" border="none" placeholder="请输入标题"></u-input>
+				</view>
+				<view class="box_item hflex acenter">
+					<view class="left">规格</view>
+					<u-input v-model="item.spec" border="none" placeholder="如颜色/尺寸等"></u-input>
+				</view>
+				<view class="box_item hflex acenter">
+					<view class="left">数量</view>
+					<u-input v-model="item.number" border="none" placeholder="请输入数量"></u-input>
+				</view>
+				<view class="box_item hflex acenter jbetween">
+					<view class="left">附件</view>
+					<view class="center hflex">
+						<block v-for="(item2,index2) in item.enclosure" :key="index2">
+							<view>{{item2.filename}}</view>
+						</block>
+					</view>
+					<view class="right" @click="upload(index)">上传附件</view>
+				</view>
+				<view class="hflex acenter jend">
+					<view class="dte_btn hflex acenter jcenter" @click="delGood(index)">删除</view>
+				</view>
+			</view>
+		</block>
 		
+		<view class="box">
+			<view class="box_item1">
+				<view class="left">生产技术标准</view>
+				<u-textarea v-model="standard_tech" placeholder="请填写生产技术的标准"></u-textarea>
+			</view>
+			<view class="box_item1">
+				<view class="left">生产验收标准</view>
+				<u-textarea v-model="standard_check" placeholder="请填写生产验收的标准"></u-textarea>
+			</view>
+			<view class="box_item hflex acenter">
+				<view class="left">交货地址</view>
+				<u-input v-model="post_address" border="none" placeholder="请填写交货地址"></u-input>
+			</view>
+			<view class="box_item hflex acenter" @click="showTime">
+				<view class="left">交货时间</view>
+				<u-input v-model="post_time" border="none" disabled disabledColor="#fff" placeholder="请选择交货时间" suffixIcon="arrow-right"></u-input>
+			</view>
+			<u-datetime-picker :show="show_time" :formatter="formatter" :minDate="Number(new Date())" mode="datetime" @close="close" @confirm="selectTime"></u-datetime-picker>
+		</view>
+		<view class="box">
+			<view class="box_title">图片/视频</view>
+			<u-upload :fileList="fileList1" :accept='accept' @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="9" width="200rpx" height="200rpx"></u-upload>
+		</view>
+		<view class="btn hflex acenter jcenter" @click="release">立即发布</view>
 	</view>
 </template>
 
@@ -10,18 +80,310 @@
 	export default {
 		data() {
 			return {
-				
+				name: '',
+				phone: '',
+				items: [
+					{
+						name: '',
+						spec: '',
+						number: '',
+						enclosure: [
+							{
+								filename: '',
+								fileurl: '',
+							}
+						]
+					}
+				],
+				good: {
+					name: '',
+					spec: '',
+					number: '',
+					enclosure: [
+						{
+							filename: '',
+							fileurl: '',
+						}
+					]
+				},
+				show: false,
+				accept: ['image','video'],
+				fileList1: [],
+				post_address: '',
+				post_time: '',
+				show_time: false,
+				standard_tech: '',
+				standard_check: '',
+				id: '',
 			}
 		},
-		onLoad() {
+		onLoad(options) {
 			that = this
+			if(options.id) {
+				that.id = options.id
+				that.getData()
+			}
 		},
 		methods: {
-			
+			getData() {
+				$api.req({
+					url: '/data/api.business.Purchase/show',
+					data: {
+						tab: 2,
+						id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.name = res.data.real_name
+						that.phone = res.data.mobile
+						that.items = res.data.items
+						// that.fileList1 = res.data.file
+						that.post_address = res.data.post_address
+						that.post_time = res.data.post_time
+						that.standard_tech = res.data.standard_tech
+						that.standard_check = res.data.standard_check
+					}
+				})
+			},
+			showTime() {
+				that.show_time = true
+			},
+			close() {
+				that.show_time = false
+			},
+			selectTime(e) {
+				that.post_time = $api.formatDate(e)
+				that.close()
+			},
+			upload(index) {
+				uni.chooseFile({
+					count: 9, //默认100
+					type:'all',
+					success: function (res) {
+						const tempFilePaths = res.tempFilePaths;
+						uni.uploadFile({
+							url: $api.config.baseUrl + '/data/api.auth.Center/upload', //仅为示例,非真实的接口地址
+							filePath: tempFilePaths[0],
+							name: 'file',
+							header: {
+								'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+								'api-name': 'iosapp'
+							},
+							formData: {
+								'user': 'test'
+							},
+							success: (uploadFileRes) => {
+								var data = JSON.parse(uploadFileRes.data)
+								var enclosure = {
+									filename: res.tempFiles[0].name,
+									fileurl: data.data.url
+								}
+								if(that.items[index].enclosure[0].filename == '') {
+									that.items[index].enclosure.splice(0,1,enclosure)
+								} else {
+									that.items[index].enclosure.push(enclosure)
+								}
+								console.log('items',that.items);
+							}
+						});
+					},
+					fail: function(res) {
+						console.log('fail',res);
+					}
+				});
+			},
+			// 删除图片
+			deletePic(event) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
+			// 新增图片
+			async afterRead(event) {
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						// status: 'uploading',
+						// message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						// status: 'success',
+						type: result.type,
+						url: result.url
+					}))
+					fileListLen++
+				}
+				console.log(that.fileList1);
+			},
+			uploadFilePromise(url) {
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: $api.config.baseUrl + '/data/api.auth.Center/upload', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						header: {
+							'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+							'api-name': 'iosapp'
+						},
+						formData: {
+							user: 'test'
+						},
+						success: (res) => {
+							setTimeout(() => {
+								var data = JSON.parse(res.data)
+								console.log('data:',data);
+								var type = data.data.key.split('.')
+								if(type[1] == 'mp4') {
+									that.$set(data.data,'type','video')
+								} else {
+									that.$set(data.data,'type','image')
+								}
+								resolve(data.data)
+							}, 1000)
+						}
+					});
+				})
+			},
+			addGood() {
+				that.items.push(that.good)
+			},
+			delGood(index) {
+				that.items.splice(index,1)
+			},
+			release() {
+				console.log(that.fileList1);
+				var images = []
+				var image = {}
+				for(var i=0;i<that.fileList1.length;i++) {
+					image = {
+						type: that.fileList1[i].type,
+						src: that.fileList1[i].url,
+						url: that.fileList1[i].url
+					}
+					images.push(image)
+				}
+				$api.req({
+					url: '/data/api.business.Purchase/production_order',
+					method: 'POST',
+					data: {
+						id: that.id,
+						real_name: that.name,
+						mobile: that.phone,
+						standard_tech: that.standard_tech,
+						standard_check: that.standard_check,
+						post_time: that.post_time,
+						post_address: that.post_address,
+						file: JSON.stringify(images),
+						item: JSON.stringify(that.items)
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+					}
+				})
+			}
 		},
 	}
 </script>
 
 <style lang="scss" scoped>
-	.content {}
+	.content::v-deep {
+		background: #F5F5F5;
+		.title {
+			font-size: 30rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 42rpx;
+			padding: 24rpx 0 14rpx 30rpx;
+		}
+		.add_text {
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 40rpx;
+			padding-left: 2rpx;
+		}
+		.box {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			background: #fff;
+			margin-bottom: 20rpx;
+			.box_title {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #222222;
+				line-height: 40rpx;
+				padding: 24rpx 0 20rpx;
+			}
+			.box_item {
+				padding: 28rpx 0;
+				border-bottom: 1rpx solid #F5F5F5;
+				.left {
+					width: 156rpx;
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.center {
+					width: calc(100% - 276rpx);
+				}
+				.right {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #5471FF;
+					line-height: 42rpx;
+				}
+				
+			}
+			.box_item1 {
+				padding: 28rpx 0;
+				.left {
+					// width: 156rpx;
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.u-textarea {
+					margin: 28rpx 0 0;
+					border: none;
+					background: #F5F5F5;
+					border-radius: 16rpx;
+				}
+			}
+			.dte_btn {
+				width: 132rpx;
+				height: 52rpx;
+				margin: 30rpx 0;
+				border-radius: 26rpx;
+				border: 1rpx solid #D3D3D3;
+				font-size: 26rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 36rpx;
+			}
+		}
+		.btn {
+			margin: 28rpx auto;
+			width: 690rpx;
+			height: 84rpx;
+			background: #5471FF;
+			border-radius: 46rpx;
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+		}
+		.popu_title {
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 50rpx;
+		}
+	}
 </style>

+ 228 - 13
pages/release/purchase/purchase.vue

@@ -13,35 +13,54 @@
 		</view>
 		<view class="hflex acenter jbetween" style="padding-right: 30rpx;">
 			<view class="title">商品信息</view>
-			<view class="hflex acenter ">
+			<view class="hflex acenter " @click="addGood">
 				<image src="/static/images/common/add_icon2.png" style="width: 36rpx;height: 36rpx;"></image>
 				<view class="add_text">添加</view>
 			</view>
 		</view>
-		<block v-for="item in index">
+		<block v-for="(item,index) in items">
 			<view class="box">
 				<view class="box_item hflex acenter">
-					<view class="left">商品{{item}}</view>
-					<u-input v-model="items[item].name" border="none" placeholder="请输入标题"></u-input>
+					<view class="left">商品{{index + 1}}</view>
+					<u-input v-model="item.name" border="none" placeholder="请输入标题"></u-input>
 				</view>
 				<view class="box_item hflex acenter">
 					<view class="left">规格</view>
-					<u-input v-model="items[item].spec" border="none" placeholder="如颜色/尺寸等"></u-input>
+					<u-input v-model="item.spec" border="none" placeholder="如颜色/尺寸等"></u-input>
 				</view>
 				<view class="box_item hflex acenter">
 					<view class="left">数量</view>
-					<u-input v-model="items[item].number" border="none" placeholder="请输入数量"></u-input>
+					<u-input v-model="item.number" border="none" placeholder="请输入数量"></u-input>
 				</view>
 				<view class="box_item1">
 					<view class="left">质量标准</view>
-					<u-textarea v-model="items[item].standard" placeholder="请填写质量标准要求"></u-textarea>
+					<u-textarea v-model="item.standard" placeholder="请填写质量标准要求"></u-textarea>
 				</view>
 				<view class="box_item hflex acenter">
 					<view class="left">原采购价</view>
-					<u-input v-model="items[item].price" border="none" placeholder="请输入原采购价格"></u-input>
+					<u-input v-model="item.price" border="none" placeholder="请输入原采购价格"></u-input>
+				</view>
+				<view class="hflex acenter jend">
+					<view class="dte_btn hflex acenter jcenter" @click="delGood(index)">删除</view>
 				</view>
 			</view>
 		</block>
+		<view class="box">
+			<view class="box_title">图片/视频</view>
+			<u-upload :fileList="fileList1" :accept='accept' @beforeRead="open" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="9" width="200rpx" height="200rpx"></u-upload>
+		</view>
+		<view class="box">
+			<view class="box_item hflex acenter">
+				<view class="left">交货地址</view>
+				<u-input v-model="post_address" border="none" placeholder="请填写交货地址"></u-input>
+			</view>
+			<view class="box_item hflex acenter" @click="showTime">
+				<view class="left">交货时间</view>
+				<u-input v-model="post_time" border="none" disabled disabledColor="#fff" placeholder="请选择交货时间" suffixIcon="arrow-right"></u-input>
+			</view>
+			<u-datetime-picker :show="show_time" :formatter="formatter" :minDate="Number(new Date())" mode="datetime" @close="close" @confirm="selectTime"></u-datetime-picker>
+		</view>
+		<view class="btn hflex acenter jcenter" @click="release">立即发布</view>
 	</view>
 </template>
 
@@ -53,21 +72,165 @@
 			return {
 				name: '',
 				phone: '',
-				index: 1,
-				items: [],
+				items: [
+					{
+						name: '',
+						spec: '',
+						number: '',
+						standard: '',
+						price: ''
+					}
+				],
+				good: {
+					name: '',
+					spec: '',
+					number: '',
+					standard: '',
+					price: ''
+				},
+				show: false,
+				accept: ['image','video'],
+				fileList1: [],
+				post_address: '',
+				post_time: '',
+				show_time: false,
+				id: '',
 			}
 		},
-		onLoad() {
+		onLoad(options) {
 			that = this
+			if(options.id) {
+				that.id = options.id
+				that.getData()
+			}
 		},
 		methods: {
-			
+			getData() {
+				$api.req({
+					url: '/data/api.business.Purchase/show',
+					data: {
+						tab: 1,
+						id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.name = res.data.real_name
+						that.phone = res.data.mobile
+						that.items = res.data.items
+						that.fileList1 = res.data.images
+						that.post_address = res.data.post_address
+						that.post_time = res.data.post_time
+					}
+				})
+			},
+			showTime() {
+				that.show_time = true
+			},
+			close() {
+				that.show_time = false
+			},
+			selectTime(e) {
+				that.post_time = $api.formatDate(e)
+				that.close()
+			},
+			// 删除图片
+			deletePic(event) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
+			// 新增图片
+			async afterRead(event) {
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						// status: 'uploading',
+						// message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						// status: 'success',
+						type: result.type,
+						url: result.url
+					}))
+					fileListLen++
+				}
+				console.log(that.fileList1);
+			},
+			uploadFilePromise(url) {
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: $api.config.baseUrl + '/data/api.auth.Center/upload', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						header: {
+							'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+							'api-name': 'iosapp'
+						},
+						formData: {
+							user: 'test'
+						},
+						success: (res) => {
+							setTimeout(() => {
+								var data = JSON.parse(res.data)
+								console.log('data:',data);
+								var type = data.data.key.split('.')
+								if(type[1] == 'mp4') {
+									that.$set(data.data,'type','video')
+								} else {
+									that.$set(data.data,'type','image')
+								}
+								resolve(data.data)
+							}, 1000)
+						}
+					});
+				})
+			},
+			addGood() {
+				that.items.push(that.good)
+			},
+			delGood(index) {
+				that.items.splice(index,1)
+			},
+			release() {
+				var images = []
+				var image = {}
+				for(var i=0;i<that.fileList1.length;i++) {
+					image = {
+						type: that.fileList1[i].type,
+						src: that.fileList1[i].url,
+						url: that.fileList1[i].url
+					}
+					images.push(image)
+				}
+				console.log(images);
+				$api.req({
+					url: '/data/api.business.Purchase/purchase_order',
+					method: 'POST',
+					data: {
+						id: that.id,
+						real_name: that.name,
+						mobile: that.phone,
+						post_time: that.post_time,
+						post_address: that.post_address,
+						images: JSON.stringify(images),
+						item: JSON.stringify(that.items)
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+					}
+				})
+			}
 		},
 	}
 </script>
 
 <style lang="scss" scoped>
-	.content {
+	.content::v-deep {
 		background: #F5F5F5;
 		.title {
 			font-size: 30rpx;
@@ -88,6 +251,14 @@
 			box-sizing: border-box;
 			padding: 0 30rpx;
 			background: #fff;
+			margin-bottom: 20rpx;
+			.box_title {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #222222;
+				line-height: 40rpx;
+				padding: 24rpx 0 20rpx;
+			}
 			.box_item {
 				padding: 28rpx 0;
 				border-bottom: 1rpx solid #F5F5F5;
@@ -98,7 +269,51 @@
 					color: #222222;
 					line-height: 42rpx;
 				}
+				
+			}
+			.box_item1 {
+				padding: 28rpx 0;
+				.left {
+					// width: 156rpx;
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.u-textarea {
+					margin: 28rpx 0 0;
+					border: none;
+					background: #F5F5F5;
+					border-radius: 16rpx;
+				}
+			}
+			.dte_btn {
+				width: 132rpx;
+				height: 52rpx;
+				margin: 30rpx 0;
+				border-radius: 26rpx;
+				border: 1rpx solid #D3D3D3;
+				font-size: 26rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 36rpx;
 			}
 		}
+		.btn {
+			margin: 28rpx auto;
+			width: 690rpx;
+			height: 84rpx;
+			background: #5471FF;
+			border-radius: 46rpx;
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+		}
+		.popu_title {
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 50rpx;
+		}
 	}
 </style>

+ 366 - 4
pages/release/waixie/waixie.vue

@@ -1,6 +1,76 @@
 <template>
 	<view class="content">
+		<view class="title">订单信息</view>
+		<view class="box">
+			<view class="box_item hflex acenter">
+				<view class="left">联系人</view>
+				<u-input v-model="name" border="none" placeholder="请输入联系人姓名"></u-input>
+			</view>
+			<view class="box_item hflex acenter">
+				<view class="left">联系电话</view>
+				<u-input v-model="phone" border="none" placeholder="请输入手机号"></u-input>
+			</view>
+		</view>
+		<view class="hflex acenter jbetween" style="padding-right: 30rpx;">
+			<view class="title">商品信息</view>
+			<view class="hflex acenter " @click="addGood">
+				<image src="/static/images/common/add_icon2.png" style="width: 36rpx;height: 36rpx;"></image>
+				<view class="add_text">添加</view>
+			</view>
+		</view>
+		<block v-for="(item,index) in items">
+			<view class="box">
+				<view class="box_item hflex acenter">
+					<view class="left">商品{{index + 1}}</view>
+					<u-input v-model="item.name" border="none" placeholder="请输入标题"></u-input>
+				</view>
+				<view class="box_item hflex acenter">
+					<view class="left">规格</view>
+					<u-input v-model="item.spec" border="none" placeholder="如颜色/尺寸等"></u-input>
+				</view>
+				<view class="box_item hflex acenter">
+					<view class="left">数量</view>
+					<u-input v-model="item.number" border="none" placeholder="请输入数量"></u-input>
+				</view>
+				<view class="box_item hflex acenter jbetween">
+					<view class="left">附件</view>
+					<view class="center hflex">
+						<block v-for="(item2,index2) in item.enclosure" :key="index2">
+							<view>{{item2.filename}}</view>
+						</block>
+					</view>
+					<view class="right" @click="upload(index)">上传附件</view>
+				</view>
+				<view class="hflex acenter jend">
+					<view class="dte_btn hflex acenter jcenter" @click="delGood(index)">删除</view>
+				</view>
+			</view>
+		</block>
 		
+		<view class="box">
+			<view class="box_item1">
+				<view class="left">生产技术标准</view>
+				<u-textarea v-model="standard_tech" placeholder="请填写生产技术的标准"></u-textarea>
+			</view>
+			<view class="box_item1">
+				<view class="left">生产验收标准</view>
+				<u-textarea v-model="standard_check" placeholder="请填写生产验收的标准"></u-textarea>
+			</view>
+			<view class="box_item hflex acenter">
+				<view class="left">交货地址</view>
+				<u-input v-model="post_address" border="none" placeholder="请填写交货地址"></u-input>
+			</view>
+			<view class="box_item hflex acenter" @click="showTime">
+				<view class="left">交货时间</view>
+				<u-input v-model="post_time" border="none" disabled disabledColor="#fff" placeholder="请选择交货时间" suffixIcon="arrow-right"></u-input>
+			</view>
+			<u-datetime-picker :show="show_time" :formatter="formatter" :minDate="Number(new Date())" mode="datetime" @close="close" @confirm="selectTime"></u-datetime-picker>
+		</view>
+		<view class="box">
+			<view class="box_title">图片/视频</view>
+			<u-upload :fileList="fileList1" :accept='accept'  @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="9" width="200rpx" height="200rpx"></u-upload>
+		</view>
+		<view class="btn hflex acenter jcenter" @click="release">立即发布</view>
 	</view>
 </template>
 
@@ -10,18 +80,310 @@
 	export default {
 		data() {
 			return {
-				
+				name: '',
+				phone: '',
+				items: [
+					{
+						name: '',
+						spec: '',
+						number: '',
+						enclosure: [
+							{
+								filename: '',
+								fileurl: '',
+							}
+						]
+					}
+				],
+				good: {
+					name: '',
+					spec: '',
+					number: '',
+					enclosure: [
+						{
+							filename: '',
+							fileurl: '',
+						}
+					]
+				},
+				show: false,
+				accept: ['image','video'],
+				fileList1: [],
+				post_address: '',
+				post_time: '',
+				show_time: false,
+				standard_tech: '',
+				standard_check: '',
+				id: '',
 			}
 		},
-		onLoad() {
+		onLoad(options) {
 			that = this
+			if(options.id) {
+				that.id = options.id
+				that.getData()
+			}
 		},
 		methods: {
-			
+			getData() {
+				$api.req({
+					url: '/data/api.business.Purchase/show',
+					data: {
+						tab: 3,
+						id: that.id
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						that.name = res.data.real_name
+						that.phone = res.data.mobile
+						that.items = res.data.items
+						that.fileList1 = res.data.file
+						that.post_address = res.data.post_address
+						that.post_time = res.data.post_time
+						that.standard_tech = res.data.standard_tech
+						that.standard_check = res.data.standard_check
+					}
+				})
+			},
+			showTime() {
+				that.show_time = true
+			},
+			close() {
+				that.show_time = false
+			},
+			selectTime(e) {
+				that.post_time = $api.formatDate(e)
+				that.close()
+			},
+			upload(index) {
+				uni.chooseFile({
+					count: 9, //默认100
+					type:'all',
+					success: function (res) {
+						const tempFilePaths = res.tempFilePaths;
+						uni.uploadFile({
+							url: $api.config.baseUrl + '/data/api.auth.Center/upload', //仅为示例,非真实的接口地址
+							filePath: tempFilePaths[0],
+							name: 'file',
+							header: {
+								'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+								'api-name': 'iosapp'
+							},
+							formData: {
+								'user': 'test'
+							},
+							success: (uploadFileRes) => {
+								var data = JSON.parse(uploadFileRes.data)
+								var enclosure = {
+									filename: res.tempFiles[0].name,
+									fileurl: data.data.url
+								}
+								if(that.items[index].enclosure[0].filename == '') {
+									that.items[index].enclosure.splice(0,1,enclosure)
+								} else {
+									that.items[index].enclosure.push(enclosure)
+								}
+								console.log('items',that.items);
+							}
+						});
+					},
+					fail: function(res) {
+						console.log('fail',res);
+					}
+				});
+			},
+			// 删除图片
+			deletePic(event) {
+				this[`fileList${event.name}`].splice(event.index, 1)
+			},
+			// 新增图片
+			async afterRead(event) {
+				let lists = [].concat(event.file)
+				let fileListLen = this[`fileList${event.name}`].length
+				lists.map((item) => {
+					this[`fileList${event.name}`].push({
+						...item,
+						// status: 'uploading',
+						// message: '上传中'
+					})
+				})
+				for (let i = 0; i < lists.length; i++) {
+					const result = await this.uploadFilePromise(lists[i].url)
+					let item = this[`fileList${event.name}`][fileListLen]
+					this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
+						// status: 'success',
+						type: result.type,
+						url: result.url
+					}))
+					fileListLen++
+				}
+				console.log(that.fileList1);
+			},
+			uploadFilePromise(url) {
+				return new Promise((resolve, reject) => {
+					let a = uni.uploadFile({
+						url: $api.config.baseUrl + '/data/api.auth.Center/upload', // 仅为示例,非真实的接口地址
+						filePath: url,
+						name: 'file',
+						header: {
+							'token': uni.getStorageSync('token')?uni.getStorageSync('token'):'',
+							'api-name': 'iosapp'
+						},
+						formData: {
+							user: 'test'
+						},
+						success: (res) => {
+							setTimeout(() => {
+								var data = JSON.parse(res.data)
+								console.log('data:',data);
+								var type = data.data.key.split('.')
+								if(type[1] == 'mp4') {
+									that.$set(data.data,'type','video')
+								} else {
+									that.$set(data.data,'type','image')
+								}
+								resolve(data.data)
+							}, 1000)
+						}
+					});
+				})
+			},
+			addGood() {
+				that.items.push(that.good)
+			},
+			delGood(index) {
+				that.items.splice(index,1)
+			},
+			release() {
+				console.log(that.fileList1);
+				var images = []
+				var image = {}
+				for(var i=0;i<that.fileList1.length;i++) {
+					image = {
+						type: that.fileList1[i].type,
+						src: that.fileList1[i].url,
+						url: that.fileList1[i].url
+					}
+					images.push(image)
+				}
+				$api.req({
+					url: '/data/api.business.Purchase/coordination_order',
+					method: 'POST',
+					data: {
+						id: that.id,
+						real_name: that.name,
+						mobile: that.phone,
+						standard_tech: that.standard_tech,
+						standard_check: that.standard_check,
+						post_time: that.post_time,
+						post_address: that.post_address,
+						file: JSON.stringify(images),
+						item: JSON.stringify(that.items)
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						$api.info(res.info)
+					}
+				})
+			}
 		},
 	}
 </script>
 
 <style lang="scss" scoped>
-	.content {}
+	.content::v-deep {
+		background: #F5F5F5;
+		.title {
+			font-size: 30rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 42rpx;
+			padding: 24rpx 0 14rpx 30rpx;
+		}
+		.add_text {
+			font-size: 28rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 40rpx;
+			padding-left: 2rpx;
+		}
+		.box {
+			width: 100%;
+			box-sizing: border-box;
+			padding: 0 30rpx;
+			background: #fff;
+			margin-bottom: 20rpx;
+			.box_title {
+				font-size: 28rpx;
+				font-weight: 500;
+				color: #222222;
+				line-height: 40rpx;
+				padding: 24rpx 0 20rpx;
+			}
+			.box_item {
+				padding: 28rpx 0;
+				border-bottom: 1rpx solid #F5F5F5;
+				.left {
+					width: 156rpx;
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.center {
+					width: calc(100% - 276rpx);
+				}
+				.right {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #5471FF;
+					line-height: 42rpx;
+				}
+				
+			}
+			.box_item1 {
+				padding: 28rpx 0;
+				.left {
+					// width: 156rpx;
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #222222;
+					line-height: 42rpx;
+				}
+				.u-textarea {
+					margin: 28rpx 0 0;
+					border: none;
+					background: #F5F5F5;
+					border-radius: 16rpx;
+				}
+			}
+			.dte_btn {
+				width: 132rpx;
+				height: 52rpx;
+				margin: 30rpx 0;
+				border-radius: 26rpx;
+				border: 1rpx solid #D3D3D3;
+				font-size: 26rpx;
+				font-weight: 400;
+				color: #222222;
+				line-height: 36rpx;
+			}
+		}
+		.btn {
+			margin: 28rpx auto;
+			width: 690rpx;
+			height: 84rpx;
+			background: #5471FF;
+			border-radius: 46rpx;
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #FFFFFF;
+		}
+		.popu_title {
+			font-size: 36rpx;
+			font-weight: 500;
+			color: #222222;
+			line-height: 50rpx;
+		}
+	}
 </style>

+ 179 - 8
pages/tabbar/index/index.vue

@@ -33,17 +33,34 @@
 				</u-tabs>
 				<view class="vflex">
 					<block v-for="(item,index) in pageList" :key="index">
-						
+						<view class="right_item">
+							<view class="hflex acenter">
+								<view class="item_left">
+									<image :src="item.cover" class="item_cover"></image>
+									<image src="/static/images/common/img_bq1.png" v-if="item.status == 1" class="bq1"></image>
+									<image src="/static/images/common/img_bq2.png" v-if="item.status == 0" class="bq1"></image>
+								</view>
+								<view class="vflex">
+									<view class="item_title">{{item.name}}</view>
+									<view class="item_price">¥{{item.price_selling}}</view>
+								</view>
+							</view>
+							<view class="item_bottom hflex acenter jend">
+								<view class="btn1 hflex acenter jcenter" @click="toEdit(item.id)">编辑</view>
+								<view class="btn1 btn2 hflex acenter jcenter" v-if="item.status == 1" @click="lower(item.id)">下架</view>
+								<view class="btn1 btn2 hflex acenter jcenter" v-if="item.status == 0" @click="shelves(item.id)">上架</view>
+							</view>
+						</view>
 					</block>
 				</view>
 			</scroll-view>
 		</view>
 		<view class="hover hflex acenter jbetween">
-			<view class="hflex acenter">
+			<view class="hflex acenter" @click="toManager">
 				<image src="/static/images/common/sort_icon.png" class="hover_icon"></image>
 				<view class="hover_text">批量管理</view>
 			</view>
-			<view class="hflex acenter">
+			<view class="hflex acenter" @click="add">
 				<image src="/static/images/common/add_icon.png" class="hover_icon"></image>
 				<view class="hover_text">添加商品</view>
 			</view>
@@ -62,52 +79,65 @@
 				tabs: [
 					{
 						index: 0,
+						status: '',
 						name: '全部',
 						badge: {
-							value: 452,
+							value: 0,
 							bgColor: '#393939',
 							color: '#FFFFFF'
 						}
 					},
 					{
 						index: 1,
+						status: '1',
 						name: '售卖中',
 						badge: {
-							value: 126,
+							value: 0,
 							bgColor: '#EDEDED',
 							color: '#888888'
 						}
 					},
 					{
 						index: 2,
+						status: '0',
 						name: '已下架',
 						badge: {
-							value: 59,
+							value: 0,
 							bgColor: '#EDEDED',
 							color: '#888888'
 						}
 					},
 					{
 						index: 3,
+						status: '2',
 						name: '已售罄',
 						badge: {
-							value: 59,
+							value: 0,
 							bgColor: '#EDEDED',
 							color: '#888888'
 						}
 					},
 					
 				],
+				tab_active: 0,
 				current: 0,
 				cateList: [],
 				left_active: 0,
+				right_active: 0,
 				pageList: [],
-				cate_show: false
+				cate_show: false,
+				page: 1,
+				limit: 10,
+				total: 10
 			}
 		},
 		onLoad() {
 			that = this
+			
+		},
+		onShow() {
 			that.getCate()
+			
 		},
 		methods: {
 			getCate() {
@@ -116,6 +146,31 @@
 				}, function(res) {
 					if(res.code == 1) {
 						that.cateList = res.data
+						that.getList()
+					}
+				})
+			},
+			getList() {
+				$api.req({
+					url: '/data/api.business.Goods/goods_list',
+					data: {
+						name: that.search,
+						status: that.tabs[that.tab_active].status,
+						cateids: that.cateList[that.left_active].sub[that.right_active].id,
+						page: that.page
+					}
+				}, function(res) {
+					if(res.code == 1) {
+						for (var i=0;i<that.tabs.length;i++) {
+							that.$set(that.tabs[i].badge,'value',res.data.count[i])
+						}
+						if(that.page == 1) {
+							that.pageList = res.data.list.list
+						} else {
+							that.pageList = that.pageList.concat(res.data.list.list)
+						}
+						that.total = res.data.list.page.total
+						that.limit = res.data.list.page.limit
 					}
 				})
 			},
@@ -130,9 +185,65 @@
 						that.$set(that.tabs[i].badge,"color",'#888888')
 					}
 				}
+				that.tab_active = e.index
+				that.page = 1
+				that.pageList = []
+				that.getList()
+			},
+			clickTab2(e) {
+				that.right_active = e.index
+				that.page = 1
+				that.pageList = []
+				that.getList()
 			},
 			open() {
 				that.cate_show = !that.cate_show
+			},
+			add() {
+				$api.jump('/pages/good/add')
+			},
+			toManager() {
+				$api.jump('/pages/good/manager')
+			},
+			toEdit(id) {
+				$api.jump('/pages/good/add?id=' + id)
+			},
+			lower(id) {
+				$api.req({
+					url: '/data/api.business.Goods/lower',
+					method: 'POST',
+					data: {
+						goods_id: id
+					}
+				}, function(res) {
+					if(res.code ==1) {
+						$api.info(res.info)
+						that.getList()
+					}
+				})
+			},
+			shelves(id) {
+				$api.req({
+					url: '/data/api.business.Goods/shelves',
+					method: 'POST',
+					data: {
+						goods_id: id
+					}
+				}, function(res) {
+					if(res.code ==1) {
+						$api.info(res.info)
+						that.getList()
+					}
+				})
+			},
+			onReachBottom() {
+				if (Number(that.page) * Number(that.limit) >= Number(that.total)) {
+					$api.info("没有更多了")
+				} else {
+					that.page++
+					that.getList()
+				}
+				
 			}
 		},
 	}
@@ -185,6 +296,66 @@
 					color: #393939;
 					line-height: 28rpx;
 				}
+				.right_item {
+					width: 100%;
+					box-sizing: border-box;
+					padding: 0 20rpx;
+					.item_left {
+						position: relative;
+						.item_cover {
+							width: 144rpx;
+							height: 144rpx;
+							border-radius: 16rpx;
+							margin-right: 20rpx;
+						}
+						.bq1 {
+							position: absolute;
+							top: 0;
+							right: 20rpx;
+							width: 60rpx;
+							height: 60rpx;
+						}
+					}
+					.item_title {
+						font-size: 28rpx;
+						font-weight: 500;
+						color: #222222;
+						line-height: 40rpx;
+						text-overflow: ellipsis;
+						overflow: hidden;
+						display: -webkit-box;
+						-webkit-box-orient: vertical;
+						box-orient: vertical;
+						line-clamp: 2;
+						-webkit-line-clamp: 2;
+					}
+					.item_price {
+						margin-top: 22rpx;
+						font-size: 28rpx;
+						font-weight: bold;
+						color: #FF2626;
+						line-height: 32rpx;
+					}
+					.item_bottom {
+						width: 100%;
+						padding: 20rpx;
+						.btn1 {
+							width: 120rpx;
+							height: 48rpx;
+							border-radius: 4rpx;
+							border: 1rpx solid #708AFF;
+							margin-left: 32rpx;
+							font-size: 28rpx;
+							font-weight: 400;
+							color: #5B77FF;
+							line-height: 40rpx;
+						}
+						.btn2 {
+							border: 1px solid #979797;
+							color: #222222;
+						}
+					}
+				}
 			}
 		}
 		.hover {

+ 38 - 8
pages/tabbar/mine/mine.vue

@@ -5,7 +5,7 @@
 				<u-avatar :src="user.headimg"></u-avatar>
 				<view class="user_name">{{user.nickname?user.nickname:'请先登录'}}</view>
 			</view>
-			<view class="message hflex acenter jcenter">
+			<view class="message hflex acenter jcenter" @click="toMessage">
 				<image src="/static/images/mine/message.png" style="width: 48rpx;height: 48rpx;"></image>
 				<u-badge max="99" :absolute="true" :offset="[1,1]" :value="user.message_num" v-if="user.message_num>0"></u-badge>
 			</view>
@@ -18,11 +18,11 @@
 			<view class="order">
 				<view class="order_top hflex acenter jbetween">
 					<view class="order_title">商城订单</view>
-					<view class="order_right">查看全部</view>
+					<view class="order_right" @click="toOrder(1)">查看全部</view>
 				</view>
 				<view class="order_list hflex acenter jcenter">
 					<block v-for="(item,index) in orderList" :key="index">
-						<view class="order_item vflex acenter jcenter">
+						<view class="order_item vflex acenter jcenter" @click="toOrder(item.id)">
 							<image :src="item.img" style="width: 52rpx;height: 52rpx;"></image>
 							<u-badge :absolute="true" :offset="[1,20]" max="99" :value="item.number" v-if="item.number>0"></u-badge>
 							<view class="order_text">{{item.name}}</view>
@@ -84,21 +84,25 @@
 				login: true,
 				orderList: [
 					{
+						id: 2,
 						img: '/static/images/mine/order1.png',
 						name: '待付款',
-						number: 12
+						number: 0
 					},
 					{
+						id: 3,
 						img: '/static/images/mine/order2.png',
 						name: '待发货',
-						number: 4
+						number: 0
 					},
 					{
+						id: 4,
 						img: '/static/images/mine/order3.png',
 						name: '待收货',
 						number: 0
 					},
 					{
+						id: 5,
 						img: '/static/images/mine/order4.png',
 						name: '退款/售后',
 						number: 0
@@ -108,6 +112,7 @@
 		},
 		onLoad() {
 			that = this
+			that.getNum()
 		},
 		onShow() {
 			that.isLogin()
@@ -127,6 +132,17 @@
 					}
 				})
 			},
+			getNum() {
+				$api.req({
+					url: '/data/api.business.Order/order_statistics'
+				}, function(res) {
+					if(res.code == 1) {
+						for(var i=0;i<that.orderList.length;i++) {
+							that.$set(that.orderList[i],'number',res.data[i])
+						}
+					}
+				})
+			},
 			isLogin() {
 				var token = uni.getStorageSync('token')
 				if(token) {
@@ -140,6 +156,13 @@
 					$api.jump('/pages/login/login/login')
 				}
 			},
+			toMessage() {
+				if(that.login) {
+					$api.jump('/pages/mine/message/index')
+				} else {
+					$api.info('请先登录')
+				}
+			},
 			toMoney() {
 				if(that.login) {
 					$api.jump('/pages/mine/wallet/wallet')
@@ -147,20 +170,27 @@
 					$api.info('请先登录')
 				}
 			},
+			toOrder(id) {
+				if(id != 5) {
+					$api.jump('/pages/order/list?status=' + id)
+				} else {
+					$api.jump('/pages/order/refund')
+				}
+			},
 			toService(index) {
 				var url = ''
 				switch(index) {
 					case 1 : 
-						url = '/pages/mine/service/feed/feed';
+						url = '/pages/mine/service/purOrder/list';
 						break;
 					case 2 :
-						url = '/pages/mine/service/feed/feed';
+						url = '/pages/mine/service/detail';
 						break;
 					case 3 :
 						url = '/pages/mine/service/feed/feed';
 						break;
 					case 4 :
-						url = '/pages/mine/service/feed/feed';
+						url = '/pages/mine/service/rule';
 						break;
 					case 5 :
 						url = '/pages/mine/service/setting/setting';

BIN
static/images/common/biyanjing.png


BIN
static/images/common/check.png


BIN
static/images/common/close_icon.png


BIN
static/images/common/copy.png


BIN
static/images/common/delete.png


BIN
static/images/common/down2.png


BIN
static/images/common/down_icon.png


BIN
static/images/common/edit_icon.png


BIN
static/images/common/img_bq1.png


BIN
static/images/common/img_bq2.png


BIN
static/images/common/popu_close.png


BIN
static/images/common/saoyisao.png


BIN
static/images/common/select1.png


BIN
static/images/common/select2.png


BIN
static/images/common/tele.png


BIN
static/images/common/top_bg.png


BIN
static/images/common/upload_img.png


BIN
static/images/common/upload_img2.png


BIN
static/images/common/yanjing.png


BIN
static/images/mine/address_icon.png


BIN
static/images/mine/edit.png


BIN
static/images/mine/orderType1.png


BIN
static/images/mine/orderType2.png


BIN
static/images/mine/orderType3.png


BIN
static/images/mine/orderType4.png


+ 1 - 1
static/js/api.js

@@ -811,7 +811,7 @@ module.exports = {
 		if(mode == 'year-month') {
 			value1 = Y+ '-'+ M
 		} else {
-			value1 = Y+ '-'+M+ '-'+D
+			value1 = Y+ '-'+M+ '-'+D + ' ' + h + ':' + m
 		}
 		return value1
 	},