lilei hai 7 meses
pai
achega
8c3e88dd99

+ 38 - 0
src/api/mqmsg.js

@@ -36,4 +36,42 @@ export const checkOptionTask = (params) => {
         'module': encodeURIComponent('钉钉审批')
     }
   })
+}
+//  erp数据校验查询 列表  有分页
+export const queryCheckResultPage = (params) => {
+  const url = `/report/datacheck/queryCheckResult/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers:{
+        'module': encodeURIComponent('erp数据校验列表查询')
+    }
+  })
+}
+// erp数据校验处理 
+export const datacheckModify = (params) => {
+  const url = `/report/datacheck/modifyById`
+  return axios({
+    url: url,
+    data:params,
+    method: 'post',
+    headers:{
+        'module': encodeURIComponent('erp数据校验处理')
+    }
+  })
+}
+// erp数据校验重新验证 
+export const datacheckReset = (params) => {
+  const url = `/report/datacheck/check`
+  return axios({
+    url: url,
+    data:params,
+    method: 'post',
+    headers:{
+        'module': encodeURIComponent('erp数据校验重新验证')
+    }
+  })
 }

+ 30 - 31
src/views/setting/dataValidManagement/editModal.vue

@@ -19,21 +19,25 @@
           :label-col="formItemLayout.labelCol"
           :wrapper-col="formItemLayout.wrapperCol"
         >
-          <a-form-model-item label="处理状态" prop="handleResult">
-            <a-select placeholder="请选择处理状态" id="erpMessageManagement-handleResult" v-model="form.handleResult">
-              <a-select-option value="finish" id="erpMessageManagement-handleResult-finish">
-                处理成功
-              </a-select-option>
-              <a-select-option value="fail" id="erpMessageManagement-handleResult-fail">
-                处理失败
-              </a-select-option>
-            </a-select>
+          <a-form-model-item label="业务名称">
+            {{ nowData && nowData.bizName||'--' }}
           </a-form-model-item>
-          <a-form-model-item label="处理描述" prop="handleRemark">
+          <a-form-model-item label="业务编号">
+            {{ nowData && nowData.bizNo||'--' }}
+          </a-form-model-item>
+          <a-form-model-item label="处理状态" prop="disposeType">
+            <v-select
+              code="DATA_CHECK_RESULT_DISPOSE_TYPE"
+              id="handleManage-disposeType"
+              placeholder="请选择处理状态"
+              v-model="form.disposeType"
+            ></v-select>
+          </a-form-model-item>
+          <a-form-model-item label="处理描述">
             <a-textarea
               id="handleManage-name"
               :maxLength="100"
-              v-model.trim="form.handleRemark"
+              v-model.trim="form.disposeDesc"
               @change="filterEmpty"
               placeholder="请输入处理描述(最多100个字符)"
               allowClear />
@@ -52,8 +56,9 @@
 import { commonMixin } from '@/utils/mixin'
 // 组件
 import { VSelect } from '@/components'
+import moment from 'moment'
 // 接口
-import { allocateTypeSave } from '@/api/allocateType'
+import { datacheckModify } from '@/api/mqmsg'
 export default {
   name: 'ValidEditModal',
   mixins: [commonMixin],
@@ -63,10 +68,6 @@ export default {
       type: Boolean,
       default: false
     },
-    itemSn: {
-      type: [Number, String],
-      default: ''
-    },
     nowData: {
       type: Object,
       default: null
@@ -83,15 +84,17 @@ export default {
       },
       // 提交参数
       form: {
-        handleRemark: '', // 处理描述
-        handleResult: undefined // 处理状态
+        disposeDesc: '', // 处理描述
+        disposeType: undefined, // 处理状态
+        disposeDate: moment().format('YYYY-MM-DD HH:mm:ss'), // 处理时间
+        id: '' // 数据校验ID
       },
       // 表单验证规则
       rules: {
-        handleResult: [
+        disposeType: [
           { required: true, message: '请选择处理状态', trigger: 'change' }
         ],
-        handleRemark: [
+        disposeDesc: [
           { required: true, message: '请输入处理描述', trigger: 'change' }
         ]
       }
@@ -112,9 +115,8 @@ export default {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           const form = _this.form
-          form.id = _this.itemSn ? _this.itemSn : null
           _this.spinning = true
-          allocateTypeSave(form).then(res => {
+          datacheckModify(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$emit('close', 1)
@@ -139,15 +141,12 @@ export default {
       if (!newValue) {
         this.$emit('close', 0)
         this.$refs.ruleForm.resetFields()
-      }
-    },
-    itemSn (newValue, oldValue) {
-      if (this.isShow && newValue) { //  编辑
-        this.form.handleResult = this.nowData && this.nowData.handleResult ? this.nowData.handleResult : ''
-        this.form.handleRemark = this.nowData && this.nowData.handleRemark ? this.nowData.handleRemark : ''
-      } else { //  添加
-        this.form.handleRemark = ''
-        this.form.handleResult = undefined
+      } else {
+        if (this.nowData && this.nowData.id) { //  编辑
+          this.form.disposeType = this.nowData && this.nowData.disposeType ? this.nowData.disposeType : ''
+          this.form.disposeDesc = this.nowData && this.nowData.disposeDesc ? this.nowData.disposeDesc : ''
+          this.form.id = this.nowData && this.nowData.id ? this.nowData.id : ''
+        }
       }
     }
   }

+ 68 - 49
src/views/setting/dataValidManagement/list.vue

@@ -6,28 +6,33 @@
         <a-form layout="inline" id="erpMessageManagement-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
-              <a-form-item label="同步时间">
+              <a-form-item label="校验时间">
                 <rangeDate ref="rangeDate" id="erpMessageManagement-rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="处理状态">
-                <a-select placeholder="请选择处理状态" id="erpMessageManagement-handleResult" v-model="queryParam.handleResult">
-                  <a-select-option value="finish" id="erpMessageManagement-handleResult-finish">
-                    处理成功
+            <a-col :md="4" :sm="24">
+              <a-form-item label="校验结果">
+                <a-select placeholder="请选择校验结果" id="erpMessageManagement-checkResult" v-model="queryParam.resultType">
+                  <a-select-option value="right" id="erpMessageManagement-checkResult-success">
+                    成功
                   </a-select-option>
-                  <a-select-option value="fail" id="erpMessageManagement-handleResult-fail">
-                    处理失败
+                  <a-select-option value="error" id="erpMessageManagement-checkResult-fail">
+                    失败
                   </a-select-option>
                 </a-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <a-form-item label="业务编码">
-                <a-input id="erpMessageManagement-bizId" v-model.trim="queryParam.bizId" allowClear placeholder="请输入完整的业务编码"/>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="业务编号">
+                <a-input id="erpMessageManagement-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务编号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="业务名称">
+                <a-input id="erpMessageManagement-bizName" v-model.trim="queryParam.bizName" allowClear placeholder="请输入业务名称"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+            <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="erpMessageManagement-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="erpMessageManagement-reset">重置</a-button>
             </a-col>
@@ -50,24 +55,29 @@
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
           bordered>
-          <!-- 同步状态 -->
+          <!-- 处理状态 -->
           <template slot="syncStatus" slot-scope="text, record">
-            <span v-if="record.handleResult&&record.handleResult=='finish'">处理成功</span>
-            <span v-else-if="record.handleResult&&record.handleResult=='wait'">等待处理</span>
-            <span v-else style="color:#ed1c24;">处理失败</span>
+            <span v-if="record.disposeType&&record.disposeType=='NO_DISPOSE'">未处理</span>
+            <span v-else-if="record.disposeType&&record.disposeType=='RUN_DISPOSE'">处理中</span>
+            <span v-else-if="record.disposeType&&record.disposeType=='YES_DISPOSE'">已处理</span>
+            <span v-else>--</span>
           </template>
           <!-- 错误信息 -->
           <template slot="errInfo" slot-scope="text, record">
-            <div v-if="record.errInfo">
+            <div v-if="record.resultInfo">
               <a-popover trigger="hover">
                 <template slot="content">
-                  {{ record.errInfo }}
+                  {{ record.resultInfo }}
                 </template>
-                <div>{{ record.errInfo }}</div>
+                <div>{{ record.resultInfo }}</div>
               </a-popover>
             </div>
             <div v-else>--</div>
           </template>
+          <!-- 验证结果 -->
+          <template slot="resultType" slot-scope="text, record">
+            <span :style="{color:text=='right'?'green':'red'}">{{ text=='right'?'成功':'失败' }}</span>
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <div>
@@ -78,6 +88,7 @@
                 @click="handleCli(record)"
                 :id="'erpMessageManagement-handle-btn'+record.id">处理</a-button>
               <a-button
+                v-if="record.bizNo"
                 size="small"
                 type="link"
                 class="button-info"
@@ -89,7 +100,7 @@
       </a-spin>
     </a-card>
     <!-- 新增/编辑 -->
-    <editModal :openModal="openModal" :nowData="nowData" :itemSn="itemSn" @close="closeModal" />
+    <editModal :openModal="openModal" :nowData="nowData" @close="closeModal" />
   </div>
 </template>
 
@@ -100,7 +111,7 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import editModal from './editModal.vue'
 // 接口
-import { queryReceivePage, handle } from '@/api/mqmsg'
+import { queryCheckResultPage, datacheckReset } from '@/api/mqmsg'
 export default {
   name: 'DataValidManagementList',
   mixins: [commonMixin],
@@ -112,33 +123,32 @@ export default {
       tableHeight: 0, // 列表高度
       // 查询参数
       queryParam: {
-        createDateStart: '', // 同步开始时间
-        createDateEnd: '', // 同步结束时间
-        handleResult: undefined, // 处理状态
-        bizType: 'KdMidSpareInputs', // 业务类型
-        bizId: undefined// 业务编码
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        resultType: undefined, // 校验结果
+        bizName: '', // 业务名称
+        bizNo: '' // 业务编号
       },
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
-        { title: '业务编号', dataIndex: 'bizId', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '校验时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务名称', dataIndex: 'lastHandleDate0', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '错误信息', scopedSlots: { customRender: 'errInfo' }, width: '15%', align: 'center', ellipsis: true },
-        { title: '校验内容', dataIndex: 'lastHandleDate1', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '校验结果', dataIndex: 'lastHandleDate2', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '校验内容', dataIndex: 'lastHandleDate3', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '处理状态', scopedSlots: { customRender: 'syncStatus' }, width: '10%', align: 'center' },
-        { title: '处理描述', dataIndex: 'lastHandleDate4', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '处理时间', dataIndex: 'lastHandleDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
+        { title: '业务名称', dataIndex: 'bizName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '校验内容', dataIndex: 'checkContent', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务编号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '校验结果', dataIndex: 'resultType', scopedSlots: { customRender: 'resultType' }, width: '6%', align: 'center' },
+        { title: '错误信息', scopedSlots: { customRender: 'errInfo' }, width: '14%', align: 'center', ellipsis: true },
+        { title: '校验时间', dataIndex: 'checkDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '处理状态', scopedSlots: { customRender: 'syncStatus' }, width: '6%', align: 'center' },
+        { title: '处理描述', dataIndex: 'disposeDesc', width: '14%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '处理时间', dataIndex: 'disposeDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
         // 获取列表数据 有分页
-        return queryReceivePage(Object.assign(parameter, this.queryParam)).then(res => {
+        return queryCheckResultPage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -154,32 +164,41 @@ export default {
         })
       },
       openModal: false, //  新增编辑调拨类型  弹框
-      itemSn: '', //  当前sn
       nowData: null //  当前记录数据
     }
   },
   methods: {
     //  同步时间  change
     dateChange (date) {
-      this.queryParam.createDateStart = date[0] ? date[0] : ''
-      this.queryParam.createDateEnd = date[1] ? date[1] : ''
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
     },
     //  重置
     resetSearchForm () {
-      this.queryParam.handleResult = undefined
-      this.queryParam.createDateStart = ''
-      this.queryParam.createDateEnd = ''
-      this.queryParam.bizId = undefined
+      this.queryParam = {
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        resultType: undefined, // 校验结果
+        bizName: '', // 业务名称
+        bizNo: '' // 业务编号
+      }
       this.$refs.rangeDate.resetDate()
       this.$refs.table.refresh(true)
     },
     // 处理
     handleCli (row) {
-      this.itemSn = row ? row.id : null
       this.nowData = row
       this.openModal = true
     },
-    // 重新同步
+    // 处理完成
+    closeModal (flag) {
+      this.nowData = null
+      this.openModal = false
+      if (flag) {
+        this.$refs.table.refresh()
+      }
+    },
+    // 重新验证
     handleAgainVeriy (row) {
       const _this = this
       this.$confirm({
@@ -188,7 +207,7 @@ export default {
         centered: true,
         onOk () {
           _this.spinning = true
-          handle({ id: row.id }).then(res => {
+          datacheckReset({ bizName: row.bizName, bizNo: row.bizNo, nodeCode: row.nodeCode }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -208,7 +227,7 @@ export default {
     // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 200
+      this.tableHeight = window.innerHeight - tableSearchH - 190
     }
   },
   watch: {

+ 33 - 24
src/views/setting/erpAllotSettings/editModal.vue

@@ -19,8 +19,8 @@
           :label-col="formItemLayout.labelCol"
           :wrapper-col="formItemLayout.wrapperCol"
         >
-          <a-form-model-item label="调拨类别" prop="allocateCategory">
-            <allocateType id="transferTypeManagementEdit-allocateCategory" v-model="allocateType" @change="changeCategory" :level="2" placeholder="请选择调拨类别"></allocateType>
+          <a-form-model-item label="父类型">
+            {{ parentName }}
           </a-form-model-item>
           <a-form-model-item label="调拨类型名称" prop="name">
             <a-input
@@ -31,6 +31,15 @@
               placeholder="请输入调拨类型名称(最多30个字符)"
               allowClear />
           </a-form-model-item>
+          <a-form-model-item label="价格类型" prop="erpPriceType">
+            <v-select
+              code="ERP_PRICE_TYPE"
+              ref="erpPriceType"
+              id="transferTypeManagementEdit-erpPriceType"
+              placeholder="请选择价格类型"
+              v-model="form.erpPriceType"
+            ></v-select>
+          </a-form-model-item>
         </a-form-model>
         <div class="btn-cont">
           <a-button id="transferTypeManagementEdit-cancel" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
@@ -45,13 +54,12 @@
 import { commonMixin } from '@/utils/mixin'
 // 组件
 import { VSelect } from '@/components'
-import allocateType from '@/views/common/allocateType'
 // 接口
 import { allocateTypeSave } from '@/api/allocateType'
 export default {
   name: 'TransferTypeManagementEditModal',
   mixins: [commonMixin],
-  components: { VSelect, allocateType },
+  components: { VSelect },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -69,7 +77,10 @@ export default {
   computed: {
     // 弹窗标题
     modalTit () {
-      return (this.itemSn ? '编辑' : '新增') + '调拨类型'
+      return (this.itemSn ? '编辑' : this.nowData ? '添加子级' : '添加一级') + '调拨类型'
+    },
+    parentName () {
+      return this.nowData && this.nowData.superior ? this.nowData.superior.name : '--'
     }
   },
   data () {
@@ -81,20 +92,19 @@ export default {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
       },
-      allocateType: [], // 调拨类别
       // 提交参数
       form: {
         name: '', // 调拨类型名称
-        allocateCategory: undefined, //  调拨类别
-        treeLevel: 3
+        allocateCategory: undefined, //  父节点sn
+        erpPriceType: undefined //  价格类型
       },
       // 表单验证规则
       rules: {
-        allocateCategory: [
-          { required: true, message: '请选择调拨类别', trigger: 'change' }
-        ],
         name: [
           { required: true, message: '请输入调拨类型名称', trigger: 'change' }
+        ],
+        erpPriceType: [
+          { required: true, message: '请选择价格类型', trigger: 'change' }
         ]
       }
     }
@@ -108,10 +118,6 @@ export default {
       str = str.replace(/[\r\n]/g, '')
       this.form.name = str
     },
-    // 调拨类别 change
-    changeCategory (v, opt) {
-      this.form.allocateCategory = v && v[1] ? v[1] : ''
-    },
     //  保存
     handleSave () {
       const _this = this
@@ -145,18 +151,21 @@ export default {
       if (!newValue) {
         this.$emit('close', 0)
         this.$refs.ruleForm.resetFields()
-        this.allocateType = []
+      } else {
+        if (this.nowData) { //  编辑 或 添加子级
+          this.form.name = this.nowData && this.nowData.name ? this.nowData.name : ''
+          this.form.allocateCategory = this.nowData && this.nowData.allocateCategory ? this.nowData.allocateCategory : ''
+          this.form.erpPriceType = this.nowData && this.nowData.erpPriceType ? this.nowData.erpPriceType : undefined
+          this.form.treeLevel = this.nowData && this.nowData.treeLevel ? this.nowData.treeLevel : ''
+        } else { //  添加一级分类
+          this.form.name = ''
+          this.form.allocateCategory = 0
+          this.form.erpPriceType = undefined
+          this.form.treeLevel = 1
+        }
       }
     },
     itemSn (newValue, oldValue) {
-      if (this.isShow && newValue) { //  编辑
-        this.form.name = this.nowData && this.nowData.name ? this.nowData.name : ''
-        this.form.allocateCategory = this.nowData.allocateType[1]
-        this.allocateType = this.nowData.allocateType
-      } else { //  添加
-        this.form.name = ''
-        this.form.allocateCategory = undefined
-      }
     }
   }
 }

+ 22 - 54
src/views/setting/erpAllotSettings/list.vue

@@ -6,14 +6,7 @@
         id="transferTypeManagementList-add"
         type="primary"
         v-if="$hasPermissions('B_transferTypeManagement_add')"
-        @click="handleEdit()">新增</a-button>
-      <v-select
-        size="small"
-        code="ERP_PRICE_TYPE"
-        ref="erpPriceType"
-        v-show="false"
-        @loaded="loadedOk"
-      ></v-select>
+        @click="handleEdit()">新增一级类型</a-button>
     </div>
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 列表 -->
@@ -38,12 +31,20 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            class="button-success"
+            @click="handleEdit({allocateCategory:record.allocateTypeSn,treeLevel:record.treeLevel+1,superior:{name:record.name}})"
+            v-if="record.treeLevel != 3"
+            :id="'erpAllotSet-add-btn-'+record.id">新增子级类型</a-button>
+          <span style="color:#fff" v-else>———————-</span>
           <a-button
             size="small"
             type="link"
             class="button-info"
             @click="handleEdit(record)"
-            v-if="record.root==1 && $hasPermissions('B_transferTypeManagement_edit')"
+            v-if="$hasPermissions('B_transferTypeManagement_edit')"
             :id="'erpAllotSet-edit-btn-'+record.id">编辑</a-button>
           <a-button
             size="small"
@@ -53,21 +54,11 @@
             v-if="record.root==1 && $hasPermissions('B_transferTypeManagement_del')"
             :id="'erpAllotSet-del-btn-'+record.id">删除</a-button>
         </template>
-        <!-- 价格类型 -->
+        <template slot="createDate" slot-scope="text, record">
+          {{ record.createDate }}
+        </template>
         <template slot="priceType" slot-scope="text, record">
-          <a-select
-            v-if="record.root==1"
-            size="small"
-            style="width:50%;"
-            :id="'erpAllotSettings-erpPriceType'+record.id"
-            v-model="record.erpPriceType"
-            placeholder="请选择价格类型"
-            @change="e=>handleType(record,e)"
-          >
-            <a-select-option v-for="item in erpPriceTypeList" :key="item.code" :value="item.code">
-              {{ item.dispName }}
-            </a-select-option>
-          </a-select>
+          {{ record.erpPriceTypeDictValue }}
         </template>
       </s-table>
     </a-spin>
@@ -93,9 +84,10 @@ export default {
       tableHeight: 0, // 表格高度
       // 表头
       columns: [
-        { title: '费用/调拨类型/类型名称', scopedSlots: { customRender: 'titles' }, width: '60%', align: 'left' },
-        { title: '同步ERP价格类型', scopedSlots: { customRender: 'priceType' }, width: '20%', align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'center' }
+        { title: '调拨类型', scopedSlots: { customRender: 'titles' }, width: '60%', align: 'left' },
+        { title: '创建时间', scopedSlots: { customRender: 'createDate' }, width: '20%', align: 'center' },
+        { title: '价格类型', scopedSlots: { customRender: 'priceType' }, width: '20%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '20%', align: 'left' }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -126,33 +118,9 @@ export default {
     //  新增/编辑
     handleEdit (row) {
       console.log(row)
-      this.itemSn = row ? row.allocateTypeSn : null
-      this.nowData = {
-        name: row ? row.name : '',
-        allocateTypeSn: row ? row.allocateTypeSn : '',
-        allocateType: []
-      }
-      // 编辑时
-      if (row) {
-        this.findParent(this.allData, row ? row.allocateTypeSn : '')
-      } else {
-        this.openModal = true
-      }
-    },
-    // 查找父节点
-    findParent (treeList, sn) {
-      const _this = this
-      treeList.forEach(item => {
-        if (item.sonList && item.sonList.length > 0) {
-          _this.nowData.allocateType.push(item.allocateTypeSn)
-          _this.findParent(item.sonList, sn)
-        } else {
-          if (item.allocateTypeSn == sn) {
-            _this.openModal = true
-            return false
-          }
-        }
-      })
+      this.itemSn = row && row.allocateTypeSn ? row.allocateTypeSn : null
+      this.nowData = row
+      this.openModal = true
     },
     //  删除
     handleDel (row) {
@@ -190,7 +158,7 @@ export default {
           this.findChild(item.sonList)
           this.expandedRowKeys.push(item.allocateTypeSn)
         } else {
-          item.root = item.treeLevel == 3 && this.$hasPermissions('B_erpAllotSettings_erpPriceType') ? 1 : 0
+          item.root = this.$hasPermissions('B_erpAllotSettings_erpPriceType') ? 1 : 0
         }
       })
       return treeList