chenrui %!s(int64=3) %!d(string=hai) anos
pai
achega
d6da75eb14
Modificáronse 5 ficheiros con 140 adicións e 27 borrados
  1. 4 25
      package-lock.json
  2. 14 0
      pages.json
  3. 8 0
      pages/sales/chooseCustomer.vue
  4. 110 0
      pages/sales/edit.vue
  5. 4 2
      pages/sales/listComponent.vue

+ 4 - 25
package-lock.json

@@ -1,31 +1,8 @@
 {
   "name": "qpls-md-app",
   "version": "1.0.0",
-  "lockfileVersion": 2,
+  "lockfileVersion": 1,
   "requires": true,
-  "packages": {
-    "": {
-      "name": "qpls-md-app",
-      "version": "1.0.0",
-      "license": "ISC",
-      "dependencies": {
-        "moment": "^2.29.1",
-        "uview-ui": "^1.8.4"
-      }
-    },
-    "node_modules/moment": {
-      "version": "2.29.1",
-      "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz",
-      "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==",
-      "engines": {
-        "node": "*"
-      }
-    },
-    "node_modules/uview-ui": {
-      "version": "1.8.4",
-      "license": "MIT"
-    }
-  },
   "dependencies": {
     "moment": {
       "version": "2.29.1",
@@ -33,7 +10,9 @@
       "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ=="
     },
     "uview-ui": {
-      "version": "1.8.4"
+      "version": "1.8.4",
+      "resolved": "https://registry.npmjs.org/uview-ui/-/uview-ui-1.8.4.tgz",
+      "integrity": "sha512-Zr+D5dFdNy6CdHQLBEXeGq/w0LkjxzBtsgaaDwLl0P58g67H7fBBDvy6AzWK/k0c7dwPYMBiK7I4Tr9p92+0DA=="
     }
   }
 }

+ 14 - 0
pages.json

@@ -209,6 +209,20 @@
 				"navigationBarTextStyle": "white"
 			}
 		},
+		{
+			"path": "pages/sales/edit", // 新增销售单/编辑销售单/销售单详情
+			"style": {
+				"navigationBarTitleText": "销售单",
+				"enablePullDownRefresh": false
+			}
+		},
+		{
+			"path": "pages/sales/chooseCustomer", // 销售单  选择客户
+			"style": {
+				"navigationBarTitleText": "选择客户",
+				"enablePullDownRefresh": false
+			}
+		},
 		{
 			"path": "pages/sales/productPricing", // 产品报价
 			"style": {

+ 8 - 0
pages/sales/chooseCustomer.vue

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

+ 110 - 0
pages/sales/edit.vue

@@ -0,0 +1,110 @@
+<template>
+	<view class="sales-edit-wrap">
+		<!-- 基础信息 -->
+		<view class="sales-info-con">
+			<view class="sales-info-header flex align_center justify_between">
+				<view>
+					<view class="u-line" :style="{backgroundColor: $config('primaryColor')}"></view>基础信息
+				</view>
+				<view class="sales-info-all" @click="getInfo">
+					查看全部<u-icon name="arrow-right" color="#666" size="28"></u-icon>
+				</view>
+			</view>
+			<view class="info-item-box">
+				<text class="info-item-tit color_6">销售单号</text>
+				<text>XS321132312</text>
+			</view>
+			<view class="info-item-box">
+				<text class="info-item-tit color_6">客户名称</text>
+				<text>XS321132312</text>
+			</view>
+		</view>
+		<!-- 产品列表 -->
+		<view class="sales-product-con">
+			<view class="sales-product-header flex align_center justify_between">
+				<view>
+					<view class="u-line" :style="{backgroundColor: $config('primaryColor')}"></view>产品列表
+				</view>
+				<view class="sales-product-operation">
+					<u-button @click="" size="mini" :hair-line="false" plain type="primary" hover-class="none">打折</u-button>
+					<u-button @click="" size="mini" :hair-line="false" plain type="primary" hover-class="none">选择产品</u-button>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default{
+		data(){
+			return{
+				pageData: {
+					type: 'edit',
+					data: null
+				}
+			}
+		},
+		onLoad(opt) {
+			console.log(opt)
+			if(opt){
+				this.pageData = {
+					type: opt.pageType || 'edit',
+					data: opt.data ? JSON.parse(opt.data) : null
+				}
+			}
+		},
+		methods: {
+			
+		}
+	}
+</script>
+
+<style lang="scss">
+	.sales-edit-wrap{
+		width: 100%;
+		.color_6{
+			color: #666;
+		}
+		.font_13{
+			font-size: 26upx;
+		}
+		.u-line{
+			display: inline-block;
+			width: 8upx;
+			height: 40upx;
+			background-color: red;
+			vertical-align: bottom;
+			margin: 0 20upx 0 0;
+		}
+		.sales-info-con{
+			background-color: #fff;
+			margin-bottom: 20upx;
+			padding: 0 20upx;
+			>view{
+				padding: 14upx 0;
+				border-bottom: 1px solid #e4e7ed;
+			}
+			>view:last-child{
+				border-bottom: none;
+			}
+			.info-item-box{
+				.info-item-tit{
+					display: inline-block;
+					width: 20%;
+				}
+			}
+		}
+		.sales-product-con{
+			background-color: #fff;
+			padding: 0 20upx;
+			.sales-product-header{
+				padding: 14upx 0;
+				.sales-product-operation{
+					button{
+						margin: 0 0 0 10upx;
+					}
+				}
+			}
+		}
+	}
+</style>

+ 4 - 2
pages/sales/listComponent.vue

@@ -124,7 +124,9 @@
 				}
 			},
 			// 查看详情
-			getDetail(data){},
+			getDetail(data){
+				uni.navigateTo({ url: '/pages/sales/edit?pageType=detail&data='+JSON.stringify(data) })
+			},
 			// 操作
 			handleFun(type, data){
 				this.dataInfo = data
@@ -207,7 +209,7 @@
 						text-overflow: ellipsis;
 						.u-line{
 							display: inline-block;
-							width: 6upx;
+							width: 8upx;
 							height: 40upx;
 							background-color: red;
 							vertical-align: bottom;