Ver código fonte

修改陆运 君海

Qukatie 7 meses atrás
pai
commit
532060429b

+ 45 - 33
src/components/tradeAgency/businessReportsJK.vue

@@ -2,28 +2,33 @@
   <div>
   <div>
     <el-dialog class="dialogClass" append-to-body title="预览报表" :visible.sync="previewDialog" width="60%"
     <el-dialog class="dialogClass" append-to-body title="预览报表" :visible.sync="previewDialog" width="60%"
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
       :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
-      <avue-crud :option="selecList.length || type == 1 ? optionBack : optionPrinting" :table-loading="loading"
-        :data="data" :page.sync="page" :permission="permissionList" v-model="form" ref="crud" id="out-table"
-        :header-cell-class-name="headerClassName" :search.sync="query" @search-change="searchChange"
-        @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
-        @size-change="sizeChange" @refresh-change="refreshChange">
-        <template slot-scope="scope" slot="menu">
-          <el-link type="primary" :disabled="scope.row.status == 1"
-            @click="reportsGetReportDatafun(scope.row.url, scope.row)">预览报表</el-link>
-        </template>
-        <template slot="curCode" slot-scope="{ row }">
-          <dic-select v-model="row.curCode" placeholder="币别" key="id" keyValue="key" label="code"
-            :mockData="curCodeList" :filterable="true" :activateCreated="false"></dic-select>
-        </template>
-        <template slot="type" slot-scope="{ row }">
-          <!-- <dic-select v-model="row.type" placeholder="报表类型" key="id" keyValue="cnName" label="enName"
-            :mockData="typeList" :filterable="true" :activateCreated="false"></dic-select> -->
-          <el-select v-model="row.type" placeholder="请选择" size="small">
-            <el-option v-for="item in typeList" :key="item.id" :label="item.cnName" :value="item.cnName">
-            </el-option>
-          </el-select>
-        </template>
-      </avue-crud>
+      <el-row>
+        <el-col :span="selecList.length?0:5">
+          <el-tree :data="typeList" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
+        </el-col>
+        <el-col :span="selecList.length?24:19">
+          <avue-crud :option="selecList.length || type == 1 ? optionBack : optionPrinting" :table-loading="loading"
+            :data="data" :page.sync="page" :permission="permissionList" v-model="form" ref="crud" id="out-table"
+            :header-cell-class-name="headerClassName" :search.sync="query" @search-change="searchChange"
+            @search-reset="searchReset" @selection-change="selectionChange" @current-change="currentChange"
+            @size-change="sizeChange" @refresh-change="refreshChange">
+            <template slot-scope="scope" slot="menu">
+              <el-link type="primary" :disabled="scope.row.status == 1"
+                @click="reportsGetReportDatafun(scope.row.url, scope.row)">预览报表</el-link>
+            </template>
+            <template slot="curCode" slot-scope="{ row }">
+              <dic-select v-model="row.curCode" placeholder="币别" key="id" keyValue="key" label="code"
+                :mockData="curCodeList" :filterable="true" :activateCreated="false"></dic-select>
+            </template>
+            <!-- <template slot="type" slot-scope="{ row }">
+              <el-select v-model="row.type" placeholder="请选择" size="small">
+                <el-option v-for="item in typeList" :key="item.id" :label="item.cnName" :value="item.cnName">
+                </el-option>
+              </el-select>
+            </template> -->
+          </avue-crud>
+        </el-col>
+      </el-row>
     </el-dialog>
     </el-dialog>
     <reportContainer ref="reportContainer"></reportContainer>
     <reportContainer ref="reportContainer"></reportContainer>
   </div>
   </div>
