Selaa lähdekoodia

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

ccj 2 vuotta sitten
vanhempi
commit
8f919403e4

+ 2 - 2
package.json

@@ -51,9 +51,9 @@
     "base-core-lib": "^1.3.16",
     "base-core-lib": "^1.3.16",
     "base-template-lib": "^1.0.7-beta",
     "base-template-lib": "^1.0.7-beta",
     "countup": "^1.8.2",
     "countup": "^1.8.2",
-    "echarts": "4.2.1",
+    "echarts": "^4.2.1",
     "element-china-area-data": "^5.0.2",
     "element-china-area-data": "^5.0.2",
-    "element-ui": "^2.13.2",
+    "element-ui": "^2.15.9",
     "file-saver": "^2.0.5",
     "file-saver": "^2.0.5",
     "form-making-advanced": "^1.2.6",
     "form-making-advanced": "^1.2.6",
     "html2canvas": "^1.3.2",
     "html2canvas": "^1.3.2",

+ 2 - 0
src/api/V2/warehouse/index.js

@@ -120,3 +120,5 @@ export const API_SET_PAYMONEY = 'warehousingOrder/api/payMoney'
 // export const API_GET_EXPENSEINFO = '/expenseInfo/selectInfo'z
 // export const API_GET_EXPENSEINFO = '/expenseInfo/selectInfo'z
 //审核
 //审核
 export const API_WORKFLOWHANDLE ='/newWorkflow/api/handle'
 export const API_WORKFLOWHANDLE ='/newWorkflow/api/handle'
+//查看可分配金额
+export const API_GET_EXPENSE='/expenseAllocationInfo/getExpenseAllocationInfo'

+ 1 - 1
src/lang/zh.js

@@ -1068,7 +1068,7 @@ export default {
     warehouseprofitsdetails:'库点利润  /  利润详情',
     warehouseprofitsdetails:'库点利润  /  利润详情',
     expensemanagementdetails:'费用管理  /  费用详情',
     expensemanagementdetails:'费用管理  /  费用详情',
     contractinventory:'合同利润  /  利润详情  /  库存',
     contractinventory:'合同利润  /  利润详情  /  库存',
-    warehouseinventory:'合同利润  /  利润详情  /  库存',
+    warehouseinventory:'库点利润  /  利润详情  /  库存',
     warehousecost:'库点利润  /  利润详情  /  费用',
     warehousecost:'库点利润  /  利润详情  /  费用',
     contractcost:'合同利润  /  利润详情  /  费用',
     contractcost:'合同利润  /  利润详情  /  费用',
     cashout:'费用管理  /  费用详情  /  请款',
     cashout:'费用管理  /  费用详情  /  请款',

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

@@ -58,7 +58,8 @@ import {
     API_GET_WAREHOUSINGORDER,
     API_GET_WAREHOUSINGORDER,
     API_EDIT_WAREHOUSINGORDER,
     API_EDIT_WAREHOUSINGORDER,
     API_SET_PAYMONEY,
     API_SET_PAYMONEY,
-    API_WORKFLOWHANDLE
+    API_WORKFLOWHANDLE,
+    API_GET_EXPENSE
     // API_GET_EXPENSEINFO
     // API_GET_EXPENSEINFO
 } from '@/api/V2/warehouse'
 } from '@/api/V2/warehouse'
 // import { app } from 'electron'
 // import { app } from 'electron'
