Преглед изворни кода

Merge branch 'master' of http://110.41.163.243:9980/kd-aiot/aiot-app

ysy пре 1 година
родитељ
комит
e22bee60e6
2 измењених фајлова са 35 додато и 17 уклоњено
  1. 28 16
      pages/saleManage/contact/contactList.vue
  2. 7 1
      pages/saleManage/contact/index.vue

+ 28 - 16
pages/saleManage/contact/contactList.vue

@@ -1,17 +1,17 @@
 <template>
 <template>
 	<view class="mainBox">
 	<view class="mainBox">
 		<u-list-item v-for="(item, index) in tableList" :key="index" style="position: relative;">
 		<u-list-item v-for="(item, index) in tableList" :key="index" style="position: relative;">
-			<myCard @setFree="setFree(item)" @assignModelShow="assignModelShow(item)" @del="del(item)" :item="item" :index="index+1" :btnList="btnList" :columns="columns"> </myCard>
-	
-			
+			<myCard @setFree="setFree(item)" @addApply="addApply(item)" @assignModelShow="assignModelShow(item)" @del="del(item)" :item="item"
+				:index="index+1" :btnList="btnList" :columns="columns"> </myCard>
+
+
 		</u-list-item>
 		</u-list-item>
-		
+
 		<u-modal :show="modalShow" @cancel="modalShow=false" :showCancelButton="true" :closeOnClickOverlay="true"
 		<u-modal :show="modalShow" @cancel="modalShow=false" :showCancelButton="true" :closeOnClickOverlay="true"
 			@confirm="assign" :title="'指派'">
 			@confirm="assign" :title="'指派'">
 			<view>
 			<view>
 				<view>
 				<view>
-					<u--input placeholder="分管部门" @click.native="showPicker" 
-						v-model="addForm.fgDeptName"></u--input>
+					<u--input placeholder="分管部门" @click.native="showPicker" v-model="addForm.fgDeptName"></u--input>
 
 
 				</view>
 				</view>
 				<view>
 				<view>
@@ -25,8 +25,8 @@
 
 
 
 
 		</u-modal>
 		</u-modal>
-		<ba-tree-picker ref="treePicker" :multiple="false" @select-change="confirm" :localdata="listData"
-			valueKey="id" textKey="name" childrenKey="children" />
+		<ba-tree-picker ref="treePicker" :multiple="false" @select-change="confirm" :localdata="listData" valueKey="id"
+			textKey="name" childrenKey="children" />
 		<u-toast ref="uToast"></u-toast>
 		<u-toast ref="uToast"></u-toast>
 
 
 	</view>
 	</view>
@@ -37,7 +37,7 @@
 		contactPage,
 		contactPage,
 		contactDelete,
 		contactDelete,
 		free,
 		free,
-		assign
+		assign,apply
 	} from '@/api/saleManage/contact/index.js'
 	} from '@/api/saleManage/contact/index.js'
 	import {
 	import {
 		listOrganizations,
 		listOrganizations,
@@ -77,7 +77,7 @@
 					[{
 					[{
 						label: '名称:',
 						label: '名称:',
 						prop: 'name',
 						prop: 'name',
-						type:'title',
+						type: 'title',
 						className: 'perce100',
 						className: 'perce100',
 					}],
 					}],
 					[{
 					[{
@@ -115,7 +115,7 @@
 					[{
 					[{
 						label: '操作:',
 						label: '操作:',
 						prop: 'action',
 						prop: 'action',
-						type:'action',
+						type: 'action',
 						className: 'perce100',
 						className: 'perce100',
 					}],
 					}],
 				]
 				]
@@ -129,7 +129,7 @@
 			showPicker() {
 			showPicker() {
 				this.$refs.treePicker._show();
 				this.$refs.treePicker._show();
 			},
 			},
-		
+
 			confirm(data, name) {
 			confirm(data, name) {
 				this.addForm.fgDeptName = name
 				this.addForm.fgDeptName = name
 				this.addForm.fgDeptId = data[0]
 				this.addForm.fgDeptId = data[0]
@@ -187,7 +187,7 @@
 				});
 				});
 			},
 			},
 			assignModelShow(row) {
 			assignModelShow(row) {
-				this.current=row
+				this.current = row
 				this.modalShow = true
 				this.modalShow = true
 			},
 			},
 			assign() {
 			assign() {
@@ -222,9 +222,21 @@
 						this.getList(this.where)
 						this.getList(this.where)
 					})
 					})
 			},
 			},
-
-	
-
+			//申请
+			addApply(row) {
+				apply({
+					contactIds: row.id,
+					contactNames:row.name
+				}).then((res) => {
+					this.isEnd = false
+					this.page = 1
+					this.$refs.uToast.show({
+						type: "success",
+						message: "操作成功",
+					})
+					this.getList(this.where)
+				});
+			},
 			//获取列表信息
 			//获取列表信息
 			getList(where) {
 			getList(where) {
 				this.where = where
 				this.where = where

+ 7 - 1
pages/saleManage/contact/index.vue

@@ -30,6 +30,11 @@
 					btnType: 'primary',
 					btnType: 'primary',
 					type: '1',
 					type: '1',
 					pageUrl: '/pages/saleManage/contact/add'
 					pageUrl: '/pages/saleManage/contact/add'
+				},{
+					name: '申请',
+					apiName: 'addApply',
+					btnType: 'primary',
+					type: '2',
 				}]
 				}]
 			}
 			}
 		},
 		},
@@ -50,7 +55,8 @@
 			},
 			},
 			scrolltolower() {
 			scrolltolower() {
 				this.$refs.contactListRef.getList({
 				this.$refs.contactListRef.getList({
-					type: 1
+					type: 1,
+					assignStatus:0
 				})
 				})
 			},
 			},
 		}
 		}