zhongtianhaoyuan 3 лет назад
Родитель
Сommit
a6cb9090be

+ 12 - 3
src/api/V2/tradeServicesManagement/index.js

@@ -1,6 +1,15 @@
-//贸易服务管理
 // 列表
 export const API_GET_TRADESERVICES_LIST  = '/tradeWarehouseReceiptAppl/selectTradeWarehouseReceiptAppl'
-
-
+//获取地图
+export const API_GET_MAPINFO  = '/tradeWarehouseReceiptAppl/getMapInfo'
+//仓库列表查看
+export const API_GET_WAREHOUSE_LOOK = '/warehouseBaseInfo/getWarehouse'
+//仓单列表添加
+export const API_POST_RECEIPTAPPL_ADD = '/tradeWarehouseReceiptAppl/api/insertTradeWarehouseReceiptAppl'
+//仓单查看
+export const API_GET_WAREHOUSE_LIST = '/warehouseBaseInfo/getWarehouse'
+//仓单编辑
+export const API_POST_WAREHOUSE_EDIT = '/warehouseBaseInfo/getWarehouse'
+// 获取业务编号
+export const API_GET_BILLNO = '/tradeWarehouseReceiptAppl/getBillNo'
 

+ 15 - 1
src/model/tradeServicesManagement/index.js

@@ -1,8 +1,22 @@
 import { errorCatcher, errorHandle, filter } from 'base-core-lib'
 import { appRx } from '../defalutConfig/indexRx'
 import {
-    API_GET_TRADESERVICES_LIST
+    API_GET_MAPINFO,
+    API_GET_WAREHOUSE_LOOK,
+    API_POST_WAREHOUSE_EDIT,
+    API_GET_BILLNO,
+    API_GET_TRADESERVICES_LIST,
+    API_POST_RECEIPTAPPL_ADD
 } from '@/api/V2/tradeServicesManagement'
 
 // 列表
 export const getList = appRx.get(API_GET_TRADESERVICES_LIST, errorCatcher, errorHandle, filter)
+export const getMapInfo = appRx.get(API_GET_MAPINFO, errorCatcher, errorHandle, filter)
+// 添加
+export const addList = appRx.post(API_POST_RECEIPTAPPL_ADD, errorCatcher, errorHandle, filter)
+// 查看
+export const getwarehousewarrantList = appRx.get(API_GET_WAREHOUSE_LOOK, errorCatcher, errorHandle, filter)
+// 编辑
+export const editList = appRx.post(API_POST_WAREHOUSE_EDIT, errorCatcher, errorHandle, filter)
+// 获取业务编号
+export const getbillno = appRx.get(API_GET_BILLNO, errorCatcher, errorHandle, filter)

+ 14 - 13
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -684,7 +684,7 @@
           if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
           let _tobeVal1 = _val1 % point
           if (type == 'waterBase') {
-            if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum && _tobeVal1 == 0) {
+            if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum ) {
               return false
             }
           }
@@ -701,10 +701,10 @@
           }
           return true
         }
-        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterBase == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterBase))) {
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
-            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.5整除!');
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterBase))) {
+            that.$message.error('水分基准输入错误,最多保留1位小数,基准水分须可被0.1整除!');
           } else {
             this.$message.error('基准水分不能为空!');
           }
@@ -731,13 +731,13 @@
           return false
         }
 
-        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterMin == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterMin))) {
           if (this.baseInfoForm.waterMin == '') {
             this.$message.error('干粮水分不能为空!')
           }
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
-            that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.5整除!')
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMin))) {
+            that.$message.error('干粮水分输入错误,最多保留1位小数,干粮水分须可被0.1整除!')
           }
           return false
         }
@@ -751,10 +751,10 @@
           return false
         }
 
