Kaynağa Gözat

fix: 调整

zh 2 yıl önce
ebeveyn
işleme
4aca930d44

+ 10 - 46
src/views/logisticsBill/components/ExceptionBox.vue

@@ -77,13 +77,13 @@ export default {
             width: 200
           },
           render: (h, { row }) => {
-            // const { orderType } = row
-            // const typeObj = {
-            //   TOB: '商家机工程机类型',
-            //   ALL: '所有类型,广州的订单统一 开单价',
-            //   TOC: '佛山销售销售订单类型公司'
-            // }
-            return <div>{row.orderType}</div>
+            const { orderType } = row
+            const typeObj = {
+              TOB: '商家机工程机类型',
+              ALL: '所有类型,广州的订单统一 开单价',
+              TOC: '佛山销售销售订单类型公司'
+            }
+            return <div>{typeObj[orderType]}</div>
           }
         },
         {
@@ -93,7 +93,7 @@ export default {
             width: 200
           },
           render: (h, { row }) => {
-            row.isRealUnload = row.isRealUnload === '是' ? 1 : 0
+     
 
             return (
               <el-select
@@ -121,7 +121,7 @@ export default {
             width: 200
           },
           render: (h, { row }) => {
-            row.isRealUpstairs = row.isRealUpstairs === '是' ? 1 : 0
+    
             return (
               <el-select
                 value={row.isRealUpstairs}
@@ -293,47 +293,11 @@ export default {
         orderCode = this.detail.salesCheckCode
       }
 
-      const list = this.recordSelected.map(k => {
-        // const {
-        //   orderType,
-        //   isRealUnload,
-        //   isRealUpstairs,
-        //   unloadUpstairsCoefficient,
-        //   unitPrice,
-        //   returnOrderCost,
-        //   materialPrice,
-        //   materialNumber,
-        //   subsidyCoefficient,
-        //   orderDate,
-        //   coefficient
-        // } = k
-        // return {
-        //   orderType,
-        //   isRealUnload,
-        //   isRealUpstairs,
-        //   unloadUpstairsCoefficient,
-        //   unitPrice,
-        //   returnOrderCost,
-        //   materialPrice,
-        //   materialNumber,
-        //   subsidyCoefficient,
-        //   orderDate,
-        //   coefficient
-        // }
-        return {
-          ...k,
-          isAccountChecking:k.isAccountChecking === '是' ? 1 : 0,
-          isAudit:k.isAudit === '是' ? 1 : 0,
-          isFinish:k.isFinish === '是' ? 1 : 0,
-          isUnload:k.isUnload === '是' ? 1 : 0,
-          isUpstairs:k.isUpstairs === '是' ? 1 : 0,
-        }
-      })
       ticketGoToReview({
         ticketType,
         orderCode,
         comment: this.comment,
-        modifiedCostBillList: list
+        modifiedCostBillList: this.recordSelected
       }).then(res => {
         this.$message({
           type: 'success',

+ 25 - 3
src/views/logisticsBill/components/reconciliationDetail.vue

@@ -21,6 +21,7 @@ import TemplatePage from '@/components/template/template-page-1.vue'
 import import_mixin from '@/components/template/import_mixin.js'
 import add_callback_mixin from '@/components/template/add_callback_mixin.js'
 import { getListCostBillV2 } from '@/api/logisticsBill'
+import { dataTool } from 'echarts'
 export default {
   components: { TemplatePage, ExceptionBox },
   mixins: [import_mixin, add_callback_mixin],
@@ -70,7 +71,8 @@ export default {
       tableEvents: {
         'selection-change': this.selectionChange
       },
-      recordSelected: []
+      recordSelected: [],
+      listData:[]
     }
   },
   methods: {
@@ -85,6 +87,7 @@ export default {
           value: this.orderCode
         }
       ]
+      this.getListCostBillV2(...p)
       return getListCostBillV2(...p)
     },
     // 列表导出函数
@@ -95,7 +98,20 @@ export default {
     },
     // 监听勾选变化
     selectionChange(data) {
-      this.recordSelected = data
+      if (data && data.length) {
+        const newList = []
+         this.listData.forEach(l=>{
+             data.forEach(k => {
+                  if (l.id===k.id) {
+                    newList.push(l)
+                  }
+            });
+        })  
+        this.recordSelected = newList
+      }else{
+        this.recordSelected = []
+      }
+   console.log(  this.recordSelected)
     },
     operation() {
       return (h, { row, index, column }) => {
@@ -105,7 +121,13 @@ export default {
     handleClose() {
       this.visible = false
       this.$refs.pageRefItem.refreshList()
-    }
+    },
+    getListCostBillV2(p){
+      getListCostBillV2(p).then(res=>{
+        this.listData = res.data.records
+      })
+     }
+
   }
 }
 </script>

+ 5 - 1
src/views/logisticsBill/reconciliation.vue

@@ -78,7 +78,9 @@ export default {
       return (h, { row, index, column }) => {
         return (
           <div class='operation-btns'>
-            <el-button
+            {row.processStatus !== 'COST_IN_MERCHANT_CHECK'?
+            <div>
+              <el-button
               size='mini'
               type='text'
               onClick={() => {
@@ -116,6 +118,8 @@ export default {
             >
               完成对账
             </el-button>
+            </div>
+          :null}
           </div>
         )
       }

+ 4 - 1
src/views/logisticsBill/salesReconciliation.vue

@@ -76,7 +76,8 @@ export default {
       return (h, { row, index, column }) => {
         return (
           <div class='operation-btns'>
-            <el-button
+            {row.processStatus !== 'COST_IN_SALES_CHECK'?<div>
+              <el-button
               size='mini'
               type='text'
               onClick={() => {
@@ -114,6 +115,8 @@ export default {
             >
               完成对账
             </el-button>
+              </div>:null}
+       
           </div>
         )
       }