Ver Fonte

Merge branch 'develop_yh13' of jianguan-web/qpls-md-app into pre-release

李磊 há 2 anos atrás
pai
commit
f10589076f

+ 6 - 4
manifest.json

@@ -2,8 +2,8 @@
     "name" : "iSCM智慧供应链",
     "appid" : "__UNI__5B57B68",
     "description" : "iSCM智慧供应链系统",
-    "versionName" : "1.2.1",
-    "versionCode" : 121,
+    "versionName" : "1.2.6",
+    "versionCode" : 126,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {
@@ -55,7 +55,8 @@
         /* 模块配置 */
         "modules" : {
             "Bluetooth" : {},
-            "Share" : {}
+            "Share" : {},
+            "Push" : {}
         },
         /* 应用发布信息 */
         "distribute" : {
@@ -128,7 +129,8 @@
                         "appid" : "wx1409d0e9171fc6ed",
                         "UniversalLinks" : "https://iscm.360arrow.com/ulink/"
                     }
-                }
+                },
+                "push" : {}
             },
             "icons" : {
                 "android" : {

+ 2 - 2
pages/common/copyText.vue

@@ -35,8 +35,8 @@
 		margin-left: 20upx;
 		background: #c1c1bf;
 		font-weight: normal;
-		padding: 0 5upx;
-		border-radius: 5upx;
+		padding: 2upx 8upx;
+		border-radius: 8upx;
 		color: #fff;
 	}
 </style>

+ 48 - 103
pages/sales/addSales.vue

@@ -6,7 +6,7 @@
 				<u-button size="mini" :hair-line="false" plain type="primary" hover-class="none" @click="goBack" :custom-style="customBtnStyle">重新选择</u-button>
 			</view>
 		</view>
-		<view class="flex_1 content-box">
+		<view class="content-box">
 			<view class="content-form">
 				<u-form :model="form" ref="uForm"  label-width="180" :error-type="['toast']">
 					<u-form-item label="客户地址" required >
@@ -55,16 +55,14 @@
 					</u-form-item>
 				</u-form>
 			</view>
-			<view class="form-footer-btn">
-				<u-button class="handle-btn" size="medium" shape="circle" hover-class="none" @click="handleSaveCust" :custom-style="customBtnStyle">新增销售单</u-button>
-			</view>
+		</view>
+		<view class="form-footer-btn">
+			<u-button class="handle-btn" size="medium" shape="circle" hover-class="none" @click="handleSaveCust" :custom-style="customBtnStyle">新增销售单</u-button>
 		</view>
 		<!-- 省市区 -->
 		<Address ref="applyAddress" :isJrMini="false" @onConfirm="areaConfirm"></Address>
 		<!-- 选择收款方式 -->
 		<u-picker v-model="showSettle" title="收款方式"  @confirm="settleStyleChange" :range="settleTypeList" range-key="name" mode="selector" :default-selector="JSON.parse(JSON.stringify(defaultSettleIndex))"></u-picker>
-		<!-- 客户类型 -->
-		<u-picker v-model="showCust" title="客户类型" @confirm="custTypeChange" :range="custTypeList" range-key="name" mode="selector" :default-selector="JSON.parse(JSON.stringify(defaultCustIndex))"></u-picker>
 		<!-- 业务员 -->
 		<u-picker v-model="showUser" title="业务员" @confirm="userChange" :range="userList" range-key="name" mode="selector"></u-picker>
 	</view>
@@ -72,7 +70,7 @@
 
 <script>
 	import {settleStyleQueryAll,salesSave} from '@/api/sales.js'
-	import {customerDetail,custType,employeeAllList,updateByCustomerSn} from '@/api/customer.js'
+	import {customerDetail,employeeAllList,updateByCustomerSn} from '@/api/customer.js'
 	import Address from '@/components/address.vue'
 	import vSelect  from  '@/components/select/v-select.vue'
 	export default{
@@ -89,9 +87,6 @@
 				showSettle:false,//结算方式初始值
 				settleTypeList:[],//收款方式列表
 				settleStyleName:'',//收款方式名称
-				custTypeList:[] ,// 客户类型数据
-				showCust:false, //客户类型下拉弹窗初始值
-				custTypeName:'', // 客户类型名称
 				areaInfo: {},  //  省市区
 				areaIdArr: [],  //  省市区id数组
 				itemId:'',
@@ -140,43 +135,19 @@
 		},
 		onLoad(option) {
 			console.log(option.nowId,'option')
-			if(option.nowId){
-				// if(option.pageType=='edit'){
-				// 	uni.setNavigationBarTitle({
-				// 	  title:'编辑销售单'
-				// 	})
-				// }else{
-				// 	uni.setNavigationBarTitle({
-				// 	  title:'新增销售单'
-				// 	})
-				// }
-				this.itemId=option.nowId
-				this.getCustomerData(this.itemId)
-				this.getUserAllList()
-				setTimeout(()=>{
-					// 回显收款方式并下拉数据默认高亮选中
-					const ind=this.settleTypeList.findIndex((item)=>{
-						return item.settleStyleSn==this.customerData.settleStyleSn
-					})
-					console.log(ind,'ind')
-					this.settleStyleName=this.settleTypeList[ind].name
-					this.defaultSettleIndex=[ind]
-					// 回显业务员并下拉数据默认高亮选中
-					if(this.customerData.salesManSn){
-						const userInd=this.userList.findIndex((item)=>{
-							return item.customerSn==this.customerData.salesManSn
-						})
-						this.defaultUserIndex=[userInd]
-						this.form.salesManName=this.userList[userInd].name
-						this.form.salesManSn=this.userList[userInd].salesManSn
-					}
-					console.log(ind,'a',JSON.parse(JSON.stringify(this.defaultSettleIndex)) )
-				},200)
-			}
-			this.getSettleStyle()
-			this.getCustomerList()
+			this.itemId=option.nowId
+			this.pageInit()
 		},
 		methods:{
+			async pageInit(){
+				const a = await employeeAllList({}) // 获取业务员列表数据
+				const b = await settleStyleQueryAll({}) // 获取结算方式列表
+				this.userList = a.status == 200 ? a.data : []
+				this.settleTypeList = b.status == 200 ? b.data : []
+				if(this.itemId){
+				  this.getCustomerData(this.itemId)
+				}
+			},
 			getCustomerData(val){
 				uni.showLoading({title:'加载中...',mask:true})
 				customerDetail({id:val}).then(res=>{
@@ -205,7 +176,7 @@
 						  priceType: this.customerData.priceType, //  价格类型
 						  settleStyleSn: this.customerData.settleStyleSn //  收款方式
 						})
-						if(this.customerData.priceType || this.customerData.dispatchType){
+						if(this.customerData.priceType){
 							setTimeout(()=>{
 								this.$refs.priceType.setVal(this.customerData.priceType)
 							},200)
@@ -216,6 +187,25 @@
 							},200)
 						}
 						this.form=Object.assign(this.form,res.data)
+						
+						// 回显收款方式并下拉数据默认高亮选中
+						const ind=this.settleTypeList.findIndex((item)=>{
+							return item.settleStyleSn==this.customerData.settleStyleSn
+						})
+						if(ind){
+							this.settleStyleName=this.settleTypeList[ind].name
+							this.defaultSettleIndex=[ind]
+						}
+						// 回显业务员并下拉数据默认高亮选中
+						if(this.customerData.salesManSn){
+							const userInd=this.userList.findIndex((item)=>{
+								return item.customerSn==this.customerData.salesManSn
+							})
+							this.defaultUserIndex=[userInd]
+							this.form.salesManName=this.userList[userInd].name
+							this.form.salesManSn=this.userList[userInd].salesManSn
+						}
+						
 					}else{
 						this.customerData=null
 					}
@@ -249,11 +239,9 @@
 			},
 			// 重新选择
 			goBack(){
-				uni.$emit('clear')
-				setTimeout(()=>{
-					uni.navigateBack({})
-				},500)
-				
+				uni.redirectTo({
+					url: '/pages/sales/chooseCustomer?backPage=addSales'
+				})
 			},
 			radioChange(e) {
 				console.log(e);
@@ -285,49 +273,12 @@
 				// console.log(this.areaIdArr,'this.areaIdArr')
 				this.$refs.applyAddress.open(this.areaIdArr)
 			},
