高敬炎 2 роки тому
батько
коміт
b4863a6151

+ 4 - 4
src/api/V2/speedGoods.js

@@ -3,7 +3,7 @@ const baseUrl = process.env.VUE_APP_API_NEWS
 
 
 // 极速版货名list
-export const API_GET_SPEEDGOODSLIST = `${baseUrl}/speedGoodsInfo/selectInfo`
-export const API_GET_SPEEDGOODSADD = `${baseUrl}/speedGoodsInfo/api/addInfo`
-export const api_speedPositionInfoList = `${baseUrl}/speedPositionInfo/selectInfo`
-export const api_speedPositionInfoAdd = `${baseUrl}/speedPositionInfo/api/addInfo `
+export const API_GET_SPEEDGOODSLIST = `/speedGoodsInfo/selectInfo`
+export const API_GET_SPEEDGOODSADD = `/speedGoodsInfo/api/addInfo`
+export const api_speedPositionInfoList = `/speedPositionInfo/selectInfo`
+export const api_speedPositionInfoAdd = `/speedPositionInfo/api/addInfo`

+ 7 - 1
src/api/V2/warehouse/index.js

@@ -1,2 +1,8 @@
+// 添加出入库
 export const API_POST_ADDINFO = '/speedWarehouseInOutInfo/api/addInfo'
-export const API_POST_DELINFO = '/speedWarehouseInOutInfo/api/deleteInfo'
+// 删除出入库
+export const API_POST_DELINFO = '/speedWarehouseInOutInfo/api/deleteInfo'
+// 出入库列表
+export const API_GET_INFO = '/speedWarehouseInOutInfo/selectInfo'
+// 查看客户信息
+export const API_GET_CUSTOMERINFO = '/speedCustomerInfo/getInfo'

+ 4 - 44
src/api/index.js

@@ -13,8 +13,6 @@ export const API_GET_LOGOUT = '/roleMenu/query/getListByUserId'
 // 找回密码
 export const API_POST_RETRIEVEPASSWORD = '/auth/api/retrievePassword'
 
-// 通过域名获取公司信息
-export const API_GET_COMPANYINFOBYDOMAINNAME = '/company/query/companyInfoByDomainName'
 export const API_GET_COMPANYINFO = `/company/query/companyInfo`
     // 验证密码
 export const API_POST_CHECKPASSWORD = '/auth/api/checkPassword'
@@ -26,8 +24,6 @@ export const API_POST_SENDVERICODE = '/veriCode/api/send'
 export const API_GET_LOGININFO = '/auth/query/loginInfo'
 
 
-// 修改管理员密码
-export const API_POST_CHANGEPASSWORDBYPWD = '/auth/api/changePassword'
 
 export const API_GET_FINDVESSELSYSVERSION = '/system/query/findVesselSysVersion'
     //确认是否是第一次登陆接口
@@ -52,20 +48,13 @@ export const API_GET_CHANGELOGINFLAG = '/auth/query/changeLoginFlag'
  */
 export const API_GET_BATCHATTACHMENT = '/appendix/download/batchAttachment'
 
-/**
- * 获取船舶接口 TODO: 目前没有全部接口只能随便找一个
- */
-export const API_GET_VESSELSBYSTATISTICS = '/baseVessel/query/getVessels'
 
 /**
  * 获取部门接口
  */
 export const API_GET_VESSELDEPTBYCOMPID = '/commonDeptRole/query/getVesselDeptByCompId'
 
-/**
- * 获取岸基部门
- */
-export const API_GET_DEPTLISTBYCOMPID = '/staff/query/deptListByCompId'
+
 
 // 获取BI报表路径
 export const API_GET_BI_REPORT_URL = '/bi/query/reportUrl'
@@ -76,25 +65,11 @@ export const API_GET_TENANT_SERVICE_TYPE = '/tenant/query/findTenantServiceType'
 // 获取当前登录用户信息
 export const API_GET_CURRENTUSERINFO = `/staff/query/getCurrentUserInfo`
 
-// 通过公司ID获取船舶列表
-export const API_GET_VESSELLISTBYCOMPID = `/staff/query/vesselListByCompId`
-    // 查询部门下职员 岸端
-export const API_GET_STAFFLISTBYDEPTID = `/staff/query/getStaffListByDeptId`
-    // 根据公司ID获取船上所有职务 船端
-export const API_GET_ROLEDUTYBYCOMPID = `/commonDeptRole/query/getRoleDutyByCompId`
-    // 查询部门下职员 船端
-export const API_GET_ROLELISTBYDEPTID = `/commonDeptRole/query/getRoleListByDeptId`
-
-export const API_GET_INITDETAILINFO = `/financeMonthBudget/query/getInitDetailInfo`
-    // 根据用户查询所在公司的船舶
-export const API_GET_USERVESSELLISTBYSTATUS = `/vessel/query/getUserVesselListByStatus`
+
+
     // 根据公司ID获取职务列表
 export const API_GET_ROLELIST = `/role/query/roleList`
 
