qinbai 3 years ago
parent
commit
e39ef07668

+ 42 - 0
src/api/financialManagement/financialManagement.js

@@ -0,0 +1,42 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+  return request({
+    url: '/api/trade-finance/settlement/list',
+    method: 'get',
+    params: {
+      ...params,
+      current,
+      size,
+    }
+  })
+}
+
+export const remove = (id) => {
+  return request({
+    url: '/api/trade-finance/settlement/remove',
+    method: 'delete',
+    params: {
+      id:id
+    }
+  })
+}
+
+
+export const getDetail = (id) => {
+  return request({
+    url: '/api/trade-finance/settlement/detail',
+    method: 'get',
+    params: {
+      id:id
+    }
+  })
+}
+
+export const editFinance = (params) => {
+  return request({
+    url: '/api/trade-finance/settlement/modify',
+    method: 'post',
+    data:params
+  })
+}

+ 3 - 3
src/router/views/index.js

@@ -87,7 +87,7 @@ export default [{
             }
         ]
     },
-    //商品详情页
+    //商品false
     {
         path: '/commodityType_detailsPageEdit',
         component: Layout,
@@ -428,9 +428,9 @@ export default [{
     children: [
       {
         path: '/receipt_detailsPage',
+        name:"收款详情",
         meta: {
           i18n: 'receipt_detailsPage',
-          keepAlive: true
         },
         component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/receiptDetailsPage')
       }
@@ -444,9 +444,9 @@ export default [{
     children: [
       {
         path: '/payment_detailsPage',
+        name:"付款详情",
         meta: {
           i18n: 'payment_detailsPage',
-          keepAlive: true
         },
         component: () => import( /* webpackChunkName: "views" */ '@/views/financialManagement/paymentDetailsPage')
       }

+ 1 - 1
src/views/financialManagement/configuration/paymentList.json

@@ -14,7 +14,7 @@
   "selection": false,
   "viewBtn": false,
   "editBtn": false,
-  "delBtn": true,
+  "delBtn": false,
   "menuWidth": 220,
   "column": [
     {

+ 12 - 16
src/views/financialManagement/payment.vue

@@ -52,6 +52,7 @@
 
 <script>
   import option from "./configuration/paymentList.json";
+  import {getList ,remove} from "@/api/financialManagement/financialManagement"
 
   export default {
     data() {
@@ -99,14 +100,12 @@
             cancelButtonText: "取消",
             type: "warning"
           }).then(() => {
-            deleteMain(row.id).then(res =>{
-              this.$message({
-                type: "success",
-                message: "操作成功!"
-              });
+            remove(row.id).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!");
+                this.onLoad(this.page);
+              }
             })
-            // 数据回调进行刷新
-            this.onLoad(this.page);
           });
         }
       },
@@ -133,16 +132,13 @@
         console.log('1')
       },
       onLoad(page, params = {}) {
-        if(!params.status){
-          params.status = "1,4,5";
-        }
+        params.billType = "付费"
         this.loading = true
-        // getFlowList(page.currentPage, page.pageSize,params).then(res =>{
-        //   this.dataList = res.data.data.records
-        //   this.page.total = res.data.data.total
-        //   this.loading = false
-        // })
-        this.loading = false
+        getList(page.currentPage, page.pageSize,params).then(res =>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
+          this.loading = false
+        })
       },
     }
   }

+ 24 - 6
src/views/financialManagement/paymentDetailsPage.vue

@@ -10,7 +10,7 @@
                    @click.stop="addMainProject">复制新单
         </el-button>
         <el-button class="el-button--small-yh add-customer-btn" type="primary"
-                   @click.stop="editMainProject"
+                   @click.stop="editFinance"
         >{{this.id?"确认修改" :"确认新增"}}
         </el-button>
       </div>
@@ -42,8 +42,7 @@
                    @selection-change="selectionChange"
                    @current-change="currentChange"
                    @size-change="sizeChange"
-                   @refresh-change="refreshChange"
-                   @on-load="onLoad">
+                   @refresh-change="refreshChange">
           <template slot="menuLeft">
             <el-button type="primary"
                        size="small"
@@ -88,6 +87,7 @@
 
 <script>
   import option from "./configuration/detailsPage.json";
+  import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
 
   export default {
     data() {
@@ -95,6 +95,7 @@
         form: {},
         option: option,
         parentId:0,
+        id:"",
         dataList: [],
         page: {
           pageSize: 10,
@@ -293,7 +294,12 @@
       }
     },
     created() {
-
+      if (this.$route.query.id) {
+        this.id = BigInt(this.$route.query.id);//字符串转数字  超长用BigInt
+        getDetail(this.id).then(res => {
+          this.form = res.data.data;
+        })
+      }
     },
     mounted() {
       option.height = window.innerHeight - 640 ;
@@ -314,8 +320,20 @@
       refreshChange() {
         console.log('1')
       },
-      onLoad(page, params = {}) {
-        this.page.total = 1;
+      editFinance(){
+        this.$refs["form"].validate((valid) => {
+          if(valid){
+            const params = {
+              ...this.form,
+              billType:"付费"
+            }
+            editFinance(params).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!")
+              }
+            })
+          }
+        })
       },
       backToList(){
         this.$router.$avueRouter.closeTag();

+ 11 - 15
src/views/financialManagement/receipt.vue

@@ -52,6 +52,7 @@
 
 <script>
   import option from "./configuration/receiptList.json";
+  import {getList ,remove} from "@/api/financialManagement/financialManagement"
 
   export default {
     data() {
@@ -99,14 +100,12 @@
             cancelButtonText: "取消",
             type: "warning"
           }).then(() => {
-            deleteMain(row.id).then(res =>{
-              this.$message({
-                type: "success",
-                message: "操作成功!"
-              });
+            remove(row.id).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!");
+                this.onLoad(this.page);
+              }
             })
-            // 数据回调进行刷新
-            this.onLoad(this.page);
           });
         }
       },