-			// 获取业务员列表数据
-			getUserAllList () {
-			  employeeAllList({}).then(res => {
-			    if (res.status == 200) {
-			      this.userList = res.data || []
-			    } else {
-			      this.userList = []
-			    }
-			  })
-			},
-			// 获取客户类型列表
-			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
-					}
-				})
-			},
 			// 收款方式change
 			settleStyleChange(e){
-				console.log(e,'data')
 				this.defaultSettleIndex=[e]
 				this.settleStyleName=this.settleTypeList[e].name
 				this.form.settleStyleSn=this.settleTypeList[e].settleStyleSn
 			},
-			// 客户类型change
-			custTypeChange(e){
-				this.defaultCustIndex=[e]
-				this.custTypeName=this.custTypeList[e].name
-				this.form.customerTypeSn=this.custTypeList[e].customerTypeSn
-			},
 			// 业务员change
 			userChange(e){
 				this.defaultUserIndex=[e]
@@ -388,7 +339,7 @@
 							salesManName: '',
 							distributionFlag: this.form.distributionFlag, // 铺货出库
 							salesTragetType: 'CUSTOMER',
-							remarks: this.remarks //  备注
+							remarks: this.form.remarks //  备注
 						}
 						console.log(params,'params')
 						salesSave(params).then(res=>{
@@ -397,8 +348,9 @@
 									title: res.message,
 									icon: 'none'
 								})
