Browse Source

财务管理发票bug修补 项目管理业务类型 排序号和业务类型添加

lijt 1 year atrás
parent
commit
85436e9d40

+ 1 - 1
.env.production

@@ -7,4 +7,4 @@ VUE_APP_SERVER_URL = 'http://3081089em4.wicp.vip:36186/jeeplus-vue'
 #单点登录设置
 VUE_APP_SSO_LOGIN  = 'false'
 VUE_APP_CAS_SERVER = 'https://www.cainiao.com:8443/cas'
-VUE_APP_CLIENT_HOST = 'http://localhost:3001'
+VUE_APP_CLIENT_HOST = 'http://localhost:3000'

+ 82 - 4
src/views/modules/cw/invoice/InvoiceForm.vue

@@ -20,6 +20,7 @@
         <el-row  :gutter="15">
           <vxe-table
             border
+            :footer-method="footerMethod2"
             show-overflow
             show-footer
             ref="baseTable"
@@ -29,6 +30,7 @@
             @cell-click=""
             @edit-closed=""
             highlight-current-row
+            :edit-rules="tableRules"
             :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon: '-'}"
           >
             <vxe-table-column field="programName" title="项目名称" :edit-render="{}">
@@ -46,6 +48,16 @@
                 <el-input :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
               </template>
             </vxe-table-column>
+            <vxe-table-column field="reportNo" align="center" title="报告文号222" :edit-render="{}">
+              <template v-slot:edit="scope">
+                <el-input :readonly="true" placeholder="请填写报告文号" v-model="scope.row.reportNo"/>
+              </template>
+            </vxe-table-column>
+            <vxe-table-column field="account" align="center" title="发票金额(元)" :edit-render="{}">
+              <template v-slot:edit="scope">
+                <el-input :readonly="true" placeholder="请填写发票金额" v-model="scope.row.account" @blur="scope.row.account = twoDecimalPlaces(scope.row.account)" maxlength="15"/>
+              </template>
+            </vxe-table-column>
 <!--            <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
 <!--              <template v-slot:edit="scope">-->
 <!--                <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
@@ -245,8 +257,8 @@
                 </el-option>
               </el-select>
             </el-form-item>
-          </el-col>
-          <el-col :span="12">
+<!--          </el-col>-->
+<!--          <el-col :span="12">
             <el-form-item label="发票金额(元)" prop="account"
                           :rules="[
                           {required: true, message:'发票金额不能为空', trigger:'blur'}
@@ -265,7 +277,7 @@
               </el-input-number>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="12">-->
             <el-form-item label="是否多张开票" prop="isMultiple"
                           :rules="[
                         {required: true, message:'是否多张开票不能为空', trigger:'blur'}
@@ -602,14 +614,21 @@
   import WorkClientForm from '../workClientInfo/WorkClientChooseRadio'
   import SelectUserTree from '@/views/modules/utils/treeUserSelect'
   import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import XEUtils from 'xe-utils'
   export default {
     data () {
       return {
+        tableRules: {
+          account: [
+            { required: true, message: '请填写发票金额' }
+          ]
+        },
         title: '',
         method: '',
         visible: false,
         loading: false,
         inputForm: {
+          actualPrice: '',
           id: '',
           financeInvoiceBaseDTOList: [],
           programName: '',
@@ -695,6 +714,7 @@
         }
         this.method = method
         this.inputForm = {
+          actualPrice: '',
           id: '',
           financeInvoiceBaseDTOList: [],
           programName: '',
@@ -997,6 +1017,7 @@
             r.programNo = item.projectNumber
             r.contractId = item.contractId
             r.programId = item.id
+            r.reportNo = item.reportNo
             this.inputForm.financeInvoiceBaseDTOList[this.programRow] = r
           } else {
             let r = {
@@ -1004,9 +1025,13 @@
               contractName: item.contractName,
               programNo: item.projectNumber,
               contractId: item.contractId,
-              programId: item.id
+              programId: item.id,
+              reportNo: item.reportNo
             }
             this.inputForm.financeInvoiceBaseDTOList.push(r)
+            // this.$refs.baseTable.insertAt(r)
+            // this.inputForm.financeInvoiceBaseDTOList.push(r)
+            // this.baseKey = Math.random()
           }
         })
         this.$forceUpdate()
@@ -1226,6 +1251,56 @@
           })
         }
         this.$message.success('导入完成')