-// 判断当前客户端是否是船端
-export const API_GET_ISVESSELTERMINAL = `/system/query/isVesselTerminal`
-    // 判断当前客户端是否是岸基
-export const API_GET_ISLANDBASED = `/system/query/isLandBased`
 
 // 判断当前租户在运营后台是否选择code
 export const API_GET_ATTRIBUTESERVICE = `/pluginService/query/attributeService`
@@ -102,26 +77,11 @@ export const API_GET_ATTRIBUTESERVICE = `/pluginService/query/attributeService`
 export const API_POST_RENEWALHEAD = `/thermalRouting/api/renewalHead`
     // 获取快捷路口列表
 export const API_GET_FINDHOTTESTROUTING = `/thermalRouting/query/findHottestRouting`
-    // 查询当前职员的显示项
-export const API_GET_STAFFHOMESHOWLIST = `/staffHomeShowInfo/query/getStaffHomeShowList`
-    // 更新职员显示项
-export const API_POST_UPDATESHOWINFO = `/staffHomeShowInfo/api/updateShowInfo`
-    // TODO: 不能删除第二事业部使用【操作历史】
-export const API_GET_COMMONBILLOPERATEHIS = `/billOperateHis/query/commonBillOperateHis`
+
 
 // 根据公司Id获取角色列表 船端
 export const API_GET_BASEDATA_VESSLEROLEBYCOMPID = `/commonDeptRole/query/getVessleRoleByCompId`
 
-// 查询公司常量基础数据
-export const API_GET_BASEDATA_PARAMETERCOMPANY = `/parameterCompany/query/parameterTenant`
-
-
-// 动态轨迹船舶
-export const API_GET_DYNAMICTRAJECTORYVESSELLIST = `/baseVessel/query/getDynamicTrajectoryVesselList`
-
-// 动态轨迹船舶航线绘制
-export const API_GET_DYNAMICTRAJECTORYTrackDraw = `/vesselTrajectory/query/getVesselTrajectory`
-
 //我发布的-导出
 export const API_GET_EXPORT_CIRCULARMANAGEMENT_INFOLIST = `/txCircularManagementInfo/query/exportCircularManagementInfoList`
 

+ 6 - 3
src/model/warehouse/index.js

@@ -3,11 +3,14 @@ import { appRx } from '../defalutConfig/indexRx'
 import {
     API_POST_ADDINFO,
     API_POST_DELINFO,
-    API_GET_INFO
-} from '@/api/common'
+    API_GET_INFO,
+    API_GET_CUSTOMERINFO
+} from '@/api/V2/warehouse'
 // 添加出入库
 export const addList = appRx.post(API_POST_ADDINFO, errorCatcher, errorHandle, filter)
 // 删除出入库
 export const delList = appRx.post(API_POST_DELINFO, errorCatcher, errorHandle, filter)
 // 出入库列表
-export const getList = appRx.get(API_GET_INFO, errorCatcher, errorHandle, filter)
+export const getList = appRx.get(API_GET_INFO, errorCatcher, errorHandle, filter)
+// 查看客户信息
+export const getcustomer = appRx.get(API_GET_CUSTOMERINFO, errorCatcher, errorHandle, filter)

+ 1 - 0
src/store/modules/user.js