-        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this
+        if (this.baseInfoForm.waterMax == '' || _baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this
             .baseInfoForm.waterMax))) {
-          if (_baseWaterValidate(1, 100, 1, 0.5, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
-            that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.5整除!');
+          if (_baseWaterValidate(1, 100, 1, 0.1, 'waterBase', parseFloat(this.baseInfoForm.waterMax))) {
+            that.$message.error('水分上限输入错误,最多保留1位小数,干粮水分须可被0.1整除!');
           } else {
             this.$message.error('水分上限不能为空!');
           }
@@ -812,7 +812,7 @@
                 return false
               }
             } else {
-              if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.5, 'waterBase', parseFloat(_item1.water))) {
+              if (_item1.water == '' || _baseWaterValidate(0, 100, 1, 0.1, 'waterBase', parseFloat(_item1.water))) {
                 if (_item1.water == '') {
                   that.$message.error('分界水分不能为空!')
                 } else {
@@ -853,6 +853,7 @@
           isValidate = this.validate()
          
         if (isValidate) {
+          debugger
           this.makeTableList()
           this.baseInfoForm.details = []
           this.makePriceDataList()
@@ -936,7 +937,7 @@
         let _obj = {}
         let _waterMin = parseFloat(this.baseInfoForm.waterMin)
         let _waterMax = parseFloat(this.baseInfoForm.waterBase)
-        let _count = (_waterMax - _waterMin) / 0.1 
+        let _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0)) 
         if(this.baseInfoForm.paramType == '2'){
           for (let i = 0; i < _count; i++) {
             // if (i == 0) {
@@ -961,7 +962,7 @@
           _obj = {}
           _waterMin = parseFloat(this.baseInfoForm.waterBase)
           _waterMax = parseFloat(this.baseInfoForm.waterMax)
-          _count = (_waterMax - _waterMin) / 0.1
+          _count = Number(((_waterMax - _waterMin) / 0.1).toFixed(0))
           for (let i = 0; i < _count; i++) {
             // if (i == 0) {
             //   _waterMin += 0.4

+ 33 - 3
src/views/houseSelfCollect/inspectInfo.vue

@@ -74,7 +74,7 @@
               <ws-input type="number" @mousewheel.native.prevent v-model="inspect.tidalGrainPrice" placeholder="请输入净重单价" maxlength="10" size="small" :disabled="disabled2" />
             </ws-form-item>
             <ws-form-item label="干粮单价(元/公斤)" span="1" prop="dryGrainPrice" v-if="inspect.type == '干粮'">
-              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.dryGrainPrice" placeholder="请输入干粮单价" maxlength="10" size="small"  :disabled="disabled" />
+              <ws-input type="number" @mousewheel.native.prevent v-model="inspect.dryGrainPrice" placeholder="请输入干粮单价" maxlength="10" size="small"  :disabled="disabled2" />
             </ws-form-item>
           </ws-info-table>
 
@@ -423,7 +423,7 @@
             })
             return
           }
-           if(this.inspect.dryGrainPrice < 0 || this.inspect.dryGrainPrice > 1000){
+           if(this.inspect.dryGrainPrice <= 0 || this.inspect.dryGrainPrice > 1000){
             this.$message({
               message:'干粮价格输入错误',
               type:'warning'
@@ -440,6 +440,22 @@
           return
         }
         }
+        else{
+          if(!this.inspect.tidalGrainPrice){
+            this.$message({
+              message:'净重单价不能为空',
+              type:'warning'
+            })
+            return
+          }
+           if(this.inspect.tidalGrainPrice <= 0 || this.inspect.tidalGrainPrice > 1000){
+            this.$message({
+              message:'净重单价输入错误',
+              type:'warning'
+            })
+            return
+          }
+        }
         if (!this.inspect.grade) {
           this.$message({
             message: '等级不能为空',
@@ -769,7 +785,21 @@
               if(this.inspect.paramType == '1'){
                 this.inspect.tidalGrainPrice = parseFloat(parseFloat(response) - parseFloat(this.inspect.buckleMiscellaneous)/100*parseFloat(this.inspect.dryGrainPrice)).toFixed(4)
               }else{
-                this.inspect.tidalGrainPrice = response
+                if(this.inspect.type=='干粮'){
+                  if(response == 0){
+                    getDryGrainPrice({warehouseId:this.cangid,goodsName:this.inspect.goodsName})
+                      .toPromise()
+                      .then((response) => { 
+                        this.$set(this.inspect,'dryGrainPrice',response)
+                      })
+                  }
+                  else{
+                    this.inspect.dryGrainPrice = response
+                  }
+                }
+                else{
+                  this.inspect.tidalGrainPrice = response
+                }
               }
             })
         }

+ 12 - 4
src/views/houseSelfCollect/inspectionManagement.vue

@@ -158,7 +158,8 @@
 				isShowPrint: false,
 				printData: {},
 				deductWeight: '', //扣重比
-				saleLimit: ''
+				saleLimit: '',
+				allowEdit:'0'
 			}
 		},
 		activated() {
@@ -195,7 +196,8 @@
 						id: row.id,
 						warehouseName: this.warehouseName,
 						count: this.warehouseCount,
-						warehouseNo: this.warehouseNo
+						warehouseNo: this.warehouseNo,
+						allowEdit:this.allowEdit
 					},
 				})
 			},
@@ -207,6 +209,7 @@
 						this.warehouseCount = this.warehouseList[i].count
 						this.warehouseNo = this.warehouseList[i].No
 						this.cangid = this.warehouseList[i].id
+						this.allowEdit = this.warehouseList[i].allowEdit
 						this.WAREHOUSE[1].payname = this.warehouseList[i].value
 					}
 				}
@@ -269,28 +272,33 @@
 								this.warehouseName = _wareHouse.value
 								this.warehouseNo = _wareHouse.No
 								this.warehouseCount = _wareHouse.count
