gjy 1 rok temu
rodzic
commit
97e7800b95

+ 1 - 0
src/views/houseSelfCollect/paymentManagement.vue

@@ -971,6 +971,7 @@
               obj.netWeight = v.净重
               obj.dryGrainPrice = v.单价
               obj.money = v.粮款
+              console.log(v.日期)
               obj.qualityDate = _this.formatDate(v.日期, '-')
               obj.deductionAmount = v.扣款
               obj.goodsName = v.货名

+ 5 - 1
src/views/taskManagement/supplyofgoods.vue

@@ -66,7 +66,11 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="contractNo" label="合同编号" width="160"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="160">
+          <template scope="scope">
+            <span >{{ scope.row.contractNo}}({{ scope.row.inType }})</span>
+          </template>
+        </el-table-column>
         <el-table-column prop="pointOut" label="合同提示" width="160"></el-table-column>
         <!-- <el-table-column prop="goodsSource" label="货源" width="160"></el-table-column> -->
         <el-table-column prop="goodsName" label="货名" width="160">

+ 5 - 1
src/views/taskManagement/supplyofgoodslook.vue

@@ -24,7 +24,11 @@
             <span v-else>{{ scope.$index + 1 }}</span>
           </template>
         </el-table-column>
-        <el-table-column prop="contractNo" label="合同编号" width="160"></el-table-column>
+        <el-table-column prop="contractNo" label="合同编号" width="160">
+          <template scope="scope">
+            <span >{{ scope.row.contractNo}}({{ scope.row.inType }})</span>
+          </template>
+        </el-table-column>
         <el-table-column prop="pointOut" label="合同提示" width="160"></el-table-column>
         <el-table-column prop="goodsSource" label="货源" width="160"></el-table-column>
         <el-table-column prop="goodsName" label="货名" width="160">

+ 17 - 1
src/views/warehousenew/gooddetail.vue

@@ -12,6 +12,11 @@
               <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" >
             </el-date-picker></div>
+            <el-select style="margin-left:10px;" v-model="agent" multiple filterable allow-create default-first-option placeholder="按经办人筛选"
+              clearable @change="getList1" class="options_css">
+              <el-option v-for="item in personList" :key="item.id" :label="item.agent" :value="item.agent">
+              </el-option>
+            </el-select>
             <el-input placeholder="可按业务编号、合同编号、客户查找" class="input_css" v-model="searchKeyWord"></el-input>
             <el-button class="find" type="primary" @click="find()"><img width="16" height="16" style="left: -8px;"
                 src="../../../public/img/sousuo.png" alt="" /></el-button>
@@ -118,7 +123,9 @@
   </div>
 </template>
 <script>
-
+import {
+  getXialaList,
+} from '@/model/profitable/index'
 import {
   getroll
 } from '@/model/warehouse/index'
@@ -145,9 +152,18 @@ import {
         binNumbershow:false,
         accessoryTFs:false,
         appendixIdss:'',
+        agent:'',
+        personList:[]
       }
     },
     activated() {
+      getXialaList({
+        removeRepeatFlag: 4,
+      })
+        .toPromise()
+        .then((response) => {
+          this.personList = response
+        })
       this.getList()
     },
     methods: {

+ 109 - 19
src/views/warehousenew/goodsrollIn.vue

@@ -37,13 +37,25 @@
                     <el-radio label="1" >是</el-radio>
                 </el-radio-group>
             </el-form-item>
-            <el-form-item v-if="form.redeemFlag==1" label="待赎回合同">
-                <el-select filterable clearable v-model="form.redeemContractNo" placeholder="选择待赎回的合同">
-                    <el-option v-for="item in tableData" :key="item.id" :label="item.contractNo" :value="item.contractNo"></el-option>
+          </el-form>
+          <div v-if="form.redeemFlag==1">
+            <el-form :inline="true"  v-for="(item,index) in form.redeemContractNoList" :key="'hetong'+index" class="demo-form-inline">
+            <el-form-item class="inline-big" :label="'待赎回合同-'+(index+1)" label-width="160px">
+                <el-select @change="( (val)=>{contractNochange1(val,index)} )" filterable clearable v-model="item.redeemContractNo" placeholder="选择待赎回的合同">
+                    <el-option v-for="item1 in tableData" :key="item1.id" :label="item1.contractNo+(item1.expectedRedemption?'('+item1.expectedRedemption+'吨)':'')" :value="item1.contractNo"></el-option>
                 </el-select>
-            </el-form-item>
+              </el-form-item>
+              <el-form-item label-width="120px" label="转入重量">
+                <el-input @input="weightinput1($event,index)" v-model="item.transferOutWeight" placeholder="输入转入重量"></el-input>
+              </el-form-item>
+              <img width="22" height="22" class="add" @click="addcontract" src="../../../public/img/add.png" alt="" />
+              <img width="22" height="22" class="del" @click="delcontract(index)" src="../../../public/img/del.png" alt="" /> 
+            </el-form>
+          </div>
+          
+          <el-form ref="form" :model="form" label-width="160px">
             <el-form-item label="平均成本(元/吨)">
-                <el-input v-model="form.avgCost" placeholder="输入平均成本"></el-input>
+                <el-input @input="avgcostinput" v-model="form.avgCost" placeholder="输入平均成本"></el-input>
             </el-form-item>
             <el-form-item label="应付粮款(元)">
                 <el-input @input="amountinginput" v-model="form.amountIngPayable" placeholder="输入粮款金额"></el-input>
@@ -61,13 +73,13 @@
             </el-form-item>
         </el-form>
         <el-form :inline="true"  v-for="(item,index) in form.cargoPositionDetailsList" :key="'cangwe'+index" class="demo-form-inline">
-          <el-form-item label-width="160px" :label="'仓位-'+(index+1)">
+          <el-form-item class="inline-big" label-width="160px" :label="'仓位-'+(index+1)">
             <el-select @focus="binNumberfocus" clearable filterable @change="($event)=>binNumberchange($event,item,index)" v-model="item.binNumber" placeholder="选择仓位">
               <el-option v-for="item1 in binNumberList" :label="item1.binNumber" :value="item1.binNumber"></el-option>
             </el-select>
           </el-form-item> 
-          <el-form-item label-width="170px" label="入库重量(吨)">
-            <el-input @input="weightinput" v-model="item.weight" placeholder="输入该仓位出库重量"></el-input>
+          <el-form-item label-width="120px" label="入库重量(吨)">
+            <el-input  @input="weightinput" v-model="item.weight" placeholder="输入该仓位出库重量"></el-input>
           </el-form-item>
           <img width="22" height="22" class="add" @click="add" src="../../../public/img/add.png" alt="" />
           <img width="22" height="22" class="del" @click="del(index)" src="../../../public/img/del.png" alt="" />
@@ -141,6 +153,7 @@ import {xialaNo} from '@/model/tasksport/index'
             relationReceiveNo:'不关联',
             redeemFlag:'0',
             cargoPositionDetailsList:[{binNumber:'',positionId:'',weight:'',goodsweight:''}],
+            redeemContractNoList:[{redeemContractNo:'',transferOutWeight:'',weight:''}],
             compId: localStorage.getItem('ws-pf_compId')
         }
       }
