zhangyuewww 3 anni fa
parent
commit
a973d88aeb

+ 9 - 1
src/api/V2/statisticalReport/index.js

@@ -15,4 +15,12 @@ export const API_POST_EDITSTATUS = '/purchaseOrder/api/editStatus'
 //采购状态,基差,单价修改 
 export const API_POST_PROCUREMENT_EDITSTATUS = '/procurementPlanInfo/api/editStatus'
 // 采购订单删除
-export const API_POST_DELETEPURCHASE = '/purchaseOrder/api/deletePurchaseOrder'
+export const API_POST_DELETEPURCHASE = '/purchaseOrder/api/deletePurchaseOrder'
+//采购平仓报表
+export const API_GET_CLOSE = '/purchaseClosingReport/selectPurchaseOrder'
+//采购平仓审核
+export const API_POST_CLOAEAUDIT = '/purchaseClosingReport/api/examine'
+//采购平仓付款
+export const API_POST_CLOSEPAYMONEY = '/purchaseClosingReport/api/payMoney'
+//采购平仓收款
+export const API_POST_CLOSECOLLMONEY = '/purchaseClosingReport/api/collectMoney'

+ 14 - 2
src/model/statisticalReport/index.js

@@ -6,7 +6,11 @@ import {
     API_POST_AMEND_PURCHRECEIPT,
     API_POST_REPLANISHENT,
     API_POST_AUDIT,
-    API_POST_PAYMONEY
+    API_POST_PAYMONEY,
+    API_GET_CLOSE,
+    API_POST_CLOAEAUDIT,
+    API_POST_CLOSEPAYMONEY,
+    API_POST_CLOSECOLLMONEY
 } from '@/api/V2/statisticalReport'
 //采购入库报表
 export const getpurchreceipt = appRx.get(API_GET_PURCHRECEIPT, errorCatcher, errorHandle, filter)