@@ -133,16 +132,13 @@
         console.log('1')
       },
       onLoad(page, params = {}) {
-        if(!params.status){
-          params.status = "1,4,5";
-        }
+        params.billType = "收费"
         this.loading = true
-        // getFlowList(page.currentPage, page.pageSize,params).then(res =>{
-        //   this.dataList = res.data.data.records
-        //   this.page.total = res.data.data.total
-        //   this.loading = false
-        // })
+        getList(page.currentPage, page.pageSize,params).then(res =>{
+          this.dataList = res.data.data.records
+          this.page.total = res.data.data.total
           this.loading = false
+        })
       },
     }
   }

+ 25 - 7
src/views/financialManagement/receiptDetailsPage.vue

@@ -10,7 +10,7 @@
                    @click.stop="addMainProject">复制新单
         </el-button>
         <el-button class="el-button--small-yh add-customer-btn" type="primary"
-                   @click.stop="editMainProject"
+                   @click.stop="editFinance "
         >{{this.id?"确认修改" :"确认新增"}}
         </el-button>
       </div>
@@ -42,8 +42,7 @@
                    @selection-change="selectionChange"
                    @current-change="currentChange"
                    @size-change="sizeChange"
-                   @refresh-change="refreshChange"
-                   @on-load="onLoad">
+                   @refresh-change="refreshChange">
           <template slot="menuLeft">
             <el-button type="primary"
                        size="small"
@@ -88,13 +87,14 @@
 
 <script>
   import option from "./configuration/detailsPage.json";
+  import { getDetail,editFinance } from "@/api/financialManagement/financialManagement"
 
   export default {
     data() {
       return {
         form: {},
         option: option,
-        parentId:0,
+        id:'',
         dataList: [],
         page: {
           pageSize: 10,
@@ -268,7 +268,13 @@
       }
     },
     created() {
-
+      if (this.$route.query.id) {
+        this.id = BigInt(this.$route.query.id);//字符串转数字  超长用BigInt
+        getDetail(this.id).then(res => {
+          this.form = res.data.data;
+          // dataList
+        })
+      }
     },
     mounted() {
       option.height = window.innerHeight - 640 ;
@@ -289,8 +295,20 @@
       refreshChange() {
         console.log('1')
       },
-      onLoad(page, params = {}) {
-        this.page.total = 1;
+      editFinance(){
+        this.$refs["form"].validate((valid) => {
+          if(valid){
+            const params = {
+              ...this.form,
+              billType:"收费"
+            }
+            editFinance(params).then(res =>{
+              if(res.data.success){
+                this.$message.success("操作成功!")
+              }
+            })
+          }
+        })
       },
       backToList(){
         this.$router.$avueRouter.closeTag();

+ 5 - 1
src/views/purchase/contract/detailsPage.vue

@@ -46,6 +46,7 @@
             :data="contactsData"
             ref="crudContact"
             @row-save="rowSave"
+            @selection-change="selectionContact"
             @row-click="handleRowClick"
             @row-update="rowUpdate"
             @row-del="rowDel"
@@ -78,6 +79,7 @@
               </el-button>
               <el-button type="primary"
                          size="small"
+
                          @click=""
               >收货单
               </el-button>
@@ -585,7 +587,6 @@ export default {
       let id = this.$route.query.id.replace(/\"/g, "")
       detailListData(id).then(res => {
         this.form = res.data.data;
-        console.log(res)
         if(res.data.data.itemsVOList){
           this.contactsData = res.data.data.itemsVOList
         }
@@ -623,6 +624,9 @@ export default {
         }
       });
     },
+    selectionContact(row){
+      this.selectcontact = row;
+    },
     //新增商品明细保存触发
     rowSave(row, done, loading) {
       // this.contactsData.push(row)

+ 12 - 0
src/views/purchase/contract/index.vue

@@ -33,6 +33,18 @@
           <el-table-column  label="是否到货" prop="isArrival" align="center" show-overflow-tooltip width="200"></el-table-column>
         </el-table>
       </template>
+      <template slot="menuLeft">
+        <el-button size="small"
+                   type="success"
+                   @click.stop=""
+        >复制新单
+        </el-button>
+        <el-button size="small"
+                   type="info"
+                   @click.stop="openReport()"
+        >报表
+        </el-button>
+      </template>
       <template slot-scope="scope" slot="menu">
         <el-button
           type="text"

+ 2 - 2
vue.config.js

@@ -27,9 +27,9 @@ module.exports = {
       '/api': {
         //本地服务接口地址
         // target: 'http://192.168.1.177:1080',
-        target: 'http://192.168.1.151:1080',
+        // target: 'http://192.168.1.151:1080',
         // 打包地址.
-        // target: 'http://121.37.83.47:10004',//服务器ip
+        target: 'http://121.37.83.47:10004',//服务器ip
         // target: 'http://trade.tubaosoft.com:10004',//服务器域名
         ws: true,
         pathRewrite: {