Browse Source

前端gjy

18513069273 4 năm trước cách đây
mục cha
commit
f1f25d64c2

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 1351 - 656
package-lock.json


+ 2 - 1
package.json

@@ -43,6 +43,7 @@
   },
   "dependencies": {
     "@babel/polyfill": "^7.12.1",
+    "@babel/preset-env": "^7.14.4",
     "axios": "^0.20.0",
     "babel-polyfill": "^6.26.0",
     "base-core-lib": "^1.3.16",
@@ -78,7 +79,7 @@
     "xe-utils": "^2.3.0"
   },
   "devDependencies": {
-    "@babel/core": "7.0.0",
+    "@babel/core": "^7.0.0",
     "@babel/register": "7.0.0",
     "@pixul/node-rancher-api": "^1.4.0",
     "@vue/cli-plugin-babel": "3.6.0",

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

@@ -18,15 +18,20 @@ export const API_GET_WAREHOUSE_DELETE = '/warehouseBaseInfo/api/deleteWarehouse'
 //仓库编辑
 export const API_POST_WAREHOUSE_EDIT = '/warehouseBaseInfo/api/editWarehouse'
 //盘损
-export const API_POST_WAREHOUSE_IOSS = '/warehouseInventoryCountInfo/getInfo'
+export const API_GET_WAREHOUSE_IOSS = '/warehouseInventoryCountInfo/getInfo'
 //货名下拉
 export const API_POST_WAREHOUSE_NAME = '/warehousePositionStorageInfo/selectGoodsName'
 
 // 货名等下拉
 export const API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN = `/commonSysParameter/getInfo`
 // 入库添加
+
 export const API_POST_STORAGE_PUT = `/warehouseInOutInfo/InOutWarehouse`
 //流转记录
 export const API_GET_SELECT_INFO = `/warehouseInOutInfo/selectInfo`
 // 盘损记录
-export const API_GET_WAREHOUSE_INVENTORYCOUNT = '/warehouseInventoryCountInfo/selectInfo'
+export const API_GET_WAREHOUSE_INVENTORYCOUNT = '/warehouseInventoryCountInfo/selectInfo'
+//盘损提交
+export const API_POST_STORAGE_IOSS = '/warehouseInventoryCountInfo/addInventory'
+//待完善记录
+export const API_GET_WAREHOUSE_COMPLETE = '/warehouseInOutInfo/selectWarehouseInOutInfo'

+ 58 - 18
src/components/mapdrag/mapdrag.vue

@@ -1,7 +1,7 @@
 <style lang='scss' scoped>
 .mapContent {
   position: relative;
-  margin-top: 40px;
+  margin-top: 64px;
 }
 #mapContainer {
   width: 300px;
@@ -28,6 +28,14 @@
     resize: none;
   }
 }
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #5878e8;
+  border-color: #5473e8;
+}
 </style>
 
 <template>
@@ -61,13 +69,15 @@
         >
         </el-option>
       </el-select>
-      <el-input
+      <!-- <el-input
         type="textarea"
         id="searchValue"
         placeholder="地址"
         v-model="address"
         clearable
-      ></el-input>
+      ></el-input> -->
+      <el-button @click="positions" type="primary">确定定位</el-button>
+      <el-button @click="anewselect">重新选择</el-button>
     </div>
   </div>
 </template>
@@ -89,6 +99,9 @@ export default {
       address: '',
       objPoint: [],
       markers: [],
+      zoomEnable: true,
+      dragEnable: true,
+      status: true,
     }
   },
   props: ['flagVisible', 'position'],
