Browse Source

非货架设置

lilei 1 year ago
parent
commit
9fb125a508
6 changed files with 102 additions and 27 deletions
  1. 1 1
      App.vue
  2. 1 1
      config/index.js
  3. 2 2
      manifest.json
  4. 36 8
      pages/approveStore/authPass.vue
  5. 20 4
      pages/approveStore/detail.vue
  6. 42 11
      pages/shelfSetting/shelfSet.vue

+ 1 - 1
App.vue

@@ -7,7 +7,7 @@
 			token: '',
 			changeOrg:'',
 			version: '', // 当前版本号
-			buildType: 'uat', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
+			buildType: 'dev', // 打包环境对应类型,pro 生产 uat 预发布 dev 本地开发
 			envTips: '', // 环境文字提示
 			theme: 'default', // 主题,default
 			isIphoneXup: false //是否iphonex以及以上的版本

+ 1 - 1
config/index.js

@@ -6,7 +6,7 @@ const getConfig = (theme) => {
 			themePath: 'default',
 			pro_URL: 'https://iscm.360arrow.com/qpls-md/', // 生产地址
 			uat_URL: 'https://p.iscm.360arrow.com/qpls-md/', // 预发布地址
-			dev_URL: 'http://192.168.2.117:8503/qpls-md/', // 本地地址
+			dev_URL: 'http://192.168.2.103:8503/qpls-md/', // 本地地址
 			appName: 'iSCM智慧供应链', // app 名称
 			company: '陕西山海高科信息技术有限公司',
 			loadText:{

+ 2 - 2
manifest.json

@@ -2,8 +2,8 @@
     "name" : "iSCM智慧供应链",
     "appid" : "__UNI__5B57B68",
     "description" : "iSCM智慧供应链系统",
-    "versionName" : "1.3.6",
-    "versionCode" : 136,
+    "versionName" : "1.3.7",
+    "versionCode" : 137,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 36 - 8
pages/approveStore/authPass.vue

@@ -52,12 +52,23 @@
 				<u-form-item label="授信金额" v-if="form.settleType == 'CREDIT'" required prop="creditLimit">
 					<u-input :clearable="false" type="digit" :min="100" :maxlength="8" @blur="numberToFixed('creditLimit',2,999999)" v-model.trim="form.creditLimit" placeholder="请输入大于100的数字,最多两位小数"/>
 				</u-form-item>
-				<u-form-item label="价格权限设置" >
-					<u-checkbox-group @change="priceSetChange">
-						<u-checkbox v-for="item in showPrice" :key="item.paramCode" v-model="item.checked"
-							:name="item.paramCode">{{item.text}}</u-checkbox>
-					</u-checkbox-group>
-				</u-form-item>
+				<view>
+					<view style="padding: 1rem 0">价格权限设置</view>
+					<view class="flex align_center" style="width: 100%;padding: 0.3rem 0">
+						<text style="width: 90px;">货架产品:</text>
+						<u-checkbox-group @change="priceSetChange">
+							<u-checkbox v-for="item in showPrice" :key="item.paramCode" v-model="item.checked"
+								:name="item.paramCode">{{item.text}}</u-checkbox>
+						</u-checkbox-group>
+					</view>
+					<view class="flex align_center" style="width: 100%;padding: 0.3rem 0">
+						<text style="width: 90px;">非货架产品:</text>
+						<u-checkbox-group @change="nonPriceSetChange">
+							<u-checkbox v-for="item in showNoPrice" :key="item.paramCode" v-model="item.checked"
+								:name="item.paramCode">{{item.text}}</u-checkbox>
+						</u-checkbox-group>
+					</view>
+				</view>
 			</u-form>
 		</view>
 		<view class="form-btn-con flex justify_center">
@@ -127,7 +138,8 @@
 				yyzzPhotoList: [],
 				settleStyleModal: false,
 				settleStyleList: [],
-				showPrice: []
+				showPrice: [],
+				showNoPrice: []
 			}
 		},
 		// 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕
@@ -144,6 +156,17 @@
 								text: '结算价',
 								checked: false
 							}]