+								this.allowEdit = _wareHouse.allowEdit
 							} 
 						for (let i = 0; i < response.length; i++) {
 							if(_wareHouse && response[i].warehouseName==_wareHouse.value){
 								this.warehouseCount = response[i].count
+								this.allowEdit = response[i].allowEdit
 							}
 							this.warehouseList.push({
 								value: response[i].warehouseName,
 								id: response[i].id,
 								count: response[i].count,
-								No: response[i].commonWarehouseNo
+								No: response[i].commonWarehouseNo,
+								allowEdit:response[i].allowEdit
 							})
 							if (!_wareHouse) {
-									if (this.cangid && this.cangid == response[i].id) {
+								if (this.cangid && this.cangid == response[i].id) {
 									this.warehouseName = response[i].warehouseName
 									this.warehouseCount = response[i].count
 									this.warehouseNo = response[i].commonWarehouseNo
+									this.allowEdit =  response[i].allowEdit
 								}
 								if (this.warehouseList.length > 0 && !this.cangid) {
 									this.warehouseName = this.warehouseList[0].value
 									this.warehouseCount = this.warehouseList[0].count
 									this.warehouseNo = this.warehouseList[0].No
 									this.cangid = this.warehouseList[0].id
+									this.allowEdit = this.warehouseList[0].allowEdit
 									this.WAREHOUSE[1].payname = this.warehouseList[0].value
 								}
 							}

Разница между файлами не показана из-за своего большого размера
+ 552 - 814
src/views/houseSelfCollect/paymentManagement.vue


+ 13 - 13
src/views/houseSelfCollect/weightCheck.vue

@@ -111,7 +111,7 @@
             </el-table>
             <div style="text-align: center">
               <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                :current-page="currentPage" :page-size="deptCircularPage.pageSize"
+                :current-page="currentPage" page-size="100"
                 layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
               </el-pagination>
             </div>
@@ -296,18 +296,18 @@
           })
           .toPromise()
           .then((response) => {
-            for (let i = 0; i < response.records.length; i++) {
-              if (response.records[i].paymentManagement) {
-                if (response.records[i].paymentManagement.status == '待结算' && !response.records[i].paymentManagement
-                  .approveStatus) {
-                  response.records[i].allow = 1
-                } else {
-                  response.records[i].allow = 2
-                }
-              } else {
-                response.records[i].allow = 1
-              }
-            }
+            // for (let i = 0; i < response.records.length; i++) {
+            //   if (response.records[i].paymentManagement) {
+            //     if (response.records[i].paymentManagement.status == '待结算' && !response.records[i].paymentManagement
+            //       .approveStatus) {
+            //       response.records[i].allow = 1
+            //     } else {
+            //       response.records[i].allow = 2
+            //     }
+            //   } else {
+            //     response.records[i].allow = 1
+            //   }
+            // }
             this.weighingList = response.records
             this.common.commonWeighingList = response.records
             this.makeData();

+ 381 - 62
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -1,84 +1,98 @@
 //创建仓单
 <template>
-  <div>
-    <el-form ref="deptBudgetList" :rules="mainReportAdd" :model="deptBudgetList">
+  <div class="center">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left titleup">创建仓单</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button class="bg-bottom" type="primary" size="small" @click="cancel"><img width="6" height="10"
+            style="vertical-align: bottom; margin-right: 3px" src="../../../public/img/lujing.png" alt="" />返回
+        </el-button>
+      </el-col>
+    </el-row>
+    <el-form :inline="true" ref="deptBudgetList" label-position="right" class="content2" :rules="rules"
+      :model="deptBudgetList" label-width="120px">
+      <div class="title1">申请信息</div>
       <!-- <ws-info-table class="el-table"> -->
-      <div>申请信息</div>
-      <el-form-item label="业务编号" span="1" prop="taskNo" class="forlist">
-        <el-input v-model="deptBudgetList.taskNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled></el-input>
-      </el-form-item>
-      <el-form-item label="名头" span="1" prop="taskNo" class="forlist">
-        <el-select v-model="deptBudgetList.region" placeholder="请选择名头">
-          <el-option label="区域一" value="shanghai"></el-option>
-          <el-option label="区域二" value="beijing"></el-option>
-        </el-select>
+      <el-form-item label="业务编号" prop="billNo" class="forlist">
+        <el-col>
+          <el-input v-model="deptBudgetList.billNo" placeholder="请输入任务编号" maxlength="20" size="small" disabled>
+          </el-input>
+        </el-col>
       </el-form-item>
-      <el-form-item label="仓库名称" span="1" prop="taskNo" class="forlist">
-        <el-select v-model="deptBudgetList.region" placeholder="请选择仓库">
-          <el-option label="区域一" value="shanghai"></el-option>
-          <el-option label="区域二" value="beijing"></el-option>
+      <el-form-item label="名头" prop="renown" class="forlist">
+        <el-select v-model="deptBudgetList.renown" placeholder="请选择名头" @change="changeCompOptionList">
+          <el-option :label="item.compName" :key="index" :value="item.compId" v-for="(item,index) in compOptionList">
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="仓位号" span="1" prop="taskNo" class="forlist">
-        <el-select v-model="deptBudgetList.region" placeholder="请选择仓位号">
-          <el-option label="区域一" value="shanghai"></el-option>
-          <el-option label="区域二" value="beijing"></el-option>
+      <el-form-item label="仓库名称" prop="warehouseName" class="forlist">
+        <el-select v-model="deptBudgetList.warehouseName" filterable placeholder="请选择仓库" @change="changeWarehouse">
+          <el-option v-for="(item,index) in warehouseList" :key='index' :label="item.warehouseName" :value="item.id">
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="仓库地址" span="1" prop="taskNo" class="forlist">
-        <el-input disabled v-model="deptBudgetList.goodsName" placeholder="请输入仓库地址" size="small"></el-input>
-      </el-form-item>
-      <el-form-item prop="goodsName" label="货名" span="1">
-        <el-select v-model="deptBudgetList.region" placeholder="请选择货名">
-          <el-option label="区域一" value="shanghai"></el-option>
-          <el-option label="区域二" value="beijing"></el-option>
+      <el-form-item label="仓位号" prop="warehouseNo" class="forlist">
+        <el-select v-model="deptBudgetList.warehouseNo" placeholder="请选择仓位号" @change="changeWarehouseNo">
+          <el-option :label="item.binNumber" :value="item.id" v-for="(item,index) in cwNumberList" :key='index'>
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="goodsName" label="货名" span="1">
-        <el-select v-model="deptBudgetList.region" placeholder="请选择货名">
-          <el-option label="区域一" value="shanghai"></el-option>
-          <el-option label="区域二" value="beijing"></el-option>
+      <el-form-item label="仓库地址" prop="warehouseAddress" class="forlist">
+        <el-input disabled v-model="deptBudgetList.warehouseAddress" placeholder="请输入仓库地址" size="small"></el-input>
+      </el-form-item>
+      <el-form-item prop="goodsName" label="货名">
+        <el-select v-model="deptBudgetList.goodsName" placeholder="请选择货名" @change="changeGoodsName">
+          <el-option v-for="(item,index) in goodsList" :key='index' :label="item.goodsName" :value="item.id">
+          </el-option>
         </el-select>
       </el-form-item>
-      <el-form-item prop="goodsName" label="品级" span="1">
-        <el-select v-model="deptBudgetList.region" placeholder="请选择品级">
-          <el-option label="区域一" value="shanghai"></el-option>
-          <el-option label="区域二" value="beijing"></el-option>
+      <el-form-item prop="goodsName" label="品级">
+        <el-select v-model="deptBudgetList.grade" placeholder="请选择品级">
+          <el-option label="一等" value="一等"></el-option>
+          <el-option label="二等" value="二等"></el-option>
+          <el-option label="三等" value="三等"></el-option>
+          <el-option label="等外" value="等外"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="现有储量" span="1" prop="taskNo" class="forlist">
-        <el-input disabled v-model="deptBudgetList.goodsName" placeholder="请输入现有储量" size="small"></el-input>
+      <el-form-item label="现有储量" prop="nowWeight" class="forlist">
+        <el-input disabled v-model="deptBudgetList.nowWeight" placeholder="请输入现有储量" size="small"></el-input>
       </el-form-item>
-      <el-form-item label="可用储量(吨)" span="1" prop="taskNo" class="forlist">
-        <el-input disabled v-model="deptBudgetList.goodsName" placeholder="请输入可用储量" size="small"></el-input>
+      <el-form-item label="可用储量(吨)" prop="useWeight" class="forlist">
+        <el-input disabled v-model="deptBudgetList.useWeight" placeholder="请输入可用储量" size="small"></el-input>
       </el-form-item>
-      <el-form-item label="本单重量(吨)" span="1" prop="taskNo" class="forlist">
-        <el-input v-model="deptBudgetList.goodsName" placeholder="输入本次仓单申请所需的重量" size="small"></el-input>
+      <el-form-item label="本单重量(吨)" prop="weight" class="forlist">
+        <el-input v-model="deptBudgetList.weight" placeholder="输入本次仓单申请所需的重量" size="small" @input='inputChange'>
+        </el-input>
       </el-form-item>
-      <el-form-item label="单价(元/吨)" span="1" prop="taskNo" class="forlist">
-        <el-input v-model="deptBudgetList.goodsName" placeholder="输入粮食单价" size="small"></el-input>
+      <el-form-item label="单价(元/吨)" prop="unitPrice" class="forlist">
+        <el-input v-model="deptBudgetList.unitPrice" placeholder="输入粮食单价" size="small" @input='inputChange'></el-input>
       </el-form-item>
-      <el-form-item label="总价值(元)" span="1" prop="taskNo" class="forlist">
-        <el-input v-model="deptBudgetList.goodsName" placeholder="自动计算,不可编辑" size="small"></el-input>
+      <el-form-item label="总价值(元)" prop="totalValue" class="forlist">
+        <el-input disabled v-model="deptBudgetList.totalValue" placeholder="自动计算,不可编辑" size="small"></el-input>
       </el-form-item>
-      <el-form-item label="申请比例(%)" span="1" prop="taskNo" class="forlist">
-        <el-input v-model="deptBudgetList.goodsName" placeholder="输入申请比例" size="small"></el-input>
+      <el-form-item label="申请比例(%)" prop="applicationProportion" class="forlist">
+        <el-input v-model="deptBudgetList.applicationProportion" placeholder="输入申请比例" size="small"></el-input>
       </el-form-item>
-      <el-form-item label="申请金额(元)" span="1" prop="taskNo" class="forlist">
-        <el-input v-model="deptBudgetList.goodsName" placeholder="输入申请金额" size="small"></el-input>
+      <el-form-item label="申请金额(元)" prop="interest" class="forlist">
+        <el-input v-model="deptBudgetList.interest" placeholder="输入申请金额" size="small"></el-input>
       </el-form-item>
       <div>附件</div>
-      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.addressUrl" :size-limit="size"
+      <ws-upload ref="upload" :comp-id="compId" :appendix-ids="deptBudgetList.appendix" :size-limit="size"
         @onChange="onChange" accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar" />
       <div>外审部门</div>
-      <el-form-item prop="goodsName" label="银行" span="1">
-        <el-select v-model="deptBudgetList.region" placeholder="请选择银行">
-          <el-option label="区域一" value="shanghai"></el-option>
-          <el-option label="区域二" value="beijing"></el-option>
+      <el-form-item prop="bank" label="银行">
+        <el-select v-model="deptBudgetList.bank" placeholder="请选择银行">
+          <el-option label="中国银行" value="bank1"></el-option>
+          <el-option label="营口银行" value="bank2"></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="第三方" span="1" prop="taskNo" class="forlist">
-        <el-input v-model="deptBudgetList.goodsName" placeholder="无" size="small"></el-input>
+      <el-form-item label="第三方" span="1" prop="three" class="forlist">
+        <el-select v-model="deptBudgetList.three" placeholder="请选择银行">
+          <el-option label="第三方1" value="three1"></el-option>
+          <el-option label="第三方2" value="three2"></el-option>
+        </el-select>
       </el-form-item>
       <div>
         <el-button @click='inoutput' type="primary">出入库记录</el-button>
@@ -91,8 +105,15 @@
 </template>
 <script>
   import {
-    getList,
+    getcompList,
+  } from '@/model/signIn/index'
+  import {
+    addList,
+    getbillno
   } from '@/model/tradeServicesManagement/index'
+  import {
+    selectWarehouseSelf,
+  } from '@/model/houseSelfCollect/index'
   import WsUpload from '@/components/WsUpload'
   export default {
     components: {
@@ -100,40 +121,338 @@
     },
     data() {
       return {
-        deptBudgetList: {},
+        deptBudgetList: {
+          warehouseName: '',
+          warehouseNo: '',
+          compId: '',
+          renown: '',
+          grade: '',
+          bank: '',
+          three: ''
+        },
         size: 10,
-        compId: sessionStorage.getItem('ws-pf_compId'),
+        compId: '',
+        warehouseList: [],
+        compOptionList: [],
+        cwNumberList: [],
+        goodsList: [],
+        rules: {
+          // unitPrice: [
+          //   { required: true, message: '单价不能为空!', trigger: 'blur' },
+          //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
+          // ],
+        }
       }
     },
     activated() {
-
+      this.compId = sessionStorage.getItem('ws-pf_compId')
+      this.deptBudgetList.compId = this.compId
+      this.getcompList()
+      this.getList()
     },
     methods: {
+      inputChange(e) {
+        if (this.deptBudgetList.unitPrice && this.deptBudgetList.weight) {
+          this.deptBudgetList.totalValue = this.deptBudgetList.unitPrice * this.deptBudgetList.weight
+        }
+        console.log(e)
+      },
+      getList() {
+        this.deptBudgetList.grade = '二等'
+        // 获取业务编号
+        getbillno().toPromise().then((response) => {
+          this.deptBudgetList.billNo = response
+        })
+        this.getWarehouse()
+      },
+      getcompList() {
+        //获取公司名头
+        getcompList()
+          .toPromise()
+          .then((res) => {
+            console.log('公司下拉列表数据', res)
+            this.compOptionList = res
+            this.deptBudgetList.renown = res[0].compName
+          })
+          .catch((err) => {})
+      },
+      getWarehouse() {
+        //获取仓库
+        selectWarehouseSelf({
+            compId: this.compId
+          }).toPromise()
+          .then(response => {
+            console.log('仓库信息', response)
+            this.warehouseList = response
+            this.deptBudgetList.warehouseName = response[0].warehouseName
+            this.cwNumberList = response[0].positionInfos
+            this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .binNumber : ''
+            this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .baseId : ''
+            this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity +
+              response[0].warehouseArea + response[0].detailedAddress
+            this.goodsList = response[0].goodsNameInfos
+            this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .storage : ''
+            // this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useWeight
+            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.goodsName = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .goodsName : ''
+            this.deptBudgetList.warehouseId = response[0].id
+            if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
+            if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
+            this.deptBudgetList.bankId = 'bankId'
+            this.deptBudgetList.threeId = 'threeId'
+            this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0]
+              .id : ''
+            this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0]
+              .goodsNameKey : ''
+          })
+      },
+      //货名切换
+      changeGoodsName(val) {
+        let _data = this.goodsList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].id == val) {
+            this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
+            this.deptBudgetList.goodsName = _data[i].goodsName
+          }
+        }
+      },
+      //银行切换
+      changeBank(val) {
+        this.deptBudgetList.bankId = 'changebankId'
+      },
+      //第三方切换
+      changeThree(val) {
+        this.deptBudgetList.threeId = 'changethreeId'
+      },
+      //仓位号切换
+      changeWarehouseNo(val) {
+        let _data = this.cwNumberList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].id == val) {
+            this.deptBudgetList.warehouseNoId = _data[i].id
+            this.deptBudgetList.warehouseNo = _data[i].binNumber
+            this.deptBudgetList.baseId = _data.baseId
+          }
+        }
+      },
+      // 名头切换
+      changeCompOptionList(val) {
+        let _data = this.compOptionList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].compId == val) {
+            this.deptBudgetList.renownId = _data[i].compId
+            this.deptBudgetList.renown = _data[i].compName
+            this.compId = val
+            this.getWarehouse()
+          }
+        }
+      },
+      //仓库切换
+      changeWarehouse(val) {
+        console.log('切换后仓库数据', val)
+        let _data = this.warehouseList
+        for (let i = 0; i < _data.length; i++) {
+          if (_data[i].id == val) {
+            this.deptBudgetList.warehouseName = _data[i].warehouseName
+            this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
+            this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber :
+              ''
+            this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity +
+              _data[i].warehouseArea + _data[i].detailedAddress
+            this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
+            this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage :
+              ''
+            // this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useWeight:''
+            this.deptBudgetList.useWeight = '10'
+            this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsName :
+              ''
+            this.deptBudgetList.warehouseId = _data[i].id
+            this.deptBudgetList.goodsNameKey = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0]
+              .goodsNameKey : ''
+              this.deptBudgetList.warehouseNoId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
+                .id : ''
+                this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0]
+                  .baseId : ''
+          }
+        }
+      },
       inoutput() {
         this.$router.push({
-          name: 'inOutRecord'
+          name: 'inOutRecord',
+          query: {
+            baseId: this.deptBudgetList.baseId,
+            positionId: this.deptBudgetList.warehouseNoId,
+            warehouseName: this.deptBudgetList.warehouseName,
+          }
         })
       },