@@ -178,4 +179,6 @@ export const paymoney = appRx.post(API_SET_PAYMONEY,errorCatcher, errorHandle, f
 //审核
 //审核
 export const workflowhandle = appRx.post(API_WORKFLOWHANDLE,errorCatcher, errorHandle, filter)
 export const workflowhandle = appRx.post(API_WORKFLOWHANDLE,errorCatcher, errorHandle, filter)
 // //费用详情
 // //费用详情
-// export const getexenseinfo = appRx.get(API_GET_EXPENSEINFO,errorCatcher, errorHandle, filter)
+// export const getexenseinfo = appRx.get(API_GET_EXPENSEINFO,errorCatcher, errorHandle, filter)
+//查看可分配金额
+export const getExpense = appRx.get(API_GET_EXPENSE,errorCatcher, errorHandle, filter)

+ 1 - 1
src/store/modules/permission.js

@@ -127,7 +127,7 @@ const actions = {
       .catch((err) => {
       .catch((err) => {
         clearStorage()
         clearStorage()
         resetRouter()
         resetRouter()
-        window.location.href="https://www.eliangeyun.com"
+        // window.location.href="https://www.eliangeyun.com"
       })
       })
         
         
       const roles = [];
       const roles = [];

+ 1 - 1
src/views/houseSelfCollect/inspectionManagementrecord.vue

@@ -17,7 +17,7 @@
       </template>
       </template>
       <template slot="right">
       <template slot="right">
         <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
         <ws-select v-model="warehouseName" placeholder="" @change="warehouseNameChange" :value="searchType"
-          style="margin: 0 10px">
+          style="width: 50%">
           <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
           <ws-option v-for="item in warehouseList" :key="item.value" :label="item.value" :value="item.value"
             style="color: #8890b1" />
             style="color: #8890b1" />
         </ws-select>
         </ws-select>

+ 4 - 4
src/views/houseSelfCollect/newWeighingManagement.vue

@@ -92,16 +92,16 @@
                     disabled />
                     disabled />
                 </ws-form-item>
                 </ws-form-item>
                 <ws-form-item label="箱号-1" span="1" prop="boxNo">
                 <ws-form-item label="箱号-1" span="1" prop="boxNo">
-                  <ws-input  v-model="weighingList.boxNo" placeholder="暂无" maxlength="20" size="small" />
+                  <ws-input  v-model="weighingList.boxNo" placeholder="自动获取,不可编辑" maxlength="20" size="small" disabled/>
                 </ws-form-item>
                 </ws-form-item>
                 <ws-form-item label="封号-1" span="1" prop="titleNo">
                 <ws-form-item label="封号-1" span="1" prop="titleNo">
-                  <ws-input  v-model="weighingList.titleNo" placeholder="暂无" maxlength="20" size="small" />
+                  <ws-input  v-model="weighingList.titleNo" placeholder="自动获取,不可编辑" maxlength="20" size="small" disabled/>
                 </ws-form-item>
                 </ws-form-item>
                 <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
                 <ws-form-item label="箱号-2" span="1" prop="boxNoOther">
-                  <ws-input  v-model="weighingList.boxNoOther" placeholder="暂无" maxlength="20" size="small" />
+                  <ws-input  v-model="weighingList.boxNoOther" placeholder="自动获取,不可编辑" maxlength="20" size="small" disabled/>
                 </ws-form-item>
                 </ws-form-item>
                 <ws-form-item label="封号-2" span="1" prop="titleNoOther">
                 <ws-form-item label="封号-2" span="1" prop="titleNoOther">
-                  <ws-input  v-model="weighingList.titleNoOther" placeholder="暂无" maxlength="20" size="small" />
+                  <ws-input  v-model="weighingList.titleNoOther" placeholder="自动获取,不可编辑" maxlength="20" size="small" disabled  />
                 </ws-form-item>
                 </ws-form-item>
                 <ws-form-item label="毛重(KG)" span="1" prop="grossWeight">
                 <ws-form-item label="毛重(KG)" span="1" prop="grossWeight">
                   <ws-input type="number" @mousewheel.native.prevent v-if="index == 0"
                   <ws-input type="number" @mousewheel.native.prevent v-if="index == 0"

+ 3 - 2
src/views/outboundManagement/weighingManagementNew.vue

@@ -125,8 +125,9 @@
                           maxlength="10" size="small" />
                           maxlength="10" size="small" />
                       </ws-form-item>
                       </ws-form-item>
                       <ws-form-item v-if="tpyeNo == 1" label="出库类型" span="1">
                       <ws-form-item v-if="tpyeNo == 1" label="出库类型" span="1">
-                        <ws-input v-model="weighingList.inOutType" class="right-bottom" :disabled="isSelectType"
-                          placeholder="暂无" />
+                        <ws-input v-model="weighingList.inOutType" class="right-bottom" disabled
+                          placeholder="自动获取,不可编辑" />
+                          <!-- :disabled="isSelectType" -->
                       </ws-form-item>
                       </ws-form-item>
                       <ws-form-item v-if="tpyeNo == 1" label="出库日期" span="1" prop="inOutDate" class="deliverydate">
                       <ws-form-item v-if="tpyeNo == 1" label="出库日期" span="1" prop="inOutDate" class="deliverydate">
                         <ws-date-picker v-model="weighingList.inOutDate" type="date" placeholder="请选择出库日期"
                         <ws-date-picker v-model="weighingList.inOutDate" type="date" placeholder="请选择出库日期"

+ 2 - 1
src/views/profitable/warehouseinventory.vue

@@ -71,6 +71,7 @@
         expenseIncome:0,
         expenseIncome:0,
         expensesPay:0,
         expensesPay:0,
         currentProfit:0,
         currentProfit:0,
+        warehouseName:'',
       }
       }
     },
     },
     activated() {
     activated() {
@@ -126,7 +127,7 @@
          getinventoryinfo({
          getinventoryinfo({
             compId: localStorage.getItem('ws-pf_compId'),
             compId: localStorage.getItem('ws-pf_compId'),
             currentPage: this.currentPage,
             currentPage: this.currentPage,
-            warehouseName:this.warehouseName,
+            warehouse:this.warehouseName,
             pageSize:this.pageSize ,
             pageSize:this.pageSize ,
             inventoryType:3,
             inventoryType:3,
           })
           })

+ 1 - 1
src/views/profitable/warehouseprofitsdetails.vue

@@ -19,7 +19,7 @@
             <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
             <el-date-picker value-format='yyyy-MM-dd' v-model="value" type="daterange" align="right" unlink-panels range-separator="至"
               start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
               start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" class="data_css" @change="changeDate" >
             </el-date-picker>
             </el-date-picker>
-            <el-input placeholder="可按仓库名称查找" class="input_css" v-model="searchKeyWord"></el-input>
+            <el-input placeholder="可按仓库名称查找" class="input_css" v-model="searchKeyWord" @keyup.enter.native="find()"></el-input>
             <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
             <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
                 src="../../../public/img/sousuo.png" alt="" /></el-button>
                 src="../../../public/img/sousuo.png" alt="" /></el-button>
           </div>
           </div>

+ 269 - 4
src/views/warehousenew/warehousingOrder.vue

@@ -17,7 +17,6 @@
               vertical-align: text-top;
               vertical-align: text-top;
               position: relative;
               position: relative;
               top: 0px;
               top: 0px;
-              left: -8px;
             " src="../../../public/img/sousuo.png" alt />
             " src="../../../public/img/sousuo.png" alt />
         </ws-button>
         </ws-button>
       </template>
       </template>
@@ -46,6 +45,8 @@
         <div>{{item.issuingTime}}</div>
         <div>{{item.issuingTime}}</div>
         <div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
         <div>{{item.warehouseName}}入库单<span v-if='item.warehouseType==2'>(临)</span></div>
         <div>
         <div>
+          <ws-button  type="primary" @click="distribution(item)" >预付款分配</ws-button>
+        <ws-button type="primary" @click="marginAllocation(item)">保证金分配</ws-button>
             <ws-button v-if='item.payshow' type="primary" @click="payout(item)" v-hasPermission="
             <ws-button v-if='item.payshow' type="primary" @click="payout(item)" v-hasPermission="
             `warehouseManagement.warehousingOrder.appl`
             `warehouseManagement.warehousingOrder.appl`
           ">请款
           ">请款
@@ -159,6 +160,110 @@
           <el-button @click="aduitshow = false">取消</el-button>
           <el-button @click="aduitshow = false">取消</el-button>
           <el-button type="primary" @click="paymentsubmit">确定</el-button>
           <el-button type="primary" @click="paymentsubmit">确定</el-button>
         </span>
         </span>
+      </el-dialog>
+            <el-dialog
+        title="预付款分配"
+        :visible.sync="distributionshow"
+        width="50%"
+        :before-close="handleClose1">
+        <div>
+           <!--插槽会替换title显示的内容 -->
+         <div slot="title" class="header-title">
+            <span v-show="dialogTitle" class="title-name">{{ dialogTitle }}</span>
+        </div>
+          <el-form ref="form" :model="form" label-width="120px">
+              <el-col class="col1">
+            <el-form-item label="累计预付(元)">
+              <el-input disabled v-model="form.accumulatedPrepayment"></el-input>
+            </el-form-item>
+              </el-col>
+               <el-col class="col1">
+             <el-form-item label="收回预付(元)">
+              <el-input disabled v-model="form.recoveryPrepayments"></el-input>
+            </el-form-item>
+             </el-col>
+             <el-col class="col1">
+            <el-form-item label="已分配(元)">
+              <el-input disabled v-model="form.distributionEd"></el-input>
+            </el-form-item>
+             </el-col>
+              <el-col class="col1">
+             <el-form-item label="可分配(元)">
+              <el-input disabled v-model="form.distributionCan"></el-input>
+            </el-form-item>
+              </el-col>
+              <el-row>
+               <el-col class="col1">
+            <el-form-item label="未付金额(元)">
+              <el-input disabled v-model="form.distributionNot"></el-input>
+            </el-form-item>
+               </el-col>
+              </el-row>
+              <el-row>
+             <el-form-item label="分配金额(元)">
+              <el-input  v-model="form.distributionIng"></el-input>
+            </el-form-item>
+              </el-row>
+
+
+          </el-form>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="distributionshow = false">取消</el-button>
+          <el-button type="primary" @click="distributionsubmit">确定</el-button>
+        </span>
+      </el-dialog>
+                  <el-dialog
+        title="保证金分配"
+        :visible.sync="marginshow"
+        width="50%"
+        :before-close="handleClose2">
+        <div>
+           <!--插槽会替换title显示的内容 -->
+         <div slot="title" class="header-title">
+            <span v-show="dialogTitle" class="title-name">{{ dialogTitle }}</span>
+        </div>
+          <el-form ref="form" :model="form" label-width="120px">
+              <el-col class="col1">
+            <el-form-item label="累计支付(元)">
+              <el-input disabled v-model="form.accumulatedPrepayment"></el-input>
+            </el-form-item>
+              </el-col>
+               <el-col class="col1">
+             <el-form-item label="累计收回(元)">
+              <el-input disabled v-model="form.recoveryPrepayments"></el-input>
+            </el-form-item>
+             </el-col>
+             <el-col class="col1">
+            <el-form-item label="已分配(元)">
+              <el-input disabled v-model="form.distributionEd"></el-input>
+            </el-form-item>
+             </el-col>
+              <el-col class="col1">
+             <el-form-item label="可分配(元)">
+              <el-input disabled v-model="form.distributionCan"></el-input>
+            </el-form-item>
+              </el-col>
+              <el-row>
+               <el-col class="col1">
+            <el-form-item label="未付金额(元)">
+              <el-input disabled v-model="form.distributionNot"></el-input>
+            </el-form-item>
+               </el-col>
+              </el-row>
+              <el-row>
+             <el-form-item label="分配金额(元)">
+              <el-input  v-model="form.distributionIng"></el-input>
+            </el-form-item>
+              </el-row>
+
+
+          </el-form>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="marginshow = false">取消</el-button>
+          <el-button type="primary" @click="marginsubmit">确定</el-button>
+        </span>
       </el-dialog>
       </el-dialog>
       <!-- <el-dialog
       <!-- <el-dialog
       title="提示"
       title="提示"
@@ -221,7 +326,7 @@
   getwarehousingorder,
   getwarehousingorder,
   paymoney,
   paymoney,
   editwarehousingorder,
   editwarehousingorder,
-  getexenseinfo,
+  getExpense,
   workflowhandle
   workflowhandle
 } from '@/model/warehouse/index'
 } from '@/model/warehouse/index'
   import {
   import {
@@ -258,7 +363,15 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         dataList:[],
         dataList:[],
         // 船舶类型
         // 船舶类型
         monetaryKey: null,
         monetaryKey: null,
-        form:{},
+        form:{
+          accumulatedPrepayment:'',
+          recoveryPrepayments:'',
+          distributionEd:'',
+          distributionCan:'',
+          distributionNot:'',
+          distributionIng:''
+
+        },
         // 表格显示数据
         // 表格显示数据
         tableDate: [],
         tableDate: [],
 
 
@@ -342,6 +455,8 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         money:0,
         money:0,
         multipleSelection1:{},
         multipleSelection1:{},
         aduitshow:false,
         aduitshow:false,
+        distributionshow:false,
+        marginshow:false,
         costlist:[],
         costlist:[],
         pickerBeginDateBefore: {
         pickerBeginDateBefore: {
           disabledDate: (time) => {
           disabledDate: (time) => {
@@ -350,6 +465,8 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         },
         },
         accessoryTFs: false,
         accessoryTFs: false,
         remarkList: false,
         remarkList: false,
+        dialogTitle:'',
+
         remark:''
         remark:''
       }
       }
     },
     },
