gjy 3 years ago
parent
commit
570b59431e

+ 2 - 0
src/lang/zh.js

@@ -485,6 +485,7 @@ export default {
     collectionContract: '代收合同',
     collectionContract: '代收合同',
     storageContract:'代储合同',
     storageContract:'代储合同',
     purchaseContractAdd: '现货采购合同  /  添加',
     purchaseContractAdd: '现货采购合同  /  添加',
+    purchaseContractcost:'现货采购合同  /  费用',
     collectionContractAdd: '代收合同  /  添加',
     collectionContractAdd: '代收合同  /  添加',
     storageContractAdd:'代储合同  /  添加',
     storageContractAdd:'代储合同  /  添加',
     purchaseContractEdit: '现货采购合同  /  编辑',
     purchaseContractEdit: '现货采购合同  /  编辑',
@@ -497,6 +498,7 @@ export default {
     purchaseContractExamine: '现货采购合同  /  查看',
     purchaseContractExamine: '现货采购合同  /  查看',
     salesContract: '现货销售合同',
     salesContract: '现货销售合同',
     salesContractEdit: '现货销售合同  /  编辑',
     salesContractEdit: '现货销售合同  /  编辑',
+    salesContractcost: '现货销售合同  /  费用',
     salesContractExamine: '现货销售合同  /  查看',
     salesContractExamine: '现货销售合同  /  查看',
     salesContractAudit: '现货销售合同  /  审核',
     salesContractAudit: '现货销售合同  /  审核',
     salesContractAdd: '现货销售合同  /  添加',
     salesContractAdd: '现货销售合同  /  添加',

+ 19 - 1
src/model/contarct/index.js

@@ -42,7 +42,13 @@ import {
     API_POST_STORAGEFEERECORDCHARGE,
     API_POST_STORAGEFEERECORDCHARGE,
     API_GET_FEERECORD,
     API_GET_FEERECORD,
     API_POST_STOP,
     API_POST_STOP,
-    API_POST_STORAGEFEERECORDEXPORT
+    API_POST_STORAGEFEERECORDEXPORT,
+    API_CONTRACTCOST,
+    API_GET_CONTRACT,
+    API_ADD_CONTRACT,
+    API_EDIT_CONTRACT,
+    API_DELETE_CONTRACT,
+    API_PAYMENT
 } from '@/api/V2/contract'
 } from '@/api/V2/contract'
 // 列表
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -144,3 +150,15 @@ export const stopStorageFeeRecord = appRx.post(API_POST_STOP, errorCatcher, erro
 
 
 // 代储费导出
 // 代储费导出
 export const exportStorageFee = appRx.post(API_POST_STORAGEFEERECORDEXPORT)
 export const exportStorageFee = appRx.post(API_POST_STORAGEFEERECORDEXPORT)
+// 合同费用列表
+export const contractcost = appRx.get(API_CONTRACTCOST, errorCatcher, errorHandle, filter)
+// 合同编号
+export const getcontract = appRx.get(API_GET_CONTRACT, errorCatcher, errorHandle, filter)
+// 请款收款
+export const addcontractcost = appRx.post(API_ADD_CONTRACT, errorCatcher, errorHandle, filter)
+// 编辑请款收款
+export const editcontractcost = appRx.post(API_EDIT_CONTRACT, errorCatcher, errorHandle, filter)
+// 删除请款收款
+export const delcontractcost = appRx.post(API_DELETE_CONTRACT, errorCatcher, errorHandle, filter)
+// 付款
+export const payment = appRx.post(API_PAYMENT, errorCatcher, errorHandle, filter)

+ 31 - 1
src/views/contractManagement/component/routers/route.js

@@ -26,6 +26,21 @@ const contractManagementRouter = {
         keepAlive: true
         keepAlive: true
       }
       }
     },
     },
+    // 现货采购合同费用
+    {
+            path: 'buyContractcost',
+            component: () =>
+              import(/* webpackChunkName: "sparepartList" */ '@/views/contractManagement/purchaseContractCost'),
+            name: 'buyContractcost',
+            meta: {
+              title: 'purchaseContractcost',
+              shortcutEntrance: 'contractManagement',
+              module: 'contractManagement.buyContract',
+              permissicon: [],
+              keepAlive: true
+            },
+            hidden: true
+    },
     //现货采购合同查看
     //现货采购合同查看
     {
     {
       path: 'purchaseContractExamine',
       path: 'purchaseContractExamine',
@@ -137,7 +152,22 @@ const contractManagementRouter = {
       },
       },
       hidden: true
       hidden: true
     },
     },