+      validate() {
+        function _Validate(min, max, saveNum, type, inputVal) {
+          let _val1 = inputVal
+          let _pointVal1 = _val1.toString().split('.')[1]
+          if (_pointVal1 == undefined) _pointVal1 = 0
+          if (typeof(_pointVal1) == 'string') _pointVal1 = _pointVal1.length
+          if (_val1 <= max && _val1 >= min && _pointVal1 <= saveNum) {
+            return false
+          }
+          return true
+        }
+        if (!this.deptBudgetList.weight || _Validate(0, this.deptBudgetList.useWeight, 3, '', this.deptBudgetList
+            .weight)) {
+          if (!this.deptBudgetList.weight) {
+            this.$message.error('本单重量不能为空!');
+          } else {
+            this.$message.error('本单重量输入错误且本单重量不可超过可用重量!');
+          }
+          return false
+        }
+        if (!this.deptBudgetList.unitPrice || _Validate(1, 20000, 3, '', this.deptBudgetList
+            .unitPrice)) {
+          if (!this.deptBudgetList.unitPrice) {
+            this.$message.error('单价不能为空!');
+          } else {
+            this.$message.error('单价输入错误,1-20000之间,最多保留3位小数!');
+          }
+          return false
+        }
+        if (!this.deptBudgetList.totalValue) {
+          this.$message.error('总价值不能为空!');
+          return false
+        }
+        if (!this.deptBudgetList.applicationProportion || _Validate(10, 100, 2, '', this.deptBudgetList
+            .applicationProportion)) {
+          if (!this.deptBudgetList.applicationProportion) {
+            this.$message.error('申请比例不能为空!');
+          } else {
+            this.$message.error('申请比例输入错误,10-100之间,最多保留2位小数!');
+          }
+          return false
+        }
+        if (!this.deptBudgetList.interest || _Validate(1, 1000000000, 2, '', this.deptBudgetList
+            .interest)) {
+          if (!this.deptBudgetList.interest) {
+            this.$message.error('申请金额不能为空!');
+          } else {
+            this.$message.error('申请金额输入错误,1-10亿之间,最多保留2位小数!');
+          }
+          return false
+        }
+        if (!this.deptBudgetList.appendix) {
+          this.$message.error('附件不能为空!');
+          return false
+        } else if (this.deptBudgetList.appendix.split(',').length > 30) {
+          this.$message.error('附件数量需小于30!');
+          return false
+        }
+        if (!this.deptBudgetList.bank) {
+          this.$message.error('银行不能为空!');
+          return false
+        }
+        if (!this.deptBudgetList.three) {
+          this.$message.error('第三方不能为空!')
+          return false
+        }
+      },
       submit() {
-
+        let isValidate = false
+        isValidate = this.validate()
+        if (isValidate) {
+          this.$confirm(`确定提交审核?`, {
+            cancelButtonText: '取消',
+            confirmButtonText: '确定',
+            type: 'warning',
+          }).then(() => {
+            addList(this.deptBudgetList).toPromise().then((response) => {
+              // this.tableData = response.records
+              this.$message.success('提交成功')
+              this.$router.push({
+                path: 'warehouseReceiptRegulation'
+              })
+            }).catch((req) => {
+              // this.tableData = response.records
+              this.$message.success('提交失败')
+            })
+          })
+        }
       },
       onChange() {
         this.$refs.upload
           .handleSaveBill()
           .then(async response => {
-            this.deptBudgetList.addressUrl = response
+            this.deptBudgetList.appendix = response
           })
           .catch(res => {
             EventBus.$emit('error', (JSON.parse(res) || {}).message)
             this.$refs.upload.clearFiles()
           })
       },