@@ -463,6 +580,83 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
         }
         }
         
         
         
         
+      },
+      marginAllocation(item){
+        let _this= this
+        var arr1=this.multipleSelection1[item.id]
+        for (let i = 0; i < arr1.length; i++) {
+          if(arr1[i].amountNotPayable<0){
+            this.$message({
+              message: '请选择一条有未付金额的条目!',
+              type: 'warning'
+            });
+            return
+          }
+          if(!arr1[i].contractNo){
+            this.$message({
+              message: '请选择货源是采购合同的条目',
+              type: 'warning'
+            });
+            return
+          }
+          _this.dialogTitle=arr1[i].contractNo
+          getExpense({contractNo:arr1[i].contractNo,costType:5}).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.distributionNot=arr1[i].amountNotPayable
+          }).catch(() => {
+           this.$message({
+              message: '无可分配金额',
+              type: 'warning'
+            });
+            return
+          })
+        }
+        this.currectdata=item
+        this.marginshow=true
+      },
+      distribution(item){
+        let _this= this
+        var arr1=this.multipleSelection1[item.id]
+        for (let i = 0; i < arr1.length; i++) {
+          if(arr1[i].amountNotPayable<0){
+            this.$message({
+              message: '请选择一条有未付金额的条目!',
+              type: 'warning'
+            });
+            return
+          }
+          if(!arr1[i].contractNo){
+            this.$message({
+              message: '请选择货源是采购合同的条目',
+              type: 'warning'
+            });
+            return
+          }
+          _this.dialogTitle=arr1[i].contractNo
+          getExpense({contractNo:arr1[i].contractNo,costType:1}).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.distributionNot=arr1[i].amountNotPayable
+          }).catch(() => {
+           this.$message({
+              message: '无可分配金额',
+              type: 'warning'
+            });
+            return
+          })
+        }
+        this.currectdata=item
+
+        this.distributionshow=true
+
+       
       },
       },
       getNowTime() {
       getNowTime() {
       const start = new Date(new Date().getTime() - 3600 * 1000 * 24 )
       const start = new Date(new Date().getTime() - 3600 * 1000 * 24 )
@@ -624,6 +818,68 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             });
             });
           })
           })
       },
       },
