gjy 2 роки тому
батько
коміт
27364799b1

+ 59 - 28
src/views/statisticalReport/shippingList.vue

@@ -28,7 +28,7 @@
           </el-select>
           <el-select v-model="taskNo" placeholder="请选择运输任务编号" clearable filterable @change="taskNochange"
             maxlength="500" type="input" class="findValue">
-            <el-option v-for="item in taskNoList" :key="item.taskNoKey" :label="item.taskNoValue"
+            <el-option v-for="item in taskNoList" :key="'task'+item.taskNoKey" :label="item.taskNoValue"
               :value="item.taskNoValue" />
           </el-select>
           <!-- <el-select v-model="processNo" placeholder="请选择运输阶段编号" clearable filterable @change="processNochange"
@@ -55,7 +55,7 @@
             <span style="display:inline-block;margin-right:10px;">船名:{{shipName}}</span> 
             <span style="display:inline-block;margin-right:10px;">航次:{{shipNo}}</span>  
             <div style="display:inline-block;margin-right:10px;"> 水单装船重量(吨):<span v-if="shippedWeight>0">{{shippedWeight}}<img width="18" height="20" style="vertical-align: text-top; position: relative; top: -1px"
-            src="../../../public/img/fujian.png" @click="fujian1(scope.row)" alt="" /></span><ws-button v-if="shippedWeight==0" type="primary" @click="handlefeedback()">反馈</ws-button></div>
+            src="../../../public/img/fujian.png" @click="fujian1()" alt="" /></span><ws-button v-if="shippedWeight==0" type="primary" @click="handlefeedback()">反馈</ws-button></div>
           </div>
         </el-col>
       </el-row>
@@ -167,7 +167,7 @@
     <!--账户-->
     <el-dialog width="30%" title="账户信息" :visible.sync="dialogFormVisible8" :append-to-body="true">
       <h3 style="margin-left: 30px">{{ driverPayeeList.payeeName }}的账户</h3>
-      <div v-for="(item, index) in driverPayeeList" :key="index">
+      <div v-for="(item, index) in driverPayeeList" :key="'zh'+index">
         <h4 style="margin-left: 30px">账户-{{ index + 1 }}</h4>
         <div class="anniu">
           <el-radio-group @change="bankCard(item, id)" v-model="item.radio">
@@ -228,10 +228,13 @@
         <el-form-item label="重量(吨)" >
           <el-input type='number' v-model="shippedWeight" autocomplete="off" placeholder="输入水单装船重量"></el-input>
         </el-form-item>
-      </el-form>
-        <ws-upload ref="upload" :comp-id="compId" :appendix-ids="enclosure" 
+        <el-form-item label="水单截图" >
+          <ws-upload ref="upload" :comp-id="compId" :appendix-ids="enclosure" 
         @onChange="onChange"
 				accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
+        </el-form-item>
+      </el-form>
+        
       <div slot="footer" class="dialog-footer">
         <el-button @click="editshow = false">取 消</el-button>
         <el-button @click="taskconfirm">确定</el-button>
@@ -244,7 +247,7 @@
     </WinseaContentModal>
     <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
       @on-cancel="accessoryTFs = false">
-      <div v-for="(item, index) in paymentScreenshotList" :key="index">
+      <div v-for="(item, index) in paymentScreenshotList" :key="'fj'+index">
         <!-- <ws-upload ref="upload" :comp-id="compId" :appendix-ids="item" :editable="false"
 				accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" /> -->
         <img :src="item" alt="附件" class="img_css" />
@@ -300,6 +303,7 @@
         alreadyInvoice: '',
         needReapply: true,
         taskform:{},
+        accessoryTFs1:false,
         dialogFormVisible1: false,
         dialogFormVisible2: false,
         dialogFormVisible3: false,
@@ -410,6 +414,7 @@
         paymentScreenshotUrls: [],
         carryovercontractnolist: [],
         historyList: [],
+        taskNoList1:[],
         pickerBeginDateBefore: {
           disabledDate: (time) => {
             return time.getTime() > Date.now()
@@ -422,6 +427,23 @@
       }
     },
     activated() {
+      this.contractNoList = []
+        getYunShuXiaLa({
+            flag: 1,
+          })
+          .toPromise()
+          .then((response) => {
+            for (let i = 0; i < response.length; i++) {
+              this.contractNoList.push({
+                constKey: i,
+                contractNo: response[i],
+              })
+            }
+            this.contractNoList.unshift({
+              contractNo: '全部合同'
+            })
+            this.options = this.contractNoList
+          })
       this.getList()
       this.showType = this.isShow
     },
