Browse Source

参数设置

chenrui 2 years ago
parent
commit
950fce9d97
1 changed files with 24 additions and 13 deletions
  1. 24 13
      pages/userCenter/setData.vue

+ 24 - 13
pages/userCenter/setData.vue

@@ -42,11 +42,11 @@
 			</u-cell-group>
 		</view>
 		<!-- 类似于picker单选 -->
-		<redioPicker :showModal="showModal0" @chooseItem="chooseCycle" @close="showModal0 = false"  code="sales_bill_period"></redioPicker>
+		<redioPicker :showModal="showModal0" @chooseItem="chooseCycle" @close="showModal0 = false" :val="val0"  code="sales_bill_period"></redioPicker>
 		<!-- 类似于picker多选 -->
-		<checkBoxPicker :showModal="showModal1" @chooseCon="chooseStatus" @close="showModal1 = false" code="SALES_BILL_STATUS"></checkBoxPicker>
-		<checkBoxPicker :showModal="showModal2" @chooseCon="chooseStatus" @close="showModal2 = false" code="SALES_SOURCE"></checkBoxPicker>
-		<checkBoxPicker :showModal="showModal3" @chooseCon="chooseStatus" @close="showModal3 = false" code="verify_default_customer"></checkBoxPicker>
+		<checkBoxPicker :showModal="showModal1" @chooseCon="chooseStatus" @close="showModal1 = false" :val="val1" code="SALES_BILL_STATUS"></checkBoxPicker>
+		<checkBoxPicker :showModal="showModal2" @chooseCon="chooseStatus" @close="showModal2 = false" :val="val2" code="SALES_SOURCE"></checkBoxPicker>
+		<redioPicker :showModal="showModal3" @chooseItem="chooseCycle" @close="showModal3 = false" :val="val3" code="verify_default_customer"></redioPicker>
 	</view>
 </template>
 
@@ -63,14 +63,16 @@ export default {
 	data() {
 		return {
 			systemList: null,
-			
 			showModal0: false,
 			showModal1: false,
 			showModal2: false,
 			showModal3: false,
-			
 			siteNum:null,
 			
+			val0:undefined,
+			val1:undefined,
+			val2:undefined,
+			val3:undefined,
 			
 			inputStyle: {
 				'text-align': 'right'
@@ -83,20 +85,29 @@ export default {
 	},
 	methods: {
 		getData() {
+				
 			queryVerifySalesParams({}).then(res => {
-				this.systemList = res.data;
+				res.data.forEach(item=>{
+					if(item.valueShow && item.valueShow.indexOf(",")!=-1){
+						let arr = item.valueShow.split(',');
+						item.value = '已选' + arr.length + '项'
+					}else{
+						item.value  = item.valueShow
+					}
+				})
+				this.systemList = res.data;	
 			});
 		},
 		openModal(code,index) {
-			const newArr = ['sales_bill_period','verify_default_customer','SALES_BILL_STATUS','SALES_SOURCE']
-			let i = newArr.findIndex(con=>{
-				code.remarks==con
+			const newArr = ['sales_bill_period','SALES_BILL_STATUS','SALES_SOURCE','verify_default_customer']
+			newArr.forEach((con,i)=>{
+				if(code.remarks==con){
+					this['showModal' + i] = true;
+					this['val' + i] = code.paramValue;
+				}
 			})
 			//打开弹窗
 			this.siteNum=index;
-			if(i!=-1){
-				this['showModal' + i] = true;
-			}
 		},
 		changeSwitch(status, i) {
 			//是否参与对账单 0否 1是