+      },
+      footerMethod2 ({ columns, data }) {
+        const footerData = [
+          columns.map((column, columnIndex) => {
+            if (columnIndex === 0) {
+              return '发票金额汇总(元)'
+            }
+            if (['account'].includes(column.property)) {
+              // eslint-disable-next-line no-undef
+              this.inputForm.actualPrice = XEUtils.sum(data, column.property)
+              return XEUtils.sum(data, column.property)
+            }
+            if (['actualPrice'].includes(column.property)) {
+              // eslint-disable-next-line no-undef
+              this.inputForm.actualPrice = XEUtils.sum(data, column.property)
+              return XEUtils.sum(data, column.property)
+            }
+            return null
+          })
+        ]
+        console.log('actualPrice', this.inputForm.actualPrice)
+        return footerData
+      },
+      twoDecimalPlaces (num) {
+        let str = num.toString()
+        var len1 = str.substr(0, 1)
+        var len2 = str.substr(1, 1)
+        // eslint-disable-next-line eqeqeq
+        if (str.length > 1 && len1 == 0 && len2 != '.') {
+          str = str.substr(1, 1)
+        }
+        // eslint-disable-next-line eqeqeq
+        if (len1 == '.') {
+          str = ''
+        }
+        // eslint-disable-next-line eqeqeq
+        if (str.indexOf('.') != -1) {
+          var str_ = str.substr(str.indexOf('.') + 1)
+          // eslint-disable-next-line eqeqeq
+          if (str_.indexOf('.') != -1) {
+            str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
+          }
+          if (str_.length > 2) {
+            this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
+            return (str = '')
+          }
+        }
+        // eslint-disable-next-line no-useless-escape
+        str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
+        return str
       }
     }
   }
@@ -1234,4 +1309,7 @@
   /deep/ .el-input-number .el-input__inner {
     text-align: left;
   }
+  /deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+    font-weight:700;
+  }
 </style>

+ 27 - 9
src/views/modules/cw/invoice/InvoiceFormTask.vue

@@ -40,24 +40,28 @@
               <el-input :readonly="true" placeholder="请填写项目编号" v-model="scope.row.programNo"/>
             </template>
           </vxe-table-column>
+          <vxe-table-column field="reportNo" align="center" title="报告文号111" :edit-render="{}">
+            <template v-slot:edit="scope">
+              <el-input :readonly="true" placeholder="请填写报告文号" v-model="scope.row.reportNo"/>
+            </template>
+          </vxe-table-column>
           <vxe-table-column field="account" align="center" title="发票金额(元)" :edit-render="{}">
             <template v-slot:edit="scope">
               <el-input :readonly="false" placeholder="请填写发票金额" v-model="scope.row.account" @blur="scope.row.account = twoDecimalPlaces(scope.row.account)" maxlength="15"/>
             </template>
-          </vxe-table-column>
-
 
+          </vxe-table-column>
 
           <!--          <vxe-table-column field="clientName" title="委托方" :edit-render="{}">-->
           <!--            <template v-slot:edit="scope">-->
           <!--              <el-input :readonly="true" placeholder="请填写委托方" v-model="scope.row.clientName"/>-->
           <!--            </template>-->
           <!--          </vxe-table-column>-->
-          <!--            <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">-->
-          <!--              <template v-slot:edit="scope">-->
-          <!--                <el-input v-model="scope.row.reportNo" placeholder="请填写报告号"/>-->
-          <!--              </template>-->
-          <!--            </vxe-table-column>-->
+<!--                      <vxe-table-column field="reportNo" title="报告号" :edit-render="{}">
+                        <template v-slot:edit="scope">
+                          <el-input v-model="scope.row.reportNo" placeholder="请填写报告号"/>
+                        </template>
+                      </vxe-table-column>-->
           <vxe-table-column title="操作" align="center" width="100">
             <template v-slot="scope">
               <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'base')">删除</el-button>
