caojunjie 3 år sedan
förälder
incheckning
2c725cd879

+ 1 - 1
src/api/landTransportation/index.js

@@ -52,7 +52,7 @@ export function detailDelegationList(data) {
 // 单据新增
 export function removeCollection(data) {
     return request({
-        url: '/api/blade-land/orderfee/remove?ids='+data,
+        url: '/api/blade-land/order-fee/remove?ids='+data,
         method: 'post'
     })
 }

+ 98 - 83
src/views/landTransportation/dispatchingCars/detailPage.vue

@@ -1320,19 +1320,19 @@ export default {
           label: '单价',
           cell: true,
           type: 'number',
-          controls:false,
+          controls: false,
           prop: 'price'
         }, {
           label: '数量',
           cell: true,
-          controls:false,
+          controls: false,
           type: 'number',
           prop: 'quantity'
         }, {
           label: '金额',
           cell: true,
           type: 'number',
-          controls:false,
+          controls: false,
           prop: 'amount'
         }, {
           label: '税率',
@@ -1381,66 +1381,81 @@ export default {
         }],
         column: [{
           label: '客户名称',
-          slot: true,
-          width: 300,
-          prop: 'corpId'
-        }, {
-          label: '车号',
           cell: true,
-          prop: 'plateNo',
-          type: "select",
-          props: {
-            label: "label",
-            value: "label"
-          },
-        }, {
-          label: '费用名称',
-          slot: true,
-          width: 200,
-          prop: 'feeId'
-        }, {
-          label: '计价单位',
-          cell: true,
-          prop: 'unit',
+          width: 300,
+          prop: 'fleetId',
           type: "select",
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
+          cascader: ['plateNo'],
+          dicUrl: "/api/blade-land/order-fee/fleet?orderId=" + this.id,
           props: {
-            label: "dictValue",
-            value: "dictKey"
+            label: "fleetName",
+            value: "fleetId"
           }
-        }, {
-          label: '单价',
-          cell: true,
-          controls:false,
-          type: 'number',
-          prop: 'price',
-        }, {
-          label: '数量',
-          cell: true,
-          controls:false,
-          type: 'number',
-          prop: 'quantity'
-        }, {
-          label: '金额',
-          cell: true,
-          controls:false,
-          type: 'number',
-          prop: 'amount'
-        }, {
-          label: '税率',
-          cell: true,
-          prop: 'taxRate'
-        }, {
-          label: '币别',
-          cell: true,
-          prop: 'currency',
-          type: "select",
-          dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
-          props: {
-            label: "dictValue",
-            value: "dictKey"
-          },
         },
+          //   {
+          //   label: '客户名称',
+          //   slot: true,
+          //   width: 300,
+          //   prop: 'corpId'
+          // },
+          {
+            label: '车号',
+            cell: true,
+            prop: 'plateNo',
+            dicUrl: "/blade-land/order-fee/plate-no?orderId=" + this.id+'&fleetId={{key}}',
+            type: "select",
+            props: {
+              label: "label",
+              value: "label"
+            },
+          }, {
+            label: '费用名称',
+            slot: true,
+            width: 200,
+            prop: 'feeId'
+          }, {
+            label: '计价单位',
+            cell: true,
+            prop: 'unit',
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            }
+          }, {
+            label: '单价',
+            cell: true,
+            controls: false,
+            type: 'number',
+            prop: 'price',
+          }, {
+            label: '数量',
+            cell: true,
+            controls: false,
+            type: 'number',
+            prop: 'quantity'
+          }, {
+            label: '金额',
+            cell: true,
+            controls: false,
+            type: 'number',
+            prop: 'amount'
+          }, {
+            label: '税率',
+            cell: true,
+            prop: 'taxRate'
+          }, {
+            label: '币别',
+            cell: true,
+            prop: 'currency',
+            type: "select",
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            },
+          },
         ]
       }
     };
@@ -1452,22 +1467,22 @@ export default {
     // price
     // quantity
     this.findObject(this.collectionOption.column, "price").change = (data) => {
-      if (data.row.price && data.row.quantity){
+      if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
       }
     }
     this.findObject(this.collectionOption.column, "quantity").change = (data) => {
-      if (data.row.price && data.row.quantity){
+      if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
       }
     }
     this.findObject(this.paymentOption.column, "price").change = (data) => {
-      if (data.row.price && data.row.quantity){
+      if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
       }
     }
     this.findObject(this.paymentOption.column, "quantity").change = (data) => {
-      if (data.row.price && data.row.quantity){
+      if (data.row.price && data.row.quantity) {
         data.row.amount = Number(data.row.price) * Number(data.row.quantity)
       }
     }
@@ -1496,17 +1511,17 @@ export default {
         // })
       })
     }