+								uni.$emit("refreshSalesHomeBL")
 								setTimeout(()=>{
-									uni.navigateTo({
+									uni.redirectTo({
 										url:'/pages/sales/edit?pageType=edit&data='+JSON.stringify(res.data)
 									})
 								},300)
@@ -414,19 +366,18 @@
 </script>
 
 <style lang="scss">
+	page{
+		height: 100vh;
+	}
 	.addCustomer-content{
 		width: 100%;
 		height: 100vh;
-		// background-color: #fff;
-		
 		display: flex;
 		flex-direction: column;
 		.content-customerName{
 			width: 100%;
 			.customerName{
-				// position: fixed;
 				width: 100%;
-				// z-index: 999;
 				color: #000000;
 				font-size: 30upx;
 				font-weight: 1000;
@@ -435,14 +386,12 @@
 			}
 		}
 		.content-box{
-			display: flex;
-			flex-direction: column;
-			// margin-top: 100upx;
 			padding:0 40upx;
 			background-color: #fff;
+			flex-grow: 1;
+			overflow: auto;
 		}
 		.content-form{
-			flex: 1;
 			.receiveAddress{
 				width: 100%;
 				line-height: 1.5em;
@@ -456,12 +405,8 @@
 		}
 		.form-footer-btn{
 			background-color: #fff;
-			position: fixed;
-			bottom: 0;
-			left: 0;
 			width: 100%;
-			padding:0 30upx ;
-			z-index: 999;
+			padding:8px 30upx ;
 			.handle-btn{
 				width: 100%;
 				background-color: rgb(51, 95, 182);

+ 2 - 2
pages/sales/chooseCustomer.vue

@@ -123,11 +123,11 @@
 				this.listData = []
 			},
 			chooseItem(item){
-				console.log(item)
+				console.log(item,this.backPage)
 				this.queryWord=item.customerName
 				// 新增销售单
 				if(this.backPage == 'addSales'){
-					uni.navigateTo({
+					uni.redirectTo({
 						url:'/pages/sales/addSales?pageType=edit&nowId='+item.id
 					})
 				}

+ 1 - 1
pages/sales/chooseProduct.vue

@@ -124,7 +124,7 @@
 			uni.getSystemInfo({
 				success: function (res) {
 					const winH = res.windowHeight * 2
-					_this.scrollH = winH - 180
+					_this.scrollH = winH - 120
 				}
 			})
 		},

+ 3 - 3
pages/sales/edit.vue

@@ -9,7 +9,7 @@
 			</view>
 			<view class="info-item-box">
 				<text class="info-item-tit color_6">客户名称</text>
-				<text>{{detailData && detailData.buyerName || '--'}}</text>
+				<text>{{detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</text>
 			</view>
 		</view>
 		<!-- 产品列表 -->
@@ -375,9 +375,9 @@
 						const winH = res.windowHeight * 2
 						let totalH = _this.$refs.salesTotal && _this.$refs.salesTotal.$el && _this.$refs.salesTotal.$el.offsetHeight || 0
 						if(_this.toggle){
-							_this.scrollH = winH - 656 - totalH
+							_this.scrollH = winH - 605 - totalH
 						}else{
-							_this.scrollH = winH - 522 - totalH
+							_this.scrollH = winH - 468 - totalH
 						}
 						// if(_this.detailData&&_this.detailData.billStatus=='FINISH'){
 							_this.scrollH = _this.scrollH + 100

+ 3 - 1
pages/sales/index.vue

@@ -27,7 +27,7 @@
 					<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?backPage=addSales')">
 					<u-image class="nav-pic" :src="`../../static/${theme}/navIcon/sale_icon.png`" width="70" height="70"></u-image>
 					<text class="nav-txt">新增销售单</text>
 				</view> -->
@@ -145,6 +145,8 @@
 			this.getLookUpList('SETTLE_STYLE', 'vuex_paymentTypeList');
 			// 获取单据来源
 			this.getLookUpList('SALES_SOURCE', 'vuex_salesSourceList');
+			// 获取产品状态
+			this.getLookUpList('ONLINE_FLAG2', 'vuex_onlineFlagList');
 			// 获取门店审核状态
 			this.getLookUpList('XPRH_STORE_APPLY_STATUS', 'vuex_storeAuthState');
 			// 门店审核结算方式

+ 1 - 1
pages/sales/listComponent.vue

@@ -5,7 +5,7 @@
 				<view class="sales-list-item" v-for="(item, index) in listData" :key="item.id" @click="getDetail(item)">
 					<view class="list-item-tit flex align_center justify_between">
 						<view class="u-line" :style="{background: $config('primaryColor')}"></view>
-						<view class="buyer">{{item.buyerName}}</view>
+						<view class="buyer">{{item.buyerNameCurrent}}</view>
 						<view>{{item.billStatusDictValue}} <u-icon name="arrow-right" color="#969da3" size="28"></u-icon></view>
 					</view>
 					<view class="list-item-con">

+ 1 - 1
pages/sales/orderInfoModal.vue

@@ -9,7 +9,7 @@
 				</view>
 				<view class="order-info-list">
 					<text class="info-item-tit">客户名称:</text>
-					<text class="info-item-txt">{{ (infoData && infoData.buyerName) || '--' }}</text>
+					<text class="info-item-txt">{{infoData&&infoData.buyerNameCurrent?infoData.buyerName?infoData.buyerName==infoData.buyerNameCurrent?infoData.buyerNameCurrent:infoData.buyerNameCurrent+'('+infoData.buyerName+')':infoData.buyerNameCurrent:'--' }}</text>
 				</view>
 				<view class="order-info-list">
 					<text class="info-item-tit">客户地址:</text>

+ 34 - 25
pages/sales/productPricing.vue

@@ -1,8 +1,8 @@
 <template>
 	<view class="productPricing-content">
 		<view class="checkbox-price">
-			<u-checkbox-group  placement="row">
-				<u-checkbox v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in tabList" :key="index" :name="item.val">{{item.name}}</u-checkbox>
+			<u-checkbox-group  placement="row" :size="28">
+				<u-checkbox :label-size="26" v-model="item.checked" activeColor="rgb(4, 133, 246)" v-for="(item,index) in tabList" :key="index" :name="item.val">{{item.name}}</u-checkbox>
 			</u-checkbox-group>
 		</view>
 		<scroll-view class="product-list" scroll-y @scrolltolower="onreachBottom">
@@ -11,7 +11,8 @@
 					<view class="st-detailList-tit flex justify_between">
 						<!-- <view class="u-line" :style="{backgroundColor: $config('primaryColor')}"></view> -->
 						<view class="u-name">
-							<text>{{item.name}}</text>
+							<text style="margin-right: 20upx;">{{item.name}}</text>
+							<u-tag size="mini" :type="item.onlineFalg==1?'success':'info'" :text="item.onlineFalgDictValue"></u-tag>
 							<copyText :text="item.name" label="产品名称"></copyText>
 						</view>
 						<view class="u-last">
@@ -23,35 +24,33 @@
 							<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 class="padding_3">产品编码:{{item.code}} </view>
+							<view class="padding_3">产品编码:{{item.code}} <copyText :text="item.code" label="产品编码"></copyText></view>
 							<view class="padding_3">原厂编码:{{(item.origCode&&item.origCode!=' ')?item.origCode:'--'}} </view>
 							<view class="padding_3">品牌:{{item.productBrandName || '--'}} </view>
-							<view class="flex align_center justify_between">
-								<view class="font_13">
-									库存数:<text>{{toThousands(item.stockQty|| 0)}} 个</text>
-								</view>
-								<view class="font_13">
-									车主价:<text class="red">¥{{toThousands(item.carOwnersPrice|| 0,2)}} </text>
-								</view>
+							<view class="font_13">
+								库存数:<text>{{toThousands(item.stockQty|| 0)}} 个</text>
+							</view>
+							<view class="font_13">
+								车主价/自定义车主价:<text class="red">{{item.carOwnersPrice ||item.carOwnersPrice==0?'¥'+toThousands(item.carOwnersPrice,2):'--'}}/{{item.dealerProductPrice&&(item.dealerProductPrice.carOwnersPrice||item.dealerProductPrice.carOwnersPrice==0)?'¥'+toThousands(item.dealerProductPrice.carOwnersPrice,2):'--'}} </text>
 							</view>
 						</view>
 					</view>
 					<view class="price-all flex" v-if="selPriceShow">
-						<view class="price-item" v-if="priceList[0].checked">
-							<text>{{toThousands(item.offerCost|| 0,2)}} </text>
+						<view class="price-item1" v-if="priceList[0].checked">
+							<text>{{(item.offerCost||item.offerCost==0)?toThousands(item.offerCost,2):'--'}} </text>
 							<view>成本价</view>
 						</view>
-						<view class="price-item" v-if="priceList[1].checked">
-							<text>{{toThousands(item.cityPrice|| 0,2)}} </text>
+						<view class="price-item1" v-if="priceList[1].checked">
+							<text>{{(item.cityPrice || item.cityPrice==0)?toThousands(item.cityPrice,2):'--'}} </text>
 							<view>市级价</view>
 						</view>
-						<view class="price-item" v-if="priceList[2].checked">
-							<text>{{toThousands(item.specialPrice|| 0,2)}} </text>
+						<view class="price-item1" v-if="priceList[2].checked">
+							<text>{{(item.specialPrice||item.specialPrice==0)?toThousands(item.specialPrice,2):'--'}} </text>
 							<view>特约价</view>
 						</view>
-						<view class="price-item" v-if="priceList[3].checked">
-							<text>{{toThousands(item.terminalPrice|| 0,2)}} </text>
-							<view>终端会员价</view>
+						<view class="price-item2" v-if="priceList[3].checked">
+							<text>{{(item.terminalPrice||item.terminalPrice==0)?toThousands(item.terminalPrice,2):'--'}}/{{item.dealerProductPrice&&(item.dealerProductPrice.terminalPrice||item.dealerProductPrice.terminalPrice==0)?toThousands(item.dealerProductPrice.terminalPrice,2):'--'}}  </text>
+							<view>终端价/自定义终端价</view>
 						</view>
 					</view>
 				</view>
@@ -82,7 +81,7 @@
 					{ name: '成本价', checked: false, val: 'offerCost' },
 					{ name: '市级价', checked: false, val: 'cityPrice' },
 					{ name: '特约价', checked: false, val: 'specialPrice' },
-					{ name: '终端会员价', checked: false, val: 'terminalPrice' },
+					{ name: '终端价/自定义终端价', checked: false, val: 'terminalPrice' },
 				],
 				pageNo:1,
 				pageSize:15,
@@ -90,7 +89,12 @@
 				theme: '',
 				status: 'loadmore',
 				showModal:false,
-				params:{}
+				params:{
+					"code": "",
+					"name": "",
+					"origCode": "",
+					"putStockFlag": 1
+				}
 			}
 		},
 		onNavigationBarButtonTap(e){
@@ -236,16 +240,21 @@
 						.price-all{
 							border-top: 1px solid #e4e7ed;
 							padding: 20upx 20upx 0;
-							.price-item{
-								width: 25%;
+							.price-item1{
+								width: 18%;
 								border-right:  1px solid #e4e7ed;
 								text-align: center;
 								>view{
 									color:#999;
 								}
 							}
-							.price-item:last-child{
+							.price-item2{
+								width: 46%;
 								border-right:  none;
+								text-align: center;
+								>view{
+									color:#999;
+								}
 							}
 						}
 					}

+ 1 - 1
pages/sales/salesDetail.vue

@@ -5,7 +5,7 @@
 			<u-section @click="infoModal=true" title="基础信息" sub-title="查看更多" :line-color="$config('primaryColor')"></u-section>
 			<view class="info-item-box">
 				<text class="info-item-tit color_6">客户名称</text>
-				<text>{{detailData && detailData.buyerName || '--'}}</text>
+				<text>{{detailData&&detailData.buyerNameCurrent?detailData.buyerName?detailData.buyerName==detailData.buyerNameCurrent?detailData.buyerNameCurrent:detailData.buyerNameCurrent+'('+detailData.buyerName+')':detailData.buyerNameCurrent:'--' }}</text>
 			</view>
 			<view class="info-item-box">
 				<text class="info-item-tit color_6">销售单号</text>

+ 2 - 2
pages/sales/salesRecord.vue

@@ -15,14 +15,14 @@
 						</view>
 					</u-cell-item>
 				</u-cell-group> -->
-				<u-search placeholder="输入客户名称搜索" v-model="queryparams.buyerName" @change="changeInput" @clear="tagClick" @search="getList(1)" @custom="getList(1)"></u-search>
+				<u-search placeholder="输入客户名称搜索" v-model="queryparams.buyerNameCurrent" @change="changeInput" @clear="tagClick" @search="getList(1)" @custom="getList(1)"></u-search>
 			</view>
 			<scroll-view class="sales-list-con" :style="{height: scrollH+'upx'}" scroll-y @scrolltolower="onreachBottom">
 				<view class="sales-list-main">
 					<view class="sales-list-item" v-for="(item, index) in listData" :key="item.id">
 						<view class="list-item-tit flex align_center">
 							<!-- <view class="u-line" :style="{background: $config('primaryColor')}"></view> -->
-							<view class="buyer">{{item.salesBillEntity.buyerName}}</view>
+							<view class="buyer">{{item.salesBillEntity.buyerNameCurrent}}</view>
 						</view>
 						<view class="list-item-con">
 							<view class="list-item-line flex align_center justify_between">

+ 4 - 4
pages/sales/salesSearch.vue

@@ -6,8 +6,8 @@
 					<u-input clearable v-model="form.date" disabled placeholder="请选择创建时间区间" class="form-item-inp" @click="showDate=true" />
 					<u-icon v-show="form.date.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearTime"></u-icon>
 				</u-form-item>
-				<u-form-item label="客户名称" prop="buyerName" class="form-item">
-					<u-input v-model="form.buyerName" :maxlength="30" placeholder="请输入客户名称" />
+				<u-form-item label="客户名称" prop="buyerNameCurrent" class="form-item">
+					<u-input v-model="form.buyerNameCurrent" :maxlength="30" placeholder="请输入客户名称" />
 				</u-form-item>
 				<u-form-item label="销售单号" prop="salesBillNo" class="form-item">
 					<u-input v-model="form.salesBillNo" :maxlength="30" placeholder="请输入销售单号" />
@@ -64,7 +64,7 @@
 					date: '',
 					beginDate: '',
 					endDate: '',
-					buyerName: '', //  客户名称
+					buyerNameCurrent: '', //  客户名称
 					salesBillNo: '', //  销售单号
 					purchaseBillNo: '', //  采购单号
 					settleStyleSn: undefined //  收款方式
@@ -100,7 +100,7 @@
 				}
 				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.buyerNameCurrent = this.defaultParams.buyerNameCurrent ? this.defaultParams.buyerNameCurrent : ''
 				this.form.salesBillNo = this.defaultParams.salesBillNo ? this.defaultParams.salesBillNo : ''
 				this.form.purchaseBillNo = this.defaultParams.purchaseBillNo ? this.defaultParams.purchaseBillNo : ''
 				this.form.settleStyleSn = this.defaultParams.settleStyleSn ? this.defaultParams.settleStyleSn : ''

+ 37 - 4
pages/sales/search.vue

@@ -1,12 +1,19 @@
 <template>
 	<view class="modal-box">
 		<u-popup v-model="isShow"  @close="isShow=false" mode="right" length="85%" >
-			<u-form :model="form" ref="uForm" label-width="180" class="form-content">
+			<u-form :model="form" ref="uForm" label-width="200" class="form-content">
 				<u-form-item label="产品编码"><u-input v-model.trim="form.code" placeholder="请输入产品编码" input-align="right" /></u-form-item>
 				<u-form-item label="原厂编码"><u-input v-model.trim="form.origCode" placeholder="请输入原厂编码" input-align="right" /></u-form-item>
 				<u-form-item label="产品名称"><u-input v-model.trim="form.name" placeholder="请输入产品名称" input-align="right" /></u-form-item>
 				<u-form-item label="产品品牌"><u-input v-model="brandName" @click="brandModal=true" disabled placeholder="请选择产品品牌" input-align="right" /></u-form-item>
 				<u-form-item label="产品分类"><u-input v-model="productTypeNameArr" @click="showTypeModal=true" disabled placeholder="请选择产品分类" input-align="right" /></u-form-item>
+				<u-form-item label="产品状态" class="form-item">
+					<u-input v-model="onlineFalgName" @click="onlineFalgModal=true" disabled placeholder="请选择产品状态" input-align="right" />
+					<u-icon v-show="onlineFalgName.length != 0" name="close-circle-fill" color="#c8c0cc" size="32" class="close-circle" @click="clearOnlineFlag"></u-icon>
+				</u-form-item>
+				<u-form-item label="包含未入库产品" label-width="300">
+					<view class="flex justify_end" style="width: 100%;"><u-switch v-model="form.putStockFlag"></u-switch></view>
+				</u-form-item>
 			</u-form>
 			<view class="form-footer-btn">
 				<u-button class="handle-btn" shape="circle" size="medium" hover-class="none" @click="handleClean">重置</u-button>
@@ -17,6 +24,8 @@
 		<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="onlineFalgModal" @confirm="onlineFalgChange" :range="onlineFlagList" range-key="dispName" mode="selector"></u-picker>
 	</view>
 </template>
 
@@ -31,7 +40,6 @@
 				type: Boolean,
 				default: false
 			}
-			
 		},
 		computed: {
 			productTypeNameArr: function() {
@@ -52,6 +60,8 @@
 					productTypeSn1: undefined, //  产品分类1
 					productTypeSn2: undefined, //  产品分类2
 					productTypeSn3: undefined, //  产品分类3
+					onlineFalg: undefined,
+					putStockFlag: true
 				},
 				customBtnStyle: {  //  自定义按钮样式
 					borderColor: this.$config('primaryColor'),
@@ -66,7 +76,10 @@
 				brandName: '',
 				isShow:this.showModal,
 				showTypeModal: false,
-				brandModal:false
+				brandModal:false,
+				onlineFalgModal: false,
+				onlineFalgName: '',
+				onlineFlagList: []
 			}
 		},
 		methods:{
@@ -75,15 +88,17 @@
 				this.form.code = ''
 				this.form.name = ''
 				this.form.origCode = ''
+				this.form.putStockFlag = true
 				this.brandClean()
 				this.typeClean()
+				this.clearOnlineFlag()
 				setTimeout(()=>{
 					this.handleSearch()
 				},300)
 			},
 			handleSearch(){
 				let data = JSON.parse(JSON.stringify(this.form))
-				console.log(data)
+				data.putStockFlag = data.putStockFlag ? 1 : 0
 				this.$emit('refresh', data)
 				this.isShow=false
 			},
@@ -118,6 +133,22 @@
 				this.form.productTypeSn1 = undefined
 				this.form.productTypeSn2 = undefined
 				this.form.productTypeSn3 = undefined
+			},
+			clearOnlineFlag(){
+				this.onlineFalgName = ''
+				this.form.onlineFalg = undefined
+			},
+			// 产品状态 change
+			onlineFalgChange(ind){
+				this.form.onlineFalg = this.onlineFlagList[ind].code || undefined
+				this.onlineFalgName = this.onlineFlagList[ind].dispName || ''
+			},
+			getStateList(){
+				this.onlineFlagList = this.$store.state.vuex_onlineFlagList
+				if(this.form.onlineFalg){
+					const b = this.onlineFlagList.find(item => item.code == this.form.onlineFalg)
+					this.onlineFalgName = b ? b.dispName : ''
+				}
 			}
 		},
 		watch:{
@@ -129,6 +160,8 @@
 			isShow (newValue, oldValue) {
 				if (!newValue) {
 					this.$emit('close')
+				}else{
+					this.getStateList()
 				}
 			}
 		}

+ 4 - 1
pages/stock/detaiList.vue

@@ -66,7 +66,10 @@
 							<u-tag v-if="item.bizTypeDictValue" :text="item.bizTypeDictValue" :border-color="$config('primaryColor')" shape="circle" size="mini" />
 						</view>
 						<view class="flex align_center justify_between">
-							<view>{{item.unitName || '--'}}</view>
+							<view>
+							<text v-if="item.unitType&&item.unitType=='CUSTOMER'">{{ item.unitNameCurrent||'--' }}</text>
+							<text v-else>{{ item.unitName||'--' }}</text>
+							</view>
 							<view>
 								<view :style="{color: item.qty && item.qty!=0 ? (item.flowType=='PUT' ? 'green':'red'):'', display:'inline-block'}"><text v-if="item.qty && item.qty!=0">{{ item.flowType=='PUT' ? '+':'-' }}</text>{{ toThousands(item.qty||0) }}</view>
 								{{item.product && item.product.unit}}

+ 4 - 1
pages/stock/warehouseDetail.vue

@@ -40,7 +40,10 @@
 			</view>
 			<view class="info-item flex align_center justify_between">
 				<view class="info-name">单位名称</view>
-				<view>{{paramsData && paramsData.unitName || '--'}}</view>
+				<view v-if="paramsData">
+					<text v-if="paramsData.unitType&&paramsData.unitType=='CUSTOMER'">{{ paramsData.unitNameCurrent||'--' }}</text>
+					<text v-else>{{ paramsData.unitName||'--' }}</text>
+				</view>
 			</view>
 			<view class="info-item flex align_center justify_between">
 				<view class="info-name">批次号</view>

+ 6 - 6
pages/userCenter/index.vue

@@ -181,14 +181,14 @@
 				const _this = this;
 				clzConfirm({
 					title: '提示',
-					content: '账户注销后将不能再使用iSCM系统,且您的所有相关数据将被删除,您确定注销吗?',
+					content: '如果您选择注销账户,您的账户信息将被全部清除,将无法使用iSCM系统。如果您确认注销,可提供注册账号,发送邮件到car_octopus@sina.com。1-3个工作日即可完成注销。',
 					success: function(res) {
 						if (res.confirm || res.index == 0) {
-							logoff().then(ret => {
-								if(ret.status == 200){
-									_this.toLogin()
-								}
-							})
+							// logoff().then(ret => {
+							// 	if(ret.status == 200){
+							// 		_this.toLogin()
+							// 	}
+							// })
 						}
 					}
 				});

+ 1 - 0
store/index.js

@@ -106,6 +106,7 @@ const store = new Vuex.Store({
 		vuex_allLookUp: [],  //  数据字典
 		vuex_paymentTypeList: [], // 收款方式
 		vuex_salesSourceList: [], // 销售单据来源
+		vuex_onlineFlagList: [], // 产品上线状态
 		vuex_storeAuthState: [], // 门店审核状态
 		vuex_shelfSettleType: [], // 门店审核结算方式
 		vuex_tempPrintList:[], // 临时打印数据