+      marginsubmit(item){
+        var arr2=this.multipleSelection1[this.currectdata.id]
+          if(this.form.distributionIng>this.form.distributionCan){
+            this.$message({
+              message: '超出可分配金额',
+              type: 'warning'
+            });
+            return
+          }
+          if(this.form.distributionIng>this.form.distributionNot){
+            this.$message({
+              message: '超出未付金额',
+              type: 'warning'
+            });
+            return
+          }
+          paymoney({flag:3,money:this.form.distributionIng,warehousingOrderList:arr2}).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '分配成功',
+              type: 'success'
+            });
+            this.marginshow=false
+            this.getList()
+          }).catch(() => {
+           this.$message({
+              message: '分配失败',
+              type: 'warning'
+            });
+          })
+      },
+      distributionsubmit(item){
+        var arr2=this.multipleSelection1[this.currectdata.id]
+          if(this.form.distributionIng>this.form.distributionCan){
+            this.$message({
+              message: '超出可分配金额',
+              type: 'warning'
+            });
+            return
+          }
+          if(this.form.distributionIng>this.form.distributionNot){
+            this.$message({
+              message: '超出未付金额',
+              type: 'warning'
+            });
+            return
+          }
+          paymoney({flag:2,money:this.form.distributionIng,warehousingOrderList:arr2}).toPromise()
+          .then((response) => {
+            this.$message({
+              message: '分配成功',
+              type: 'success'
+            });
+            this.distributionshow=false
+            this.getList()
+          }).catch(() => {
+           this.$message({
+              message: '分配失败',
+              type: 'warning'
+            });
+          })
+      },
       payment(item){
       payment(item){
         if(localStorage.getItem('ws-pf_roleName')=='出纳'){
         if(localStorage.getItem('ws-pf_roleName')=='出纳'){
           this.money=0
           this.money=0
@@ -798,7 +1054,7 @@ import { findLastIndexOfIterate } from 'xe-utils/methods'
             this.gainList = response.records
             this.gainList = response.records
             // this.currentPage = response.current
             // this.currentPage = response.current
             // this.pageSize = response.size
             // this.pageSize = response.size
-            // console.log(arr)
+            console.log(this.gainList,96)
             this.deptBudgetTotal = response.total
             this.deptBudgetTotal = response.total
           })
           })
       },
       },
@@ -919,6 +1175,12 @@ multiFilter(array, filters) {
       handleClose() {
       handleClose() {
         this.aduitshow = false
         this.aduitshow = false
       },
       },
+      handleClose1() {
+        this.distributionshow = false
+      },
+      handleClose2() {
+        this.marginshow = false
+      },
       handleSizeChange(val) {
       handleSizeChange(val) {
         console.log(`每页 ${val} 条`)
         console.log(`每页 ${val} 条`)
         this.pageSize = val
         this.pageSize = val
@@ -1008,6 +1270,9 @@ multiFilter(array, filters) {
     width: 30%;
     width: 30%;
     margin-right: 10px;
     margin-right: 10px;
   }
   }
+  .col1 {
+    width: 50%;
+  }
 .audit {
 .audit {
     margin-bottom: 20px;
     margin-bottom: 20px;
     border-bottom: 1px solid #AFB3BF;
     border-bottom: 1px solid #AFB3BF;