+			this.showNoPrice = [{
+								paramCode: 'non_shelf_price_show',
+								paramValue: 1,
+								text: '车主价',
+								checked: true
+							},{
+								paramCode: 'non_shelf_cost_show',
+								paramValue: 0,
+								text: '结算价',
+								checked: false
+							}]
 		},
 		onLoad(options) {
 			const _this = this
@@ -272,11 +295,16 @@
 					item.paramValue = e.includes(item.paramCode) ? 1 : 0
 				})
 			},
+			nonPriceSetChange(e){
+				this.showNoPrice.map(item => {
+					item.paramValue = e.includes(item.paramCode) ? 1 : 0
+				})
+			},
 			// 价格显示保存
 			savePriceSet(data) {
 				const params = {
 					shelfSn: data.shelfSn,
-					paramValue: this.showPrice
+					paramValue: [...this.showPrice, ...this.showNoPrice]
 				}
 				console.log(params)
 				// 更新价格显示

+ 20 - 4
pages/approveStore/detail.vue

@@ -46,9 +46,17 @@
 				<u-form-item label="授信金额" v-if="form.auditStatus == 'PASS'&&form.settleType == 'CREDIT'">
 					{{form.creditLimit||'--'}}
 				</u-form-item>
-				<u-form-item label="价格权限" >
-					{{showPriceStr.length ? showPriceStr.join("/") : '--'}}
-				</u-form-item>
+				<view class="flex">
+					<view style="padding: 0.5rem 0;width: 90px;">价格权限</view>
+					<view>
+						<view style="padding: 0.5rem 1rem 0.3rem 0;">
+							货架产品:{{showPriceStr.length ? showPriceStr.join("/") : '--'}}
+						</view>
+						<view style="padding: 0.5rem 1rem 0.5rem 0">
+							非货架产品:{{showNonPriceStr.length ? showNonPriceStr.join("/") : '--'}}
+						</view>
+					</view>
+				</view>
 			</u-form>
 		</view>
 	</view>
@@ -87,7 +95,8 @@
 				rules: {},
 				areaIdArr: [],  //  省市区id数组
 				labelArr: [],
-				showPriceStr: []
+				showPriceStr: [],
+				showNonPriceStr: []
 			}
 		},
 		onLoad(options) {
@@ -119,6 +128,7 @@
 			// 获取价格显示设置
 			getShelfPriceShow(data) {
 				this.showPriceStr = []
+				this.showNonPriceStr = []
 				getShelfPriceShow({
 					shelfSn: data.shelfSn
 				}).then(res => {
@@ -131,6 +141,12 @@
 							if (item.paramCode == 'shelf_cost_show' && item.paramValue == 1) {
 								this.showPriceStr.push("结算价")
 							}
+							if (item.paramCode == 'non_shelf_price_show' && item.paramValue == 1) {
+								this.showNonPriceStr.push("车主价")
+							}
+							if (item.paramCode == 'non_shelf_cost_show' && item.paramValue == 1) {
+								this.showNonPriceStr.push("结算价")
+							}
 						})
 					}
 				})

+ 42 - 11
pages/shelfSetting/shelfSet.vue

@@ -28,9 +28,12 @@
 				<view class="card-row align_center flex justify_between">
 					<view class="label" style="width: 40%;" @click="showTip(0)">价格权限设置 <u-icon color="#ffaa00"
 							name="question-circle"></u-icon></view>
-					<view class="text flex align_center" style="width: 60%;text-align: right;"
+					<view class="text flex align_center justify_end" style="width: 60%;"
 						@click="openSetPriceShow">
-						<text style="width: 80%;flex: 1;">{{showPriceStr.length ? showPriceStr.join("/") : '--'}}</text>
+						<view style="flex-grow: 1;">
+							<view>货架产品:<text style="width: 80%;flex: 1;">{{showPriceStr.length ? showPriceStr.join("/") : '--'}}</text></view>
+							<view>非货架产品:<text style="width: 80%;flex: 1;">{{showNonPriceStr.length ? showNonPriceStr.join("/") : '--'}}</text></view>
+						</view>
 						<u-icon name="arrow-right" color="#969da3" size="28"></u-icon>
 					</view>
 				</view>
@@ -98,11 +101,15 @@
 		<!-- 设置价格显示弹框 -->
 		<u-modal v-model="updateShowPrice" :show-cancel-button="true" title="价格权限设置" @confirm="savePriceSet">
 			<view class="slot-content" style="padding: 1.5rem 1rem;text-align: center;">
