瀏覽代碼

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan 3 年之前
父節點
當前提交
44525d8add

+ 2 - 0
src/lang/zh.js

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

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

@@ -42,7 +42,13 @@ import {
     API_POST_STORAGEFEERECORDCHARGE,
     API_GET_FEERECORD,
     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'
 // 列表
 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 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
       }
     },
+    // 现货采购合同费用
+    {
+            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',
@@ -137,7 +152,22 @@ const contractManagementRouter = {
       },
       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',

+ 27 - 8
src/views/contractManagement/purchaseContract.vue

@@ -73,7 +73,7 @@
       </el-table-column>
       <el-table-column width='150' prop="status" label="状态">
         <template slot-scope="scope">
-          <div v-if="scope.row.status != '执行中'&&scope.row.status != '发运结束'&&scope.row.status !='已驳回'">
+          <div v-if="scope.row.status != '执行中'&&scope.row.status != '发运结束'">
             <!-- <span v-if="scope.row.approveStatus">{{
               scope.row.approveStatus
             }}</span> -->
@@ -122,9 +122,6 @@
               style="vertical-align: text-top; position: relative; top: -1px;" src="../../../public/img/edit.png"
               @click="editClick(scope.row)" alt="" /> -->
           </div>
-          <div v-else-if="scope.row.status == '已驳回'">
-            已驳回
-          </div>
           <div v-else>
             <!-- {{scope.row.status}} -->
             <el-select v-model="scope.row.status" placeholder="" class="statusselect"
@@ -159,8 +156,18 @@
           </span>
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="140">
+      <el-table-column prop="address" label="操作" width="160">
         <template slot-scope="scope">
+           <img width="16" height="17" style="
+                vertical-align: text-top;
+                position: relative;
+                top: -1px;
+                margin: 0 6px;
+              "  src="../../../public/img/daichu.png"
+               v-hasPermission="
+              `contractManagement.nonContract.nonContractInfo.view`"
+             @click="handlecost(scope.row)" alt="" />
+             
           <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
             src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
               `contractManagement.buyContract.buyContractInfo.view`
@@ -186,7 +193,7 @@
         </template>
       </el-table-column>
     </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">
     </el-pagination>
 
@@ -205,6 +212,7 @@
     billoperatehis,
     deletecontract,
     editInfo,
+    
   } from '@/model/contarct/index'
   import {
     downloadFile
@@ -241,8 +249,8 @@
         tableDate: [],
         size: 10,
         statusList:[{
-          value:'发运结束',
-        },{value:'已完成',}],
+          value:'已完成',
+        },{value:'发运结束',}],
         // 是否显示
         showType: true,
         // 年
@@ -348,6 +356,17 @@
       this.showType = this.isShow
     },
     methods: {
+      handlecost(row){
+         this.$router.push({
+          name: 'buyContractcost',
+          query: {
+            id: row.id,
+            contractNo: row.contractNo,
+            status:row.status,
+            seller:row.seller
+          },
+        })
+      },
       onChange() {
         this.$refs.upload
           .handleSaveBill()

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

@@ -1,10 +1,10 @@
 <template>
   <div class="container">
     <el-row>
-      <el-col :span="12">
+      <el-col :span="12"  class="bg">
         <h2 class="bg-left title">创建采购合同</h2>
       </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"
             style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
@@ -13,9 +13,22 @@
     <ws-form ref="deptBudgetList" :rules="rules" :model="deptBudgetList">
       <div class="remark">
         <h3>基本信息</h3>
+        <el-row>
+        <el-col :span="12">
         <p style="color: #8890b1">
           注:基本信息和货物信息均为必填项,“<span style="color:red">*</span>” 标记的条目提交后不可修改。
         </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>
       <ws-info-table>
         <!--合同类型-->
@@ -395,10 +408,11 @@
     delxiala,
     getstafffind,
     getRelationContractNo,
-    getcustomerinfo
+    getcustomerinfo,
+    examineList
   } from '@/model/contarct/index'
   import {
-    getstaff,
+    getstaff,xialaNo,
   } from '@/model/warehouse/index'
   import {
     regionData,
@@ -437,6 +451,8 @@ import { isUndefined } from 'xe-utils/methods'
         customerinfo:[],
         type: '',
         dialogVisible: false,
+        contractNo:'',
+        outContractNo:[],
         //弹出框
         dialogViewSpareMoney: false,
         dialogApproveFormVisible: false,
@@ -569,6 +585,50 @@ import { isUndefined } from 'xe-utils/methods'
       if (!this.restaurants4) this.restaurants4 = [];
     },
     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) {
         if (e == '随行就市') {
           this.deptBudgetList.deliverType = '1'
@@ -758,6 +818,15 @@ import { isUndefined } from 'xe-utils/methods'
         })
       },
       loaddata() {
+        // 合同编号
+        xialaNo({
+            compId: localStorage.getItem('ws-pf_compId'),
+            flag: 0,
+          })
+          .toPromise()
+         .then((response) => {
+            this.outContractNo = response
+          })
         // 包装方式
         packList({
             constId: 'CON1'
@@ -1721,7 +1790,7 @@ import { isUndefined } from 'xe-utils/methods'
     border-color: #5878e8;
   }
 
-  .el-col {
+  .bg {
     background: #f6f7fc;
   }
 

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

@@ -161,8 +161,16 @@
           <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
         </template>
       </el-table-column>
-      <el-table-column prop="address" label="操作" width="140">
+      <el-table-column prop="address" label="操作" width="160">
         <template slot-scope="scope">
+          <img width="16" height="17" style="
+                vertical-align: text-top;
+                position: relative;
+                top: -1px;
+                margin: 0 6px; " 
+               v-hasPermission="
+              `contractManagement.nonContract.nonContractInfo.view`" src="../../../public/img/daichu.png"
+             @click="handlecost(scope.row)" alt="" />
           <img width="16" height="16" style="vertical-align: text-top; margin: 0 6px"
             src="../../../public/img/chakan.png" @click="handleExamine(scope.row)" v-hasPermission="
               `contractManagement.salesContract.salesContractInfo.view`
@@ -189,7 +197,7 @@
         </template>
       </el-table-column>
     </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">
     </el-pagination>
     <WinseaContentModal v-model="accessoryTFs" :title="$t('system.noticeCircular.information')"
@@ -361,6 +369,17 @@
       this.showType = this.isShow
     },
     methods: {
+      handlecost(row){
+         this.$router.push({
+          name: 'salesContractcost',
+          query: {
+            id: row.id,
+            contractNo: row.contractNo,
+            status:row.status,
+            buger:row.buger
+          },
+        })
+      },
       selectstatuschange(e,row){
         var data={}
         if(e=='发运结束'){

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

@@ -1,10 +1,10 @@
 <template>
   <div class="container">
     <el-row>
-      <el-col :span="12">
+      <el-col :span="12" class='bg'>
         <h2 class="bg-left title">创建销售合同</h2>
       </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"
             style="vertion-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
         </el-button>
@@ -1616,7 +1616,7 @@
     margin-top: 10px;
   }
 
-  .el-col {
+  .bg {
     background: #f6f7fc;
   }