Bläddra i källkod

Merge branch 'master' of https://git.steerinfo.com/DAL-DAZHOU/icore-pass

luobang 2 år sedan
förälder
incheckning
635f566043

+ 33 - 22
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckDetailsOrderNew.vue

@@ -122,7 +122,7 @@
             <i class="el-icon-circle-check"></i>生成账单
           </el-button>
         </el-form-item>
-        <el-form-item v-show="activeName == 'second'">
+        <el-form-item v-show="activeName == 'first'">
           <el-button type="primary" @click="openDetails"  v-if="!notRoutList.includes('uploadDetails')">
             <i class="el-icon-circle-check"></i>直接修改详单金额
           </el-button>
@@ -369,6 +369,19 @@
                 show-overflow-tooltip
               >
               </el-table-column>
+              <el-table-column
+                prop="detailsRemark"
+                label="直接修改备注"
+                width="120px"
+                show-overflow-tooltip
+              >
+                <template slot-scope="scope">
+                  <el-button @click="showPhoto(scope.row)" type="text" size="small">
+                    {{scope.row.detailsRemark}}
+                  </el-button>
+                </template>
+
+              </el-table-column>
             </el-table>
           </div>
         </el-tab-pane>
@@ -841,7 +854,7 @@
       :before-close="closeUpload2"
     >
       <el-form style="margin-left:20%">
-        <el-form-item label="修改金额">
+        <el-form-item label="修改单价">
           <el-input
             v-model="detailAmount"
             style="width:200px"
@@ -1691,32 +1704,29 @@ export default {
       }
     },
     openDetails() {
-      console.log(this.$refs.tableRef1.selection, 'selection')
+      console.log(this.$refs.tableRef.selection, 'selection')
       if (
-        !this.$refs.tableRef1.selection ||
-        this.$refs.tableRef1.selection.length != 1
+        !this.$refs.tableRef.selection ||
+        this.$refs.tableRef.selection.length != 1
       ) {
-        this.$message.warning('请选择需要上传发票的订单,一次只允许修改一个')
+        this.$message.warning('请选择需要上传凭证的订单,一次只允许修改一个')
+        return;
       } else {
         this.detailAmount = null
         this.detailRemark = null
         this.detailsList = []
         let data = []
-        if (this.setteldAllselectValue == 1) {
-          data = this.tableData1
+        if (this.unSetteleAllselectValue == 1) {
+          data = this.tableData
         } else {
-          data = this.$refs.tableRef1.selection
+          data = this.$refs.tableRef.selection
+        }
+        for(let i=0;i<data.length;i++){
+          if(!data[i].orderId || !data[i].netWeight){
+            this.$message.warning('没有派发运单,或没有净重,无法修改此项')
+            return;
+          }
         }
-        this.selecteddetailsOrderAmount = data.reduce((prev, item) => {
-          return item.detailsAmount + prev
-        }, 0)
-        this.selecteddetailsOrderAmount = this.selecteddetailsOrderAmount.toFixed(
-          2
-        )
-        console.log(
-          this.selecteddetailsOrderAmount,
-          'selecteddetailsOrderAmount'
-        )
         this.showDetailsUpLoad = true
       }
     },
@@ -1730,10 +1740,10 @@ export default {
         this.isLoading = false
       } else {
         let data = []
-        if (this.setteldAllselectValue == 1) {
-          data = this.tableData1
+        if (this.unSetteleAllselectValue == 1) {
+          data = this.tableData
         } else {
-          data = this.$refs.tableRef1.selection
+          data = this.$refs.tableRef.selection
         }
         let orderList = data.map(e => {
           return e.orderId
@@ -2172,6 +2182,7 @@ export default {
     },
     showPhoto(row){
       this.showPhotoPreview=true;
+      this.previewList=[];
       this.axios.post('/api/v1/uc/getPicture',{
         urls:row.photo
       }).then((res)=>{

+ 1 - 0
src/views/sale/components/transportFreight/saleTruckSettlement/bmsTruckStatementNew.vue

@@ -418,6 +418,7 @@ export default {
     },
     showPhoto2(row){
       this.showPhotoPreview=true;
+      this.previewList=[];
       this.axios.post('/api/v1/uc/getPicture',{
         urls:row.photo
       }).then((res)=>{