@@ -149,6 +162,32 @@ import {xialaNo} from '@/model/tasksport/index'
       this.getList()
     },
     methods: {
+      avgcostinput(e){
+        if(this.form.relationReceiveNo!='不关联'){
+          this.form.amountIngPayable=(this.form.transferOutWeight1*e).toFixed(3)
+          this.form.amountNotPayable=(this.form.amountIngPayable-this.form.amountEdPayable).toFixed(3)
+        }
+        
+      },
+      weightinput1(e,index){
+        console.log(this.form.redeemContractNoList[index])
+        if(!this.form.redeemContractNoList[index].redeemContractNo){
+          this.$message.error('请选择待赎回合同后再输入转入重量!')
+        }
+        if(e>this.form.redeemContractNoList[index].weight){
+          this.$message.error('转入重量不能大于待赎回合同的重量!')
+        }
+        if(e<0){
+          this.$message.error('转入重量不能是负数!')
+        }
+      },
+      contractNochange1(e,index){
+        for (let i = 0; i < this.tableData.length; i++) {
+          if(this.tableData[i].contractNo==e){
+            this.form.redeemContractNoList[index].weight=this.tableData[i].expectedRedemption
+          }
+        }
+      },
       onChange() {
       this.$refs.upload
         .handleSaveBill()
@@ -162,14 +201,15 @@ import {xialaNo} from '@/model/tasksport/index'
     },
     amountinginput(e){
         if(this.form.amountEdPayable){
-            this.form.amountNotPayable=e-this.form.amountEdPayable
+            this.form.amountNotPayable=(e-this.form.amountEdPayable).toFixed(3)
         }
     },
     amountedinput(e){
         if(this.form.amountIngPayable){
-            this.form.amountNotPayable=this.form.amountIngPayable-e
+            this.form.amountNotPayable=(this.form.amountIngPayable-e).toFixed(3)
         }
     },
+
     del(index){
         if(this.form.cargoPositionDetailsList.length>1){
             this.form.cargoPositionDetailsList.splice(index,1)
@@ -188,6 +228,17 @@ import {xialaNo} from '@/model/tasksport/index'
       this.form.cargoPositionDetailsList.push({binNumber:'',positionId:'',weight:'',goodsweight:''})
       this.$forceUpdate()
     },
+    addcontract(){
+      this.form.redeemContractNoList.push({redeemContractNo:'',transferOutWeight:''})
+      this.$forceUpdate()
+    },
+    delcontract(index){
+      if(this.form.redeemContractNoList.length>1){
+            this.form.redeemContractNoList.splice(index,1)
+        }else{
+            this.$message.error('至少保留一条数据不可删除!')
+        }
+    },
     onSubmit(){
         if(!this.form.outContractNo){
             this.$message.error('合同编号不能为空!')
@@ -197,9 +248,30 @@ import {xialaNo} from '@/model/tasksport/index'
             this.$message.error('货名不能为空!')
             return
         }
-        if(this.form.redeemFlag==1&&!this.form.redeemContractNo){
-            this.$message.error('待赎回合同不能为空!')
+        
+        if(this.form.relationReceiveNo!='不关联'){
+          
+          var weight=0
+          var contarctNo=''
+          for (let i = 0; i < this.form.redeemContractNoList.length; i++) {
+            if(this.form.redeemFlag==1&&!this.form.redeemContractNoList[i].redeemContractNo){
+              this.$message.error('待赎回合同不能为空!')
+              return
+            }
+            var arr=this.form.redeemContractNoList.filter(item=>{return item.redeemContractNo==this.form.redeemContractNoList[i].redeemContractNo})
+            if(arr.length>1){
+              this.$message.error('待赎回合同重复!')
+              return
+            }
+            contarctNo+=this.form.redeemContractNoList[i].redeemContractNo+','
+            weight+=Number(this.form.redeemContractNoList[i].transferOutWeight)
+          }
+          this.form.redeemContractNo=contarctNo
+          // console.log(Number(weight),Number(this.form.transferOutWeight1))
+          if(Number(weight)!=Number(this.form.transferOutWeight1)){
+            this.$message.error('赎回重量与出库重量不相等!')
             return
+          }
         }
         if(!this.form.avgCost){
             this.$message.error('平均成本不能为空!')
@@ -292,6 +364,7 @@ import {xialaNo} from '@/model/tasksport/index'
                 if(this.form.warehouseName==this.warehouseList[i].warehouseName){
                   this.form.baseId=this.warehouseList[i].id
                   this.binNumberList = this.warehouseList[i].positionInfos
+                  this.form.cargoPositionDetailsList=[{binNumber:'',positionId:'',weight:'',goodsweight:''}]
                   this.$forceUpdate()
                 }
             }
@@ -305,8 +378,16 @@ import {xialaNo} from '@/model/tasksport/index'
             }
             this.form.transferOutWeight=this.form.transferOutWeight.toFixed(3)
         },
+        
     contractNochange(e){
         for (let i = 0; i < this.contractNoList.length; i++) {
+            if(this.contractNoList[i].contractNo==e){
+              this.contractNoListGoodName=this.contractNoList[i].goodsName
+              this.$set(this.form,'contractSeller',this.contractNoList[i].seller)
+                this.$set(this.form,'goodsName',this.contractNoList[i].goodsName)
+                this.$set(this.form,'goodsNameKey',this.contractNoList[i].goodsNameKey)
+                this.$set(this.form,'avgCost',this.contractNoList[i].unitContractPrice)
+            }
             if(this.contractNoList[i].contractNo==e&&this.form.relationReceiveNo=='不关联'){
                 this.$set(this.form,'customer',this.contractNoList[i].seller)
                 for (let q = 0; q < this.customerList.length; q++) {
@@ -318,17 +399,12 @@ import {xialaNo} from '@/model/tasksport/index'
                   }
                 }
             }else if(this.contractNoList[i].contractNo==e&&this.form.relationReceiveNo!='不关联'){
+              console.log(this.form.goodsName,this.contractNoList[i].goodsName)
               if(this.form.goodsName!=this.contractNoList[i].goodsName){
                 this.$message.error('采购合同货名与关联转出业务货名不一致!')
               }
             }
-            if(this.contractNoList[i].contractNo==e){
-              this.contractNoListGoodName=this.contractNoList[i].goodsName
-              this.$set(this.form,'contractSeller',this.contractNoList[i].seller)
-                this.$set(this.form,'goodsName',this.contractNoList[i].goodsName)
-                this.$set(this.form,'goodsNameKey',this.contractNoList[i].goodsNameKey)
-                this.$set(this.form,'avgCost',this.contractNoList[i].unitContractPrice)
-            }
+            
         }
     },
     receiveNochange(e){
@@ -518,6 +594,20 @@ import {xialaNo} from '@/model/tasksport/index'
       margin:0;
       width:48%;
 }
+/deep/.el-form.el-form--inline .el-form-item{
+      margin:0;
+      width:31%;
+}
+/deep/.el-form.el-form--inline .el-form-item.inline-big{
+  width:62%;
+}
+/deep/.el-form.el-form--inline .el-form-item .el-form-item__content{
+  width:calc(100% - 120px);
+}
+/deep/.el-form.el-form--inline .el-form-item.inline-big .el-form-item__content{
+  width:calc(100% - 160px);
+}
+// inline-big
 .add,.del{
       position:absolute;
       top:50%;

+ 1 - 1
src/views/warehousenew/warehousingOrder.vue

@@ -1101,7 +1101,7 @@ export default {
           if (arr4.length == 0) {
             arr4.push(array[i])
           } else {
-            var arr5 = arr4.filter((item) => { return item.warehouseName == array[i].warehouseName })
+            var arr5 = arr4.filter((item) => { return item.contractNo == array[i].contractNo })
             if (arr5.length == 0) {
               arr4.push(array[i])
             }