@@ -114,16 +127,20 @@ export default {
       this.map = new AMap.Map('mapContainer', {
         resizeEnable: true,
         zoom: 10,
+        zoomEnable: this.zoomEnable,
+        dragEnable: this.dragEnable,
       })
       this.map.on('click', function (e) {
-        var marker = new AMap.Marker({
-          position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
-        })
-        that.map.remove(that.markers)
-        that.$emit('marker', e)
-        that.markers.push(marker)
-        // 将创建的点标记添加到已有的地图实例:
-        that.map.add(marker)
+        if (this.status) {
+          var marker = new AMap.Marker({
+            position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
+          })
+          that.map.remove(that.markers)
+          that.$emit('marker', e)
+          that.markers.push(marker)
+          // 将创建的点标记添加到已有的地图实例:
+          that.map.add(marker)
+        }
       })
       this.marker = new AMap.Marker({
         icon: new AMap.Icon({
@@ -150,7 +167,6 @@ export default {
             that.marker.setPosition(e.poi.location)
             placeSearch.search() // 关键字查询查询
             geocoder.getAddress(e.poi.location, function (status, result) {
-              console.log(status)
               if (status === 'complete') {
                 var obj = {}
                 that.province = result.regeocode.addressComponent.province
@@ -221,6 +237,24 @@ export default {
     this.loadmap()
   },
   methods: {
+    positions() {
+      this.status = false
+      var status = {
+        zoomEnable: false,
+        dragEnable: false,
+      }
+      this.map.setStatus(status)
+      this.loadmap()
+    },
+    anewselect() {
+      this.status = true
+      var status = {
+        zoomEnable: true,
+        dragEnable: true,
+      }
+      this.map.setStatus(status)
+      this.loadmap()
+    },
     loadmap(val) {
       let params = val
       var that = this // 插件
@@ -278,16 +312,22 @@ export default {
       })
     },
     selectP(val) {
-      this.loadmap(val)
-      this.city = ''
-      this.district = ''
+      if (this.status) {
+        this.loadmap(val)
+        this.city = ''
+        this.district = ''
+      }
     },
     selectC(val) {
-      this.loadmap(val)
-      this.district = ''
+      if (this.status) {
+        this.loadmap(val)
+        this.district = ''
+      }
     },
     selectD(val) {
-      this.loadmap(val)
+      if (this.status) {
+        this.loadmap(val)
+      }
     },
   },
 }

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

@@ -9,12 +9,14 @@ import {
     API_GET_WAREHOUSE_DELETELIST,
     API_POST_WAREHOUSE_HIDE,
     API_POST_WAREHOUSE_EDIT,
-    API_POST_WAREHOUSE_IOSS,
+    API_GET_WAREHOUSE_IOSS,
     API_POST_WAREHOUSE_NAME,
     API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN,
     API_POST_STORAGE_PUT,
     API_GET_SELECT_INFO,
-    API_GET_WAREHOUSE_INVENTORYCOUNT
+    API_GET_WAREHOUSE_INVENTORYCOUNT,
+    API_POST_STORAGE_IOSS,
+    API_GET_WAREHOUSE_COMPLETE,
 } from '@/api/V2/warehouse'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
@@ -34,7 +36,7 @@ export const hide = appRx.post(API_POST_WAREHOUSE_HIDE, errorCatcher, errorHandl
 //仓库编辑
 export const edit = appRx.post(API_POST_WAREHOUSE_EDIT, errorCatcher, errorHandle, filter)
 //盘损
-export const ioss = appRx.post(API_POST_WAREHOUSE_IOSS, errorCatcher, errorHandle, filter)
+export const ioss = appRx.get(API_GET_WAREHOUSE_IOSS, errorCatcher, errorHandle, filter)
 //货名下拉
 export const goodsname = appRx.get(API_POST_WAREHOUSE_NAME, errorCatcher, errorHandle, filter)
 // 货名等下拉
@@ -45,4 +47,9 @@ export const addstorageputList = appRx.post(API_POST_STORAGE_PUT, errorCatcher,
 export const addselectinfoList = appRx.get(API_GET_SELECT_INFO, errorCatcher, errorHandle, filter)
 // 盘损记录
 export const adjustmentrecordList = appRx.get(API_GET_WAREHOUSE_INVENTORYCOUNT, errorCatcher, errorHandle, filter)
+//盘损提交
+export const submitioss = appRx.post(API_POST_STORAGE_IOSS, errorCatcher, errorHandle, filter)
+
+//待完善记录
+export const complete = appRx.get(API_GET_WAREHOUSE_COMPLETE, errorCatcher, errorHandle, filter)
 

+ 138 - 46
src/views/warehouse/warehouseManagementAdd.vue

@@ -25,17 +25,12 @@ npm install vue-amap --save// 仓库添加
     <ws-form
       class="position"
       ref="deptBudgetList"
-      :rules="mainReportAdd"
+      :rules="rules"
       :model="deptBudgetList"
-    >
+      ><div class="small-title">基本信息</div>
       <ws-info-table>
         <!--仓库名称-->
-        <ws-form-item
-          label="仓库名称"
-          span="1"
-          prop="contractNo"
-          class="readonly"
-        >
+        <ws-form-item label="仓库名称" span="1" prop="warehouseName">
           <ws-input
             v-model="deptBudgetList.warehouseName"
             placeholder="请输入仓库名"
@@ -44,7 +39,12 @@ npm install vue-amap --save// 仓库添加
           />
         </ws-form-item>
         <!--负责人-->
-        <ws-form-item label="负责人" span="1" prop="buyer" class="readonly">
+        <ws-form-item
+          label="负责人"
+          span="1"
+          prop="personCharge"
+          class="readonly"
+        >
           <ws-input
             v-model="deptBudgetList.personCharge"
             placeholder="请输入负责人姓名"
@@ -54,7 +54,7 @@ npm install vue-amap --save// 仓库添加
         </ws-form-item>
 
         <!--负责人电话-->
-        <ws-form-item label="负责人电话" span="1" prop="shippingType">
+        <ws-form-item label="负责人电话" span="1" prop="personPhone">
           <ws-input
             v-model="deptBudgetList.personPhone"
             placeholder="请输入负责人手机号码"
@@ -70,7 +70,7 @@ npm install vue-amap --save// 仓库添加
             v-model="selectedOptions"
             clearable
             size="large"
-            placeholder="请选择交货地"
+            placeholder="请选择仓库所在地"
             style="width: 200%"
             @change="handleChange"
           />
@@ -94,6 +94,7 @@ npm install vue-amap --save// 仓库添加
         <!--总吨量(吨)-->
         <ws-form-item label="总吨量(吨)" span="1" prop="settlementMethod">
           <ws-input
+            class="totalStorage"
             :readonly="true"
             v-model="totalStorage"
             maxlength="100"
@@ -131,7 +132,7 @@ npm install vue-amap --save// 仓库添加
             <ws-input
               v-model="item.remark"
               placeholder="请输入交货地"
-              maxlength="100"
+              maxlength="20"
               size="small"
             />
           </ws-form-item>
@@ -155,6 +156,7 @@ npm install vue-amap --save// 仓库添加
       </ws-info-table>
     </ws-form>
     <ws-form ref="deptBudgetList" :model="deptBudgetList">
+      <div class="small-title">上传仓库照片</div>
       <ws-upload
         ref="upload"
         table-name="maintain_work_order"
@@ -167,9 +169,11 @@ npm install vue-amap --save// 仓库添加
         @onChange="onChange"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
       />
+      <div style="margin-bottom: 5px" class="small-title">仓库定位</div>
+      <map-drag @marker="marker" @selectedAddress="selectedAddress"></map-drag>
     </ws-form>
     <!-- <ws-button @click="exportlist()"></ws-button> -->
-    <map-drag @marker="marker" @selectedAddress="selectedAddress"></map-drag>
+
     <!-- 提交 -->
     <div style="text-align: right; padding: 10px" class="center">
       <el-button
@@ -245,7 +249,21 @@ export default {
       listDate: { country: '中国', level: 'country', city: '' },
       citylist: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
-      mainReportAdd: {},
+      rules: {
+        warehouseName: [
+          {
+            required: true,
+            message: '请输入仓库名称',
+            trigger: 'blur',
+          },
+          {
+            min: 2,
+            max: 20,
+            message: '仓库名长度不符合要求,请输入2-20字符之内',
+            trigger: 'blur',
+          },
+        ],
+      },
       appendixIdsAdd: '',
       size: 10,
       value1: '',
@@ -321,30 +339,85 @@ export default {
     },
 
     submit() {
-      console.log(this.freightspace)
-
-      this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.warehousePrivate =
-            CodeToText[this.selectedOptions[0]]
-          this.deptBudgetList.warehouseCity =
-            CodeToText[this.selectedOptions[1]]
-          this.deptBudgetList.warehouseArea =
-            CodeToText[this.selectedOptions[2]]
-          this.deptBudgetList.warehousePositionInfoList = this.freightspace
-          this.deptBudgetList.totalStorage = this.totalStorage
-          addList(this.deptBudgetList)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'warehouseManagementList' })
-            })
-        } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
-        }
+      console.log(this.deptBudgetList)
+      if (!this.deptBudgetList.warehouseName) {
+        this.$message({
+          message: '仓库名称不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.warehouseName.length < 2 ||
+        this.deptBudgetList.warehouseName.length > 20
+      ) {
+        this.$message({
+          message: '仓库名称长度不符合要求,请控制在2-20字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.personCharge.length < 2 ||
+        this.deptBudgetList.personCharge.length > 10
+      ) {
+        this.$message({
+          message: '负责人长度不符合要求,请控制在2-10字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.personPhone.length > 11) {
+        this.$message({
+          message: '手机号输入有误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.detailedAddress.length < 2 ||
+        this.deptBudgetList.detailedAddress.length > 20
+      ) {
+        this.$message({
+          message: '详细地址长度不符合要求,请控制在2-20字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定提交仓库信息?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
       })
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId = sessionStorage.getItem(
+                'ws-pf_compId'
+              )
+              this.deptBudgetList.warehousePrivate =
+                CodeToText[this.selectedOptions[0]]
+              this.deptBudgetList.warehouseCity =
+                CodeToText[this.selectedOptions[1]]
+              this.deptBudgetList.warehouseArea =
+                CodeToText[this.selectedOptions[2]]
+              this.deptBudgetList.warehousePositionInfoList = this.freightspace
+              this.deptBudgetList.totalStorage = this.totalStorage
+              addList(this.deptBudgetList)
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('添加成功')
+                  this.$router.push({ path: 'warehouseManagementList' })
+                })
+            } else {
+              EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+              return false
+            }
+          })
+        })
+        .catch(() => {
+          return false
+        })
     },
     resetForm(deptBudgetList) {
       this.$refs[deptBudgetList].resetFields()
@@ -469,6 +542,24 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+/deep/.totalStorage .el-input__inner {
+  color: #afb5cb;
+  background: #f5f7fa;
+}
+.small-title {
+  position: relative;
+  padding: 10px;
+}
+.small-title::before {
+  position: absolute;
+  content: '';
+  display: block;
+  background: #5473e8;
+  width: 4px;
+  height: 14px;
+  left: 0px;
+  top: 13px;
+}
 .position {
   position: relative;
 }
@@ -490,8 +581,8 @@ export default {
   padding: 0 15%;
 }
 /deep/.ws-info-table .el-form-item {
-  border-right: 1px solid #cdd2dc;
-  border-bottom: 1px solid #cdd2dc;
+  border-right: 1px solid transparent;
+  border-bottom: 1px solid transparent;
 }
 .readonly {
   position: relative;
@@ -517,6 +608,10 @@ export default {
   position: absolute;
   left: 0;
 }
+.ws-info-table {
+  border-left: 1px solid transparent;
+  border-top: 1px solid transparent;
+}
 .el-button--primary {
   background-color: #5878e8;
   border-color: #5878e8;
@@ -526,13 +621,13 @@ export default {
 }
 /deep/.ws-info-table .el-form-item .el-form-item__content {
   padding: 0 25px;
-  border-left: 1px solid #cdd2dc;
-  background: #fafbfc;
+  border-left: 1px solid transparent;
+  background: #fff;
 }
 /deep/.ws-info-table .el-form-item .el-form-item__label {
-  width: 140px;
+  width: 100px;
   text-align: center;
-  background: #f0f2f6;
+  background: #fff;
   // border: 1px solid #cdd2dc;
 }
 .button-container {
@@ -693,9 +788,6 @@ export default {
   overflow: scroll;
   height: 93vh;
 }
-/deep/.ws-info-table .el-form-item .el-form-item__label {
-  width: 130px;
-}
 .ws-info-table .el-form-item {
   width: 33.3333%;
 }

+ 104 - 61
src/views/warehouse/warehouseManagementIoss.vue

@@ -14,15 +14,19 @@
         >
       </el-col>
     </el-row>
-    <div class="center">
-      <h2>鲅鱼圈一号库  102仓位</h2>
-      <ws-form ref="deptBudgetList" :model="deptBudgetList">
+    <div class="center">  
+      <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+        <h2>                      
+          {{deptBudgetList1.warehouseName }}库
+          {{deptBudgetList1.binNumber }}仓位
+      </h2>
         <!-- 货名 -->
-        <ws-form-item label="货名" span="1"  class="readonly">
+        <ws-form-item label="货名" span="1"  class="readonly" prop="goodsName">
           <ws-select
+            v-model="deptBudgetList.goodsName"
             placeholder=""
             class="typeselect"
-            @change="selectpackingMethod"
+            @change="changeioss"
           >
             <ws-option
               v-for="item in goodnameList"
@@ -33,73 +37,35 @@
           </ws-select>
         </ws-form-item>
         <!--当期累计入库量-->
-        <ws-form-item label="当期累计入库量(吨)" span="1" prop="shippingType">
-          <ws-input
-            v-model="deptBudgetList.shippingType"
-            placeholder="当期累计入库量(吨)"
-            maxlength="20"
-            size="small"
-          />
+        <ws-form-item label="当期累计入库量(吨)" span="1" prop="cumulativeStockIn">
+          {{deptBudgetList.cumulativeStockIn}}
         </ws-form-item>
-
         <!--当期累计出库量(吨)-->
-        <ws-form-item
-          label="当期累计出库量(吨)"
-          span="1"
-          prop="buyer"
-          class="readonly"
-        >
-          <ws-input
-            v-model="deptBudgetList.buyer"
-            placeholder="当期累计出库量(吨)"
-            maxlength="100"
-            size="small"
-          />
+        <ws-form-item label="当期累计出库量(吨)" span="1" prop="cumulativeStockOut" class="readonly">
+          {{deptBudgetList.cumulativeStockOut}}
         </ws-form-item>
-
         <!--应余库存(吨)-->
-        <ws-form-item label="应余库存(吨)" span="1" prop="settlementMethod">
-          <ws-input
-            v-model="deptBudgetList.settlementMethod"
-            placeholder="应余库存(吨)"
-            maxlength="120"
-            size="small"
-          />
+        <ws-form-item label="应余库存(吨)" span="1" prop="surplusInventory">
+         {{deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut > 0 ? deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut : 0}}
         </ws-form-item>
-
         <!--实际库存(吨)-->
-        <ws-form-item
-          label="实际库存(吨)"
-          span="1"
-          prop="seller"
-          class="readonly"
-        >
+        <ws-form-item label="实际库存(吨)" span="1" prop="physicalInventory" class="readonly">
           <ws-input
-            v-model="deptBudgetList.seller"
-            placeholder="实际库存(吨)"
+            v-model="deptBudgetList.physicalInventory"
+            placeholder="请输入实际库存(吨)"
             maxlength="100"
             size="small"
           />
         </ws-form-item>
-
         <!--损耗量(吨)-->
-        <ws-form-item label="损耗量(吨)" span="1" prop="sourceGoods">
-          <ws-input
-            v-model="deptBudgetList.sourceGoods"
-            placeholder="损耗量(吨)"
-            maxlength="20"
-            size="small"
-          />
+        <ws-form-item label="损耗量(吨)" span="1" prop="ioss">
+          {{(deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory > 0 ? (deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory : 0}}
         </ws-form-item>
 
         <!--库损比例-->
-        <ws-form-item label="库损比例" span="1" prop="contractNo">
-          <ws-input
-            v-model.number="deptBudgetList.buyerPhone"
-            placeholder="库损比例"
-            maxlength="100"
-            size="small"
-          />
+        <ws-form-item label="库损比例" span="1" prop="inventoryRatio">
+          <!-- .占比=损耗量÷(累计入库-实际库存) -->
+          {{((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory) > 0 ? ((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory) : 0 }} {{'‰'}}
         </ws-form-item>
         <p>注:提交成功后,当期实际库存将作为下一期的初始库存。</p>
       </ws-form>
@@ -119,6 +85,8 @@
 <script>
 import {
   goodsname,
+  ioss,
+  submitioss,
 } from '@/model/warehouse/index'
 
 import { downloadFile } from '@/utils/batchDown'
@@ -169,14 +137,25 @@ export default {
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: {},
+      deptBudgetList1:[],
       date: {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
       },
+
       contractList: [],
-      deptBudgetList: {},
+      deptBudgetList:{},
       historyList: [],
-
+       rules: {
+        netWeight: [
+          {
+            required: true,
+            type: 'number',
+            message: '请输入活动名称',
+            trigger: 'blur',
+          },
+        ],
+      },
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
@@ -191,6 +170,18 @@ export default {
     // this.getVesselData();
     this.loaddata()
     this.showType = this.isShow
+  },
+   mounted() {
+    this.deptBudgetList.baseId = this.$route.query.baseId
+    this.deptBudgetList.positionId = this.$route.query.positionId
+    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+    this.deptBudgetList.binNumber = this.$route.query.binNumber
+    this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
+    this.deptBudgetList1.binNumber = this.$route.query.binNumber
+    this.deptBudgetList1.baseId=this.this.$route.query.baseId
+    this.deptBudgetList1.positionId=this.$route.query.positionId
+    this.deptBudgetList1.goodsNameKey=this.deptBudgetList.goodsNameKey
+    // this.getList()
   },
   methods: {
     //返回按钮
@@ -199,7 +190,31 @@ export default {
     },
     //提交按钮
     submit(){
-      this.$router.push({ path: 'warehouseManagementList' })
+       this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.surplusInventory=this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut
+          this.deptBudgetList.loss=(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
+         this.deptBudgetList.inventoryRatio=((this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory)/(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.physicalInventory)
+         this.deptBudgetList.baseId=this.deptBudgetList1.baseId
+         this.deptBudgetList.positionId=this.deptBudgetList1.positionId
+         this.deptBudgetList.binNumber=this.deptBudgetList1.binNumber
+         this.deptBudgetList.warehouseName=this.deptBudgetList1.warehouseName
+         this.deptBudgetList.goodsNameKey=this.deptBudgetList1.goodsNameKey
+         this.deptBudgetList.compId = this.compId
+          this.deptBudgetList.contractType = 1
+          console.log(this.deptBudgetList)
+         submitioss(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('提交成功')
+              this.$router.push({ path: 'warehouseManagementList' })
+            })
+        } else {
+          //EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+      // this.$router.push({ path: 'warehouseManagementList' })
     },
     dateFormat(fmt, date) {
       let ret
@@ -235,10 +250,38 @@ export default {
       this.currentPage = val
       console.log(`当前页: ${val}`)
       this.getList()
+    },
+    changeioss(e){
+      console.log(e)
+        for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].goodsName == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
+        }
+      }
+      // console.log(this.deptBudgetList)
+      //   for (var i = 0; i < this.packtypeList.length; i++) {
+      //     console.log(this.packtypeList[i].goodsName)
+      //   if (this.packtypeList[i].goodsName == e) {
+      //    this.getLook(this.packtypeList[i].id)
+      //   //  console.log(this.packtypeList[i].positionId)
+      //   }
+      // }    
+      this.ioss()
+    },
+     ioss(){
+      ioss(
+        this.deptBudgetList
+      )
+        .toPromise()
+        .then((response) => {
+         this.deptBudgetList=response
+         console.log(this.deptBudgetList)
+        
+        })
     },
      loaddata() {
       // 货名
-      goodsname({ constId: 'CON2' })
+      goodsname({positionId : this.$route.query.positionId})
         .toPromise()
         .then((response) => {
           this.goodnameList = response

+ 113 - 54
src/views/warehouse/warehouseManagementList.vue

@@ -5,22 +5,27 @@
       <template slot="left">
         <ws-button
           type="primary"
-          @click="handleLook()"
+          @click="handleAdd()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >查看</ws-button
+          ><img
+            width="11"
+            height="11"
+            style="position: relative; top: 1px"
+            src="../../../public/img/header-add.png"
+            alt=""
+          />
+          添加</ws-button
         >
         <ws-button
-          type="primary"
-          @click="handleAdd()"
+          @click="handleLook()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >添加</ws-button
+          >查看</ws-button
         >
         <ws-button
-          type="primary"
           @click="handleEdit()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
@@ -28,7 +33,6 @@
           >编辑</ws-button
         >
         <ws-button
-          type="primary"
           @click="handleDelete()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
@@ -38,7 +42,7 @@
       </template>
       <template slot="right">
         <ws-input
-          v-model="searchKeyWord"
+          v-model="warehouseName"
           placeholder="请输入仓库名"
           clearable
           maxlength="500"
@@ -67,7 +71,7 @@
         /></ws-button>
       </template>
     </BaseHeaderLayout>
-    <div class="connert">
+    <div>
       <el-table
         class="wenzi"
         :data="warehouseList"
@@ -87,30 +91,42 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="品种">
+        <el-table-column class="table_td" label="品种">
           <template slot-scope="scope">
-            <div v-for="(item, i) in scope.row.warehouseNumViewList">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
               {{ item.goodsName }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="入库量(吨)">
+        <el-table-column class="table_td" label="入库量(吨)">
           <template slot-scope="scope">
-            <div v-for="(item, i) in scope.row.warehouseNumViewList">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
               {{ item.inNetWeight }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="出库量(吨)">
+        <el-table-column class="table_td" label="出库量(吨)">
           <template slot-scope="scope">
-            <div v-for="(item, i) in scope.row.warehouseNumViewList">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
               {{ item.outNetWeight }}
             </div>
           </template>
         </el-table-column>
-        <el-table-column label="应余量(吨)">
+        <el-table-column class="table_td" label="应余量(吨)">
           <template slot-scope="scope">
-            <div v-for="(item, i) in scope.row.warehouseNumViewList">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
               {{ item.storage }}
             </div>
           </template>
@@ -118,8 +134,8 @@
         <el-table-column prop="seller" label="出入库" width="300">
           <template slot-scope="scope">
             <ws-button
-              type="primary"
-              @click="nocomplete()"
+              class="completed"
+              @click="nocomplete(scope.row)"
               v-hasPermission="
                 `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
               "
@@ -127,7 +143,7 @@
               待完成({{ scope.row.number }})
             </ws-button>
             <ws-button
-              type="primary"
+              class="putstorage"
               @click="warehousing(scope.row)"
               v-hasPermission="
                 `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
@@ -136,7 +152,7 @@
               入库
             </ws-button>
             <ws-button
-              type="primary"
+              class="deliverystorage"
               @click="delivery(scope.row)"
               v-hasPermission="
                 `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
@@ -148,23 +164,8 @@
         </el-table-column>
         <el-table-column prop="address" label="操作" width="200">
           <template slot-scope="scope">
-            <ws-button
-              type="primary"
-              @click="record(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
-              >记录</ws-button
-            >
-
-            <ws-button
-              type="primary"
-              @click="loss()"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
-              >盘损</ws-button
-            >
+            <div class="record" @click="record(scope.row)">记录</div>
+            <div class="adjustment" @click="loss(scope.row)">盘损</div>
           </template>
         </el-table-column>
       </el-table>
@@ -216,18 +217,13 @@ export default {
       searchTypeText: '未完成',
       searchKeyWord: '',
       contractType: 2,
-      startDate: null,
-      endDate: null,
       // 提交类型
       submitType: true,
       size: 10,
       spanArr: [],
+      warehouseName: '',
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
-      date: {
-        year: dayjs().format('YYYY'),
-        month: dayjs().format('MM'),
-      },
       warehouseList: [],
       deptBudgetList: {},
       historyList: [],
@@ -305,9 +301,13 @@ export default {
         // }
       })
     },
-    //待完成
-    nocomplete() {
-      this.$router.push({ path: 'warehouseManagementNoComplete' })
+    //待完成//传参
+    nocomplete(row) {
+      console.log(row)
+      this.$router.push({
+        path: 'warehouseManagementNoComplete',
+        query: { baseId: row.warehouseId, positionId: row.binNumberId },
+      })
     },
     //记录
     record(item) {
@@ -326,13 +326,16 @@ export default {
       })
     },
     //盘损
-    loss() {
-      // console.log(row.positionId)
-      // this.$router.push({
-      //   name: 'warehouseManagementIoss',
-      //   params: {positionId: row.positionId },
-      // })
-      this.$router.push({ path: 'warehouseManagementIoss' })
+    loss(item) {
+      this.$router.push({
+        path: 'warehouseManagementIoss',
+        query: {
+          baseId: item.warehouseId,
+          positionId: item.binNumberId,
+          warehouseName: item.warehouseName,
+          binNumber: item.binNumber,
+        },
+      })
     },
     //查看
     handleLook() {
@@ -387,6 +390,7 @@ export default {
     getList() {
       getList({
         compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseName: this.warehouseName,
       })
         .toPromise()
         .then((response) => {
@@ -502,4 +506,59 @@ export default {
   width: 62px;
   text-align: right;
 }
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.completed.el-button--default {
+  border-color: #5878e8;
+  background-color: #f6f7fc;
+  color: #5878e8;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/deep/.el-table tr th.is-leaf:first-child {
+  border-left: 1px solid #e9ecf7;
+}
+.record,
+.adjustment {
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+}
+.record:after {
+  position: absolute;
+  content: '';
+  display: block;
+  top: 5px;
+  right: -2px;
+  width: 1px;
+  height: 12px;
+  background: #e9ecf7;
+}
 </style>

+ 1 - 1
src/views/warehouse/warehouseManagementLook.vue

@@ -254,7 +254,7 @@ export default {
         .toPromise()
         .then((response) => {
          this.deptBudgetList=response
-         console.log(this.deptBudgetList)
+        //  console.log(this.deptBudgetList)
         })
     },
     // 关闭 dialog时 处理文件url 初始化upload组件

+ 82 - 67
src/views/warehouse/warehouseManagementNoComplete.vue

@@ -24,22 +24,22 @@
               <span v-else>{{ scope.$index + 1 }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="contractNo" label="货名"> </el-table-column>
-          <el-table-column prop="goodsName" label="毛重(吨)"></el-table-column>
-          <el-table-column prop="weight" label="皮重(吨)"> </el-table-column>
-          <el-table-column prop="unitContractPrice" label="净重(吨)"></el-table-column>   
-          <el-table-column prop="packingMethod" label="品级"> </el-table-column>
-          <el-table-column prop="buyer" label="出入库日期"> </el-table-column>
+          <el-table-column prop="goodsName" label="货名"> </el-table-column>
+          <el-table-column prop="tare" label="毛重(吨)"></el-table-column>
+          <el-table-column prop="grossWeight" label="皮重(吨)"> </el-table-column>
+          <el-table-column prop="netWeight" label="净重(吨)"></el-table-column>   
+          <el-table-column prop="grade" label="品级"> </el-table-column>
+          <el-table-column prop="inOutDate" label="出入库日期"> </el-table-column>
           <el-table-column prop="buyer" label="类型"> </el-table-column>
-          <el-table-column prop="buyer" label="合同编号"> </el-table-column>
-          <el-table-column prop="buyer" label="车牌号"> </el-table-column>
-          <el-table-column prop="buyer" label="经办人"> </el-table-column>
-          <el-table-column prop="buyer" label="内勤"> </el-table-column>
-          <el-table-column prop="buyer" label="保存时间"> </el-table-column>
+          <el-table-column prop="contractNo" label="合同编号"> </el-table-column>
+          <el-table-column prop="carNo" label="车牌号"> </el-table-column>
+          <el-table-column prop="agent" label="经办人"> </el-table-column>
+          <el-table-column prop=" backOffice" label="内勤"> </el-table-column>
+          <el-table-column prop="updateDate" label="保存时间"> </el-table-column>
           <el-table-column prop="address" label="操作" width="200">
           <ws-button
             type="primary"
-            @click="edits()"
+            @click="edits(scope.row)"
             v-hasPermission="
               `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
             "
@@ -47,7 +47,7 @@
           >
           <ws-button
             type="primary"
-            @click="deletes()"
+            @click="handleDelete(scope.row)"
             v-hasPermission="
               `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
             "
@@ -71,11 +71,13 @@
 </template>
 <script>
 import {
+  complete,
   getList,
   export1,
   editstatus,
   billoperatehis,
-} from '@/model/contarct/index'
+  deletewarehouse,
+} from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -115,6 +117,11 @@ export default {
       contractType: 2,
       startDate: null,
       endDate: null,
+      deletewarehouse:[],
+      pageSize:10,
+      currentPage:'1',
+      
+
       // 提交类型
       submitType: true,
       selectpackingMethod: {},
@@ -129,7 +136,8 @@ export default {
       contractList: [],
       deptBudgetList: {},
       historyList: [],
-
+      deletewarehouse:[],
+    // inOutDate:null,
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
@@ -142,17 +150,27 @@ export default {
     //cg.viewBudget
     //cg.viewSpareMoney
     // this.getVesselData();
-    this.getList()
+    
+    //接参
+    this.getList(this.$route.query.baseId,this.$route.query.positionId)
     this.showType = this.isShow
   },
   methods: {
+
+    //编辑
+     edits(row){
+       this.$router.push({
+         name:'warehouseManagementPerfectput',
+         query: { baseId:row.baseId, positionId:row.positionId, pageSize:row.pageSize, currentPage: row.currentPage },
+       })
+     },
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
     },
     //删除
     deletes(){
-
+     this.$router.push({path:'warehouseManagementDelete'})
     },
     //编辑
     edits(){
@@ -193,63 +211,60 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    getList() {
-      getList({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-        contractType: this.contractType,
-        currentPage: this.currentPage,
-        pageSize: this.pageSize,
-        searchType: this.searchType,
-        searchKeyWord: this.searchKeyWord,
-        startDate: this.startDate,
-        endDate: this.endDate,
-        contrPage: this.contrPage,
-      })
-        .toPromise()
+  //收
+  getList(id,id1){
+   complete({
+          // compId: sessionStorage.getItem('ws-pf_compId'),
+          baseId:id,
+          positionId:id1,
+          pageSize:this.pageSize,
+          currentPage:this.currentPage,
+          // inOutDate:this.inOutDate
+    })
+    .toPromise()
         .then((response) => {
-          for (var i = 0; i < response.records.length; i++) {
-            if (response.records[i].addressUrl != null) {
-              response.records[i].addressUrlArray = response.records[
-                i
-              ].addressUrl.split(',')
-            } else {
-              response.records[i].addressUrlArray = []
-            }
-          }
-          this.deptCircularPage.currentPage = response.current
-          this.deptCircularPage.pageSize = response.size
-          this.deptBudgetTotal = response.total
-          this.contractList = response
+          this.getList = response
         })
     },
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
-        }
-      }
-    },
-    fujian(row) {
-      if (
-        row.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
-      }
-      this.appendixIdss = row.receiveAttachmentPath
-    },
+    // complete(){
+    //   complete({
+
+    //   })
+    // },
+
     handleExamine(row) {
       this.$router.push({
         name: 'salesContractExamine',
         query: { id: row.id },
       })
     },
-
+    //删除
+      handleDelete(row) {
+      // console.log(row)
+      this.$confirm(`删除后不可恢复,确认删除?`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+      })
+        .then(() => {
+        deletewarehouse({ baseId:row.baseId, positionId:row.positionId, pageSize:row.pageSize, currentPage: row.currentPage })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              
+            })
+        })
+        .catch(() => {
+          return false
+        })
+      }
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleCloe() {
       this.dialogViewSpareMoney = false
@@ -299,8 +314,8 @@ export default {
     total() {},
     clearfiltQuery() {},
     selectCrtDuty() {},
-  },
-}
+  }
+
 </script>
 <style lang="scss" scoped>
 .center {

+ 1 - 2
src/views/warehouse/warehouseManagementPut.vue

@@ -69,9 +69,8 @@
           <!--净重(吨)-->
           <ws-form-item label="净重(吨)" span="1" prop="netWeight">
             <ws-input
-              v-model.number="deptBudgetList.netWeight"
+              v-model="deptBudgetList.netWeight"
               placeholder="不可编辑,自动计算"
-              type="number"
               maxlength="120"
               size="small"
             />

+ 3 - 1
vue.config.js

@@ -144,7 +144,9 @@ module.exports = {
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
         // target: 'http://192.168.1.124:8090/',
-        target: 'http://192.168.1.124:8090/',
+
+        target: 'http://192.168.1.119:8090/',
+
         // target: 'http://192.168.24.5:8098',//目标地址
         // target: 'http://product-server.winsea.com/',
         // target: 'http://192.168.24.5:8098',//目标地址

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác