Browse Source

产品报价修改

lilei 2 years ago
parent
commit
b7c49d6832
5 changed files with 45 additions and 7 deletions
  1. 2 2
      pages/common/copyText.vue
  2. 2 0
      pages/sales/index.vue
  3. 3 2
      pages/sales/productPricing.vue
  4. 37 3
      pages/sales/search.vue
  5. 1 0
      store/index.js

+ 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>

+ 2 - 0
pages/sales/index.vue

@@ -145,6 +145,8 @@
 			this.getLookUpList('SETTLE_STYLE', 'vuex_paymentTypeList');
 			// 获取单据来源
 			this.getLookUpList('SALES_SOURCE', 'vuex_salesSourceList');
+			// 获取产品状态
+			this.getLookUpList('ONLINE_FLAG', 'vuex_onlineFlagList');
 			// 获取门店审核状态
 			this.getLookUpList('XPRH_STORE_APPLY_STATUS', 'vuex_storeAuthState');
 			// 门店审核结算方式

+ 3 - 2
pages/sales/productPricing.vue

@@ -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,7 +24,7 @@
 							<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">

+ 37 - 3
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="显示未入库产品">
+					<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: false
 				},
 				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,14 +88,17 @@
 				this.form.code = ''
 				this.form.name = ''
 				this.form.origCode = ''
+				this.form.putStockFlag = false
 				this.brandClean()
 				this.typeClean()
+				this.clearOnlineFlag()
 				setTimeout(()=>{
 					this.handleSearch()
 				},300)
 			},
 			handleSearch(){
 				let data = JSON.parse(JSON.stringify(this.form))
+				data.putStockFlag = data.putStockFlag ? 1 : 0
 				console.log(data)
 				this.$emit('refresh', data)
 				this.isShow=false
@@ -118,6 +134,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 +161,8 @@
 			isShow (newValue, oldValue) {
 				if (!newValue) {
 					this.$emit('close')
+				}else{
+					this.getStateList()
 				}
 			}
 		}

+ 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:[], // 临时打印数据