Pārlūkot izejas kodu

前端孟祥旭

mxx 4 gadi atpakaļ
vecāks
revīzija
b4cce54a32

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

@@ -46,5 +46,7 @@ export const API_POST_WAREHOUSE_CLEARANCEE = '/warehouseBaseInfo/api/editCleared
 export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
 export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
 // 获取负责人
 // 获取负责人
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
+//临时库记录
+export const API_GET_WAREHOUSE_RECORDSS ='/warehouseInOutInfo/selectInfoTemporary'
 
 
 
 

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

@@ -22,9 +22,11 @@ import {
     API_POST_WAREHOUSE_ADD,
     API_POST_WAREHOUSE_ADD,
     API_POST_WAREHOUSE_CLEARANCEE,
     API_POST_WAREHOUSE_CLEARANCEE,
     API_GET_WAREHOUSE_NO,
     API_GET_WAREHOUSE_NO,
-    API_GET_STAFF
+    API_GET_STAFF,
+    API_GET_WAREHOUSE_RECORDSS,
 
 
 } from '@/api/V2/warehouse'
 } from '@/api/V2/warehouse'
+// import { app } from 'electron'
 // 列表
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
 // 添加
 // 添加
@@ -67,6 +69,8 @@ export const increase = appRx.post(API_POST_WAREHOUSE_ADD, errorCatcher, errorHa
 export const clearancee = appRx.post(API_POST_WAREHOUSE_CLEARANCEE, errorCatcher, errorHandle, filter)
 export const clearancee = appRx.post(API_POST_WAREHOUSE_CLEARANCEE, errorCatcher, errorHandle, filter)
 //获取负责人
 //获取负责人
 export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
 export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
+//临时库记录
+export const recordss = appRx.get(API_GET_WAREHOUSE_RECORDSS, errorCatcher , errorHandle , filter)
 
 
 
 
 
 

+ 57 - 17
src/views/warehouse/warehouseManagementAdd.vue

@@ -46,20 +46,22 @@
           />
           />
         </ws-form-item>
         </ws-form-item>
         <!--负责人-->
         <!--负责人-->
-        <ws-form-item
-          label="负责人"
-          span="1"
-          prop="personCharge"
-          class="readonly"
-        >
-          <ws-input
-            v-model="deptBudgetList.personCharge"
-            placeholder="请输入负责人姓名"
-            maxlength="100"
-            size="small"
-          />
-        </ws-form-item>
-
+          <ws-form-item label="负责人" span="1" prop="personCharge">
+            <el-select
+              v-model="deptBudgetList.personCharge"
+              placeholder="请选择负责人"
+              filterable
+              :filter-method="dataFilter"
+              @change="selectstaff"
+            >
+              <el-option
+                v-for="item in personCharge"
+                :key="item.value"
+                :label="item.staffName"
+                :value="item.staffName"
+              />
+            </el-select>
+          </ws-form-item>
         <!--负责人电话-->
         <!--负责人电话-->
         <ws-form-item label="负责人电话" span="1" prop="personPhone">
         <ws-form-item label="负责人电话" span="1" prop="personPhone">
           <ws-input
           <ws-input
@@ -208,6 +210,7 @@ import {
   editxiala,
   editxiala,
   delxiala,
   delxiala,
   increase,
   increase,
+  getstaff,
 } from '@/model/warehouse/index'
 } from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 import mapDrag from '@/components/mapdrag/mapdrag'