@@ -19,4 +23,12 @@ export const postreplanishent = appRx.post(API_POST_REPLANISHENT, errorCatcher,
 //采购入库审核
 export const postaudit = appRx.post(API_POST_AUDIT, errorCatcher, errorHandle, filter)
 //采购入库付款
-export const postpaymoney = appRx.post(API_POST_PAYMONEY, errorCatcher, errorHandle, filter)
+export const postpaymoney = appRx.post(API_POST_PAYMONEY, errorCatcher, errorHandle, filter)
+//采购平仓报表
+export const getclose = appRx.get(API_GET_CLOSE, errorCatcher, errorHandle, filter)
+//采购平仓审核
+export const closeaudit = appRx.post(API_POST_CLOAEAUDIT, errorCatcher, errorHandle, filter)
+//采购平仓付款
+export const closepaymoney = appRx.post(API_POST_CLOSEPAYMONEY, errorCatcher, errorHandle, filter)
+//采购平仓收款
+export const closecollmoney = appRx.post(API_POST_CLOSECOLLMONEY, errorCatcher, errorHandle, filter)

+ 214 - 134
src/views/statisticalReport/purchaseClosingCashierList.vue

@@ -2,33 +2,40 @@
 <template>
   <div class="container">
     <el-scrollbar style="height:100%">
-      <el-scrollbar style="width:130%">
-        <el-row>
-          <el-col :span="12">
-            <h2 class="bg-left title"></h2>
-          </el-col>
-          <el-col :span="12" class="bg-right">
-            <el-button class="bg-bottom" type="primary" size="small" @click="revert()">
-              <img
-                width="6"
-                height="10"
-                style="vertical-align: bottom; margin-right: 3px"
-                src="../../../public/img/lujing.png"
-                alt
-              />返回
-            </el-button>
-          </el-col>
-        </el-row>
-        <!-- <div> -->
         <div>
-          <ws-button type="primary" @click="handleAdd()">待审核</ws-button>
-          <ws-button type="primary" @click="handleAdd()">待结算</ws-button>
-          <ws-button type="primary" @click="handleAdd()">已结算</ws-button>
-          <ws-button type="primary" @click="handleAdd()">全部</ws-button>
-          <ws-button type="primary" @click="handleAdd()">驳回</ws-button>
-          <ws-button type="primary" @click="handleAdd()">通过</ws-button>
-          <ws-button type="primary" @click="handleAdd()">审核</ws-button>
-          <ws-button type="primary" @click="dialogFormVisible1=true">付款</ws-button>
+          <ws-button type="primary" @click="handlestatus(1)">待审核</ws-button>
+          <ws-button type="primary" @click="handlestatus(2)">待结算</ws-button>
+          <ws-button type="primary" @click="handlestatus(3)">已结算</ws-button>
+          <ws-button type="primary" @click="handlestatus('')">全部</ws-button>
+         <ws-button type="primary" @click="handlepass1()">通过1</ws-button>
+          <ws-button type="primary" @click="handlereject(3)">驳回1</ws-button>
+          <ws-button type="primary" @click="handlepass()">通过</ws-button>
+          <ws-button type="primary" @click="handlereject(2)">驳回</ws-button>
+          <ws-button type="primary" @click="handleAudit()">审核</ws-button>
+          <ws-button type="primary" @click="handlepayment()">付款</ws-button>
+          <ws-button type="primary" @click="handlecollect()">收款</ws-button>
+           <ws-select
+            v-model="contractNo"
+            placeholder="请选择合同"
+            clearable
+            @change='contractchange'
+            maxlength="500"
+            type="input"
+            class="findValue"
+          >
+          <ws-option
+                key=""
+                label="全部合同"
+                value=""
+              />
+          <ws-option
+                v-for="item in contractNoList.records"
+                :key="item.constKey"
+                :label="item.contractNo+'('+item.closeaccountstatus+')'"
+                :value="item.contractNo"
+              />
+          </ws-select>
+        </div>
           <el-dialog
             width="25%"
             title="付款"
@@ -37,13 +44,12 @@
           >
             <el-form :model="form">
               <el-form-item label="未付金额(元)" :label-width="formLabelWidth">
-                <!-- <el-input v-model="form.region" autocomplete="off" class="deal"></el-input> -->
               </el-form-item>
-              <el-form-item label="本次款金额(元)" :label-width="formLabelWidth">
+              <el-form-item label="本次款金额(元)" :label-width="formLabelWidth">
                 <el-input
-                  v-model="form.region"
+                  v-model="money"
                   autocomplete="off"
-                  placeholder="请输入补充金额"
+                  placeholder="请输入付款金额"
                   class="deal"
                 ></el-input>
               </el-form-item>
@@ -54,7 +60,7 @@
                 class="deal"
               >
                 <ws-date-picker
-                  v-model="deptBudgetList.submissionDate"
+                  v-model="paymentDate"
                   type="date"
                   placeholder="请选择付款日期"
                   value-format="yyyy-MM-dd"
@@ -75,11 +81,10 @@
             </el-form>
             <div slot="footer" class="dialog-footer">
               <el-button @click="dialogFormVisible1 = false">取 消</el-button>
-              <el-button type="primary" @click="dialogFormVisible1= false">确 定</el-button>
+              <el-button type="primary" @click="payment">确 定</el-button>
             </div>
           </el-dialog>
           <!-- 收款 -->
-          <ws-button type="primary" @click="dialogFormVisible2=true">收款</ws-button>
           <el-dialog
             width="25%"
             title="收款"
@@ -92,7 +97,7 @@
               </el-form-item>
               <el-form-item label="本次收款金额(元)" :label-width="formLabelWidth">
                 <el-input
-                  v-model="form.region"
+                  v-model="collectmoney"
                   autocomplete="off"
                   placeholder="请输入本次收款金额"
                   class="deal"
@@ -105,7 +110,7 @@
                 class="deal"
               >
                 <ws-date-picker
-                  v-model="deptBudgetList.submissionDate"
+                  v-model="collectionDate"
                   type="date"
                   placeholder="请选择收款日期"
                   value-format="yyyy-MM-dd"
@@ -126,18 +131,9 @@
             </el-form>
             <div slot="footer" class="dialog-footer">
               <el-button @click="dialogFormVisible2 = false">取 消</el-button>
-              <el-button type="primary" @click="dialogFormVisible2= false">提 交</el-button>
+              <el-button type="primary" @click="collectment">提 交</el-button>
             </div>
           </el-dialog>
-          <ws-select
-            v-model="searchKeyWord"
-            placeholder="可按照合同编号和任务编号进行查找"
-            clearable
-            maxlength="500"
-            type="input"
-            class="findValue"
-          ></ws-select>
-        </div>
 
         <el-table
           class="wenzi"
@@ -152,21 +148,21 @@
           <el-table-column type="selection" width="55"></el-table-column>
           <el-table-column type="index" label="序号" width="50"></el-table-column>
           <el-table-column class="table_td" prop="contractNo" label="合同编号"></el-table-column>
-          <el-table-column class="table_td" prop="procurementPlan" label="平仓日期"></el-table-column>
-          <el-table-column class="table_td" prop="customer" label="平仓数量(吨)"></el-table-column>
-          <el-table-column class="table_td" prop="unitPrice" label="成交价格(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="basis" label="平仓价格(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="freezingDeposit" label="基差(元/吨)"></el-table-column>
-          <el-table-column class="table_td" prop="defaultDeposit" label="应付金额(元)"></el-table-column>
-          <el-table-column class="table_td" prop="unloadingCharge" label="已付金额(元)"></el-table-column>
-          <el-table-column class="table_td" prop="unloadingCharge" label="未付金额(元)"></el-table-column>
-          <el-table-column class="table_td" prop="invoiceFee" label="付款日期"></el-table-column>
-          <el-table-column class="table_td" prop="send" label="应收金额(元)"></el-table-column>
-          <el-table-column class="table_td" prop="stockInQuantity" label="已收金额(元)"></el-table-column>
-          <el-table-column class="table_td" prop="openPosition" label="未收金额(元)"></el-table-column>
-          <el-table-column class="table_td" prop="closedPosition" label="收款日期"></el-table-column>
-          <el-table-column class="table_td" label="客户"></el-table-column>
-          <el-table-column class="table_td" label="库点"></el-table-column>
+          <el-table-column class="table_td" prop="closePositionDate" label="平仓日期"></el-table-column>
+          <el-table-column class="table_td" prop="closingQuantity" label="平仓数量(吨)"></el-table-column>
+          <el-table-column class="table_td" prop="transactionPrice" label="成交价格(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="closeRate" label="平仓价格(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="basisPrice" label="基差(元/吨)"></el-table-column>
+          <el-table-column class="table_td" prop="amountIngPayable" label="应付金额(元)"></el-table-column>
+          <el-table-column class="table_td" prop="amountEdPayable" label="已付金额(元)"></el-table-column>
+          <el-table-column class="table_td" prop="amountNotPayable" label="未付金额(元)"></el-table-column>
+          <el-table-column class="table_td" prop="paymentDate" label="付款日期"></el-table-column>
+          <el-table-column class="table_td" prop="collectionIngPayable" label="应收金额(元)"></el-table-column>
+          <el-table-column class="table_td" prop="collectionEdPayable" label="已收金额(元)"></el-table-column>
+          <el-table-column class="table_td" prop="collectionNotPayable" label="未收金额(元)"></el-table-column>
+          <el-table-column class="table_td" prop="collectionDate" label="收款日期"></el-table-column>
+          <el-table-column class="table_td" prop="customerName" label="客户"></el-table-column>
+          <el-table-column class="table_td" prop="warehouseName" label="库点"></el-table-column>
           <el-table-column prop="status" label="状态"></el-table-column>
         </el-table>
 
@@ -179,7 +175,6 @@
           layout="total, sizes, prev, pager, next, jumper"
           :total="deptBudgetTotal"
         ></el-pagination>
-      </el-scrollbar>
     </el-scrollbar>
   </div>
 
@@ -187,8 +182,8 @@
 </template>
 <script>
 import {
-  getpurchreceipt
-} from '@/model/purchasingManagement/index'
+  getclose,closeaudit,closepaymoney,closecollmoney
+} from '@/model/statisticalReport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -218,12 +213,7 @@ export default {
       form: {
         transactionPrice: '',
         transactionsNumber: '',
-        basis: '',
         submissionDate: ''
-        // delivery: false,
-        // type: [],
-        // resource: '',
-        // desc: ''
       },
       formLabelWidth: '120px',
 
@@ -231,6 +221,10 @@ export default {
       barHeight: 0,
       retioX: 1,
       ratioY: 1,
+      money:0,
+      collectmoney:0,
+      collectionDate:'',
+      paymentDate:'',
       isTaped: false,
       isHover: false,
       isShow: !this.autohide,
@@ -264,6 +258,8 @@ export default {
       submitType: true,
       size: 10,
       spanArr: [],
+      contractNoList:[],
+      modification:[],
       contractNo: '',
       inOutTaskNo: '',
       compId: sessionStorage.getItem('ws-pf_compId'),
@@ -291,6 +287,71 @@ export default {
         this.$refs.warehouseList.doLayout()
       })
     },
+    contractchange(e){ 
+      this.contractNo=e
+      this.getList()
+    },
+    handlestatus(status){
+      this.searchType=status
+      this.getList()
+    },
+    handlepayment(){
+       if(this.modification.length==0){
+        this.$message.warning('请选择一条要付款的条目')
+      }
+      else{
+        this.dialogFormVisible1=true
+      }
+    },
+    handlecollect(){
+        if(this.modification.length==0){
+        this.$message.warning('请选择一条要收款的条目')
+      }
+      else{
+        this.dialogFormVisible2=true
+      }
+    },
+    //统计审核
+    handleAudit(){
+      if(this.modification.length==0){
+        this.$message.warning('请选择一条要审核的条目')
+      }else{
+        this.$confirm(`审核通过后,任务将发送给财务,是否确定通过?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      }).then(() => {
+        closeaudit({roleFlag:1,flag:1,purchaseClosingReportList:this.modification}).toPromise()
+        .then(response => {
+          this.$message.success('审核成功')
+          this.getList()
+        }).catch
+      })
+      }
+    },
+    //驳回
+    handlereject(status){
+      if(this.modification.length==0){
+        this.$message.warning('请选择要驳回的条目')
+      }else{
+        this.$confirm(`驳回后任务将退回到统计,是否确定驳回?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      }).then(() => {
+        postaudit({roleFlag:status,flag:2,purchaseClosingReportList:this.modification}).toPromise()
+        .then(response => {
+          this.$message.success('驳回成功')
+          this.getList()
+        }).catch(req => {
+          this.$message.success('驳回失败')
+        })
+      })
+      }
+    },
+    handleSelectionChange(val){
+      this.modification=val
+    },
     //合计
     getSummaries(param) {
       const { columns, data } = param
@@ -318,59 +379,68 @@ export default {
       })
       return sums
     },
