Browse Source

前端入库单修改付款文件

gjy 2 years ago
parent
commit
924feba98b

+ 4 - 3
src/views/statisticalReport/autoSettlementList.vue

@@ -131,10 +131,8 @@
             " class="iconfont icon-dui"></i>
             " class="iconfont icon-dui"></i>
             <img v-if="
             <img v-if="
               (!scope.row.deductionAmountchange &&
               (!scope.row.deductionAmountchange &&
-                scope.row.deductionAmount &&
                 scope.row.status == '待请款') ||
                 scope.row.status == '待请款') ||
               (!scope.row.deductionAmountchange &&
               (!scope.row.deductionAmountchange &&
-                scope.row.deductionAmount &&
                 scope.row.status == '已驳回')
                 scope.row.status == '已驳回')
             " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
             " width="17" height="18" style="vertical-align: text-top; position: relative; top: -1px"
               src="../../../public/img/edit.png" @click="editdeductionAmount(scope.row)" alt="" />
               src="../../../public/img/edit.png" @click="editdeductionAmount(scope.row)" alt="" />
@@ -489,6 +487,9 @@ export default {
     this.showType = this.isShow
     this.showType = this.isShow
   },
   },
   methods: {
   methods: {
+    warehouseNameChange(){
+      this.getList()
+    },
     onChange() {
     onChange() {
         this.$refs.upload
         this.$refs.upload
           .handleSaveBill()
           .handleSaveBill()
@@ -871,7 +872,7 @@ export default {
           (String(this.deductionAmount).indexOf('.') + 1) >
           (String(this.deductionAmount).indexOf('.') + 1) >
           2) ||
           2) ||
         (this.deductionAmount && this.deductionAmount > 100000) ||
         (this.deductionAmount && this.deductionAmount > 100000) ||
-        (this.deductionAmount && this.deductionAmount < 1)
+        (this.deductionAmount && this.deductionAmount < 0)
       ) {
       ) {
         this.$message({
         this.$message({
           message: '扣款金额输入错误',
           message: '扣款金额输入错误',

+ 45 - 28
src/views/warehousenew/warehousingOrder.vue

@@ -133,7 +133,7 @@
         <el-table-column prop="requestFunds"  width="150" class="table_td tablerequestFunds" label="请款">
         <el-table-column prop="requestFunds"  width="150" class="table_td tablerequestFunds" label="请款">
           <template scope="scope">
           <template scope="scope">
             <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
             <span v-if="!scope.row.select">{{ scope.row.requestFunds }}</span>
-            <el-input  @focus="qingkuan(scope.row)" v-else v-model='scope.row.requestFunds'></el-input>
+            <el-input  @focus="qingkuan(scope.row,item.id)" v-else v-model='scope.row.requestFunds'></el-input>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
          <el-table-column prop="remark"  width="150" class="table_td" label="请款备注">
          <el-table-column prop="remark"  width="150" class="table_td" label="请款备注">
@@ -141,7 +141,7 @@
             <div v-if="!scope.row.select" @click.stop="lookRemark(scope.row)">
             <div v-if="!scope.row.select" @click.stop="lookRemark(scope.row)">
               <span class="text_css">查看</span>
               <span class="text_css">查看</span>
             </div>
             </div>
-            <el-input @focus="inputremark(scope.row)" v-else v-model='scope.row.remark'></el-input>
+            <el-input @focus="inputremark(scope.row,item.id)" v-else v-model='scope.row.remark'></el-input>
           </template>
           </template>
         </el-table-column>
         </el-table-column>
         <el-table-column prop="approveStatus" label="请款状态" width="90">
         <el-table-column prop="approveStatus" label="请款状态" width="90">
@@ -166,10 +166,12 @@
               <el-input disabled v-model="form.name"></el-input>
               <el-input disabled v-model="form.name"></el-input>
             </el-form-item>
             </el-form-item>
             <el-form-item label="附件">
             <el-form-item label="附件">
-              <el-upload ref='uploadfiles' :file-list='dataList' :action="global.uploadPath" list-type="picture-card"
+              <!-- <el-upload ref='uploadfiles' :file-list='dataList' :action="global.uploadPath" list-type="picture-card"
             :on-success="handlefujian" :on-remove="handleRemove" class="photo2"  accept="image/jpg,image/jpeg,image/png">
             :on-success="handlefujian" :on-remove="handleRemove" class="photo2"  accept="image/jpg,image/jpeg,image/png">
               <i class="el-icon-plus"></i>
               <i class="el-icon-plus"></i>
-              </el-upload>
+              </el-upload> -->
+              <ws-upload ref="upload" :size-limit="size" @onChange="onChange" :comp-id="compId" 
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .zip, .rar" />
             </el-form-item>
             </el-form-item>
             </el-form> 
             </el-form> 
           </div>
           </div>
@@ -422,13 +424,15 @@
         </span>
         </span>
     </el-dialog>
     </el-dialog>
     <el-dialog width='50%' :visible.sync="accessoryTFs" title="附件" top="20vh">
     <el-dialog width='50%' :visible.sync="accessoryTFs" title="附件" top="20vh">
-      <div v-for="(item,index) in appendixIdss" :key="'fujian'+index" >
+      <!-- <div v-for="(item,index) in appendixIdss" :key="'fujian'+index" >
        <el-image 
        <el-image 
         style="width: 100px; height: 100px"
         style="width: 100px; height: 100px"
         :src="item" 
         :src="item" 
         :preview-src-list="appendixIdss">
         :preview-src-list="appendixIdss">
       </el-image>
       </el-image>
-      </div>
+      </div> -->
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="appendixIdss" :editable="false"
+        accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
     </el-dialog>
     </el-dialog>
     <el-dialog width='30%' :visible.sync="dialogVisible1" title="费用" top="20vh">
     <el-dialog width='30%' :visible.sync="dialogVisible1" title="费用" top="20vh">
       <div v-for="(item,index) in costlist" :key="index" class="audit">
       <div v-for="(item,index) in costlist" :key="index" class="audit">
@@ -598,7 +602,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         id:'',
         id:'',
         customerInfo:{},
         customerInfo:{},
         appendixIdss:[],
         appendixIdss:[],
-        paymentScreenshot:[],
+        paymentScreenshot:'',
         endDate:'',
         endDate:'',
         startDate:'',
         startDate:'',
         warehouseName: '',
         warehouseName: '',
@@ -642,22 +646,25 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
       qingkuan(item){
       qingkuan(item){
         this.titletype='请款金额'
         this.titletype='请款金额'
         this.currectfocusdata=item
         this.currectfocusdata=item
-        this.textarea=item.requestFunds
+        this.textarea=this.currectfocusdata.requestFunds
         this.dialogVisiblecontent=true
         this.dialogVisiblecontent=true
       },
       },
       inputremark(item){
       inputremark(item){
         this.titletype='备注内容'
         this.titletype='备注内容'
         this.currectfocusdata=item
         this.currectfocusdata=item
-        this.textarea=item.remark
+        this.textarea=this.currectfocusdata.remark
         this.dialogVisiblecontent=true
         this.dialogVisiblecontent=true
       },
       },
       handlequeren(){
       handlequeren(){
-        if(this.titletype=='请款'){
+        if(this.titletype=='请款金额'){
           this.dialogVisiblecontent=false
           this.dialogVisiblecontent=false
           this.currectfocusdata.requestFunds=this.textarea
           this.currectfocusdata.requestFunds=this.textarea
+          console.log(this.currectfocusdata,textarea)
+          this.$forceUpdate()
         }else{
         }else{
           this.dialogVisiblecontent=false
           this.dialogVisiblecontent=false
           this.currectfocusdata.remark=this.textarea
           this.currectfocusdata.remark=this.textarea
+          this.$forceUpdate()
         }
         }
         
         
       },
       },
@@ -704,15 +711,16 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
       fujian(row) {
       fujian(row) {
         this.id = row.id
         this.id = row.id
         this.accessoryTFs = true
         this.accessoryTFs = true
-        if(row.addressUrl.split(',')){
-          var arr=row.addressUrl.split(',')
-          this.dataList=[]
-          for(var i=0;i<arr.length;i++){
-            this.dataList.push({url:arr[i]})
-          }
-          this.appendixIdss=arr
-          this.paymentScreenshot=arr
-        }
+        // if(row.addressUrl.split(',')){
+        //   var arr=row.addressUrl.split(',')
+        //   this.dataList=[]
+        //   for(var i=0;i<arr.length;i++){
+        //     this.dataList.push({url:arr[i]})
+        //   }
+        //   this.appendixIdss=arr
+        //   this.paymentScreenshot=arr
+        // }
+        this.appendixIdss=row.addressUrl
         
         
         console.log(this.appendixIdss)
         console.log(this.appendixIdss)
       },
       },
@@ -1081,10 +1089,16 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
           return false
           return false
         }
         }
       },
       },
-      handlefujian(file) {
-        // console.log(file)
-        this.paymentScreenshot.push(file.data.url)
-        // this.dialogVisible = true
+      onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.paymentScreenshot = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
       },
       },
       handleRemove(file) {
       handleRemove(file) {
         // console.log(file)
         // console.log(file)
@@ -1152,7 +1166,9 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         var that=this
         var that=this
         console.log(this.multipleSelection1,this.multipleSelection1[this.currectdata.id])
         console.log(this.multipleSelection1,this.multipleSelection1[this.currectdata.id])
         var arr2=this.multipleSelection1[this.currectdata.id]
         var arr2=this.multipleSelection1[this.currectdata.id]
-          if(this.paymentScreenshot.length==0){
+        console.log(this.paymentScreenshot)
+        var len=this.paymentScreenshot?this.paymentScreenshot.split(','):[]
+          if(len.length==0){
             this.$message({
             this.$message({
               message: '请上传付款截图',
               message: '请上传付款截图',
               type: 'warning'
               type: 'warning'
@@ -1161,14 +1177,15 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
           }
           }
           for (let i = 0; i < arr2.length; i++) {
           for (let i = 0; i < arr2.length; i++) {
             if(arr2[i].addressUrlArray){
             if(arr2[i].addressUrlArray){
-              arr2[i].addressUrlArray=arr2[i].addressUrlArray.concat(this.paymentScreenshot)
+              arr2[i].addressUrlArray=arr2[i].addressUrlArray.concat(len)
             }
             }
             else{
             else{
-              arr2[i].addressUrlArray=this.paymentScreenshot
+              arr2[i].addressUrlArray=len
             }
             }
             arr2[i].addressUrl=arr2[i].addressUrlArray.toString()
             arr2[i].addressUrl=arr2[i].addressUrlArray.toString()
             
             
           }
           }
+          console.log(arr2)
           paymoney({flag:0,warehousingOrderList:arr2}).toPromise()
           paymoney({flag:0,warehousingOrderList:arr2}).toPromise()
           .then((response) => {
           .then((response) => {
             this.$message({
             this.$message({
@@ -1176,8 +1193,8 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
               type: 'success'
               type: 'success'
             });
             });
             this.aduitshow=false
             this.aduitshow=false
-            this.paymentScreenshot=[]
-            this.$refs.uploadfiles.clearFiles()
+            this.paymentScreenshot=''
+            this.$refs.upload.clearFiles()
             this.getList()
             this.getList()
           }).catch(() => {
           }).catch(() => {
            this.$message({
            this.$message({