@@ -228,6 +231,7 @@ export default {
   data() {
   data() {
     let self = this
     let self = this
     return {
     return {
+      staffList: [],
       deptBudgetList: {
       deptBudgetList: {
         totalStorage: 0,
         totalStorage: 0,
       },
       },
@@ -238,6 +242,7 @@ export default {
       center: [116.244694, 39.517344],
       center: [116.244694, 39.517344],
       window: '',
       window: '',
       radio: 1,
       radio: 1,
+      personCharge:[],
       polygons: [
       polygons: [
         {
         {
           pName: 'Geolocation', //定位
           pName: 'Geolocation', //定位
@@ -285,9 +290,9 @@ export default {
       list: [],
       list: [],
     }
     }
   },
   },
-  activated() {
-    this.loaddata()
-  },
+mounted(){
+  this.getList()
+},
   computed: {
   computed: {
     totalStorage: function () {
     totalStorage: function () {
       var maxStorage = 0
       var maxStorage = 0
@@ -298,6 +303,30 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
+     dataFilter(val) {
+      this.deptBudgetList.personCharge = val
+      if (val) {
+        console.log(val)
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
     marker: function (item) {
     marker: function (item) {
       this.deptBudgetList.warehousePositioning =
       this.deptBudgetList.warehousePositioning =
         item.lnglat.lat + ',' + item.lnglat.lng
         item.lnglat.lat + ',' + item.lnglat.lng
@@ -640,7 +669,18 @@ export default {
     //   let key = this.unitList.find((item) => item.constValue === val).constKey
     //   let key = this.unitList.find((item) => item.constValue === val).constKey
     //   this.pleaseChoose = val
     //   this.pleaseChoose = val
     // },
     // },
+   getList(){
+    
+     getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          // this.agent = response
+//           this.options = response
+//            this.staffList = response
+        this.personCharge = response
+        })
 
 
+   },
     handleExamine() {},
     handleExamine() {},
     approve() {},
     approve() {},
     // returnsales() {
     // returnsales() {

+ 6 - 2
src/views/warehouse/warehouseManagementList.vue

@@ -273,7 +273,6 @@ export default {
       showType: true,
       showType: true,
       // 年
       // 年
       year: '',
       year: '',
-      clearancee: {},
       currentPage: 1,
       currentPage: 1,
       pageSize: 10,
       pageSize: 10,
       searchType: 1,
       searchType: 1,
@@ -344,8 +343,10 @@ export default {
       }
       }
     },
     },
 
 
+
     //出库
     //出库
     delivery(item) {
     delivery(item) {
+
       this.$router.push({
       this.$router.push({
         path: 'warehouseManagementDelivery',
         path: 'warehouseManagementDelivery',
         query: {
         query: {
@@ -355,6 +356,7 @@ export default {
           binNumber: item.binNumber,
           binNumber: item.binNumber,
           capacity: item.capacity,
           capacity: item.capacity,
           warehouseType: this.warehouseType,
           warehouseType: this.warehouseType,
+          warehouseId: item.warehouseId
         },
         },
       })
       })
     },
     },
@@ -419,12 +421,13 @@ export default {
             positionId: row.binNumberId,
             positionId: row.binNumberId,
             warehouseName: row.warehouseName,
             warehouseName: row.warehouseName,
             binNumber: row.binNumber,
             binNumber: row.binNumber,
+             warehouseType: this.warehouseType,
           },
           },
         })
         })
       }
       }
     },
     },
     //记录
     //记录
-    record(item) {
+    record(item) { 
       this.$router.push({
       this.$router.push({
         name: 'warehouseManagementRecord',
         name: 'warehouseManagementRecord',
         query: {
         query: {
@@ -434,6 +437,7 @@ export default {
           remark: item.remark,
           remark: item.remark,
           binNumber: item.binNumber,
           binNumber: item.binNumber,
           capacity: item.capacity,
           capacity: item.capacity,
+          warehouseType: this.warehouseType,
         },
         },
       })
       })
     },
     },

+ 176 - 29
src/views/warehouse/warehouseManagementRecord.vue

@@ -31,7 +31,8 @@
           alt=""
           alt=""
         />
         />
         <span style="color: #323233">{{ deptBudgetList.warehouseName }}</span>
         <span style="color: #323233">{{ deptBudgetList.warehouseName }}</span>
-        <span class="ware">{{binNumber}}仓位(容量{{capacity}}吨)</span>
+        <span class="ware" v-show="warehouseType==1">{{binNumber}}仓位(容量{{capacity}}吨)</span>
+        <span v-show="warehouseType==2">(临)</span>
       </h2>
       </h2>
       <p
       <p
         style="
         style="
@@ -105,7 +106,7 @@
             alt=""
             alt=""
           />入库记录
           />入库记录
         </div>
         </div>
-        <el-table :data="warehouseList.records" height="560">
+        <el-table :data="warehouseList.records" height="560" v-show="this.warehouseType== '1'">
           <el-table-column type="expand">
           <el-table-column type="expand">
             <template #default="props">
             <template #default="props">
               <ws-form ref="deptBudgetList" :model="deptBudgetList">
               <ws-form ref="deptBudgetList" :model="deptBudgetList">
@@ -200,9 +201,117 @@
                 @click="fujian(scope.row)"
                 @click="fujian(scope.row)"
                 alt=""
                 alt=""
               />
               />
-              <span v-if="scope.row.addressUrlArray.length > 0">{{
+              <!-- <span v-if="scope.row.addressUrlArray.length > 0">{{
                 scope.row.addressUrlArray.length
                 scope.row.addressUrlArray.length
+              }}</span> -->
+              <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+            </template>
+          </el-table-column>
+          <el-table-column prop="createDate" label="录入时间">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.createDate }}</span>
+            </template>
+          </el-table-column>
+          
+        </el-table>
+        <el-table :data="warehouseList.records" height="560" v-show="this.warehouseType== '2'">
+          <el-table-column type="expand">
+            <template #default="props">
+              <ws-form ref="deptBudgetList" :model="deptBudgetList">
+                <ws-info-table>
+                  <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+                    {{ props.row.waterContent }}
+                  </ws-form-item>
+                  <ws-form-item label="容重(%)<=" span="1" prop="bulkDensity">
+                    {{ props.row.bulkDensity }}
+                  </ws-form-item>
+                  <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+                    {{ props.row.jiaorenli }}
+                  </ws-form-item>
+                  <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+                    {{ props.row.impurity }}
+                  </ws-form-item>
+                  <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+                    {{ props.row.mildewGrain }}
+                  </ws-form-item>
+                  <ws-form-item
+                    label="不完善粒(%)<="
+                    span="1"
+                    prop="imperfectGrain"
+                  >
+                    {{ props.row.imperfectGrain }}
+                  </ws-form-item>
+                  <ws-form-item label="质检员" span="1" prop="qualityInspector">
+                    {{ props.row.qualityInspector }}
+                  </ws-form-item>
+                </ws-info-table>
+              </ws-form>
+            </template>
+          </el-table-column>
+          <el-table-column type="index" label="序号">
+            <template scope="scope">
+              <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+              <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="goodsName" label="货名"> </el-table-column>
+          <el-table-column
+            prop="grossWeight"
+            label="毛重(吨)"
+          ></el-table-column>
+          <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
+          <el-table-column
+            prop="netWeight"
+            label="净重(吨)"
+          ></el-table-column>
+          <el-table-column prop="grade" label="品级">
+            <template slot-scope="scope">
+              <span v-if="scope.row.grade == '一等品'" class="top-grade">{{
+                scope.row.grade
+              }}</span>
+              <span v-if="scope.row.grade == '二等品'" class="second-class">{{
+                scope.row.grade
               }}</span>
               }}</span>
+              <span v-if="scope.row.grade == '三等品'" class="third-class">{{
+                scope.row.grade
+              }}</span>
+              <span v-if="scope.row.grade == '等外'" class="substandard">{{
+                scope.row.grade
+              }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="inOutDate" label="出入库日期">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.inOutDate }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="inOutType" label="类型"> </el-table-column>
+          <el-table-column prop="contractNo" label="合同编号">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.contractNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="carNo" label="车牌号">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.carNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="agent" label="经办人">
+          </el-table-column>
+          <el-table-column prop="buyer" label="内勤"> </el-table-column>
+          <el-table-column prop="addressUrl" label="附件">
+            <template slot-scope="scope">
+              <img
+                width="18"
+                height="20"
+                style="vertical-align: text-top; position: relative; top: -1px"
+                src="../../../public/img/fujian.png"
+                @click="fujian(scope.row)"
+                alt=""
+              />
+              <!-- <span v-if="scope.row.addressUrlArray.length > 0">{{
+                scope.row.addressUrlArray.length
+              }}</span> -->
               <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
               <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
             </template>
             </template>
           </el-table-column>
           </el-table-column>
@@ -211,7 +320,9 @@
               <span style="color: #8890b1">{{ scope.row.createDate }}</span>
               <span style="color: #8890b1">{{ scope.row.createDate }}</span>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
+          
         </el-table>
         </el-table>
+        
         <div style="text-align: center; padding: 10px">
         <div style="text-align: center; padding: 10px">
           <el-pagination
           <el-pagination
             @size-change="handleSizeChange"
             @size-change="handleSizeChange"
@@ -244,9 +355,12 @@
       />
       />
     </WinseaContentModal>
     </WinseaContentModal>
   </div>
   </div>
+  
 </template>
 </template>
+
+
 <script>
 <script>
-import { addselectinfoList } from '@/model/warehouse/index'
+import { addselectinfoList,recordss } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import WsUpload from '@/components/WsUpload'
@@ -295,6 +409,7 @@ export default {
       submitType: true,
       submitType: true,
       selectpackingMethod: {},
       selectpackingMethod: {},
       size: 10,
       size: 10,
+      warehouseType:'1',
      deptBudgetList1: {},
      deptBudgetList1: {},
       compId: sessionStorage.getItem('ws-pf_compId'),
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       deptCircularPage: {},
@@ -326,10 +441,13 @@ export default {
     this.remark = this.$route.query.remark
     this.remark = this.$route.query.remark
     this.binNumber = this.$route.query.binNumber
     this.binNumber = this.$route.query.binNumber
     this.capacity = this.$route.query.capacity
     this.capacity = this.$route.query.capacity
+    this.warehouseType = this.$route.query.warehouseType
     this.getList()
     this.getList()
+
     this.showType = this.isShow
     this.showType = this.isShow
   },
   },
   methods: {
   methods: {
+  
     //返回按钮
     //返回按钮
     returnWarehouse() {
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
       this.$router.push({ path: 'warehouseManagementList' })
@@ -398,7 +516,8 @@ export default {
       // this.onChangeFlag = true
       // this.onChangeFlag = true
     },
     },
     getList() {
     getList() {
-      addselectinfoList({
+      if(this.warehouseType==1){
+        addselectinfoList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         compId: sessionStorage.getItem('ws-pf_compId'),
         baseId: this.deptBudgetList.baseId,
         baseId: this.deptBudgetList.baseId,
         positionId: this.deptBudgetList.positionId,
         positionId: this.deptBudgetList.positionId,
@@ -422,7 +541,35 @@ export default {
           this.deptCircularPage.pageSize = response.size
           this.deptCircularPage.pageSize = response.size
           this.deptBudgetTotal = response.total
           this.deptBudgetTotal = response.total
           this.warehouseList = response
           this.warehouseList = response
-        })
+        }) 
+      }else if(this.warehouseType==2){
+       recordss({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        baseId: this.deptBudgetList.baseId,
+        positionId: this.deptBudgetList.positionId,
+        warehouseName: this.deptBudgetList.warehouseName,
+        searchType: this.searchType,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+      })
+        .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.warehouseList = response
+        }) 
+      }
+      
     },
     },
     selecttaskType(e) {
     selecttaskType(e) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
       for (var i = 0; i < this.taskTypeList.length; i++) {
@@ -470,29 +617,29 @@ export default {
       this.currentPage = 1
       this.currentPage = 1
       this.getList()
       this.getList()
     },
     },
-    async exportlist() {
-      const { data } = await export1(
-        {
-          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,
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_采购合同`,
-        type: 'xls',
-      })
-    },
+    // async exportlist() {
+    //   const { data } = await export1(
+    //     {
+    //       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,
+    //     },
+    //     {},
+    //     { responseType: 'blob' }
+    //   ).toPromise()
+    //   downloadFile({
+    //     res: data,
+    //     fileName: `${
+    //       this.date.year + (this.date.month ? `-${this.date.month}` : '')
+    //     }_采购合同`,
+    //     type: 'xls',
+    //   })
+    // },
     // deletecontract(){},
     // deletecontract(){},
     //删除
     //删除
 
 

+ 1 - 1
vue.config.js

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