zh 2 gadi atpakaļ
vecāks
revīzija
cde4e5a86f

+ 1 - 1
src/api/basic_data/sectorAllocation.js

@@ -2,7 +2,7 @@ import request from '@/utils/request'
 
 export function getTradeConfigList(params) {
   return request({
-    url: '/config/tradeConfig/list',
+    url: '/config/tradeConfig/listLevel',
     method: 'post',
     data: params
   })

+ 18 - 3
src/views/basic_data/partya/partyaForm.vue

@@ -63,7 +63,7 @@
           <el-col :xs="24" :sm="8" :lg="8" class="item">
             <div class="label">*行业小类</div>
             <div class="value">
-              <el-select v-model="formData.tradeId" placeholder="请选择行业小类" clearable filterable class="my-width">
+              <el-select v-model="formData.tradeId" placeholder="请选择行业小类" clearable filterable class="my-width" @change="handleTrade">
                 <el-option v-for="item in tradeList" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </div>
@@ -426,10 +426,21 @@ export default {
     },
     handleTradeParent(e) {
       if (e) {
-        this.getTradeConfigList(e)
+        const item = this.tradeParentList.find(k => k.id === e)
+        this.formData.tradeParentName = item.name
+        this.tradeList = item.childList
         return
       }
-      this.tradeId = ''
+      this.formData.tradeId = ''
+    },
+    handleTrade(e) {
+      if (e) {
+        const item = this.tradeList.find(k => k.id === e)
+        this.formData.tradeName = item.name
+      } else {
+        this.formData.tradeId = ''
+        this.formData.tradeName = ''
+      }
     },
     getTradeConfigList(parentId = '') {
       getTradeConfigList({
@@ -449,6 +460,10 @@ export default {
         this.formData = {
           ...res.data
         }
+        const item = this.tradeParentList.find(k => k.id === res.data.tradeParentId)
+        this.tradeList = item.childList
+        this.getRegion(1, this.formData.provinceRegionId)
+        this.getRegion(2, this.formData.cityRegionId)
       })
     },
     onReset() {

+ 37 - 8
src/views/basic_data/sectorAllocation.vue

@@ -14,14 +14,14 @@
     </div>
     <div class="table">
       <el-table
+        v-loading="listLoading"
         :data="tableData"
+        max-height="700px"
         style="width: 100%"
         row-key="id"
         border
-        lazy
-        :load="load"
         default-expand-all
-        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+        :tree-props="{ children: 'childList', hasChildren: 'hasChildren' }"
       >
         <el-table-column prop="name" label="分类名称" width="300" />
         <el-table-column prop="createBy" label="发布人" />
@@ -50,6 +50,18 @@
         </el-table-column>
       </el-table>
     </div>
+    <!-- 分页 -->
+    <div class="fr">
+      <el-pagination
+        :current-page="currentPage"
+        :page-sizes="[10, 20, 30, 50]"
+        :page-size="10"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="listTotal"
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+      />
+    </div>
     <el-dialog
       :title="type == 'add' ? '新增分类' : '编辑分类'"
       :visible.sync="visible"
@@ -103,7 +115,11 @@ export default {
         parentName: '',
         state: true
       },
-      type: 'add'
+      type: 'add',
+      currentPage: 1,
+      pageSize: 10,
+      listTotal: 0,
+      listLoading: false
     }
   },
   created() {
@@ -118,16 +134,18 @@ export default {
       return new Promise((resolve, reject) => {
         getTradeConfigList({
           keyword: this.keyword,
-          pageNum: 1,
-          pageSize: -1,
-          parentId: parentId
+          pageNum: this.currentPage,
+          pageSize: this.pageSize
         })
           .then(res => {
+            this.listLoading = true
             if (!parentId) {
               res.data.records.forEach(k => {
                 k.hasChildren = true
               })
               this.tableData = res.data.records
+              this.listTotal = res.data.total
+              this.listLoading = false
             }
             resolve(res.data.records)
           })
@@ -184,7 +202,7 @@ export default {
     handleAdd(level = false, row = {}) {
       if (level) {
         this.formData = {
-          id: row.id,
+          id: '',
           state: row.state,
           name: '',
           parentId: row.id,
@@ -205,6 +223,17 @@ export default {
         state: true
       }
       this.visible = false
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val
+      this.currentPage = 1
+      this.getTradeConfigList()
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val
+      this.getTradeConfigList()
     }
   }
 }

+ 48 - 12
src/views/commercialEngineering/components/base.vue

@@ -11,7 +11,7 @@
         <el-col v-if="['cross'].includes(pageType)" :xs="24" :sm="24" :lg="24" class="item">
           <div class="label">项目性质*:</div>
           <div class="value">
-            <el-radio-group v-model="formData.orderType" style="width: 100%">
+            <el-radio-group v-model="formData.orderType" size="mini" style="width: 100%">
               <el-radio
                 v-for="item in [
                   { label: '工装', value: 'WORK' },
@@ -25,12 +25,32 @@
             </el-radio-group>
           </div>
         </el-col>
-        <el-col :xs="24" :sm="12" :lg="12" class="item">
+        <el-col :xs="24" :sm="['add'].includes(module) ? 12 :24" :lg="['add'].includes(module) ? 12 :24" class="item">
           <div class="label">销售公司名称:</div>
           <div class="value">
             <el-input v-model="formData.salesCompanyName" disabled placeholder="请填写" size="mini" clearable />
           </div>
         </el-col>
+        <template v-if="!['add'].includes(module)">
+          <el-col :xs="24" :sm="12" :lg="8" class="item">
+            <div class="label">工程登录类型:</div>
+            <div class="value">
+              <el-input :value="formData.orderType === 'WORK'? '工装': '家装'" placeholder="请填写" size="mini" clearable />
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="8" class="item">
+            <div class="label">项目编号:</div>
+            <div class="value">
+              <el-input v-model="formData.projectNo" placeholder="请填写" size="mini" clearable />
+            </div>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="8" class="item">
+            <div class="label">登录时间:</div>
+            <div class="value">
+              <el-input v-model="formData.createTime" placeholder="请填写" size="mini" clearable />
+            </div>
+          </el-col>
+        </template>
         <el-col :xs="24" :sm="12" :lg="12" class="item">
           <div class="label">{{ ['cross'].includes(pageType) ? '业务' : '项目' }}所在区域*:</div>
           <div class="value">
@@ -77,7 +97,8 @@
         <el-col :xs="24" :sm="12" :lg="8" class="item">
           <div class="label">经销商*:</div>
           <div class="value">
-            <el-select v-model="formData.customerId" placeholder="请选择" clearable filterable @change="handleCustomer">
+            <el-input v-if="isCustomer" v-model="formData.customerId" placeholder="请填写" size="mini" clearable />
+            <el-select v-else v-model="formData.customerId" placeholder="请选择" clearable filterable @change="handleCustomer">
               <el-option
                 v-for="item in commonData.customerList"
                 :key="item.value"
@@ -160,7 +181,7 @@
         >
           <div class="label" style="height: auto">工程项目名称*:</div>
           <div class="value my-center" style="height: 100%">
-            <el-radio-group v-model="formData.homeProjectNameRadio">
+            <el-radio-group v-model="formData.homeProjectNameRadio" size="mini">
               <el-radio label="AREA">
                 <el-input
                   v-model="formData.homeProjectNameArea"
@@ -254,7 +275,7 @@
         <el-col :xs="24" :sm="24" :lg="24" class="item">
           <div class="label">项目类别*:</div>
           <div class="value">
-            <el-radio-group v-model="formData.projectCategory">
+            <el-radio-group v-model="formData.projectCategory" size="mini">
               <el-radio v-for="item in commonData.dict['TRADE_LOGIN_CATEGORY']" :key="item.value" :label="item.value">
                 {{ item.label }}
               </el-radio>
@@ -271,7 +292,7 @@
         <el-col :xs="24" :sm="12" :lg="12" class="item">
           <div class="label">类型</div>
           <div class="value">
-            <el-radio-group v-model="formData.type">
+            <el-radio-group v-model="formData.type" size="mini">
               <el-radio v-for="item in commonData.dict['TRADE_LOGIN_TYPE']" :key="item.value" :label="item.value">
                 {{ item.label }}
               </el-radio>
@@ -334,7 +355,7 @@
         <el-col :xs="24" :sm="24" :lg="24" class="item">
           <div class="label">成功机率*:</div>
           <div class="value">
-            <el-radio-group v-model="formData.successRate">
+            <el-radio-group v-model="formData.successRate" size="mini">
               <el-radio v-for="item in commonData.dict['SUCCESS_RATE']" :key="item.value" :label="item.value">
                 {{ item.label }}
               </el-radio>
@@ -363,13 +384,19 @@
         <el-col :xs="24" :sm="24" :lg="24" class="item">
           <div class="label">工程跟进状态*:</div>
           <div class="value">
-            <el-radio-group v-model="formData.status">
+            <el-radio-group v-model="formData.status" size="mini">
               <el-radio v-for="item in commonData.dict['FOLLOW_STATUS']" :key="item.value" :label="item.value">
                 {{ item.label }}
               </el-radio>
             </el-radio-group>
           </div>
         </el-col>
+        <el-col v-if="['detail', 'examine'].includes(module)" :xs="24" :sm="24" :lg="24" class="item">
+          <div class="label">订单状态:</div>
+          <div class="value">
+            <el-input :value="orderTypeEume[formData.orderStatus]" placeholder="请填写" size="mini" clearable />
+          </div>
+        </el-col>
         <el-col :xs="24" :sm="24" :lg="24" class="item">
           <div class="label" style="height: auto">备注:</div>
           <div class="value" style="height: 100%">
@@ -453,11 +480,14 @@ export default {
       areaList: [],
       streetList: [],
       tradeParentList: [],
-      tradeList: []
+      tradeList: [],
+      orderTypeEume: {
+        SAVE: '保存', WAIT: '待审核', OK: '登录成功', FAIL: '登录不成功', RETURN: '返回'
+      }
     }
   },
   computed: {
-    ...mapGetters(['isTradeExaminer'])
+    ...mapGetters(['isTradeExaminer', 'isCustomer', 'customerNumber', 'customerId', 'customerName'])
   },
   watch: {
     async 'formData.id'(newValue, oldValue) {
@@ -471,7 +501,8 @@ export default {
             }
           })
         }
-        this.getTradeConfigList(this.formData.tradeParentId)
+        const item = this.tradeParentList.find(k => k.id === this.formData.tradeParentId)
+        this.tradeList = item.childList
         await this.getCallbackPosition(0, this.formData.provinceId, 'province', 'id')
         await this.getCallbackPosition(this.formData.provinceId, this.formData.cityId, 'city', 'id')
         await this.getCallbackPosition(this.formData.cityId, this.formData.areaId, 'area', 'id')
@@ -483,6 +514,11 @@ export default {
     this.getTradeConfigList()
     if (this.module === 'add') {
       this.getRegion()
+      if (this.isCustomer) {
+        this.formData.customerId = this.customerId
+        this.formData.customerNumber = this.customerNumber
+        this.formData.customerName = this.customerName
+      }
     }
   },
   methods: {
@@ -582,7 +618,7 @@ export default {
       if (e) {
         const item = this.tradeParentList.find(k => k.id === e)
         this.formData.tradeParentName = item.name
-        this.getTradeConfigList(e)
+        this.tradeList = item.childList
         return
       }
       this.formData.tradeId = ''

+ 1 - 1
src/views/commercialEngineering/crossDistrict/crossDistrictkList.vue

@@ -58,7 +58,7 @@ export default {
           ]
         ],
         ...(() => {
-          return !this.isTradeExaminer
+          return this.isTradeExaminer
             ? [
               [
                 [

+ 1 - 1
src/views/commercialEngineering/frock/frockList.vue

@@ -55,7 +55,7 @@ export default {
           ]
         ],
         ...(() => {
-          return !this.isTradeExaminer
+          return this.isTradeExaminer
             ? [
               [
                 [

+ 1 - 1
src/views/commercialEngineering/homeDecoration/homeDecorationList.vue

@@ -65,7 +65,7 @@ export default {
           ]
         ],
         ...(() => {
-          return !this.isTradeExaminer
+          return this.isTradeExaminer
             ? [
               [
                 [