@@ -441,12 +463,27 @@
         this.editshow=true
       },
       taskconfirm(){
-        edittrantask({id:this.currecttask.id,shippedWeight:this.shippedWeight,enclosure:this.enclosure,tranProcessInfoList:[]}).toPromise().then((response) => {
+        if(!this.shippedWeight){
+          this.$message.warning('水单装船重量不能为空')
+          return
+        }
+        if(!this.enclosure){
+          this.$message.warning('至少上传一个水单截图')
+          return
+        }
+        this.$confirm(`水单信息提交后不可修改,确认提交?`, {
+          cancelButtonText: '取消',
+          confirmButtonText: '确定',
+          type: 'warning',
+        }).then(() => {
+          edittrantask({id:this.currecttask.id,shippedWeight:this.shippedWeight,enclosure:this.enclosure,tranProcessInfoList:[]}).toPromise().then((response) => {
               this.editshow=false
+              this.$message.success('提交成功')
             })
             .catch((response) => {
               EventBus.$emit('error', response.message)
             })
+        })
       },
       find(){
       this.getList()
@@ -463,6 +500,7 @@
         // this.appendixIdss = row.addressUrl
       },
       fujian1() {
+        console.log(this.enclosure)
           this.accessoryTFs1 = true
       },
       cur(status) {
@@ -979,7 +1017,9 @@
           })
           .toPromise()
           .then((response) => {
+            this.taskNoList1=response
             for (let i = 0; i < response.length; i++) {
+              
               this.taskNoList.push({
                 taskNoKey: i,
                 taskNoValue: response[i].taskNo,
@@ -988,6 +1028,8 @@
               this.taskNo=response[0].taskNo
               this.shipName=response[0].shipName
               this.shipNo=response[0].shipNo
+              this.shippedWeight=response[0].shippedWeight
+              this.enclosure=response[0].enclosure
               this.currecttask=response[0]
               this.getList()
             }
@@ -999,8 +1041,13 @@
         this.getList()
         // this.processNoList = []
         // this.processNo = ''
-        // for (let i = 0; i < this.taskNoList.length; i++) {
-        //   if (e == this.taskNoList[i].taskNoValue) {
+        for (let i = 0; i < this.taskNoList1.length; i++) {
+          if (e == this.taskNoList1[i].taskNo) {
+            this.shipName=this.taskNoList1[i].shipName
+            this.shipNo=this.taskNoList1[i].shipNo
+            this.enclosure=this.taskNoList1[i].enclosure
+            this.shippedWeight=this.taskNoList1[i].shippedWeight
+            this.currecttask=this.taskNoList1[i]
         //     for (let j = 0; j < this.taskNoList.length; j++) {
         //       this.processNoList.push({
         //         processNoKey: i,
@@ -1011,8 +1058,8 @@
         //         priceStatus: this.taskNoList[i].processNo[j].priceStatus,
         //       })
         //     }
-        //   }
-        // }
+          }
+        }
       },
       processNochange(e) {
         this.processNo = e
@@ -1122,23 +1169,7 @@
             this.deptBudgetTotal = response.total
             this.warehouseList = response
           })
-        this.contractNoList = []
-        getYunShuXiaLa({
-            flag: 1,
-          })
-          .toPromise()
-          .then((response) => {
-            for (let i = 0; i < response.length; i++) {
-              this.contractNoList.push({
-                constKey: i,
-                contractNo: response[i],
-              })
-            }
-            this.contractNoList.unshift({
-              contractNo: '全部合同'
-            })
-            this.options = this.contractNoList
-          })
+        
       },
       handleRemove(file) {
         console.log(file)

+ 12 - 1
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -947,7 +947,18 @@
 					.toPromise()
 					.then(response => {
 						var that = this
-						this.$message.success('添加成功')
+						if(response=='该合同累计任务量已超过溢短装!'){
+							this.$message({
+							message: '该合同累计任务量已超过溢短装!',
+							type: 'error',
+							duration:15000
+							})
+						}else{
+							this.$message({
+							message: '提交成功!',
+							type: 'success',
+							})
+						}
 						setTimeout(function() {
 							that.dataList = {
 								taskTypeKey: 1