+      cancel() {
+        this.$router.push({
+          path: 'warehouseReceiptRegulation'
+        })
+      },
     },
   }
 </script>
 <style lang="scss" scoped>
+  /deep/.el-form-item__content {
+    width: 400px;
+  }
+
+  /deep/.el-select {
+    width: 100%;
+  }
+
   .el-form {
     overflow: scroll;
     height: 94vh;
   }
+
+  .bg-left {
+    padding-left: 30px;
+  }
+
+  .bg-bottom {
+    margin: 15px 0px;
+  }
+
+  .titleup {
+    position: relative;
+  }
+
+  .titleup::before {
+    content: '';
+    display: inline-block;
+    width: 5px;
+    height: 30px;
+    background: #5473e8;
+    position: absolute;
+    left: 0;
+  }
+
+  .bg-right {
+    padding-right: 10px;
+    text-align: right;
+  }
+
+  .center {
+    background: #f6f7fc;
+  }
+
+  .content2 {
+    background: white;
+    // padding:0 200px;
+    // text-align: center;
+    padding-left: 40px;
+  }
+
+  .title1 {
+    font-size: 20px;
+    font-weight: 600;
+    margin: 20px 0;
+  }
 </style>

+ 16 - 4
src/views/tradeServicesManagement/warehouseReceiptEdit.vue