-    queryVehicle({orderId: this.id}).then(res => {
-      const column = this.findObject(this.collectionOption.column, "plateNo");
-      const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
-      column.dicData = []
-      columnTwo.dicData = []
-      res.data.data.forEach(item => {
-        column.dicData.push({label: item})
-        columnTwo.dicData.push({label: item})
-      })
-      this.key++
-    });
+    // queryVehicle({orderId: this.id}).then(res => {
+    //   const column = this.findObject(this.collectionOption.column, "plateNo");
+    //   const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
+    //   column.dicData = []
+    //   columnTwo.dicData = []
+    //   res.data.data.forEach(item => {
+    //     column.dicData.push({label: item})
+    //     columnTwo.dicData.push({label: item})
+    //   })
+    //   this.key++
+    // });
     this.$refs.other.show = false
     // 非租户模式默认加载管理组数据
     if (!website.tenantMode) {
@@ -1770,11 +1785,11 @@ export default {
     },
     //返回主列表
     backToList(value) {
-      if (value === 0){
+      if (value === 0) {
         this.$emit('backToList')
-      }else if(value === 1){
-        this.$emit('backToList',true)
-      }else if (value === 2){
+      } else if (value === 1) {
+        this.$emit('backToList', true)
+      } else if (value === 2) {
         this.$router.push({
           path: '/landTransportation/reportAnalysis/index'
         });
@@ -1850,10 +1865,10 @@ export default {
         this.$refs.collection.rowCellAdd({
           currency: '1',
           type: '1',
-          feeId: res.data.data.records.length > 0 ? res.data.data.records[0] : '',
+          feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
           unit: '件数',
-          corpId: '1526835847238901762',
-          quantity:1,
+          corpId: this.goodsForm.corpId,
+          quantity: 1,
           orderId: this.id,
           $cellEdit: true
         });
@@ -1865,10 +1880,10 @@ export default {
         this.$refs.payment.rowCellAdd({
           currency: '1',
           type: '2',
-          feeId: res.data.data.records.length > 0 ? res.data.data.records[0] : '',
+          feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
           unit: '件数',
-          quantity:1,
-          corpId: '1526835847238901762',
+          quantity: 1,
+          // corpId: '1526835847238901762',
           orderId: this.id,
           $cellEdit: true
         });

+ 16 - 15
src/views/wel/home/landTransportation/components/sales-trend.vue

@@ -106,6 +106,22 @@
               </template>
             </el-table-column>
             <el-table-column
+                width="100"
+                align="center"
+                label="状态"
+                show-overflow-tooltip
+                prop="status">
+              <template slot-scope="{row}">
+                <span v-if="row.status == 0" style="color: #E45656;">未调度</span>
+                <span v-if="row.status == 1" style="color: #F56C6C;">未派车</span>
+                <span v-if="row.status == 2" style="color: #F1A532;">未受理</span>
+                <span v-if="row.status == 3" style="color: #53C21D;">未完工</span>
+                <span v-if="row.status == 5" style="color: #F56C6C;">未到厂</span>
+                <span v-if="row.status == 4" style="color: #3C9CFF;">工单关闭</span>
+                <span v-if="row.status == 6" style="color: #3C9CFF;">已提箱</span>
+              </template>
+            </el-table-column>
+            <el-table-column
               align="center"
               label="运费"
               show-overflow-tooltip
@@ -132,21 +148,6 @@
               prop="extraAmountD"
             ></el-table-column>
             <el-table-column
-                width="100"
-                label="状态"
-                show-overflow-tooltip
-                prop="status">
-              <template slot-scope="{row}">
-                <span v-if="row.status == 0" style="color: #E45656;">未调度</span>
-                <span v-if="row.status == 1" style="color: #F56C6C;">未派车</span>
-                <span v-if="row.status == 2" style="color: #F1A532;">未受理</span>
-                <span v-if="row.status == 3" style="color: #53C21D;">未完工</span>
-                <span v-if="row.status == 5" style="color: #F56C6C;">未到厂</span>
-                <span v-if="row.status == 4" style="color: #3C9CFF;">工单关闭</span>
-                <span v-if="row.status == 6" style="color: #3C9CFF;">已提箱</span>
-              </template>
-            </el-table-column>
-            <el-table-column
                 align="center"
                 label="客户名称"
                 width="190"