+				<view style="color: #999;font-size: 0.8rem;margin: 0.5rem;">提示:不勾选则不显示价格</view>
 				<u-checkbox-group @change="priceSetChange">
 					<u-checkbox v-for="item in showPrice" :key="item.paramCode" v-model="item.checked"
 						:name="item.paramCode">{{item.text}}</u-checkbox>
 				</u-checkbox-group>
-				<view style="color: #999;font-size: 0.8rem;margin: 0.5rem;">提示:不勾选则不显示价格</view>
+				<u-checkbox-group @change="nonPriceSetChange">
+					<u-checkbox v-for="item in showNonPrice" :key="item.paramCode" v-model="item.checked"
+						:name="item.paramCode">{{item.text}}</u-checkbox>
+				</u-checkbox-group>
 			</view>
 		</u-modal>
 	</view>
@@ -149,7 +156,9 @@
 				webView: null,
 				showDot: false,
 				showPrice: [],
+				showNonPrice:[],
 				showPriceStr: [],
+				showNonPriceStr:[],
 				updateShowPrice: false,
 				showPriceBak: [],
 				showMore: false
@@ -270,7 +279,7 @@
 					confirmText: "好的",
 					title: "提示",
 					content: type ? "只有当数字货架的“是否设置完成”为“是”,系统才会自动对该货架生成补货单,修理厂才能正常下单。" :
-						"1、不勾选则不显示价格,非货架产品只显示车主价,不选择车主价时,非货架产品不显示价格\n2、结算价:即易码通进货价"
+						"不勾选则不显示价格,结算价:即易码通进货价"
 				})
 			},
 			// 设置完成是否
@@ -394,6 +403,8 @@
 			formatPriceShow(){
 				this.showPrice = []
 				this.showPriceStr = []
+				this.showNonPrice = []
+				this.showNonPriceStr = []
 				this.showPriceBak.map(item => {
 					if (item.paramCode == 'shelf_price_show' && item.paramValue == 1) {
 						this.showPriceStr.push("车主价")
@@ -401,12 +412,27 @@
 					if (item.paramCode == 'shelf_cost_show' && item.paramValue == 1) {
 						this.showPriceStr.push("结算价")
 					}
-					this.showPrice.push({
-						paramCode: item.paramCode,
-						paramValue: item.paramValue,
-						text: item.paramCode == 'shelf_price_show' ? '车主价' : '结算价',
-						checked: item.paramValue == 1
-					})
+					if (item.paramCode == 'non_shelf_price_show' && item.paramValue == 1) {
+						this.showNonPriceStr.push("车主价")
+					}
+					if (item.paramCode == 'non_shelf_cost_show' && item.paramValue == 1) {
+						this.showNonPriceStr.push("结算价")
+					}
+					if(item.paramCode.indexOf("non_")>=0){
+						this.showNonPrice.push({
+							paramCode: item.paramCode,
+							paramValue: item.paramValue,
+							text: item.paramCode == 'non_shelf_price_show' ? '车主价' : '结算价',
+							checked: item.paramValue == 1
+						})
+					}else{
+						this.showPrice.push({
+							paramCode: item.paramCode,
+							paramValue: item.paramValue,
+							text: item.paramCode == 'shelf_price_show' ? '车主价' : '结算价',
+							checked: item.paramValue == 1
+						})
+					}
 				})
 			},
 			openSetPriceShow(){
@@ -420,6 +446,11 @@
 					item.paramValue = e.includes(item.paramCode) ? 1 : 0
 				})
 			},
+			nonPriceSetChange(e){
+				this.showNonPrice.map(item => {
+					item.paramValue = e.includes(item.paramCode) ? 1 : 0
+				})
+			},
 			// 价格显示保存
 			savePriceSet() {
 				uni.showLoading({
@@ -429,7 +460,7 @@
 				// 更新价格显示
 				updateShelfPriceShow({
 					shelfSn: this.shelfSn,
-					paramValue: this.showPrice
+					paramValue: [...this.showPrice,...this.showNonPrice]
 				}).then(res => {
 					if (res.status == 200) {
 						this.getShelfPriceShow()