-    //成交
-    submit() {
-      if (!this.warehouseList.transactionPrice) {
-        this.$message({
-          message: '成交价不能为空',
-          type: 'warning'
-        })
-        return
-      }
-      this.$confirm(`确定提交成交信息`, {
+    //付款
+    payment(){
+      this.$confirm(`确定提交付款信息?`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning'
-      }).then(() => {
-        console.log(23456678790)
-
-        chengList(this.warehouseList)
-          .toPromise()
+        }).then(() => {
+          closepaymoney({purchaseClosingReportList:this.modification,money:this.money,paymentDate:this.paymentDate}).toPromise()
           .then(response => {
-            this.$message.success('添加成功')
-
-            // this.$router.go(-1)
+            this.$message.success('付款成功')
+            this.dialogFormVisible1=false
+            this.getList()
           })
-          .catch(() => {
-            console.log(1111111111)
-            return false
+        })
+    },
+    //收款
+    collectment(){
+      this.$confirm(`确定提交收款信息?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+        }).then(() => {
+          closecollmoney({purchaseClosingReportList:this.modification,money:this.collectmoney,collectionDate:this.collectionDate}).toPromise()
+          .then(response => {
+            this.$message.success('收款成功')
+            this.dialogFormVisible2=false
+            this.getList()
           })
-      })
+        })
     },
     getList() {
-      getpurchreceipt({
+      getclose({
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         pageSize: this.pageSize,
         searchType: this.searchType,
-        searchKeyWord: this.searchKeyWord
+        contractNo:this.contractNo,
+        roleFlag:this.roleFlag
       })
         .toPromise()
         .then(response => {
           this.warehouseList = response
         })
-    },
-    // loaddata(){
-    //   chengList({
-    //      compId: sessionStorage.getItem('ws-pf_compId'),
-    //   })
-    //   .toPromise()
-    //   .then(response => {
-    //       this.warehouseList = response
-    //     })
-    // },
-    handleSelectionChange(val) {
-      this.multipleSelection = val
+        getclose({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        roleFlag:this.roleFlag
+      })
+        .toPromise()
+        .then(response => {
+          for (let i = 0; i < response.records.length; i++) {
+            if(response.records[i].amountNotPayable==0){
+              response.records[i].closeaccountstatus='已结算'
+            }else{
+              response.records[i].closeaccountstatus='待结算'
+            }
+            
+            
+          }
+           this.contractNoList = response
+        })
     },
     handleRemove(file) {
       console.log(file)
@@ -382,23 +452,46 @@ export default {
     handleDownload(file) {
       console.log(file)
     },
-
-    // statusquery(state) {
-    //   this.searchType = state
-    //   this.getList()
-    // },
-    // delivery(item) {
-    //   this.$router.push({
-    //     path: 'warehouseManagementDelivery',
-    //     query: {
-    //       baseId: item.warehouseId,
-    //       positionId: item.binNumberId,
-    //       warehouseName: item.warehouseName,
-    //       binNumber: item.binNumber,
-    //       capacity: item.capacity
-    //     }
-    //   })
-    // },
+    //财务通过
+    handlepass(){
+      if(this.modification.length==0){
+        this.$message.warning('请选择要通过的条目')
+      }else{
+        this.$confirm(`审核通过后,任务将发送给决策人,是否确定通过?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      }).then(() => {
+        postaudit({roleFlag:2,flag:1,purchaseClosingReportList:this.modification}).toPromise()
+        .then(response => {
+          this.$message.success('通过成功')
+          this.getList()
+        }).catch(req => {
+          this.$message.success('通过失败')
+        })
+      })
+      }
+    },
+    //决策人通过
+    handlepass1(){
+      if(this.modification.length==0){
+        this.$message.warning('请选择要通过的条目')
+      }else{
+        this.$confirm(`审核通过后,任务将发送给出纳,是否确定通过?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning'
+      }).then(() => {
+        closeaudit({roleFlag:3,flag:1,purchaseClosingReportList:this.modification}).toPromise()
+        .then(response => {
+          this.$message.success('通过成功')
+          this.getList()
+        }).catch(req => {
+          this.$message.success('通过失败')
+        })
+      })
+      }
+    },
     getSpanArr(data) {
       let that = this
 
@@ -430,19 +523,6 @@ export default {
         }
       })
     },
-    //查看
-    handleLook(row) {
-      this.$router.push({
-        path: 'warehouseManagementPutOutLook',
-        query: {
-          relevanceId: row.relevanceId
-        }
-      })
-    },
-    //返回
-    revert() {
-      this.$router.push({ path: 'warehouseManagementList' })
-    },
     dateFormat(fmt, date) {
       let ret
       const opt = {

+ 1 - 1
vue.config.js

@@ -141,7 +141,7 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
-        target: 'http://192.168.1.116:8090/',
+        target: 'http://192.168.1.120:8090/',
         // target: 'http://192.168.1.112:8090/',
         // target: 'http://192.168.1.121:8090/',
         // target: 'http://192.168.1.119:8090/',