-
+     //现货销售合同费用
+     {
+        path: 'salesContractcost',
+        component: () =>
+          import(/* webpackChunkName: "applDetail" */ '@/views/contractManagement/salesContractCost'),
+        name: 'salesContractcost',
+       meta: {
+         title: 'salesContractcost',
+         shortcutEntrance: 'contractManagement',
+         module: 'contractManagement.salesContract',
+         permissicon: [],
+         keepAlive: true
+        // module: 'procurement.sparepart.applDetail'
+      },
+       hidden: true
+    },
     //现货销售合同
     //现货销售合同
     {
     {
       path: 'salesContract',
       path: 'salesContract',

+ 2 - 2
src/views/contractManagement/purchaseContract.vue

@@ -156,7 +156,7 @@
           </span>
           </span>
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="140">
+      <el-table-column prop="address" label="操作" width="160">
         <template slot-scope="scope">
         <template slot-scope="scope">
            <img width="16" height="17" style="
            <img width="16" height="17" style="
                 vertical-align: text-top;
                 vertical-align: text-top;
@@ -193,7 +193,7 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+    <el-pagination  :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
       :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
       :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
     </el-pagination>
     </el-pagination>
 
 

+ 74 - 5
src/views/contractManagement/purchaseContractAdd.vue

@@ -1,10 +1,10 @@
 <template>
 <template>
   <div class="container">
   <div class="container">
     <el-row>
     <el-row>
-      <el-col :span="12">
+      <el-col :span="12"  class="bg">
         <h2 class="bg-left title">创建采购合同</h2>
         <h2 class="bg-left title">创建采购合同</h2>
       </el-col>
       </el-col>
-      <el-col :span="12" class="bg-right">
+      <el-col :span="12" class="bg-right bg">
         <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
         <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
             style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
             style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
         </el-button>
@@ -13,9 +13,22 @@
     <ws-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList">
     <ws-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList">
       <div class="remark">
       <div class="remark">
         <h3>基本信息</h3>
         <h3>基本信息</h3>
+        <el-row>
+        <el-col :span="12">
         <p style="color: #8890b1">
         <p style="color: #8890b1">
           注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>” 标记的条目提交后不可修改。
           注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>” 标记的条目提交后不可修改。
         </p>
         </p>
+        </el-col>
+      <el-col :span="12" style='text-align:right;'>
+        <el-select v-model="contractNo" placeholder="请选择要复制的合同" class="typeselect" filterable clearable
+              @change="copySelect">
+              <el-option v-for="(item,index) in outContractNo" :key="'hetong'+index" :label="item.contractNo"
+                :value="item.contractNo" />
+            </el-select>
+            <el-button class="bg-bottom" type="primary" size="small" @click="cancelcopy()">取消复制
+       </el-button>
+         </el-col>
+    </el-row>
       </div>
       </div>
       <ws-info-table>
       <ws-info-table>
         <!--合同类型-->
         <!--合同类型-->
@@ -395,10 +408,11 @@
     delxiala,
     delxiala,
     getstafffind,
     getstafffind,
     getRelationContractNo,
     getRelationContractNo,
-    getcustomerinfo
+    getcustomerinfo,
+    examineList
   } from '@/model/contarct/index'
   } from '@/model/contarct/index'
   import {
   import {
-    getstaff,
+    getstaff,xialaNo,
   } from '@/model/warehouse/index'
   } from '@/model/warehouse/index'
   import {
   import {
     regionData,
     regionData,
@@ -437,6 +451,8 @@ import { isUndefined } from 'xe-utils/methods'
         customerinfo:[],
         customerinfo:[],
         type: '',
         type: '',
         dialogVisible: false,
         dialogVisible: false,
+        contractNo:'',
+        outContractNo:[],
         //弹出框
         //弹出框
         dialogViewSpareMoney: false,
         dialogViewSpareMoney: false,
         dialogApproveFormVisible: false,
         dialogApproveFormVisible: false,
@@ -569,6 +585,50 @@ import { isUndefined } from 'xe-utils/methods'
       if (!this.restaurants4) this.restaurants4 = [];
       if (!this.restaurants4) this.restaurants4 = [];
     },
     },
     methods: {
     methods: {
+      copySelect(e){
+        for (let i = 0; i < this.outContractNo.length; i++) {
+          if(this.outContractNo[i].contractNo==e){
+            examineList({
+            id: this.outContractNo[i].id
+          })
+          .toPromise()
+          .then((response) => {
+            this.deptBudgetList = response
+            if(this.deptBudgetList.personPhone){
+              this.deptBudgetList.personPhone=this.deptBudgetList.personPhone.split(',')
+            }
+            
+            if (this.deptBudgetList.deliverType == 1) {
+              this.deptBudgetList.deliverType1 = '我方自提'
+            } else if (this.deptBudgetList.deliverType == 2) {
+              this.deptBudgetList.deliverType1 = '对方送货'
+            }
+          })
+          }
+          
+        }
+      },
+      cancelcopy(){
+        this.contractNo=''
+        this.deptBudgetList={
+          deliverType: '1',
+          sourceGoods:'',
+          placeDelivery:'',
+          agreementType: '采购合同',
+          addressUrl: '',
+          sellerPhone:'',
+          personPhone:'',
+          personCharge:'',
+          personChargeKey:'',
+          finalTradingVolume: 0,
+          totalContractPrice: 0,
+          contractGoodsInfo: {
+            goodsName: '',
+          },
+          contractProcessInfo: {},
+          settlementWeightMethod: '1',
+        }
+      },
       selectpriceType(e) {
       selectpriceType(e) {
         if (e == '随行就市') {
         if (e == '随行就市') {
           this.deptBudgetList.deliverType = '1'
           this.deptBudgetList.deliverType = '1'
@@ -758,6 +818,15 @@ import { isUndefined } from 'xe-utils/methods'
         })
         })
       },
       },
       loaddata() {
       loaddata() {
+        // 合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 0,
+          })
+          .toPromise()
+         .then((response) => {
+            this.outContractNo = response
+          })
         // 包装方式
         // 包装方式
         packList({
         packList({
             constId: 'CON1'
             constId: 'CON1'
@@ -1721,7 +1790,7 @@ import { isUndefined } from 'xe-utils/methods'
     border-color: #5878e8;
     border-color: #5878e8;
   }
   }
 
 
-  .el-col {
+  .bg {
     background: #f6f7fc;
     background: #f6f7fc;
   }
   }
 
 

+ 2 - 2
src/views/contractManagement/salesContract.vue

@@ -161,7 +161,7 @@
           <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
           <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
         </template>
         </template>
       </el-table-column>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="140">
+      <el-table-column prop="address" label="操作" width="160">
         <template slot-scope="scope">
         <template slot-scope="scope">
           <img width="16" height="17" style="
           <img width="16" height="17" style="
                 vertical-align: text-top;
                 vertical-align: text-top;
@@ -197,7 +197,7 @@
         </template>
         </template>
       </el-table-column>
       </el-table-column>
     </el-table>
     </el-table>
-    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+    <el-pagination  :page-sizes="[10, 30, 50, 100, 500, 1000, 9999]" @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
       :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
       :page-size="deptCircularPage.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
     </el-pagination>
     </el-pagination>
     <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
     <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"

+ 3 - 3
src/views/contractManagement/salesContractAdd.vue

@@ -1,10 +1,10 @@
 <template>
 <template>
   <div class="container">
   <div class="container">
     <el-row>
     <el-row>
-      <el-col :span="12">
+      <el-col :span="12" class='bg'>
         <h2 class="bg-left title">创建销售合同</h2>
         <h2 class="bg-left title">创建销售合同</h2>
       </el-col>
       </el-col>
-      <el-col :span="12" class="bg-right">
+      <el-col :span="12" class="bg-right bg">
         <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
         <el-button class="bg-bottom" type="primary" size="small" @click="returnsales()"><img width="6" height="10"
             style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
             style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
         </el-button>
@@ -1616,7 +1616,7 @@
     margin-top: 10px;
     margin-top: 10px;
   }
   }
 
 
-  .el-col {
+  .bg {
     background: #f6f7fc;
     background: #f6f7fc;
   }
   }