Просмотр исходного кода

Merge branch 'linwenxin_workOrder' of ssh://gogs.zfire.top:2222/zfire-front/zfire-newmall-admin

linwenxin 1 год назад
Родитель
Сommit
fc1ae686ee
1 измененных файлов с 42 добавлено и 33 удалено
  1. 42 33
      src/views/setting/departmentManage/index.vue

+ 42 - 33
src/views/setting/departmentManage/index.vue

@@ -71,17 +71,17 @@
         <el-form-item label="名称" prop="name">
           <el-input placeholder="请输入网点名称" v-model="mainForm.name"></el-input>
         </el-form-item>
-			<el-form-item label="联系人" prop="linkName">
-				<el-input placeholder="请输入联系人名称" v-model="mainForm.linkName"></el-input>
-			</el-form-item>
-			<el-form-item label="联系人电话" prop="websitPhone">
-				<el-input placeholder="请输入联系人电话" maxlength="11" type="number" v-model="mainForm.websitPhone"></el-input>
-			</el-form-item>
+        <el-form-item label="联系人" prop="linkName">
+          <el-input placeholder="请输入联系人名称" v-model="mainForm.linkName"></el-input>
+        </el-form-item>
+        <el-form-item label="联系人电话" prop="websitPhone">
+          <el-input placeholder="请输入联系人电话" maxlength="11" type="number" v-model="mainForm.websitPhone"></el-input>
+        </el-form-item>
         <el-form-item label="地址" prop="address" required>
-			<div style="display:flex;">
-				<el-input placeholder="请选择地址" readonly style="margin-right: 20px;" v-model="mainForm.address"></el-input>
-				<geographicalPosi :formData="mainForm" @selectPosi="selectAddress"></geographicalPosi>
-			</div>
+          <div style="display:flex;">
+            <el-input placeholder="请选择地址" readonly style="margin-right: 20px;" v-model="mainForm.address"></el-input>
+            <geographicalPosi :formData="mainForm" @selectPosi="selectAddress"></geographicalPosi>
+          </div>
         </el-form-item>
         <el-form-item label="状态" prop="status">
           <el-radio-group v-model="mainForm.status">
@@ -89,6 +89,12 @@
             <el-radio :label="false">禁用</el-radio>
           </el-radio-group>
         </el-form-item>
+        <el-form-item label="增值服务" prop="isIncre">
+          <el-radio-group v-model="mainForm.isIncre">
+            <el-radio :label="true">启用</el-radio>
+            <el-radio :label="false">禁用</el-radio>
+          </el-radio-group>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancelMainForm">取 消</el-button>
@@ -102,7 +108,7 @@
 import { getDepartmentList, addDepartment, editDepartment, getDepartmentDetail, deleteDepartment } from '@/api/setting'
 import geographicalPosi from '@/components/geographicalPosi/index.vue'
 export default {
-	components: {geographicalPosi},
+  components: { geographicalPosi },
   data() {
     return {
       dataList: [], // 列表数据
@@ -113,7 +119,7 @@ export default {
       editId: null,
       mainFormType: 'add',
       mainFormVisible: false,
-	  addressVisible: false,
+      addressVisible: false,
       input: '',
       value1: [],
       levels: [],
@@ -121,18 +127,19 @@ export default {
       mainForm: {
         parentId: '',
         name: '',
-		linkName:'',
-		websitPhone: '',
-		lat: '',
-		lng: '',
+        linkName: '',
+        websitPhone: '',
+        lat: '',
+        lng: '',
         address: '',
         status: true,
+        isIncre: true,
       },
       mainFormRules: {
         name: [{ required: true, message: '请填写网点名称', trigger: 'blur' }],
-		linkName: [{ required: true, message: '请填写联系人名称', trigger: 'blur' }],
-		websitPhone: [{ required: true, message: '请填写联系人电话', trigger: 'blur' }],
-		address: [{ required: true, message: '请选择GPS地址', trigger: 'blur' }],
+        linkName: [{ required: true, message: '请填写联系人名称', trigger: 'blur' }],
+        websitPhone: [{ required: true, message: '请填写联系人电话', trigger: 'blur' }],
+        address: [{ required: true, message: '请选择GPS地址', trigger: 'blur' }],
       }
     }
   },
@@ -195,12 +202,12 @@ export default {
         this.levels = levels
       })
     },
-	
-	selectAddress(res){
-		this.mainForm.lng = res.center[0]
-		this.mainForm.lat = res.center[1]
-		this.mainForm.address = res.name
-	},
+
+    selectAddress(res) {
+      this.mainForm.lng = res.center[0]
+      this.mainForm.lat = res.center[1]
+      this.mainForm.address = res.name
+    },
 
     // 更改每页数量
     handleSizeChange(val) {
@@ -245,12 +252,13 @@ export default {
           this.mainForm = {
             parentId: res.data.parentId,
             name: res.data.name,
-			linkName: res.data.linkName,
-			websitPhone: res.data.websitPhone,
-			lat: res.data.lat,
-			lng: res.data.lng,
+            linkName: res.data.linkName,
+            websitPhone: res.data.websitPhone,
+            lat: res.data.lat,
+            lng: res.data.lng,
             address: res.data.address,
             status: res.data.status,
+            isIncre: res.data.isIncre
           }
         })
       }
@@ -278,12 +286,13 @@ export default {
           let params = {
             parentId,
             name: this.mainForm.name,
-			linkName: this.mainForm.linkName,
-			websitPhone: this.mainForm.websitPhone,
-			lat: this.mainForm.lat,
-			lng: this.mainForm.lng,
+            linkName: this.mainForm.linkName,
+            websitPhone: this.mainForm.websitPhone,
+            lat: this.mainForm.lat,
+            lng: this.mainForm.lng,
             address: this.mainForm.address,
             status: this.mainForm.status,
+            isIncre: this.mainForm.isIncre
           }
           if (this.mainFormType == 'edit') {
             params.websitId = this.editId