gjy 2 rokov pred
rodič
commit
3ce95bfb30

+ 1 - 1
src/api/V2/warehouse/index.js

@@ -122,4 +122,4 @@ export const API_SET_PAYMONEY = 'warehousingOrder/api/payMoney'
 //审核
 export const API_WORKFLOWHANDLE ='/newWorkflow/api/handle'
 //查看可分配金额
-export const API_GET_EXPENSE='/expenseAllocationInfo/getExpenseAllocationInfo'
+export const API_GET_EXPENSE='/contractManagementInfo/getContractInfo'

+ 2 - 1
src/model/warehouse/index.js

@@ -59,7 +59,8 @@ import {
     API_EDIT_WAREHOUSINGORDER,
     API_SET_PAYMONEY,
     API_WORKFLOWHANDLE,
-    API_GET_EXPENSE
+    API_GET_EXPENSE,
+    API_SET_EXPENSE
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'

+ 21 - 12
src/views/statisticalReport/autoSettlementList.vue

@@ -219,10 +219,13 @@
             class="deal" />
         </el-form-item>
         <el-form-item label="上传付款截图" :label-width="formLabelWidth">
-          <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
+          <!-- <el-upload action="https://www.zthymaoyi.com/upload/admin" list-type="picture-card"
             :on-success="handlePictureCardPreview" :on-remove="handleRemove" class="photo2">
             <i class="el-icon-plus"></i>
-          </el-upload>
+          </el-upload> -->
+          <ws-upload ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+        @onChange="onChange" 
+       />
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -307,9 +310,11 @@
     <!--付款截图 -->
     <WinseaContentModal v-model="paymentImg" title="付款截图信息" @on-cancel="handleClose2">
       <p>查看付款截图</p>
-      <div v-for="item in paymentScreenshot1">
+      <ws-upload :editable='false' ref="upload" accept=".jpg, .jpeg, .png, .pdf, .doc, .docx, .xls, .xlsx" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+       />
+      <!-- <div v-for="item in paymentScreenshot1">
         <img style="width: 100px; height: 100px" :src="item" alt="" />
-      </div>
+      </div> -->
     </WinseaContentModal>
   </div>
   <!-- </div> -->
@@ -357,8 +362,7 @@ export default {
   },
 
   data() {
-    return {
-      checked: true,
+    return { 
       alreadyInvoice: '',
       needReapply: true,
       dialogFormVisible1: false,
@@ -382,10 +386,6 @@ export default {
       currect: true,
       formLabelWidth: '120px',
       formLabelWidth1: '140px',
-      barWidth: 0,
-      barHeight: 0,
-      retioX: 1,
-      ratioY: 1,
       isTaped: false,
       isHover: false,
       settlementWeightchange: false,
@@ -400,14 +400,12 @@ export default {
       year: '',
       options: [],
       id: '',
-      pickerOptions: {},
       value2: '',
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
       searchType: '1',
       manualFlag: '',
-      searchTypeText: '未完成',
       searchKeyWord: '',
       startAddress:'',
       driverPayeeList: {
@@ -484,6 +482,17 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    onChange() {
+        this.$refs.upload
+          .handleSaveBill()
+          .then(async response => {
+            this.paymentScreenshot = response
+          })
+          .catch(res => {
+            EventBus.$emit('error', (JSON.parse(res) || {}).message)
+            this.$refs.upload.clearFiles()
+          })
+      },
     find(){
       this.getList()
     },

+ 15 - 12
src/views/warehousenew/warehousingOrder.vue

@@ -380,7 +380,8 @@
   paymoney,
   editwarehousingorder,
   getExpense,
-  workflowhandle
+  workflowhandle,
+  setExpense
 } from '@/model/warehouse/index'
   import {getpayeeinfo,getbuypayeeinfo} from '@/model/profitable/index'
   import {
@@ -685,12 +686,13 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             return
           }
           _this.dialogTitle=arr1[i].contractNo
-          getExpense({contractNo:arr1[i].contractNo,costType:5}).toPromise()
+          getExpense({contractNo:arr1[i].contractNo,compId:this.compId}).toPromise()
           .then((response) => {
-            _this.form.accumulatedPrepayment=response.accumulatedPrepayment
-            _this.form.recoveryPrepayments=response.recoveryPrepayments
-            _this.form.distributionEd=response.distributionMoney
-            _this.form.distributionCan=response.accumulatedPrepayment-response.recoveryPrepayments-response.distributionMoney
+            _this.form.contractId=response.id
+            _this.form.accumulatedPrepayment=response.accumulatedMargin
+            _this.form.recoveryPrepayments=response.withdrawalOfMargin
+            _this.form.distributionEd=response.allocatedMargin
+            _this.form.distributionCan=response.accumulatedMargin-response.withdrawalOfMargin-response.allocatedMargin
             _this.form.distributionNot=arr1[i].amountNotPayable
             this.currectdata=currectData
             this.marginshow=true
@@ -751,12 +753,13 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             return
           }
           _this.dialogTitle=arr1[i].contractNo
-          getExpense({contractNo:arr1[i].contractNo,costType:1}).toPromise()
+          getExpense({contractNo:arr1[i].contractNo,compId:this.compId}).toPromise()
           .then((response) => {
+            _this.form.contractId=response.id
             _this.form.accumulatedPrepayment=response.accumulatedPrepayment
-            _this.form.recoveryPrepayments=response.recoveryPrepayments
-            _this.form.distributionEd=response.distributionMoney
-            _this.form.distributionCan=response.accumulatedPrepayment-response.recoveryPrepayments-response.distributionMoney
+            _this.form.recoveryPrepayments=response.accumulatedRecovery
+            _this.form.distributionEd=response.prepaidAssigned
+            _this.form.distributionCan=response.accumulatedPrepayment-response.accumulatedRecovery-response.prepaidAssigned
             _this.form.distributionNot=arr1[i].amountNotPayable
           }).catch(() => {
            this.$message({
@@ -954,7 +957,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
-            paymoney({flag:3,money:this.form.distributionIng,warehousingOrderList:arr2}).toPromise()
+            paymoney({flag:3,money:this.form.distributionIng,warehousingOrderList:arr2,contractId:this.form.contractId}).toPromise()
           .then((response) => {
             this.$message({
               message: '分配成功',
@@ -998,7 +1001,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             cancelButtonText: '取消',
             type: 'warning'
           }).then(() => {
-            paymoney({flag:2,money:this.form.distributionIng,warehousingOrderList:arr2}).toPromise()
+            paymoney({flag:2,money:this.form.distributionIng,warehousingOrderList:arr2,contractId:this.form.contractId}).toPromise()
           .then((response) => {
             this.$message({
               message: '分配成功',