@@ -137,7 +137,7 @@
         </el-form-item>
 		<div>
 			 <el-button @click='inoutput' type="primary">出入库记录</el-button>
-			  <el-button @click='submit'  type="primary">提交审核</el-button>
+			  <el-button @click='submit'  type="primary">提交</el-button>
 		</div>
 		<div>审核记录</div>
 		 <el-table
@@ -165,7 +165,8 @@
 </template>
 <script>
 	import {
-		getList,
+		getwarehousewarrantList,
+    editList
 	} from '@/model/tradeServicesManagement/index'
 	import WsUpload from '@/components/WsUpload'
 	export default {
@@ -180,14 +181,25 @@
 			}
 		},
 		activated() {
-			
+			this.getList()
 		},
 		methods: {
 		inoutput(){
 			this.$router.push({ name: 'inOutRecord' })
 		},
+    getList(){
+      getwarehousewarrantList.toPromise().then((response) => {
+        this.deptBudgetList=response
+      })
+    },
 		submit(){
-
+      editList().toPromise().then((response) => {
+						// this.tableData = response.records
+						 this.$message.success('提交成功')
+					}).catch((req) => {
+						// this.tableData = response.records
+						 this.$message.success('提交失败')
+					})
 		},
 		onChange() {
 			this.$refs.upload

+ 18 - 9
src/views/tradeServicesManagement/warehouseReceiptRegulation.vue

@@ -86,7 +86,8 @@
 <script>
   import mapDrag from '@/components/mapdrag/warehouseReceiptMap'
   import {
-    getList
+    getList,
+    getMapInfo
   } from '@/model/tradeServicesManagement/index'
   import {
     selectWarehouseSelf,
@@ -102,13 +103,14 @@
         isActive: false,
         radio: '1',
         tradeServicesList: [],
+        mapInfo: [],
         currentPage: 1,
         pageSize: 10,
         deptBudgetTotal: 0,
         deptCircularPage: {},
         searchType: '0',
         warehouseList: [],
-        compId:'',
+        compId: '',
       }
     },
     activated() {},
@@ -131,15 +133,20 @@
       }
       this.compId = sessionStorage.getItem('ws-pf_compId')
       this.getList()