@@ -78,6 +83,9 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      defaultProps: {
+        label: 'cnName'
+      },
       curCodeList: [
       curCodeList: [
         {
         {
           key: null,
           key: null,
@@ -134,11 +142,11 @@ export default {
             prop: "curCode",
             prop: "curCode",
             overHidden: true,
             overHidden: true,
           },
           },
-          {
-            label: "报表类型",
-            prop: "type",
-            overHidden: true,
-          },
+          // {
+          //   label: "报表类型",
+          //   prop: "type",
+          //   overHidden: true,
+          // },
           {
           {
             label: "客户名称",
             label: "客户名称",
             prop: "cnName",
             prop: "cnName",
@@ -217,6 +225,7 @@ export default {
       },
       },
       data: [],
       data: [],
       url: null,
       url: null,
+      groupName:null
     };
     };
   },
   },
   async created() {
   async created() {
@@ -247,7 +256,12 @@ export default {
     }
     }
   },
   },
   methods: {
   methods: {
+    handleNodeClick(row){
+      console.log(row)
+      this.groupName=row.cnName
+    },
     openDialog() {
     openDialog() {
+      this.groupName=null
       this.previewDialog = true
       this.previewDialog = true
       this.onLoad(this.page, this.query);
       this.onLoad(this.page, this.query);
     },
     },
@@ -611,18 +625,16 @@ export default {
           type: this.businessValue
           type: this.businessValue
         }
         }
       } else {
       } else {
-        if(!row.type) return this.$message.error('请选择报表类型');
+        if (!this.groupName) return this.$message.error('请选择报表类型');
         this.typeList.forEach(e => {
         this.typeList.forEach(e => {
-          if (row.type == e.cnName) {
-            obj = {
+          obj = {
               billId: this.id,
               billId: this.id,
               reportCode: e.classifyCode,
               reportCode: e.classifyCode,
-              groupCode: e.groupCode,
-              type:this.businessValue,
+              groupCode: this.groupName,
+              type: this.businessValue,
               corpIds: row.id,
               corpIds: row.id,
               curCode: row.curCode,
               curCode: row.curCode,
             }
             }
-          }
         })
         })
         // obj = {
         // obj = {
         //   billId: this.id,
         //   billId: this.id,

+ 12 - 9
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -132,7 +132,7 @@
         <!--              @getCorpData="(data)=>{getfleetIdT(data,row)}"-->
         <!--              @getCorpData="(data)=>{getfleetIdT(data,row)}"-->
         <!--              corpType="CD"-->
         <!--              corpType="CD"-->
         <!--          ></crop-select>-->
         <!--          ></crop-select>-->
-        <!--          <span v-else>{{ row.fleetName }}</span>-->
+        <!--          <span v-else>{{ row.fleetName }}</span>-->z
         <!--        </template>-->
         <!--        </template>-->
         <template slot-scope="{row,index}" slot="menu">
         <template slot-scope="{row,index}" slot="menu">
           <el-button type="text" size="small" v-if="row.status === 0" @click="rowSaveT(row, index)">{{ row.$cellEdit ?
           <el-button type="text" size="small" v-if="row.status === 0" @click="rowSaveT(row, index)">{{ row.$cellEdit ?
@@ -1259,17 +1259,17 @@ export default {
         column: [{
         column: [{
           label: '客户名称',
           label: '客户名称',
           cell: true,
           cell: true,
-          width: 300,
+          width: 200,
           prop: 'fleetId',
           prop: 'fleetId',
           type: "select",
           type: "select",
-          cascader: ['plateNo'],
+          // cascader: ['plateNo'],
           props: {
           props: {
             label: "fleetName",
             label: "fleetName",
             value: "fleetId"
             value: "fleetId"
           },
           },
-          change: (data) => {
-            data.row.plateNo = ''
-          }
+          // change: (data) => {
+          //   data.row.plateNo = ''
+          // }
         },
         },
         //   {
         //   {
         //   label: '客户名称',
         //   label: '客户名称',
@@ -1282,6 +1282,7 @@ export default {
           cell: true,
           cell: true,
           prop: 'plateNo',
           prop: 'plateNo',
           type: "select",
           type: "select",
+          width: 150,
           props: {
           props: {
             label: "label",
             label: "label",
             value: "label"
             value: "label"
@@ -1380,7 +1381,7 @@ export default {
       }
       }
     })
     })
 
 
-    this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
+    this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id
     this.findObject(this.paymentOption.column, "plateNo").dicFormatter = (data) => {
     this.findObject(this.paymentOption.column, "plateNo").dicFormatter = (data) => {
       let list = []
       let list = []
       data.data.forEach(ele => {
       data.data.forEach(ele => {
@@ -1595,7 +1596,7 @@ export default {
         } else {
         } else {
           this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
           this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
         }
         }
-        this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
+        this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id
         this.$message.success("保存成功");
         this.$message.success("保存成功");
         //关闭窗口
         //关闭窗口
         this.$refs.payment.$refs.dialogColumn.columnBox = false;
         this.$refs.payment.$refs.dialogColumn.columnBox = false;
@@ -1612,7 +1613,7 @@ export default {
         } else {
         } else {
           this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
           this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
         }
         }
-        this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
+        this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id
         this.$refs.payment.$refs.dialogColumn.columnBox = false;
         this.$refs.payment.$refs.dialogColumn.columnBox = false;
       }
       }
     },
     },
@@ -1988,6 +1989,8 @@ export default {
             currency: '1',
             currency: '1',
             type: '2',
             type: '2',
             itemId: this.selectionList[0].id,
             itemId: this.selectionList[0].id,
+            fleetId:this.selectionList[0].fleetId,
+            plateNo:this.selectionList[0].plateNo,
             // feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
             // feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
             // unit: '件数',
             // unit: '件数',
             // quantity: 1,
             // quantity: 1,