@@ -107,6 +107,7 @@ const mutations = {
 
 const actions = {
     async login({ commit, dispatch }, userInfo) {
+        console.log(login)
         const { username, password, domainName, companyName, status } = userInfo
         localStorage.setItem('ws-pf_pass', password)
         const data = await login({

+ 75 - 20
src/views/warehousing/index.vue

@@ -28,11 +28,11 @@
               <el-checkbox v-model="checked">手动编辑重量</el-checkbox>
             </div>
             <el-form-item label="毛重(公斤)">
-              <el-input :disabled="!checked" placeholder="输入毛重" v-model="form.grossWeight"></el-input>
+              <el-input @input="grossWeightInput" :disabled="!checked" placeholder="输入毛重" v-model="form.grossWeight"></el-input>
               <el-button type="text">获取</el-button>
             </el-form-item>
             <el-form-item label="皮重(公斤)">
-              <el-input :disabled="!checked" placeholder="输入皮重" v-model="form.tare"></el-input>
+              <el-input @input="tareInput" :disabled="!checked" placeholder="输入皮重" v-model="form.tare"></el-input>
               <el-button type="text">获取</el-button>
             </el-form-item>
             <el-form-item label="净重(公斤)">
@@ -49,9 +49,8 @@
               <el-input placeholder="输入毛重车牌号" v-model="form.carNumber"></el-input>
             </el-form-item>
             <el-form-item label="仓位号">
-              <el-select filterable clearable placeholder="输入仓位号" v-model="form.positionNo" >
-                <el-option label="区域一" value="shanghai"></el-option>
-                <el-option label="区域二" value="beijing"></el-option>
+              <el-select filterable clearable @change="positionNoChange" placeholder="输入仓位号" v-model="form.positionId" >
+                <el-option v-for="item in positionOptions" :key="item.id" :label="item.positionNo" :value="item.id"></el-option>
               </el-select>
             </el-form-item>
             <div class="form-title">定价信息</div>
@@ -67,8 +66,7 @@
           <el-form  ref="form" :model="form" label-position="left" label-width="120px">
             <el-form-item label="货名">
               <el-select filterable clearable placeholder="选择货名" v-model="form.goodsName" >
-                <el-option label="区域一" value="shanghai"></el-option>
-                <el-option label="区域二" value="beijing"></el-option>
+                <el-option v-for="item in goodOptions" :key="item.id" :label="item.goodsName" :value="item.goodsName"></el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="容重(克/升)">
@@ -128,7 +126,12 @@
         <el-table-column prop="createDate" label="日期"></el-table-column>
         <el-table-column prop="positionNo" label="仓位"></el-table-column>
         <el-table-column prop="carNumber" label="车牌号"></el-table-column>
-        <el-table-column prop="customerName" label="客户"></el-table-column>
+        <el-table-column prop="customerName" label="客户">
+          <template scope="scope">
+            <span v-if="scope.row.customerId">{{ scope.row.customerName }}</span>
+            <el-button v-else @click="lookCustomerName(scope.row)" type="text">{{ scope.row.customerName }}</el-button>
+          </template>
+        </el-table-column>
         <el-table-column width="120" prop="goodsName" label="货名"></el-table-column>
         <el-table-column width="120" prop="grossWeight" label="毛重(吨)"></el-table-column>
         <el-table-column width="120" prop="tare" label="皮重(吨)"></el-table-column>
@@ -183,9 +186,15 @@
 import {
   addList,
   delList,
-  getList
+  getList,
+  getcustomer
 } from '@/model/warehouse/index'
 import BalanceAlert from '@/components/balanceAlert'
+import {
+  speedPositionInfoList,
+  speedGoodsList,
+} from '@/model/speedGoods'
+// import { threadId } from 'worker_threads';
 // import CenterMap from "./center-map.vue";
 export default {
   components: {
@@ -194,10 +203,25 @@ export default {
   data() {
     return {
       tableData:[],
-      form:{},
+      form:{
+        inOutFlag:1,
+        compId:localStorage.getItem('ws-pf_compId'),
+      },
       information:'',
       checked:false,
-      searchKeyWord:''
+      searchKeyWord:'',
+      compId:localStorage.getItem('ws-pf_compId'),
+      positionOptions:[],
+      goodOptions:[],
+      startDate:'',
+      endDate:'',
+      searchKeyWord:'',
+      currentPage:1,
+      pageSize:10,
+      value:[],
+      deptBudgetTotal:0,
+      dialogVisible:false,
+      customerData:{}
     };
   },
   filters: {
@@ -208,14 +232,36 @@ export default {
   created() {
   },
   mounted() {
-    getList().toPromise()
-
+    // getList().toPromise()
+    speedPositionInfoList({compId:this.compId}).toPromise().then((res)=>{
+      this.positionOptions=res
+    })
+    speedGoodsList({compId:this.compId}).toPromise().then((res)=>{
+      this.goodOptions=res
+    })
+    this.getList()
   },
   beforeDestroy() {
  
     
   },
   methods: {
+    lookCustomerName(){
+      getcustomer({}).toPromise().then((res)=>{
+      this.customerData=res
+    })
+    },
+    positionNoChange(e){
+      for (let i = 0; i < this.positionOptions.length; i++) {
+        if(this.positionOptions[i].id==e){
+          this.form.positionNo=this.positionOptions[i].positionNo
+        }
+      }
+    },
+    grossWeightInput(e){
+      if(this.form.tare) this.form.netWeight=e-this.form.tare
+    },
+    tareInput(e){if(this.form.grossWeight) this.form.netWeight=this.form.grossWeight-e},
     changeDate(){
       if(this.value){
         this.startDate = this.value[0]
@@ -226,6 +272,12 @@ export default {
       }
       this.getList()
     },
+    getList(){
+      getList({compId:this.compId,startDate:this.startDate,endDate:this.endDate,pageSize:this.pageSize,currentPage:this.currentPage}).toPromise().then((res)=>{
+        this.tableData=res.records
+        this.deptBudgetTotal=res.total
+      })
+    },
     setVal(data) {
       if (this.information == '毛重') {
         this.form.grossWeight = data
@@ -234,10 +286,11 @@ export default {
       }
     },
     add(){
-      this.form={}
+      this.form={inOutFlag:1,
+        compId:localStorage.getItem('ws-pf_compId'),}
     },
     save(){
-      addList().toPromise()
+      addList(this.form).toPromise()
     },
     del(row){
       this.$confirm('确定删除入库记录?', '提示', {
@@ -245,11 +298,13 @@ export default {
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
-          delList().toPromise()
-          this.$message({
-            type: 'success',
-            message: '删除成功!'
-          });
+          delList({id:row.id}).toPromise().then((res)=>{
+            this.$message({
+              type: 'success',
+              message: '删除成功!'
+            });
+          })
+          
         }).catch(() => {
           this.$message({
             type: 'info',