@@ -907,10 +911,16 @@
             }
             if (!this.commonJS.isEmpty(this.status) && this.status === 'audit' && (this.commonJS.isEmpty(this.inputForm.financeInvoiceDetailDTOList) || this.inputForm.financeInvoiceDetailDTOList.length === 0)) {
               this.inputForm.financeInvoiceDetailDTOList = []
+              let i = this.inputForm.financeInvoiceBaseDTOList.length
+              let sun = 0
+              for (let j = 0; j < i; j++) {
+                sun += parseFloat(this.inputForm.financeInvoiceBaseDTOList[j].account)
+              }
+              console.log(sun)
               this.inputForm.financeInvoiceDetailDTOList.push({
                 code: '',
                 number: '',
-                account: this.inputForm.actualPrice,
+                account: sun,
                 // account: this.inputForm.account,
                 rate: '',
                 amount: '',
@@ -1167,6 +1177,9 @@
         }
         if (type === 'detail') {
           this.$refs.detailTable.insert().then((data) => {
+            console.log('123456')
+            console.log('this.input.actualPrice, ', this.inputForm.actualPrice)
+            data.account = this.inputForm.actualPrice
             this.inputForm.financeInvoiceDetailDTOList.push(data)
           })
         }
@@ -1212,6 +1225,7 @@
             r.programNo = item.projectNumber
             r.contractId = item.contractId
             r.programId = item.id
+            r.reportNo = item.reportNo
             this.inputForm.financeInvoiceBaseDTOList[this.programRow] = r
           } else {
             let r = {
@@ -1219,7 +1233,8 @@
               contractName: item.contractName,
               programNo: item.projectNumber,
               contractId: item.contractId,
-              programId: item.id
+              programId: item.id,
+              reportNo: item.reportNo
             }
             this.$refs.baseTable.insertAt(r)
             this.inputForm.financeInvoiceBaseDTOList.push(r)
@@ -1599,4 +1614,7 @@
   /deep/ .el-input-number .el-input__inner {
     text-align: left;
   }
+  /deep/ .vxe-footer--row .vxe-footer--column:nth-child(1) .vxe-cell--item {
+    font-weight:700;
+  }
 </style>

+ 2 - 2
src/views/modules/cw/invoice/InvoiceFormTaskInvalid.vue

@@ -237,7 +237,7 @@
             </el-select>
           </el-form-item>
         </el-col>
-        <el-col :span="12">
+<!--        <el-col :span="12">
           <el-form-item label="发票金额(元)" prop="account"
                         :rules="[
                         {required: true, message:'发票金额不能为空', trigger:'blur'}
@@ -255,7 +255,7 @@
               clearable>
             </el-input-number>
           </el-form-item>
-        </el-col>
+        </el-col>-->
         <el-col :span="12">
           <el-form-item label="是否多张开票" prop="isMultiple"
                         :rules="[

+ 1 - 0
src/views/modules/cw/invoice/InvoiceList.vue

@@ -817,6 +817,7 @@
       },
       // 审核或重新调整跳转
       todo (row) {
+        console.log('row', row)
         let cUser = false
         this.taskService.getTaskDefInfo({
           taskId: row.taskId

+ 275 - 254
src/views/modules/cw/invoice/ProgramPageForm.vue

@@ -12,13 +12,16 @@
       :visible.sync="visible">
       <div v-if="isShow">
         <el-radio v-model="checkType" label="1" size="small" style="margin-right: 20px">项目</el-radio>
-        <el-radio v-if="hasPermission('cw_finance:invoice:add:report')" v-model="checkType" label="2" size="small" style="margin-right: 20px">报告</el-radio>
+        <el-radio v-if="hasPermission('cw_finance:invoice:add:report')" v-model="checkType" label="2" size="small"
+                  style="margin-right: 20px">报告
+        </el-radio>
         <el-radio v-model="checkType" label="3" size="small" style="margin-right: 20px">其他</el-radio>
 
       </div>
-<!--报告        -->
+      <!--报告        -->
       <div v-if="checkType === '2'" style="height: calc(100% - 80px);">
-        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+                 @submit.native.prevent>
           <!-- 搜索框-->
           <el-form-item label="项目名称" prop="projectName">
             <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
@@ -69,7 +72,7 @@
           <vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
           <vxe-column min-width="160" align="center" title="报告文号" field="reportNo"></vxe-column>
           <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
-         <vxe-column min-width="160" align="center" title="报告创建人" field="userName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="报告创建人" field="userName"></vxe-column>
           <vxe-column min-width="160" align="center" title="报告创建时间" field="createDate"></vxe-column>
 
         </vxe-table>
@@ -86,78 +89,81 @@
       </div>
 
       <div v-if="checkType === '1'" style="height: calc(100% - 80px);">
-          <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm" @submit.native.prevent>
-            <!-- 搜索框-->
-            <el-form-item label="项目名称" prop="projectName">
-              <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
-            </el-form-item>
-            <el-form-item label="项目编号" prop="projectNumber">
-              <el-input size="small" v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
-            </el-form-item>
-            <el-form-item label="创建时间" prop="createDates">
-              <el-date-picker
-                placement="bottom-start"
-                format="yyyy-MM-dd HH:mm:ss"
-                value-format="yyyy-MM-dd HH:mm:ss"
-                v-model="searchForm.createDates"
-                type="datetimerange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期">
-              </el-date-picker>
-            </el-form-item>
+        <el-form size="small" :inline="true" class="query-form" ref="searchForm" :model="searchForm"
+                 @submit.native.prevent>
+          <!-- 搜索框-->
+          <el-form-item label="项目名称" prop="projectName">
+            <el-input size="small" v-model="searchForm.projectName" placeholder="请输入项目名称" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="项目编号" prop="projectNumber">
+            <el-input size="small" v-model="searchForm.projectNumber" placeholder="请输入项目编号" clearable></el-input>
+          </el-form-item>
+          <el-form-item label="创建时间" prop="createDates">
+            <el-date-picker
+              placement="bottom-start"
+              format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd HH:mm:ss"
+              v-model="searchForm.createDates"
+              type="datetimerange"
+              range-separator="至"
+              start-placeholder="开始日期"
+              end-placeholder="结束日期">
+            </el-date-picker>
+          </el-form-item>
 
-            <el-form-item>
-              <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
-              <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
-            </el-form-item>
-          </el-form>
+          <el-form-item>
+            <el-button type="primary" @click="list()" size="small" icon="el-icon-search">查询</el-button>
+            <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+          </el-form-item>
+        </el-form>
 
-          <vxe-table
-            border="inner"
-            auto-resize
-            resizable
-            height="400px"
-            :loading="loading"
-            size="small"
-            ref="projectTable"
-            show-header-overflow
-            show-overflow
-            highlight-hover-row
-            :menu-config="{}"
-            :print-config="{}"
-            @sort-change=""
-            :sort-config="{remote:true}"
-            :data="dataList"
-            :row-config="{isCurrent: true}"
-            :checkbox-config="{trigger: 'row'}"
-          >
-            <vxe-column type="seq" width="60" title="序号"></vxe-column>
-            <vxe-column type="checkbox" width="40px"></vxe-column>
-            <vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
-            <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
-            <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
-            <vxe-column min-width="160" align="center" title="创建人" field="createBy.name"></vxe-column>
-            <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
+        <vxe-table
+          border="inner"
+          auto-resize
+          resizable
+          height="400px"
+          :loading="loading"
+          size="small"
+          ref="projectTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          :print-config="{}"
+          @sort-change=""
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :row-config="{isCurrent: true}"
+          :checkbox-config="{trigger: 'row'}"
+        >
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column type="checkbox" width="40px"></vxe-column>
+          <vxe-column min-width="230" align="center" title="项目名称" field="projectName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="项目编号" field="projectNumber"></vxe-column>
+          <vxe-column min-width="160" align="center" title="合同名称" field="contractName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="创建人" field="createBy.name"></vxe-column>
+          <vxe-column min-width="160" align="center" title="创建时间" field="createDate"></vxe-column>
 
-          </vxe-table>
-          <vxe-pager
-            background
-            size="small"
-            :current-page="tablePage.currentPage"
-            :page-size="tablePage.pageSize"
-            :total="tablePage.total"
-            :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
-            :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
-            @page-change="currentChangeHandle">
-          </vxe-pager>
-        </div>
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+      </div>
       <div style="height: 500px;" v-if="checkType === '3'">
-        <el-form  label-width="80px" class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
-          <el-row  :gutter="15">
+        <el-form label-width="80px" class="query-form" ref="searchForm" :model="searchForm"
+                 @keyup.enter.native="refreshList()" @submit.native.prevent>
+          <el-row :gutter="15">
             <el-col :span="21">
               <el-form-item label="详情" prop="detail">
-                <el-input style="width: 100%" type="textarea" maxlength="500" v-model="detail" placeholder="请输入详情" show-word-limit></el-input>
+                <el-input style="width: 100%" type="textarea" maxlength="500" v-model="detail" placeholder="请输入详情"
+                          show-word-limit></el-input>
               </el-form-item>
             </el-col>
           </el-row>
@@ -165,213 +171,228 @@
       </div>
       <span slot="footer" class="dialog-footer">
       <el-button size="small" @click="close()" icon="el-icon-circle-close">关闭</el-button>
-      <el-button size="small" type="primary" v-if="method != 'view'"  @click="getProgram()" icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+      <el-button size="small" type="primary" v-if="method != 'view'" v-else-if="checkType===1" @click="getProgram()"
+                 icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
+        <el-button size="small" type="primary" v-if="method != 'view'" v-else-if="checkType===2" @click="getProgram2()"
+                   icon="el-icon-circle-check" v-noMoreClick>确定</el-button>
     </span>
     </el-dialog>
   </div>
 </template>
 
 <script>
-  import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
-  export default {
-    data () {
-      return {
-        title: '项目选择',
-        method: '',
-        visible: false,
-        loading: false,
-        tablePage: {
-          total: 0,
-          currentPage: 1,
-          pageSize: 10,
-          orders: []
-        },
-        dataList: [],
-        dataList1: [],
-        searchForm: {
-          name: '',
-          no: '',
-          createBy: '',
-          projectMasterName: '',
-          projectNumber: '',
-          projectName: '',
-          createDates: [],
-          status: '',
-          reportNo: ''
-        },
-        checkType: '',
-        detail: '',
-        isShow: true,
-        num: true // num为true是多选,false是单选
-      }
-    },
-    projectRecordsService: null,
-    created () {
-      this.projectRecordsService = new ProjectRecordsService()
-    },
-    components: {
-    },
-    methods: {
-      /**
-       * @param isShow
-       *      isShow为空,则可以选择“项目”或填写“其他”
-       *      isShow为false,则只可以选择“项目”,并且弹出提示
-       *      isShow为‘1’,则只可以选择“项目”,不弹出提示
-       *      isShow为其他任何值,则只可以填写“其他”
-       * @param num
-       *      num为空或者true,则允许多选
-       *      num为其他任何值,则只可以单选
-       */
-      init (isShow, num) {
-        if (this.commonJS.isEmpty(isShow)) {
-          this.isShow = true
-          this.checkType = '1'
-        } else {
-          if (isShow === false || isShow === 'false') {
-            if (this.checkType === '1') {
-              this.isShow = false
-              this.checkType = '1'
-              this.$message({message: '第一条为项目后面新增只能选择项目', type: 'warning', customClass: 'messageZindex'})
-            } else if (this.checkType === '2') {
-              this.isShow = false
-              this.checkType = '2'
-              this.$message({message: '第一条为报告后面新增只能选择报告', type: 'warning', customClass: 'messageZindex'})
-            }
-          } else if (isShow === '1') {
+import ProjectRecordsService from '@/api/cw/projectRecords/ProjectRecordsService'
+
+export default {
+  data() {
+    return {
+      title: '项目选择',
+      method: '',
+      visible: false,
+      loading: false,
+      tablePage: {
+        total: 0,
+        currentPage: 1,
+        pageSize: 10,
+        orders: []
+      },
+      dataList: [],
+      dataList1: [],
+      searchForm: {
+        name: '',
+        no: '',
+        createBy: '',
+        projectMasterName: '',
+        projectNumber: '',
+        projectName: '',
+        createDates: [],
+        status: '',
+        reportNo: ''
+      },
+      checkType: '',
+      detail: '',
+      isShow: true,
+      num: true // num为true是多选,false是单选
+    }
+  },
+  projectRecordsService: null,
+  created () {
+    this.projectRecordsService = new ProjectRecordsService()
+  },
+  components: {},
+  methods: {
+    /**
+     * @param isShow
+     *      isShow为空,则可以选择“项目”或填写“其他”
+     *      isShow为false,则只可以选择“项目”,并且弹出提示
+     *      isShow为‘1’,则只可以选择“项目”,不弹出提示
+     *      isShow为其他任何值,则只可以填写“其他”
+     * @param num
+     *      num为空或者true,则允许多选
+     *      num为其他任何值,则只可以单选
+     */
+    init(isShow, num) {
+      if (this.commonJS.isEmpty(isShow)) {
+        this.isShow = true
+        this.checkType = '1'
+      } else {
+        if (isShow === false || isShow === 'false') {
+          if (this.checkType === '1') {
             this.isShow = false
             this.checkType = '1'
-          } else {
+            this.$message({message: '第一条为项目后面新增只能选择项目', type: 'warning', customClass: 'messageZindex'})
+          } else if (this.checkType === '2') {
             this.isShow = false
-            this.checkType = '3'
+            this.checkType = '2'
+            this.$message({message: '第一条为报告后面新增只能选择报告', type: 'warning', customClass: 'messageZindex'})
           }
-        }
-        if (this.commonJS.isEmpty(num) || num === true) {
-          this.num = true // num为true是多选,false是单选
+        } else if (isShow === '1') {
+          this.isShow = false
+          this.checkType = '1'
         } else {
-          this.num = false
+          this.isShow = false
+          this.checkType = '3'
         }
-        this.visible = true
-        this.list()
-        this.list1()
-      },
-      // 表单提交
-      getProgram () {
-        let rows
-        if (this.checkType === '1') {
-          if (this.commonJS.isEmpty(this.$refs.projectTable.getCheckboxRecords())) {
-            this.$message.error('请至少选择一条数据')
-            return
-          }
-          if (this.num === false) {
-            if (this.$refs.projectTable.getCheckboxRecords().length > 1) {
-              this.$message.error('最多选择一条数据')
-              return
-            }
-          }
-          rows = this.$refs.projectTable.getCheckboxRecords()
-        } else if (this.checkType === '2') {
-          if (this.commonJS.isEmpty(this.$refs.projectTable1.getCheckboxRecords())) {
-            this.$message.error('请至少选择一条数据')
-            return
-          }
-          if (this.num === false) {
-            if (this.$refs.projectTable1.getCheckboxRecords().length > 1) {
-              this.$message.error('最多选择一条数据')
-              return
-            }
-          }
-          rows = this.$refs.projectTable1.getCheckboxRecords()
-        } else {
-          if (this.commonJS.isEmpty(this.detail)) {
-            this.$message.error('请填写开票详情')
+      }
+      if (this.commonJS.isEmpty(num) || num === true) {
+        this.num = true // num为true是多选,false是单选
+      } else {
+        this.num = false
+      }
+      this.visible = true
+      this.list()
+      this.list1()
+    },
+    // 表单提交
+    getProgram () {
+      let rows
+      if (this.checkType === '1') {
+        if (this.commonJS.isEmpty(this.$refs.projectTable.getCheckboxRecords())) {
+          this.$message.error('请至少选择一条数据')
+          return
+        }
+        if (this.num === false) {
+          if (this.$refs.projectTable.getCheckboxRecords().length > 1) {
+            this.$message.error('最多选择一条数据')
             return
           }
-          rows = [{projectName: this.detail}]
         }
-        this.close()
-        this.$emit('getProgram', rows)
-      },
-      // 表单提交
-      /* getProgram1 () {
-        let rows
-        if (this.checkType === '1') {
-          if (this.commonJS.isEmpty(this.$refs.projectTable1.getCheckboxRecords())) {
-            this.$message.error('请至少选择一条数据')
+        rows = this.$refs.projectTable.getCheckboxRecords()
+      } else {
+        if (this.commonJS.isEmpty(this.detail)) {
+          this.$message.error('请填写开票详情')
+          return
+        }
+        rows = [{projectName: this.detail}]
+      }
+      this.close()
+      this.$emit('getProgram', rows)
+    },
+    getProgram2 () {
+      let rows
+      if (this.checkType === '2') {
+        if (this.commonJS.isEmpty(this.$refs.projectTable1.getCheckboxRecords())) {
+          this.$message.error('请至少选择一条数据')
+          return
+        }
+        if (this.num === false) {
+          if (this.$refs.projectTable1.getCheckboxRecords().length > 1) {
+            this.$message.error('最多选择一条数据')
             return
           }
-          if (this.num === false) {
-            if (this.$refs.projectTable.getCheckboxRecords().length > 1) {
-              this.$message.error('最多选择一条数据')
-              return
-            }
-          }
-          rows = this.$refs.projectTable.getCheckboxRecords()
-        } else {
-          if (this.commonJS.isEmpty(this.detail)) {
-            this.$message.error('请填写开票详情')
+        }
+        rows = this.$refs.projectTable1.getCheckboxRecords()
+      } else {
+        if (this.commonJS.isEmpty(this.detail)) {
+          this.$message.error('请填写开票详情')
+          return
+        }
+        rows = [{projectName: this.detail}]
+      }
+      this.close()
+      this.$emit('getProgram', rows)
+    },
+    // 表单提交
+    /* getProgram1 () {
+      let rows
+      if (this.checkType === '1') {
+        if (this.commonJS.isEmpty(this.$refs.projectTable1.getCheckboxRecords())) {
+          this.$message.error('请至少选择一条数据')
+          return
+        }
+        if (this.num === false) {
+          if (this.$refs.projectTable.getCheckboxRecords().length > 1) {
+            this.$message.error('最多选择一条数据')
             return
           }
-          rows = [{projectName: this.detail}]
         }
-        this.close()
-        this.$emit('getProgram', rows)
-      }, */
-      list () {
-        this.loading = true
-        this.searchForm.status = '5'
-        this.projectRecordsService.list({
-          'current': this.tablePage.currentPage,
-          'size': this.tablePage.pageSize,
-          'orders': this.tablePage.orders,
-          ...this.searchForm
-        }).then(({data}) => {
-          this.dataList = data.records
-          this.tablePage.total = data.total
-          this.loading = false
-        })
-      },
-      list1 () {
-        this.loading = true
-        this.searchForm.status = '5'
-        this.projectRecordsService.list1({
-          'current': this.tablePage.currentPage,
-          'size': this.tablePage.pageSize,
-          'orders': this.tablePage.orders,
-          ...this.searchForm
-        }).then(({data}) => {
-          this.dataList1 = data.records
-          this.tablePage.total = data.total
-          this.loading = false
-        })
-      },
-      // 当前页
-      currentChangeHandle ({currentPage, pageSize}) {
-        this.tablePage.currentPage = currentPage
-        this.tablePage.pageSize = pageSize
-        this.list()
-      },
-      resetSearch () {
-        this.$refs.searchForm.resetFields()
-        this.list()
-      },
-      currentChangeHandle1 ({currentPage, pageSize}) {
-        this.tablePage.currentPage = currentPage
-        this.tablePage.pageSize = pageSize
-        this.list1()
-      },
-      resetSearch1 () {
-        this.$refs.searchForm.resetFields()
-        this.list1()
-      },
-      close () {
-        this.detail = ''
-        this.visible = false
+        rows = this.$refs.projectTable.getCheckboxRecords()
+      } else {
+        if (this.commonJS.isEmpty(this.detail)) {
+          this.$message.error('请填写开票详情')
+          return
+        }
+        rows = [{projectName: this.detail}]
       }
+      this.close()
+      this.$emit('getProgram', rows)
+    }, */
+    list() {
+      this.loading = true
+      this.searchForm.status = '5'
+      this.projectRecordsService.list({
+        'current': this.tablePage.currentPage,
+        'size': this.tablePage.pageSize,
+        'orders': this.tablePage.orders,
+        ...this.searchForm
+      }).then(({data}) => {
+        this.dataList = data.records
+        this.tablePage.total = data.total
+        this.loading = false
+      })
+    },
+    list1() {
+      this.loading = true
+      this.searchForm.status = '5'
+      this.projectRecordsService.list1({
+        'current': this.tablePage.currentPage,
+        'size': this.tablePage.pageSize,
+        'orders': this.tablePage.orders,
+        ...this.searchForm
+      }).then(({data}) => {
+        this.dataList1 = data.records
+        this.tablePage.total = data.total
+        this.loading = false
+      })
+    },
+    // 当前页
+    currentChangeHandle({currentPage, pageSize}) {
+      this.tablePage.currentPage = currentPage
+      this.tablePage.pageSize = pageSize
+      this.list()
+    },
+    resetSearch() {
+      this.$refs.searchForm.resetFields()
+      this.list()
+    },
+    currentChangeHandle1({currentPage, pageSize}) {
+      this.tablePage.currentPage = currentPage
+      this.tablePage.pageSize = pageSize
+      this.list1()
+    },
+    resetSearch1() {
+      this.$refs.searchForm.resetFields()
+      this.list1()
+    },
+    close() {
+      this.detail = ''
+      this.visible = false
     }
   }
+}
 </script>
 <style>
-  .messageZindex {
-    z-index:9999 !important;
-  }
+.messageZindex {
+  z-index: 9999 !important;
+}
 </style>

+ 51 - 0
src/views/modules/cw/projectBusinessType/CwProjectBusinessTypeList.vue

@@ -40,6 +40,24 @@
           <vxe-column min-width="350" title="业务类型" field="name" align="left" tree-node></vxe-column>
           <vxe-column min-width="50" align="center" title="序号" field="sort"></vxe-column>
           <vxe-column min-width="50" align="center" title="级别" field="level"></vxe-column>
+          <vxe-column title="排序号" field="sortMark" width="170px" align="center" >
+            <template slot-scope="scope">
+              <el-input-number v-if="scope.row.parentId ==='0'" size="small" v-model="scope.row.sortMark" @change="sortChange(scope.row)" :step="10"  :min="0" :max="10000" label="描述文字"></el-input-number>
+            </template>
+          </vxe-column>
+          <vxe-column title="是否显示" field="isShow" align="center">
+            <template slot-scope="scope">
+              <el-switch
+                v-model="scope.row.isShow"
+                v-if="scope.row.isShow === '0' || scope.row.isShow === '1'"
+                @change="statusChange(scope.row)"
+                active-color="#13ce66"
+                inactive-color="#ff4949"
+                active-value="1"
+                inactive-value="0">
+              </el-switch>
+            </template>
+          </vxe-column>
           <vxe-column min-width="50" align="center" title="备注" field="remarks"></vxe-column>
 
           <vxe-column title="操作" width="230px" fixed="right" align="center">
@@ -121,6 +139,11 @@
             this.$refs.businessTypeTable.setAllTreeExpand(true)
           })
         })
+        // this.cwProjectBusinessTypeService.list({isShowHide: 1}).then(({data}) => {
+        //   this.loading = false
+        //   this.dataList = data.records[0].children
+        //   this.handleSearch()
+        // })
       },
       // 当前页
       currentChangeHandle ({ currentPage, pageSize }) {
@@ -128,14 +151,42 @@
         this.tablePage.pageSize = pageSize
         this.refreshList()
       },
+      sortChange (row) {
+        this.loading = true
+        this.cwProjectBusinessTypeService.save({id: row.id, sortMark: row.sortMark}).then(({data}) => {
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.loading = false
+          this.refreshList()
+        })
+      },
       // 排序
       sortChangeHandle (column) {
         this.tablePage.orders = []
+        this.tablePage.sort = []
         if (column.order != null) {
           this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        } else if (column.sort != null) {
+          this.tablePage.sort.push({column: this.$utils.toLine(column.property), asc: column.sort === 'asc'})
         }
         this.refreshList()
       },
+      // 是否显示
+      statusChange (row) {
+        this.loading = true
+        this.cwProjectBusinessTypeService.save({id: row.id, isShow: row.isShow}).then(({data}) => {
+          this.$message({
+            message: data,
+            type: 'success',
+            duration: 1500
+          })
+          this.loading = false
+          this.refreshList()
+        })
+      },
       // 删除
       del (id) {
         let ids = id || this.$refs.businessTypeTable.getCheckboxRecords().map(item => {

+ 1 - 1
src/views/modules/sys/menu/MenuList.vue

@@ -111,7 +111,7 @@
       direction="rtl">
       <data-rule-list  ref="dataRuleList" @closeRight="closeRight"></data-rule-list>
     </el-drawer>
-  
+
     <!-- 弹窗, 新增 / 修改 -->
     <menu-form ref="menuForm"   @refreshDataList="refreshList"></menu-form>
   </div>