+      this.getMapInfo()
       // this.getWarehouseList()
-      this.tradeServicesList = [{
-        authenticationStatus: 'test'
-      }]
+      this.tradeServicesList = []
     },
     methods: {
+      getMapInfo() {
+        getMapInfo().toPromise().then((response) => {
+          console.log('地图数据', response)
+          // this.mapInfo = response.data.records
+        })
+      },
       findList() {
-        this.currentPage=1
-        this.pageSize=10
+        this.currentPage = 1
+        this.pageSize = 10
         this.getList()
       },
       handlestatus(status) {
@@ -214,7 +221,7 @@
           .toPromise()
           .then((response) => {
             console.log('列表数据', response)
-            this.tradeServicesList = response.data.records
+            this.tradeServicesList = response.records
           })
       },
       selectShowType(e) {
@@ -231,10 +238,12 @@
 </script>
 <style lang="scss" scoped>
   .container {}
-  .icon{
+
+  .icon {
     transform: rotate(90deg);
     margin: 0 10px;
   }
+
   .active {
     height: 0 !important;
     overflow: hidden;

+ 5 - 4
src/views/warehouse/warehouseManagementGross.vue

@@ -637,6 +637,7 @@ export default {
       disabled2: true,
       tranCarInfoList: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
+      secretaryWeigher: sessionStorage.getItem('ws-pf_staffName'),
       deptCircularPage: {},
       packtypeList: {},
       date: {
@@ -1416,8 +1417,8 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId =
-                sessionStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName')
               this.deptBudgetList.inOutFlag = 2
               this.deptBudgetList.pcFlag = 1
               this.deptBudgetList.statusFlag = 3
@@ -1940,8 +1941,8 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId =
-                sessionStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName')
               this.deptBudgetList.inOutFlag = 2
               this.deptBudgetList.statusFlag = 1
               let _data = JSON.parse(sessionStorage.getItem('winseaview-userInfo'))

+ 2 - 0
src/views/warehouse/warehouseManagementNoWeightIn.vue

@@ -552,6 +552,7 @@ export default {
       },
       size: 10,
       compId: sessionStorage.getItem('ws-pf_compId'),
+      skinInspector: sessionStorage.getItem('ws-pf_staffName'),
       deptCircularPage: {},
       packtypeList: {},
       date: {
@@ -1372,6 +1373,7 @@ export default {
           this.$refs.dataList.validate((valid) => {
             if (valid) {
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
+              this.dataList.skinInspector = sessionStorage.getItem('ws-pf_staffName')
               this.dataList.inOutFlag = 2
               this.dataList.statusFlag = 3
               this.dataList.grossWeight = (this.dataList.grossWeight/1000).toFixed(2)

+ 2 - 0
src/views/warehouse/warehouseManagementNoWeightOut.vue

@@ -464,6 +464,7 @@ export default {
       },
       size: 10,
       compId: sessionStorage.getItem('ws-pf_compId'),
+      secretaryWeigher: sessionStorage.getItem('ws-pf_staffName'),
       deptCircularPage: {},
       packtypeList: {},
       date: {
@@ -1113,6 +1114,7 @@ export default {
           this.$refs.dataList.validate((valid) => {
             if (valid) {
               this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
+              this.dataList.secretaryWeigher = sessionStorage.getItem('ws-pf_staffName')
               this.dataList.inOutFlag = 1
               this.dataList.statusFlag = 3
               this.dataList.grossWeight /= 1000

+ 4 - 2
src/views/warehouse/warehouseManagementTare.vue

@@ -460,6 +460,7 @@ export default {
       },
       size: 10,
       compId: sessionStorage.getItem('ws-pf_compId'),
+      skinInspector: sessionStorage.getItem('ws-pf_staffName'),
       deptCircularPage: {},
       packtypeList: {},
       date: {
@@ -1002,8 +1003,8 @@ export default {
         .then(() => {
           this.$refs.deptBudgetList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId =
-                sessionStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.compId =  sessionStorage.getItem('ws-pf_compId')
+              this.deptBudgetList.skinInspector = sessionStorage.getItem('ws-pf_staffName')
               this.deptBudgetList.inOutFlag = 1
               this.deptBudgetList.pcFlag = 1
               this.deptBudgetList.statusFlag = 1
@@ -1432,6 +1433,7 @@ export default {
                 this.deptBudgetList.deductionAmount *= 1000
                 this.deptBudgetList.deductionWeight /= 1000
             this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+            this.deptBudgetList.skinInspector = sessionStorage.getItem('ws-pf_staffName')
             this.deptBudgetList.inOutFlag = 1
             this.deptBudgetList.statusFlag = 3
             addstorageputList(this.deptBudgetList)

Некоторые файлы не были показаны из-за большого количества измененных файлов