Browse Source

Merge branch 'develop_szhj' of http://git.chelingzhu.com/jianguan-web/qpls-md-app into develop_szhj

lilei 3 years ago
parent
commit
8838424107

+ 5 - 0
App.vue

@@ -211,4 +211,9 @@
 	    -webkit-flex: 1;
 	    flex: 1;    
 	}
+	// ios15原生input的type=search时会默认自带搜索图标。
+	// 在全局的公共样式隐藏ios自带搜索图标即可
+	[type="search"]::-webkit-search-decoration {
+		display: none;
+	}
 </style>

+ 8 - 0
api/data.js

@@ -6,6 +6,14 @@ export const getLookUpDatas = (params) => {
     method: 'get'
   })
 }
+
+export const listLookUp = (params) => {
+  let url = `lookup/findAll`
+  return axios.request({
+    url: url,
+    method: 'post'
+  }).then(res => res)
+}
 // 查询最新版本信息
 export const getSysVersion = (params) => {
   return axios.request({

+ 18 - 0
api/sales.js

@@ -61,6 +61,24 @@ export const salesDetailDel = (params) => {
     method: 'get'
   })
 }
+//  仓库列表  无分页
+export const warehouseAllList = (params) => {
+  const url = 'warehouse/queryList'
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 车架号  识别图片内容
+export const vinCodeParse = params => {
+  return axios.request({
+    url: `vinIdentify/ocr`,
+    method: 'post',
+    data: params,
+    responseType: 'blob'
+  })
+}
 
 // 产品报价列表
 export const dealerProductList = (params) => {

+ 11 - 0
api/stock.js

@@ -40,4 +40,15 @@ export const stockFlowList = (params) => {
     data: params,
     method: 'post'
   })
+}
+//  库存 详情列表  分页
+export const querySumByProductLocation = (params) => {
+  const url = `stock/detail/querySumByProductLocation/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios.request({
+    url: url,
+    data: params,
+    method: 'post'
+  })
 }

+ 117 - 0
components/select/v-select.vue

@@ -0,0 +1,117 @@
+<template>
+	<picker @change="toChange" :value="index" :range="datalist" range-key="dispName">
+		<view style="display: flex;align-items: center;">
+			<input class="form-input" :disabled="disabled" v-model="selected" placeholder-class="form-input-placeholder" :placeholder="getPlaceholderText" />
+			<uni-font-icons size="12" type="icon-xiangyoujiantou" color="#9DA8B5"></uni-font-icons>
+		</view>
+	</picker>
+</template>
+
+<script>
+import { getLookUpDatas, listLookUp } from '@/api/data'
+export default {
+  name: 'v-select',
+  data () {
+    return {
+      selected: '',
+      datalist: [],
+      placeholderText: '请选择',
+      lookUp: [],
+	  index: 0
+    }
+  },
+  props: {
+    disabled: {
+      type: [Boolean, String],
+      default: false
+    },
+    multiple: {
+      type: [Boolean, String],
+      default: false
+    },
+    value: [String, Number, Array],
+    code: {
+      type: String,
+      required: true
+    },
+    placeholder: {
+      type: String,
+      default: ''
+    },
+    size: [String]
+  },
+  computed: {
+    getVal () {
+      return this.value
+    },
+    getPlaceholderText () {
+      let _this = this
+      for (let i = 0; i < _this.lookUp.length; i++) {
+        if (_this.lookUp[i].code == _this.code) {
+          if (this.placeholder === '') _this.placeholderText = _this.lookUp[i].name
+          break
+        }
+      }
+      return _this.placeholderText
+    }
+  },
+  created () {
+    if (this.code) {
+      if (this.placeholder) {
+        this.placeholderText = this.placeholder
+      }
+      getLookUpDatas({
+        type: this.code
+      }).then(result => {
+		  console.log(result, 'result')
+        if (result && result.status + '' === '200') {
+          this.datalist = result.data
+          
+        }
+      })
+    } else {
+      // console.log('请确认传递类型')
+    }
+    // 获取所有数据字典
+    this.lookUp = this.$store.state.vuex_allLookUp
+  },
+  methods: {
+    getDataList (){
+      return this.datalist
+    },
+    getOptionName (val) {
+      return this.datalist.find((item) => {
+        return item.code == val
+      })
+    },
+    getCodeByName (dispName) {
+      return this.datalist.find((item) => {
+        return item.dispName == dispName
+      })
+    },
+	resetVal(){
+		this.selected = ''
+		this.index = 0
+	},
+	// 赋值
+	setVal(code){
+		let index = this.datalist.findIndex(item=>{
+			return item.code == code
+		})
+		console.log(this.datalist,code,index)
+		this.index = index
+		this.selected = this.datalist[index].dispName
+	},
+    toChange (e) {
+		this.index = e.target.value
+		this.selected = this.datalist[this.index].dispName
+        this.$emit('itemChange', this.datalist[this.index].code)
+    }
+  }
+
+}
+</script>
+
+<style scoped>
+
+</style>

+ 53 - 4
pages.json

@@ -204,9 +204,20 @@
 			"path": "pages/sales/list", // 销售列表
 			"style": {
 				"navigationBarTitleText": "销售单",
-				"enablePullDownRefresh": false,
 				"navigationStyle":"custom",
-				"navigationBarTextStyle": "white"
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "auto",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "16",
+								"width":"90px"
+							}
+						]
+					}
+				}
 			}
 		},
 		{
@@ -216,6 +227,26 @@
 				"enablePullDownRefresh": false
 			}
 		},
+		{
+			"path": "pages/sales/chooseProduct", // 选择产品
+			"style": {
+				"navigationBarTitleText": "选择产品",
+				"navigationStyle":"custom",
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "auto",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "16",
+								"width":"90px"
+							}
+						]
+					}
+				}
+			}
+		},
 		{
 			"path": "pages/sales/chooseCustomer", // 销售单  选择客户
 			"style": {
@@ -223,13 +254,31 @@
 				"enablePullDownRefresh": false
 			}
 		},
+		{
+			"path": "pages/sales/addCustomer", // 销售单  选择客户
+			"style": {
+				"navigationBarTitleText": "新增客户",
+				"enablePullDownRefresh": false
+			}
+		},
 		{
 			"path": "pages/sales/productPricing", // 产品报价
 			"style": {
 				"navigationBarTitleText": "产品报价",
-				"enablePullDownRefresh": false,
 				"navigationStyle":"custom",
-				"navigationBarTextStyle": "white"
+				"app-plus":{
+					"titleNView": {
+						"titleAlign": "auto",
+						"buttons": [ //原生标题栏按钮配置,
+							{
+								"text": "\ue694 查询" ,//原生标题栏增加分享按钮,点击事件可通过页面的 onNavigationBarButtonTap 函数进行监听u
+								"fontSrc": "/static/iconfont/iconfont.ttf",
+								"fontSize": "16",
+								"width":"90px"
+							}
+						]
+					}
+				}
 			}
 		}
     ],

+ 16 - 5
pages/common/printTag/printTag.vue

@@ -16,8 +16,8 @@
 			<view>{{fromPage == 'smdy'?'实发':'库存'}}数量:{{fromPage == 'smdy'?infoData.confirmQty : infoData.qty}}</view>
 		</view>
 		<view class="buttons flex align_center justify_center">
-			<view v-if="fromPage == 'bdtq'"><u-button @click="cansel" shape="circle" plain>返回列表</u-button></view>
-			<view v-if="fromPage == 'smdy'"><u-button @click="cansel" shape="circle" plain>重新扫描</u-button></view>
+			<view v-if="fromPage == 'bdtq'"><u-button @click="cancel" shape="circle" plain>返回列表</u-button></view>
+			<view v-if="fromPage == 'smdy'"><u-button @click="cancel" shape="circle" plain>重新扫描</u-button></view>
 			<view>
 				<kk-printer ref="kkprinter" @startPrint="startPrint"></kk-printer>
 			</view>
@@ -58,10 +58,21 @@
 			this.printInfo = null
 			this.fromPage = ''
 		},
+		// 监听页面返回,返回 event = {from:backbutton、 navigateBack} ,backbutton 表示来源是左上角返回按钮或 android 返回键;navigateBack表示来源是 uni.navigateBack
+		onBackPress(event){
+			if(event.from == 'backbutton'){
+				this.cancel()
+				return true  // 阻止默认返回行为(会导致无限循环)
+			}
+		},
 		methods: {
-			cansel(){
-				uni.$emit('refreshBL')
-				uni.navigateBack()
+			cancel(){
+				if(this.fromPage == 'bdtq'){  // 补打贴签
+					uni.navigateBack({delta: 1})
+				}else if(this.fromPage == 'smdy'){  // 扫码打印
+					uni.$emit('refreshBL')
+					uni.navigateBack({delta: 1})
+				}
 			},
 			// 获取打印内容
 			getPrintContent(){

+ 197 - 0
pages/sales/addCustomer.vue

@@ -0,0 +1,197 @@
+<template>
+	<view class="addCustomer-content">
+		<view class="content-form">
+			<u-form :model="form" ref="uForm" :rules="rules" label-width="180">
+				<u-form-item label="客户名称" required prop="customerName"><u-input v-model.trim="form.customerName" placeholder="请输入客户名称" input-align="right" /></u-form-item>
+				<u-form-item label="客户地址" required prop=""><u-input v-model="form.contactName" input-align="right" placeholder="客户地址"/></u-form-item>
+				<u-form-item label="联系电话"><u-input v-model.trim="form.contactTel" placeholder="请输入联系电话" input-align="right" /></u-form-item>
+				<u-form-item label="联系手机"><u-input v-model.trim="form.contactMobile" placeholder="请输入联系手机" input-align="right" /></u-form-item>
+				<u-form-item label="联系人"><u-input v-model="form.contactName" input-align="right" placeholder="请输入联系人"/></u-form-item>
+				<u-form-item label="详细地址"><u-input v-model.trim="form.customerAddr" type="textarea" placeholder="请输入详细地址" input-align="right" /></u-form-item>
+				<u-form-item label="客户传真"><u-input v-model="form.fax" input-align="right" placeholder="请输入客户传真"/></u-form-item>
+				<u-form-item label="配送方式"><u-input v-model="priceTypeName" input-align="right" :disabled="true" placeholder="请选择客户类型" @click="showCust=true"/></u-form-item>
+				<u-form-item label="客户类型"><u-input v-model="priceTypeName" input-align="right" :disabled="true" placeholder="请选择客户类型" @click="showCust=true"/></u-form-item>
+				<u-form-item label="价格类型" required prop=""></u-form-item>
+				<u-form-item label="收款方式" required prop="settleStyleSn">
+					<u-input v-model="settleStyleName" input-align="right" :disabled="true" placeholder="请选择收款方式" @click="showSettle=true"/>
+				</u-form-item>
+			</u-form>
+		</view>
+		<view class="form-footer-btn">
+			<u-button class="handle-btn" size="medium" shape="circle" hover-class="none" @click="handleSubmit" :custom-style="customBtnStyle">保存</u-button>
+		</view>
+		<!-- 配送方式 -->
+		<u-picker v-model="showDispatch" title="配送方式"  @confirm="dispatchTypeChange" :range="dispatchTypeList" range-key="name" mode="selector"></u-picker>
+		<!-- 价格类型 -->
+		<u-picker v-model="showDispatch" title="配送方式"  @confirm="dispatchTypeChange" :range="dispatchTypeList" range-key="name" mode="selector"></u-picker>
+		<!-- 选择收款方式 -->
+		<u-picker v-model="showSettle" title="收款方式"  @confirm="settleStyleChange" :range="settleTypeList" range-key="name" mode="selector"></u-picker>
+		<!-- 客户类型 -->
+		<u-picker v-model="showCust" title="客户类型" @confirm="custTypeChange" :range="custTypeList" range-key="name" mode="selector"></u-picker>
+	</view>
+</template>
+
+<script>
+	import {customerDetail,settleStyleQueryAll,custType} from '@/api/sales.js'
+	import vSelect  from  '@/components/select/v-select.vue'
+	export default{
+		components: { vSelect },
+		data(){
+			return{
+				customerData:null, // 客户信息
+				priceTypeName:'', //客户类型名称
+				customBtnStyle: {  //  自定义按钮样式
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				form:{
+					id: null,
+					customerName: '', // 客户名称
+					contactTel: '', //  联系电话
+					contactMobile: '', //  联系手机
+					contactName: '', //  联系人
+					provinceSn: undefined, //  省
+					provinceName: '',
+					citySn: undefined, // 市
+					cityName: '',
+					countySn: undefined, // 区
+					countyName: '',
+					customerAddr: '', //  详细地址
+					fax: '', //  客户传真
+					dispatchType: undefined, //  配送方式
+					satelliteFlag: 0, //  是否卫星仓客户
+					customerTypeSn: undefined, //  客户类型
+					priceType: '', //  价格类型
+					settleStyleSn: undefined //  收款方式
+				},
+				rules:{
+					customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
+					contactMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
+					provinceSn: [{ required: true, message: '请选择省', trigger: 'change' }],
+					citySn: [{ required: true, message: '请选择市', trigger: 'change' }],
+					countySn: [{ required: true, message: '请选择区/县', trigger: 'change' }],
+					priceType: [{ required: true, message: '请选择价格类型', trigger: 'change' }],
+					settleStyleSn: [{ required: true, message: '请选择收款方式', trigger: 'change' }]
+				},
+				
+				showDispatch:false,// 配送方式下拉弹窗初始值
+				dispatchTypeList:[], // 配送方式列表
+				dispatchTypeName:'', // 配送方式名称
+				showSettle:false,//结算方式初始值
+				settleTypeList:[],//收款方式列表
+				settleStyleName:'',//收款方式名称
+				custTypeList:[] ,// 客户类型数据
+				showCust:false, //客户类型下拉弹窗初始值
+				custTypeName:'', // 客户类型名称
+			}
+		},
+		onLoad(option) {
+			this.getSettleStyle()
+			this.getCustomerList()
+			
+		},
+		methods:{
+			// 选择配送方式
+			chooseType(v){
+				console.log(v,'---------')
+			},
+			// 下拉选择
+			selete(val){
+				if(val==0){
+					this.drownType='customer'
+				}else{
+					this.drownType='settle'
+				}
+				console.log(val,this.drownType)
+				setTimeout(()=>{
+					this.showSettle=true
+				},300)
+				
+			},
+			brandClean(){
+				this.settleStyleName=''
+				this.form.settleStyleSn=undefined
+			},
+			// 获取配送方式
+			// 获取客户类型列表
+			getCustomerList(){
+				custType({}).then(res=>{
+					if(res.status==200){
+						this.custTypeList=res.data
+					}else{
+						this.custTypeList=[]
+					}
+				})
+			},
+			// 获取结算方式列表
+			getSettleStyle(){
+				settleStyleQueryAll({}).then(res=>{
+					if(res.status==200){
+						this.settleTypeList=res.data
+					}else{
+						this.settleTypeList=null
+					}
+				})
+			},
+			settleStyleChange(e){
+				console.log(e,'data')
+				this.settleStyleName=this.settleTypeList[e].name
+				this.form.settleStyleSn=this.settleTypeList[e].settleStyleSn
+				
+			},
+			custTypeChange(e){
+				this.priceTypeName=this.custTypeList[e].name
+				this.form.customerTypeSn=this.custTypeList[e].customerTypeSn
+			},
+			// 保存
+			handleSubmit(){
+				console.log('保存===========')
+				this.$refs.uForm.validate().then(res => {
+					if(res){
+						uni.$u.toast('校验通过')
+					}
+					console.log(res,'--------------校验')
+					
+				}).catch(errors => {
+					uni.$u.toast('校验失败')
+				})
+			},
+			// getCustomerData(){
+			// 	customerDetail({id:this.itemId}).then(res=>{
+			// 		if(res.status==200){
+			// 			this.customerData=res.data
+			// 		}else{
+			// 			this.customerData=null
+			// 		}
+			// 	})
+			// }
+		}
+	}
+</script>
+
+<style lang="scss">
+	.addCustomer-content{
+		width: 100%;
+		height: 100vh;
+		background-color: #fff;
+		padding:0 40upx;
+		display: flex;
+		flex-direction: column;
+		.content-form{
+			flex: 1;
+		}
+		.content-form:not(:last-child){
+			border-bottom: none;
+		}
+		.form-footer-btn{
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			width: 100%;
+			padding: 16upx 20upx 12upx;
+			.handle-btn{
+				width: 100%;
+			}
+		}
+	}
+</style>

+ 224 - 0
pages/sales/chooseProduct.vue

@@ -0,0 +1,224 @@
+<template>
+	<view class="chooseProduct-wrap">
+		<!-- 产品列表 -->
+		<view class="product-list-box">
+			<scroll-view class="product-list-con" :style="{height: scrollH+'upx'}" scroll-y @scrolltolower="onreachBottom">
+				<view class="product-list-item font_13" v-for="(item, index) in listData" :key="item.id">
+					<view class="list-item-tit">
+						<view class="item-tit ellipsis-one" :style="{borderColor: $config('primaryColor')}">{{item.productName}}</view>
+					</view>
+					<view class="list-item-con flex align_center justify_between">
+						<view class="pimgs">
+							<u-image :src="item.productMainPic&&item.productMainPic.imageUrl?item.productMainPic.imageUrl:`../../static/${theme}/def_img@2x.png`" width="128" height="128" border-radius="10"></u-image>
+						</view>
+						<view class="flex_1">
+							<view>产品编码:{{item.productCode || '--'}}</view>
+							<view class="padding_3 flex align_center justify_between">
+								<view>原厂编码:{{item.productOrigCode || '--'}}</view>
+								<u-icon name="plus-circle" :color="$config('primaryColor')" size="40" class="close-circle" @click="handleAdd"></u-icon>
+							</view>
+							<view v-if="item.warehouseName || item.warehouseLocationName">仓库仓位:{{item.warehouseName}} > {{item.warehouseLocationName}}</view>
+						</view>
+					</view>
+					<view class="list-item-footer flex align_center justify_between">
+						<view class="footer-item">
+							<view>{{toThousands(item.currentQty||0)}}{{item.unit}}</view>
+							<view class="color_6">库存数量</view>
+						</view>
+						<view class="footer-item">
+							<view>
+								<text :style="{color: $config('errorColor')}">{{toThousands((item.lastSalePrice ? item.lastSalePrice : item.salePrice)||0, 2)}}</text>
+								<text v-if="item.origSalePriceFlag == 1">(原)</text>
+							</view>
+							<view class="color_6">参考售价</view>
+						</view>
+					</view>
+				</view>
+				<view v-if="listData && listData.length == 0">
+					<u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="30"></u-empty>
+				</view>
+			</scroll-view>
+		</view>
+		<!-- 已选产品 -->
+		<view ref="productTotal" class="selected-box flex align_center justify_between">
+			<view class="choose-info flex_1 flex align_center justify_between" @click="lookProduct">
+				<text>已选 3 款,合计 ¥96.00</text>
+				<u-icon name="arrow-up" :color="$config('primaryColor')" size="34" class="close-circle"></u-icon>
+			</view>
+			<view class="choose-btn" @click="handleChoose" :style="{backgroundColor: $config('primaryColor')}">选好了</view>
+		</view>
+		<!-- 查询右侧弹框 -->
+		<productSearch :openModal="openModal" :defaultParams="searchForm" @refresh="refresh" @close="openModal=false" />
+	</view>
+</template>
+
+<script>
+	import ProductSearch from './productSearch.vue'
+	import { toThousands } from '@/libs/tools'
+	import { querySumByProductLocation } from '@/api/stock'
+	export default{
+		components: { ProductSearch },
+		data(){
+			return{
+				toThousands,
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				listData: [],
+				pageNo: 1,
+				pageSize: 6,
+				totalNum: 0,
+				noDataText: '暂无数据',
+				searchForm: {},
+				searchParams: {},
+				openModal: false,
+				theme: '',
+				chooseProductList: [],
+				scrollH: 0,
+			}
+		},
+		onNavigationBarButtonTap(e){  // 标题栏 按钮操作
+			this.openModal = true
+		},
+		onLoad(opt) {
+			this.theme = getApp().globalData.theme
+			if(opt){
+				this.chooseProductList = opt.data ? JSON.parse(opt.data) : null
+			}
+			console.log(this.chooseProductList)
+			this.getList()
+			
+			const _this = this
+			uni.getSystemInfo({
+				success: function (res) {
+					const winH = res.windowHeight * 2
+					_this.scrollH = winH - 200
+				}
+			})
+		},
+		methods: {
+			// 获取查询参数 刷新列表
+			refresh(params){
+				const _this = this
+				this.searchParams = Object.assign(params, this.searchForm)
+				this.getList(1)
+			},
+			// 列表
+			getList(pageNo){
+				const _this = this
+				if (pageNo) {
+					this.pageNo = pageNo
+				}
+				let params = {
+					pageNo: this.pageNo,
+					pageSize: this.pageSize
+				}
+				querySumByProductLocation(Object.assign(params, this.searchParams)).then(res => {
+					if (res.status == 200) {
+						if(this.pageNo>1){
+							this.listData = this.listData.concat(res.data.list || [])
+						}else{
+							this.listData = res.data.list || []
+						}
+						this.totalNum = res.data.count || 0
+					} else {
+						this.listData = []
+						this.totalNum = 0
+						this.noDataText = res.message
+					}
+				})
+			},
+			// scroll-view到底部加载更多
+			onreachBottom() {
+				if(this.listData.length < this.totalNum){
+					this.pageNo += 1
+					this.getList()
+				}
+			},
+			// 添加产品
+			handleAdd(){},
+			// 选好了
+			handleChoose(){},
+			// 查看已选产品
+			lookProduct(){
+				
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.chooseProduct-wrap{
+		width: 100%;
+		position: relative;
+		.padding_3{
+			padding: 6upx 0;
+		}
+		.color_6{
+			color: #666;
+		}
+		.product-list-box{
+			padding: 20upx 20upx;
+			.product-list-con{
+				.product-list-item{
+					background: #ffffff;
+					padding: 20upx 20upx 0;
+					margin-bottom: 25upx;
+					border-radius: 25upx;
+					box-shadow: 1px 1px 3px #EEEEEE;
+					.list-item-tit{
+						padding-bottom: 12upx;
+						border-bottom: 1px solid #e4e7ed;
+						.item-tit{
+							font-weight: bold;
+							color: rgb(48, 49, 51);
+							font-size: 28upx;
+							padding-left: 10upx;
+							border-left: 6upx solid #000;
+							line-height: 1;
+						}
+					}
+					.list-item-con{
+						padding: 14upx 14upx 16upx;
+						font-size: 26upx;
+						.pimgs{
+							margin-right: 16upx;
+						}
+					}
+					.list-item-footer{
+						border-top: 1px solid #e4e7ed;
+						.footer-item{
+							width: 50%;
+							text-align: center;
+							border-right: 1px solid #e4e7ed;
+							font-size: 26upx;
+							padding: 8upx 0 12upx;
+						}
+						.footer-item:last-child{
+							border: none;
+						}
+					}
+				}
+			}
+		}
+		.selected-box{
+			position: fixed;
+			bottom: 0;
+			left: 0;
+			width: 100%;
+			background-color: #fff;
+			box-shadow: 1px -1px 3px #EEEEEE;
+			.choose-info{
+				padding: 0 30upx;
+			}
+			.choose-btn{
+				color: #fff;
+				width: 28%;
+				padding: 26upx 0;
+				text-align: center;
+			}
+		}
+	}
+</style>

+ 5 - 1
pages/sales/edit.vue

@@ -23,7 +23,7 @@
 								打折
 								<text v-if="discountAmount">:¥{{discountAmount}}</text>
 							</u-button>
-							<u-button @click="" size="mini" :hair-line="false" plain type="primary" hover-class="none">选择产品</u-button>
+							<u-button @click="handleProduct" size="mini" :hair-line="false" plain type="primary" hover-class="none">选择产品</u-button>
 						</view>
 					</template>
 				</u-section>
@@ -229,6 +229,10 @@
 					}
 				})
 			},
+			// 选择产品
+			handleProduct(){
+				uni.navigateTo({ url: '/pages/sales/chooseProduct?data='+JSON.stringify(this.listData) })
+			},
 			changeScrollH(){
 				const _this = this
 				uni.getSystemInfo({

+ 3 - 4
pages/sales/index.vue

@@ -26,10 +26,10 @@
 				<u-image class="nav-pic" style="margin-top: 5upx;" :src="`../../static/${theme}/navIcon/price_icon.png`" width="60" height="60"></u-image>
 				<text class="nav-txt" style="margin-top: 5upx;">产品报价</text>
 			</view>
-			<!-- <view class="nav-item" @click="toPage('/pages/sales/chooseCustomer')">
+			<view class="nav-item" @click="toPage('/pages/sales/chooseCustomer')">
 				<u-image class="nav-pic" :src="`../../static/${theme}/navIcon/sale_icon.png`" width="70" height="70"></u-image>
 				<text class="nav-txt">新增销售单</text>
-			</view> -->
+			</view>
 		</view>
 		<!-- 销售单 -->
 		<view class="sales-list">
@@ -183,8 +183,7 @@
 		}
 		.nav-cont{
 			.nav-item{
-				// width: 49%;
-				width: 100%;
+				width: 49%;
 				border-radius: 25upx;
 				background-color: #ffffff;
 				padding: 14upx 0;

+ 4 - 7
pages/sales/list.vue

@@ -1,18 +1,12 @@
 <template>
 	<view class="sales-list-wrap">
-		<!-- 标题 -->
-		<u-navbar title="销售单" :safeAreaInsetTop="false" :border-bottom="true">
-			<view class="u-nav-slot" slot="right" style="padding-right: 20rpx;">
-				<u-icon name="search" color="#999" size="28" @click="openModal=true"></u-icon>查询
-			</view>
-		</u-navbar>
 		<u-dropdown class="search-top-box">
 			<u-dropdown-item v-model="searchForm.billStatus" @change="handleChange('bill')" title="业务状态" :options="billStatusOpt"></u-dropdown-item>
 			<u-dropdown-item v-model="searchForm.financialStatus" @change="handleChange('financial')" title="财务状态" :options="financialStatusOpt"></u-dropdown-item>
 		</u-dropdown>
 		<!-- 销售单列表 -->
 		<view class="list-box">
-			<listComponent ref="salesList" height="280" :params="searchParams" />
+			<listComponent ref="salesList" height="100" :params="searchParams" />
 		</view>
 		<!-- 查询右侧弹框 -->
 		<salesSearch :openModal="openModal" :defaultParams="searchForm" @refresh="refresh" @close="openModal=false" />
@@ -43,6 +37,9 @@
 				openModal: false
 			}
 		},
+		onNavigationBarButtonTap(e){  // 标题栏 按钮操作
+			this.openModal = true
+		},
 		onLoad() {
 			const _this = this
 			this.getLookUpItem('SALES_BILL_STATUS')

+ 4 - 4
pages/sales/listComponent.vue

@@ -25,14 +25,14 @@
 							<view class="flex_1">收款方式:<text>{{item.settleStyleEntity&&item.settleStyleEntity.name||'--'}}</text></view>
 						</view>
 					</view>
-					<!-- <view class="button-box">
+					<view class="button-box">
 						<u-button @click="handleFun('audit', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="item.billStatus == 'WAIT_AUDIT'">审核</u-button>
 						<u-button @click="handleFun('out', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="item.billStatus == 'WAIT_OUT_WAREHOUSE'">出库</u-button>
 						<u-button @click="handleEdit(item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="((item.salesBillSource == 'SATELLITE' || item.salesBillSource == 'SALES') && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'WAIT_SUBMIT' || item.billStatus == 'AUDIT_REJECT'))">编辑</u-button>
 						<u-button @click="handleFun('del', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="((item.salesBillSource == 'SATELLITE' || item.salesBillSource == 'SALES') && item.billStatus != 'FINISH')">删除</u-button>
 						<u-button @click="handleEdit(item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="(item.salesBillSource == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE'))">改单</u-button>
 						<u-button @click="handleFun('cancel', item)" size="mini" :hair-line="false" plain type="primary" hover-class="none" v-if="(item.salesBillSource == 'PURCHASE' && (item.billStatus == 'WAIT_AUDIT' || item.billStatus == 'SUPERIOR_CHANGE'))">取消</u-button>
-					</view> -->
+					</view>
 				</view>
 				<view v-if="listData && listData.length == 0">
 					<u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="30"></u-empty>
@@ -85,10 +85,10 @@
 		mounted() {
 			const _this = this
 			uni.getSystemInfo({
-			    success: function (res) {
+				success: function (res) {
 					const winH = res.windowHeight * 2
 					_this.scrollH = winH - _this.height - 85
-			    }
+				}
 			})
 			this.getList()
 		},

+ 30 - 59
pages/sales/productPricing.vue

@@ -1,13 +1,8 @@
 <template>
 	<view class="productPricing-content">
-		<u-navbar leftText="返回" title="产品报价" :safeAreaInsetTop="false" :border-bottom="false" @leftClick="toPage('/pages/sales/index')">
-			<view class="u-nav-slot" slot="right" style="padding-right: 20rpx;">
-				<u-icon name="search" color="#999" size="28" @click="search"></u-icon>查询
-			</view>
-		</u-navbar>
 		<view class="checkbox-price">
-			<u-checkbox-group  placement="row"  @change="checkboxChange">
-				<u-checkbox v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in priceList" :key="index" :name="item.name" :label="item.name">{{item.name}}</u-checkbox>
+			<u-checkbox-group  placement="row">
+				<u-checkbox v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in priceList" :key="index" :name="item.val">{{item.name}}</u-checkbox>
 			</u-checkbox-group>
 		</view>
 		<scroll-view class="product-list" scroll-y @scrolltolower="onreachBottom">
@@ -34,31 +29,32 @@
 						</view>
 					</view>
 					<view class="price-all flex">
-						<view class="price-item" v-if="isCostPrice">
+						<view class="price-item" v-if="priceList[0].checked">
 							<text>{{toThousands(item.offerCost|| 0,2)}} </text>
 							<view>成本价</view>
 						</view>
-						<view class="price-item" v-if="isCityPrice">
+						<view class="price-item" v-if="priceList[1].checked">
 							<text>{{toThousands(item.cityPrice|| 0,2)}} </text>
 							<view>市级价</view>
 						</view>
-						<view class="price-item" v-if="isSpecialPrice">
+						<view class="price-item" v-if="priceList[2].checked">
 							<text>{{toThousands(item.specialPrice|| 0,2)}} </text>
 							<view>特约价</view>
 						</view>
-						<view class="price-item" v-if="isTerminalPrice">
+						<view class="price-item" v-if="priceList[3].checked">
 							<text>{{toThousands(item.terminalPrice|| 0,2)}} </text>
 							<view>终端会员价</view>
 						</view>
 					</view>
 				</view>
-				<view v-if="listData && listData.length == 0">
-					<u-empty :text="noDataText" mode="list" :img-width="200" :margin-top="30"></u-empty>
+					<u-empty v-if="listData.length == 0 &&status!='loading'" :text="noDataText" mode="list" ></u-empty>
+					<view style="padding-bottom: 20upx;">
+					<u-loadmore v-if="totalNum>listData.length || status=='loading'" :status="status" />
 				</view>
 			</view>
 		</scroll-view>
 		<!-- 搜索弹窗 -->
-		<search :showModal="showModal"/>
+		<search :showModal="showModal" @refresh="refreshList" @close="showModal=false"/>
 	</view>
 </template>
 
@@ -73,22 +69,26 @@
 				toThousands,
 				listData:[],
 				totalNum:0,
-				priceList:[{name:'成本价',checked:false},{name:'市级价',checked:false},{name:'特约价',checked:false},{name:'终端会员价',checked:false}],
+				priceList:[
+					{ name: '成本价', checked: false, val: 'offerCost' },
+					{ name: '市级价', checked: false, val: 'cityPrice' },
+					{ name: '特约价', checked: false, val: 'specialPrice' },
+					{ name: '终端会员价', checked: false, val: 'terminalPrice' },
+				],
 				pageNo:1,
-				pageSize:10,
+				pageSize:6,
 				noDataText: '暂无数据',
 				theme: '',
-				isCostPrice: false,
-				isCityPrice: false,
-				isSpecialPrice: false,
-				isTerminalPrice: false,
+				status: 'loadmore',
 				showModal:false,
 				params:{}
 			}
 		},
+		onNavigationBarButtonTap(e){
+			this.showModal=true
+		},
 		onLoad(option) {
 			this.theme = getApp().globalData.theme
-			this.params = option.data ? JSON.parse(option.data) : {}
 			this.getList()
 		},
 		methods:{
@@ -97,44 +97,13 @@
 					url:url
 				})
 			},
-			// 搜索
-			search(){
-				this.showModal=true
-				console.log('点击的时间里看电视剧')
-			},
-			// 价格显示
-			checkboxChange(val){
-				if(val&&val.length>0){
-					const a= val.filter(item=>{return item=='成本价'})
-					const b= val.filter(item=>{return item=='市级价'})
-					const c= val.filter(item=>{return item=='特约价'})
-					const d= val.filter(item=>{return item=='终端会员价'})
-					if(a&&a.length>0){
-						this.isCostPrice=true
-					}else{
-						this.isCostPrice=false
-					}
-					if(b&&b.length>0){
-						this.isCityPrice=true
-					}else{
-						this.isCityPrice=false
-					}
-					if(c&&c.length>0){
-						this.isSpecialPrice=true
-					}else{
-						this.isSpecialPrice=false
-					}
-					if(d&&d.length>0){
-						this.isTerminalPrice=true
-					}else{
-						this.isTerminalPrice=false
-					}
-				}else{
-					this.isCostPrice=false
-					this.isCityPrice=false
-					this.isSpecialPrice=false
-					this.isTerminalPrice=false
-				}
+			// 刷新列表
+			refreshList(val){
+				this.params =val ? val : {},
+				this.$nextTick(function(){
+					this.getList(1)
+				})
+				
 			},
 			// 列表
 			getList(pageNo){
@@ -143,6 +112,7 @@
 					this.pageNo = pageNo
 				}
 				let params = Object.assign(this.params, { pageNo: this.pageNo, pageSize: this.pageSize })
+				this.status = "loading"
 				dealerProductList(params).then(res => {
 					if (res.status == 200) {
 						if(this.pageNo>1){
@@ -156,6 +126,7 @@
 						this.totalNum = 0
 						this.noDataText = res.message
 					}
+					this.status = "loadmore"
 				})
 			},
 			// scroll-view到底部加载更多

+ 289 - 0
pages/sales/productSearch.vue

@@ -0,0 +1,289 @@
+<template>
+	<view class="productSearch-wrap">
+		<u-popup v-model="isShow" class="search-popup" mode="right" @close="isShow=false" length="85%">
+			<u-form class="form-content" :model="form" ref="uForm" label-width="180">
+				<u-form-item label="车架号(VIN)" prop="productCode" class="form-item">
+					<u-input v-model.trim="form.productCode" :maxlength="17" placeholder="请输入车架号" input-align="right" />
+					<u-icon @click="uploadFun" :name="vinLoading?'loading':'camera-fill'" name="camera-fill" color="#c8c0cc" size="34" style="margin-left: 14upx;"></u-icon>
+					<!-- <u-upload ref="uUpload" :custom-btn="true" :action="action" :form-data="{savePathType: 'local'}" @on-success="uploadSuccess" :max-size="2 * 1024 * 1024" max-count="1">
+						<view slot="addBtn" class="slot-btn" hover-class="slot-btn__hover" hover-stay-time="150">
+							<u-icon name="camera-fill" color="#c8c0cc" size="34" style="margin-left: 14upx;"></u-icon>
+						</view>
+					</u-upload> -->
+				</u-form-item>
+				<u-form-item label="产品编码" prop="productCode" class="form-item">
+					<u-input v-model.trim="form.productCode" placeholder="请输入产品编码" input-align="right" />
+				</u-form-item>
+				<u-form-item label="原厂编码" prop="productOrigCode" class="form-item">
+					<u-input v-model.trim="form.productOrigCode" placeholder="请输入原厂编码" input-align="right" />
+				</u-form-item>
+				<u-form-item label="产品名称" prop="productName" class="form-item">
+					<u-input v-model.trim="form.productName" placeholder="请输入产品名称" input-align="right" />
+				</u-form-item>
+				<u-form-item label="产品品牌" prop="productBrandSn" class="form-item">
+					<u-input v-model="brandName" @click="brandModal=true" disabled placeholder="请选择产品品牌" input-align="right" />
+				</u-form-item>
+				<u-form-item label="产品分类" prop="productTypeSn" class="form-item">
+					<u-input v-model="productTypeNameArr" @click="showTypeModal=true" disabled placeholder="请选择产品分类" input-align="right" />
+				</u-form-item>
+				<u-form-item label="仓库" prop="warehouseSn" class="form-item">
+					<u-input v-model="warehouseName" @click="warehouseModal=true" disabled placeholder="请选择仓库" class="form-item-inp" input-align="right" />
+					<u-icon v-show="warehouseName.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearWarehouse"></u-icon>
+				</u-form-item>
+				<u-form-item label="成本价">
+					<u-switch slot="right" v-model="cost"></u-switch>
+				</u-form-item>
+				<u-form-item label="市级价">
+					<u-switch slot="right" v-model="cityPrice"></u-switch>
+				</u-form-item>
+			</u-form>
+			<view class="uni-list-btns">
+				<u-button class="handle-btn" size="medium" hover-class="none" @click="resetForm">重置</u-button>
+				<u-button class="handle-btn search-btn" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
+			</view>
+		</u-popup>
+		<!-- 产品品牌 -->
+		<productBrand :openModal="brandModal" :itemSn="form.productBrandSn" @choose="brandChoose" @clean="brandClean" @close="brandModal=false" />
+		<!-- 产品分类 -->
+		<productType :openModal="showTypeModal" :nowData="nowData" @choose="typeChoose" @clean="typeClean" @close="showTypeModal=false" />
+		<!-- 选择收款方式 -->
+		<u-picker v-model="warehouseModal" @confirm="warehouseChange" :range="warehouseList" range-key="name" mode="selector"></u-picker>
+		<input type="file" id="filed" accept="image/jpeg,image/png" hidden="" @change="filePreview">
+	</view>
+</template>
+
+<script>
+	import productBrand from '@/pages/common/productBrand.vue'
+	import productType from '@/pages/common/productType.vue'
+	import { warehouseAllList, vinCodeParse } from '@/api/sales'
+	const baseUrl = getApp().globalData.baseUrl
+	export default{
+		components: { productBrand, productType },
+		props: {
+			openModal: { //  弹框显示状态
+				type: Boolean,
+				default: false
+			},
+			defaultParams: {  //  默认查询条件
+				type: Object,
+				default: () => {
+					return {}
+				}
+			}
+		},
+		data(){
+			return{
+				isShow: this.openModal,
+				form: {
+					vinCode: '',
+					productCode: '', //  产品编码
+					productName: '', //  产品名称
+					productOrigCode: '', //  原厂编码
+					productBrandSn: undefined, //  产品品牌
+					productTypeSn1: undefined, //  产品分类1
+					productTypeSn2: undefined, //  产品分类2
+					productTypeSn3: undefined, //  产品分类3
+					warehouseSn: undefined //  仓库
+				},
+				cost: false,  // 成本价
+				cityPrice: false,  // 市级价
+				customBtnStyle: {  //  自定义按钮样式
+					borderColor: this.$config('primaryColor'),
+					backgroundColor: this.$config('primaryColor'),
+					color: '#fff'
+				},
+				warehouseName: '',
+				warehouseModal: false,
+				warehouseList: [],
+				brandModal: false,
+				brandName: '',
+				showTypeModal: false,
+				nowData: {
+					data: [],
+					indArr: [],
+					nowInd: 0
+				},
+				vinLoading: false,
+			}
+		},
+		computed: {
+			productTypeNameArr: function() {
+				let str = ''
+				this.nowData.data.map(item => {
+					str += item.productTypeName+' / '
+				})
+				return str ? str.substr(0, str.length-3) : ''
+			}
+		},
+		mounted() {
+			this.init()
+			this.getWarehouse()
+		},
+		methods: {
+			//  初始化数据
+			init(){
+				// if(this.defaultParams.beginDate && this.defaultParams.endDate){
+				// 	this.form.date = this.defaultParams.beginDate + ' ~ ' + this.defaultParams.endDate
+				// }else{
+				// 	this.form.date = ''
+				// }
+				// this.beginDate = this.defaultParams.beginDate ? this.defaultParams.beginDate : ''
+				// this.endDate = this.defaultParams.endDate ? this.defaultParams.endDate : ''
+				// this.form.buyerName = this.defaultParams.buyerName ? this.defaultParams.buyerName : ''
+				// this.form.salesBillNo = this.defaultParams.salesBillNo ? this.defaultParams.salesBillNo : ''
+				// this.form.purchaseBillNo = this.defaultParams.purchaseBillNo ? this.defaultParams.purchaseBillNo : ''
+				// this.form.warehouseSn = this.defaultParams.warehouseSn ? this.defaultParams.warehouseSn : ''
+			},
+			// 查询
+			handleSearch() {
+				let params = JSON.parse(JSON.stringify(this.form))
+				delete params.date
+				this.$emit('refresh', params)
+				this.isShow = false
+			},
+			// 重置
+			resetForm() {
+				this.warehouseName = ''
+				this.form.beginDate = ''
+				this.form.endDate = ''
+				this.$refs.uForm.resetFields()
+				this.$emit('refresh', {})
+				this.isShow = false
+			},
+			uploadFun () {
+				console.log(111,document.getElementById('filed'))
+				document.getElementById('filed').click()
+				console.log(333)
+			},
+			filePreview (e) {
+				console.log(222)
+				const _this = this
+				var files = e.target.files[0]
+				const formData = new FormData()
+				formData.append('savePathType', 'local')
+				formData.append('file', files)
+				this.vinLoading = true
+				vinCodeParse(formData).then(res => {
+					if (res.type == 'application/json') {
+						var reader = new FileReader()
+						reader.addEventListener('loadend', function () {
+						const obj = JSON.parse(reader.result)
+						if (obj.status == 200) {
+							_this.form.vinCode = obj.data || ''
+							// 移除表单项的校验结果
+							// _this.$refs.uForm.clearValidate('vinCode')
+						} else {
+							this.toashMsg(obj.message)
+						}
+						_this.vinLoading = false
+						document.getElementById('filed').value = ''
+					})
+					reader.readAsText(res)
+			    } else {
+					_this.vinLoading = false
+			    }
+			  })
+			},
+			// 选择品牌
+			brandChoose(data){
+				this.brandName = data.brandName
+				this.form.productBrandSn = data.brandSn
+			},
+			// 清空品牌
+			brandClean(){
+				this.brandName = ''
+				this.form.productBrandSn = undefined
+			},
+			// 选择分类
+			typeChoose(obj){
+				this.nowData = {
+					data: obj.data,
+					indArr: obj.indArr,
+					nowInd: obj.nowInd
+				}
+				this.form.productTypeSn1 = this.nowData.data[0]&&this.nowData.data[0].productTypeSn ? this.nowData.data[0].productTypeSn : undefined
+				this.form.productTypeSn2 = this.nowData.data[1]&&this.nowData.data[1].productTypeSn ? this.nowData.data[1].productTypeSn : undefined
+				this.form.productTypeSn3 = this.nowData.data[2]&&this.nowData.data[2].productTypeSn ? this.nowData.data[2].productTypeSn : undefined
+			},
+			// 清空分类
+			typeClean(){
+				this.nowData = {
+					data: [],
+					indArr: [],
+					nowInd: 0
+				}
+				this.form.productTypeSn1 = undefined
+				this.form.productTypeSn2 = undefined
+				this.form.productTypeSn3 = undefined
+			},
+			//  清空仓库
+			clearWarehouse(){
+				this.warehouseName = ''
+				this.form.warehouseSn = undefined
+			},
+			// 仓库  change
+			warehouseChange(ind){
+				this.form.warehouseSn = this.warehouseList[ind].warehouseSn || undefined
+				this.warehouseName = this.warehouseList[ind].name || ''
+			},
+			// 仓库列表
+			getWarehouse () {
+				warehouseAllList().then(res => {
+					if(res.status == 200 && res.data){
+						this.warehouseList = res.data
+						// 仓库有值时,匹配对应name
+						if(this.defaultParams.warehouseSn || this.defaultParams.warehouseSn==0){
+							this.warehouseList.map(item => {
+								if(item.warehouseSn == this.defaultParams.warehouseSn){
+									this.warehouseName = item.name
+								}
+							})
+						}
+					}else{
+						this.warehouseList = []
+					}
+				})
+			},
+		},
+		watch: {
+			//  父页面传过来的弹框状态
+			openModal (newValue, oldValue) {
+				this.isShow = newValue
+			},
+			//  重定义的弹框状态
+			isShow (newValue, oldValue) {
+				if (!newValue) {
+					this.$emit('close')
+				}
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.productSearch-wrap{
+		.search-popup {
+			.form-content {
+				display: block;
+				padding: 0 20upx;
+				box-sizing: content-box;
+				.form-item-inp{
+					display: inline-block;
+					width: 88%;
+					vertical-align: top;
+				}
+			}
+			.uni-list-btns {
+				display: flex;
+				padding: 20upx;
+				margin-top: 100upx;
+				.handle-btn {
+					font-size: 28upx;
+					margin: 0 30upx;
+					width: 100%;
+					flex: 1;
+				}
+			}
+		}
+	}
+</style>

+ 1 - 8
pages/sales/salesSearch.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="salesSearch-wrap">
 		<u-popup v-model="isShow" class="search-popup" mode="right" @close="isShow=false" length="85%">
-			<view class="search-title">筛选</view>
 			<u-form class="form-content" :model="form" ref="uForm" label-width="150">
 				<u-form-item label="创建时间" prop="date" class="form-item">
 					<u-input clearable v-model="form.date" disabled placeholder="请选择创建时间区间" class="form-item-inp" @click="showDate=true" />
@@ -41,7 +40,7 @@
 				type: Boolean,
 				default: false
 			},
-			defaultParams: {  //  默认筛选条件
+			defaultParams: {  //  默认查询条件
 				type: Object,
 				default: () => {
 					return {}
@@ -165,12 +164,6 @@
 <style lang="scss">
 	.salesSearch-wrap{
 		.search-popup {
-			.search-title {
-				text-align: center;
-				padding: 18upx 22upx;
-				color: #333;
-				border-bottom: 1px solid #eee;
-			}
 			.form-content {
 				display: block;
 				padding: 0 20upx;

+ 38 - 21
pages/sales/search.vue

@@ -1,7 +1,8 @@
 <template>
 	<view class="modal-box">
-		<u-popup v-model="isShow" :customStyle="customStyle" @close="isShow=false" mode="right" >
-			<u-form :model="form" ref="uForm" label-width="180">
+		<u-popup v-model="isShow"  @close="isShow=false" mode="right" length="85%" >
+			<view class="search-title">查询</view>
+			<u-form :model="form" ref="uForm" label-width="180" class="form-content">
 				<u-form-item label="产品编码"><u-input v-model.trim="form.productCode" placeholder="请输入产品编码" input-align="right" /></u-form-item>
 				<u-form-item label="原厂编码"><u-input v-model.trim="form.productOrigCode" placeholder="请输入原厂编码" input-align="right" /></u-form-item>
 				<u-form-item label="产品名称"><u-input v-model.trim="form.productName" placeholder="请输入产品名称" input-align="right" /></u-form-item>
@@ -9,8 +10,8 @@
 				<u-form-item label="产品分类"><u-input v-model="productTypeNameArr" @click="showTypeModal=true" disabled placeholder="请选择产品分类" input-align="right" /></u-form-item>
 			</u-form>
 			<view class="form-footer-btn">
-				<u-button size="medium" hover-class="none" @click="handleClean">清空</u-button>
-				<u-button size="medium" hover-class="none" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
+				<u-button class="handle-btn" size="medium" hover-class="none" @click="handleClean">清空</u-button>
+				<u-button class="handle-btn" size="medium" hover-class="none" :custom-style="customBtnStyle" @click="handleSearch">查询</u-button>
 			</view>
 		</u-popup>
 		<!-- 产品品牌 -->
@@ -58,10 +59,6 @@
 					backgroundColor: this.$config('primaryColor'),
 					color: '#fff'
 				},
-				customStyle:{
-					width:"100%",
-					padding:"10px",
-				},
 				nowData: {
 					data: [],
 					indArr: [],
@@ -83,12 +80,13 @@
 				this.form.productTypeSn1 = undefined
 				this.form.productTypeSn2 = undefined
 				this.form.productTypeSn3 = undefined
-				// this.handleSearch()
+				this.handleSearch()
 			},
 			handleSearch(){
-				let params = JSON.parse(JSON.stringify(this.form))
-				console.log(params)
-				uni.navigateTo({ url: "/pages/sales/productPricing?data="+JSON.stringify(params) })
+				let data = JSON.parse(JSON.stringify(this.form))
+				console.log(data)
+				this.$emit('refresh', data)
+				this.isShow=false
 			},
 			// 选择品牌
 			brandChoose(data){
@@ -124,13 +122,15 @@
 			}
 		},
 		watch:{
-			showModal(nVal,oVal){
-				this.isShow=nVal
+			//  父页面传过来的弹框状态
+			showModal (newValue, oldValue) {
+				this.isShow = newValue
 			},
+			//  重定义的弹框状态
 			isShow (newValue, oldValue) {
-			  if (!newValue) {
-			    this.$emit('close')
-			  }
+				if (!newValue) {
+					this.$emit('close')
+				}
 			}
 		}
 	}
@@ -139,6 +139,17 @@
 <style lang="scss">
 	.modal-box{
 		width: 100%;
+		.search-title {
+			text-align: center;
+			padding: 30upx 22upx;
+			color: #333;
+			border-bottom: 1px solid #eee;
+		}
+		.form-content{
+			display: block;
+			padding: 0 20upx;
+			box-sizing: content-box;
+		}
 		.u-form-item{
 			padding: 20upx 10upx;
 		}
@@ -147,10 +158,16 @@
 			display: flex;
 			justify-content: space-between;
 		}
-		.form-footer-btn uni-button{
-			width: 40%;
-			margin: 0 auto;
-			font-size: 30upx;
+		.form-footer-btn {
+			display: flex;
+			padding: 20upx;
+			margin-top: 200upx;
+			.handle-btn {
+				font-size: 28upx;
+				margin: 0 30upx;
+				width: 100%;
+				flex: 1;
+			}
 		}
 	}
 </style>

File diff suppressed because it is too large
+ 0 - 0
static/iconfont/iconfont.css


BIN
static/iconfont/iconfont.ttf


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