浏览代码

前端孟祥旭

mxx 4 年之前
父节点
当前提交
7e201a8198

+ 11 - 1
src/api/V2/transport/index.js

@@ -1,4 +1,14 @@
+// 司机列表
 export const API_GET_TRAN_DRIVERINFO = '/driverViewInfo/selectDriverInfoPage'
+<<<<<<< HEAD
 export const API_POST_TRAN_DRIVERINFOADD = '/driverViewInfo/api/addInfo'
 export const API_GET_TRAN_LIST = '/tranTaskInfo/selectTranTaskInfoPage'
-export const API_POST_TRAN_ADD = '/tranTaskInfo/api/addTranTask'
+export const API_POST_TRAN_ADD = '/tranTaskInfo/api/addTranTask'
+=======
+// 司机管理添加
+export const API_POST_TRAN_DRIVERINFOADD = '/driverViewInfo/api/addInfo'
+// 司机管理查看
+export const API_GET_DRIVERINFO_GETDRIVER = '/driverViewInfo/getDriver'
+// 司机管理-删除
+export const API_POST_DELETE_DRIVER = '/driverViewInfo/api/deleteDriver'
+>>>>>>> f3ee2240cb2237ad61e6413e006e2b208c9c3038

+ 1 - 1
src/components/WsUpload/index.vue

@@ -25,7 +25,7 @@
       </div>
     </div>
     <el-upload
-      action="#"
+      action="https://www.zthymaoyi.com/upload/admin"
       list-type="picture-card"
       :http-request="_handleRequest"
       :file-list="fileList"

+ 28 - 29
src/lang/zh.js

@@ -229,7 +229,7 @@
     voyagePlanAdd: '制定航次计划',
     voyagePlanView: '航行计划',
     voyagePlanList: '航行计划',
-    
+
     // 首页
     home: '首页',
     // 工作通知
@@ -489,18 +489,18 @@
     purchaseContractAdd: '采购合同添加',
     purchaseContractEdit: '采购合同编辑',
     //仓库管理、
-    warehouseManagementList:'仓库管理',
-    warehouseManagementAdd:'仓库管理添加',
-    warehouseManagementEdit:'仓库管理编辑',
-    warehouseManagementPut:'入库',
-    warehouseManagementDelivery:'出库',
-    warehouseManagementIossRecord:'盘损详情',
-    warehouseManagementLook:'仓库管理查看',
-    warehouseManagementDelete:'仓库管理删除',
-    warehouseManagementIoss:'仓库管理盘损',
-    warehouseManagementRecord:'记录',
-    warehouseManagementNoComplete:'待完成',
-    warehouseManagementPerfectput:'编辑',
+    warehouseManagementList: '仓库管理',
+    warehouseManagementAdd: '仓库管理添加',
+    warehouseManagementEdit: '仓库管理编辑',
+    warehouseManagementPut: '入库',
+    warehouseManagementDelivery: '出库',
+    warehouseManagementIossRecord: '盘损详情',
+    warehouseManagementLook: '仓库管理查看',
+    warehouseManagementDelete: '仓库管理删除',
+    warehouseManagementIoss: '仓库管理盘损',
+    warehouseManagementRecord: '记录',
+    warehouseManagementNoComplete: '待完成',
+    warehouseManagementPerfectput: '编辑',
     //运输管理
     tranManagement: '运输管理',
     tranManagementDriver:'司机管理',
@@ -514,7 +514,6 @@
     tranManagementVehicleDispatching:'汽车调度',
     tranManagementVehicleLook:'查看派车详情',
 
-
     // 采购模块
     procurement: '采购管理',
     sparepart: '备件采购',
@@ -4681,7 +4680,7 @@
   },
   //合同管理
   sales: {
-     salesContract: '销售合同',
+    salesContract: '销售合同',
     salesContractEdit: '销售合同编辑',
     salesContractExamine: '销售合同查看',
     purchaseContractExamine: '采购合同查看',
@@ -4694,20 +4693,20 @@
     purchaseContract: '采购合同',
   },
   //仓库管理
-  warehouseManagement:{
-    warehouseManagementList:'仓库管理',
-    warehouseManagementAdd:'仓库管理添加',
-    warehouseManagementEdit:'仓库管理编辑',
-    warehouseManagementPut:'入库',
-    warehouseManagementDelivery:'出库',
-    warehouseManagementLook:'仓库管理查看',
-    warehouseManagementDelete:'仓库管理删除',
-    warehouseManagementIoss:'仓库管理盘损',
-    warehouseManagementIossRecord:'盘损详情',
-    warehouseManagementRecord:'记录',
-    warehouseManagementNoComplete:'待完成',
-    warehouseManagementPerfectput:'编辑',
-    warehouseManagementPerfectDelivery:'编辑',
+  warehouseManagement: {
+    warehouseManagementList: '仓库管理',
+    warehouseManagementAdd: '仓库管理添加',
+    warehouseManagementEdit: '仓库管理编辑',
+    warehouseManagementPut: '入库',
+    warehouseManagementDelivery: '出库',
+    warehouseManagementLook: '仓库管理查看',
+    warehouseManagementDelete: '仓库管理删除',
+    warehouseManagementIoss: '仓库管理盘损',
+    warehouseManagementIossRecord: '盘损详情',
+    warehouseManagementRecord: '记录',
+    warehouseManagementNoComplete: '待完成',
+    warehouseManagementPerfectput: '编辑',
+    warehouseManagementPerfectDelivery: '编辑',
 
   },
   //运输管理

+ 13 - 1
src/model/transport/index.js

@@ -4,14 +4,26 @@ import { appRx } from '../defalutConfig/indexRx'
 import {
     API_GET_TRAN_DRIVERINFO,
     API_POST_TRAN_DRIVERINFOADD,
+<<<<<<< HEAD
     API_GET_TRAN_LIST,
     API_POST_TRAN_ADD,
+=======
+    API_GET_DRIVERINFO_GETDRIVER,
+    API_POST_DELETE_DRIVER
+>>>>>>> f3ee2240cb2237ad61e6413e006e2b208c9c3038
 } from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
 // 添加司机信息
 export const addDriver = appRx.post(API_POST_TRAN_DRIVERINFOADD, errorCatcher, errorHandle, filter)
+<<<<<<< HEAD
 //运输任务列表
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
 //运输任务添加
-export const addtrantask = appRx.post(API_POST_TRAN_ADD,errorCatcher, errorHandle, filter) 
+export const addtrantask = appRx.post(API_POST_TRAN_ADD,errorCatcher, errorHandle, filter) 
+=======
+// 司机管理-查看
+export const lookDriver = appRx.get(API_GET_DRIVERINFO_GETDRIVER, errorCatcher, errorHandle, filter)
+// 司机管理-删除
+export const delDriver = appRx.post(API_POST_DELETE_DRIVER, errorCatcher, errorHandle, filter)
+>>>>>>> f3ee2240cb2237ad61e6413e006e2b208c9c3038

+ 1 - 0
src/store/getters.js

@@ -44,6 +44,7 @@ const getters = {
   systemOperationNum: state => state.app.systemOperationNum,
   systemWarnNum: state => state.app.systemWarnNum,
   baseInfo: state => state.user.baseInfo, // 设置系统基础信息
+  deptBudgetList: state => state.app.deptBudgetList,
   guideInfo: state => state.user.guideInfo, // 新手指引信息
   sparepartSp: state => state.app.sparepartSp, // 搜索状态
   sparepartMa: state => state.app.sparepartMa, // 搜索状态

+ 7 - 0
src/store/modules/app.js

@@ -15,6 +15,7 @@ const state = {
   sparepartMa: {},
   sparepartMap: {},
   isLoadding: false,
+  deptBudgetList:{},
   // 产品-体系-文件修改程序(待处理个数)
   modificationNum: 0,
   // 产品-体系运行-预警
@@ -84,6 +85,9 @@ const mutations = {
     state.circulationNum = num
     Cookies.set('circulationNum', num)
   },
+  SET_DEPTBUDGETLIST: (state, deptBudgetList) => {
+    state.deptBudgetList = deptBudgetList
+  },
 }
 
 const actions = {
@@ -108,6 +112,9 @@ const actions = {
   setMaQueryParams ({ commit }, params) {
     commit('SET_SPAREPARTMA_QUERY', params)
   },
+  setdeptBudgetList ({ commit }, params) {
+    commit('SET_DEPTBUDGETLIST', params)
+  },
   setMapQueryParams ({ commit }, params) {
     commit('SET_SPAREPARTMAP_QUERY', params)
   },

+ 1 - 0
src/views/contractManagement/purchaseContract.vue

@@ -419,6 +419,7 @@ export default {
       }
       return fmt
     },
+
     handleClose() {
       this.accessoryTFs = false
     },

+ 1 - 1
src/views/contractManagement/purchaseContractAdd.vue

@@ -1133,7 +1133,7 @@ export default {
             .toPromise()
             .then((response) => {
               this.$message.success('添加成功')
-              this.$router.push({ path: 'salesContract' })
+              this.$router.push({ path: 'purchaseContract' })
             })
         } else {
           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 23 - 0
src/views/tranManagement/component/routers/route.js

@@ -12,6 +12,7 @@ const tranManagementRouter = {
     icon: 'cg'
   },
   children: [
+<<<<<<< HEAD
      
     //运输任务
     {
@@ -88,6 +89,9 @@ const tranManagementRouter = {
       hidden: true
     },
     //汽运调度
+=======
+    //司机管理
+>>>>>>> f3ee2240cb2237ad61e6413e006e2b208c9c3038
     {
       path: 'tranManagementVehicle',
       component: () =>
@@ -146,7 +150,26 @@ const tranManagementRouter = {
       },
       hidden: true
     },
+<<<<<<< HEAD
     
+=======
+    //查看司机
+    {
+      path: 'tranManagementDriverLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementDriverLook'),
+      name: 'tranManagementDriverLook',
+      meta: {
+        title: 'tranManagementDriverLook',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementDriverLook',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+
+>>>>>>> f3ee2240cb2237ad61e6413e006e2b208c9c3038
   ],
 
 };

+ 200 - 64
src/views/tranManagement/tranManagementDriver.vue

@@ -59,8 +59,64 @@
         :data="driverList.records"
         style="width: 100%; margin-top: 20px"
         fit
+        ref="expandstable"
+        :expand-row-keys="expands"
+        :row-key="getRowKeys"
         height="780"
       >
+        <el-table-column type="expand">
+          <template slot-scope="props">
+            <ws-form>
+              <div v-for="item in props.row.driverPayeeInfoList">
+                <ws-info-table>
+                  <ws-form-item
+                    v-if="item.accountTypeFlag == 1"
+                    label="收款人"
+                    span="1"
+                    prop="payeeName"
+                    class="el-car"
+                  >
+                    {{ item.payeeName }}
+                  </ws-form-item>
+                  <ws-form-item
+                    v-if="item.accountTypeFlag == 1"
+                    label="企业名称"
+                    span="1"
+                    prop="bankDeposit"
+                    class="el-car"
+                  >
+                    {{ item.payeeNumberCard }}
+                  </ws-form-item>
+                  <ws-form-item
+                    v-if="item.accountTypeFlag == 2"
+                    label="身份证"
+                    span="1"
+                    prop="bankDeposit"
+                    class="el-car"
+                  >
+                    {{ item.compName }}
+                  </ws-form-item>
+                  <ws-form-item
+                    label="开户行"
+                    span="1"
+                    prop="bankDeposit"
+                    class="el-car"
+                  >
+                    {{ item.bankDeposit }}
+                  </ws-form-item>
+                  <ws-form-item
+                    label="账号"
+                    span="1"
+                    prop="bankDeposit"
+                    class="el-car"
+                  >
+                    {{ item.bankCard }}
+                  </ws-form-item>
+                </ws-info-table>
+              </div>
+            </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>
@@ -73,7 +129,22 @@
         </el-table-column>
         <el-table-column prop="driverPhone" label="手机号" width="120">
         </el-table-column>
-        <el-table-column prop="carNumber" label="车牌号" width="80">
+        <el-table-column prop="carNumber" label="车牌号" width="120">
+          <template scope="scope">
+            <ws-select
+              v-model="scope.row.carNumber"
+              placeholder=""
+              class="typeselect"
+              @change="selectcar($event, scope.row)"
+            >
+              <ws-option
+                v-for="item in scope.row.driverCarInfoList"
+                :key="item.constKey"
+                :label="item.carNumber"
+                :value="item.carNumber"
+              />
+            </ws-select>
+          </template>
         </el-table-column>
         <el-table-column prop="binNumber" label="常驻城市" width="120">
         </el-table-column>
@@ -81,6 +152,26 @@
         </el-table-column>
         <el-table-column prop="carLength" label="车长" width="80">
         </el-table-column>
+        <el-table-column label="结款账户" width="120">
+          <template slot-scope="scope">
+            <el-button
+              v-if="!scope.row.expandsStatus"
+              size="medium"
+              type="text"
+              class="fs-16"
+              @click="expandsHandle(scope.row)"
+              >展开</el-button
+            >
+            <el-button
+              v-if="scope.row.expandsStatus"
+              size="medium"
+              type="text"
+              class="fs-16"
+              @click="expandsHandle(scope.row)"
+              >收起</el-button
+            >
+          </template>
+        </el-table-column>
         <el-table-column prop="addressUrl" label="附件">
           <!-- <template slot-scope="scope">
             <img
@@ -96,40 +187,41 @@
             }}</span>
           </template> -->
         </el-table-column>
-        <el-table-column prop="address" label="操作" width="200">
-          <ws-button
-            type="primary"
-            @click="look()"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >查看</ws-button
-          >
-          <ws-button
-            type="primary"
-            @click="edit()"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >编辑</ws-button
-          >
-          <ws-button
-            type="primary"
-            @click="deletes()"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >删除</ws-button
-          >
-          <ws-button
-            type="primary"
-            @click="stop()"
-            v-hasPermission="
-              `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-            >禁用</ws-button
-          >
-          <!-- </template> -->
+        <el-table-column prop="address" label="操作" width="400">
+          <template slot-scope="scope">
+            <ws-button
+              type="primary"
+              @click="look(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >查看</ws-button
+            >
+            <ws-button
+              type="primary"
+              @click="edit(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >编辑</ws-button
+            >
+            <ws-button
+              type="primary"
+              @click="deletes(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >删除</ws-button
+            >
+            <ws-button
+              type="primary"
+              @click="stop(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+              >禁用</ws-button
+            >
+          </template>
         </el-table-column>
       </el-table>
       <el-pagination
@@ -145,7 +237,11 @@
   </div>
 </template>
 <script>
-import { selectDriver, billoperatehis } from '@/model/transport/index'
+import {
+  selectDriver,
+  billoperatehis,
+  delDriver,
+} from '@/model/transport/index'
 import Pagination from '@/components/Pagination'
 // provinceAndCityData省市二级
 import { provinceAndCityData, CodeToText } from 'element-china-area-data'
@@ -185,6 +281,7 @@ export default {
       contractType: 2,
       startDate: null,
       endDate: null,
+      carNumber: '',
       searchTypeText: '',
       // 提交类型
       submitType: true,
@@ -196,6 +293,12 @@ export default {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
       },
+      expands: [], //只展开一行放入当前行id
+      getRowKeys: (row) => {
+        //获取当前行id
+        // console.log(row)
+        return row.id //这里看这一行中需要根据哪个属性值是id
+      },
       driverList: [],
       deptBudgetList: {},
       historyList: [],
@@ -212,11 +315,21 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    expandsHandle(row) {
+      row.expandsStatus = !row.expandsStatus
+      this.$refs.expandstable.toggleRowExpansion(row)
+    },
     //查找
     handleLook() {
       this.currentPage = 1
       this.getList()
     },
+    look(row) {
+      this.$router.push({
+        name: 'tranManagementDriverLook',
+        query: { id: row.id },
+      })
+    },
     //添加
     handleAdd() {
       this.$router.push({ path: 'tranManagementDriverAdd' })
@@ -228,27 +341,39 @@ export default {
     handleDelete() {
       this.$router.push({ path: 'warehouseManagementDelete' })
     },
-    dateFormat(fmt, date) {
-      let ret
-      const opt = {
-        'Y+': date.getFullYear().toString(), // 年
-        'm+': (date.getMonth() + 1).toString(), // 月
-        'd+': date.getDate().toString(), // 日
-        'H+': date.getHours().toString(), // 时
-        // "M+": date.getMinutes().toString(),         // 分
-        // "S+": date.getSeconds().toString()          // 秒
-        // 有其他格式化字符需求可以继续添加,必须转化成字符串
-      }
-      for (let k in opt) {
-        ret = new RegExp('(' + k + ')').exec(fmt)
-        if (ret) {
-          fmt = fmt.replace(
-            ret[1],
-            ret[1].length == 1 ? opt[k] : opt[k].padStart(ret[1].length, '0')
-          )
+    selectcar(e, row) {
+      console.log(e, row)
+      for (var i = 0; i < row.driverCarInfoList.length; i++) {
+        if (e == row.driverCarInfoList[i].carNumber) {
+          row.carModel = row.driverCarInfoList[i].carModel
+          row.carLength = row.driverCarInfoList[i].carLength
         }
       }
-      return fmt
+    },
+    deletes(row) {
+      this.$confirm(`司机信息删除后不可恢复,是否确定删除?`, '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          delDriver({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              console.log(response)
+              EventBus.$emit('error', response.message)
+            })
+        })
+        .catch(() => {
+          return false
+        })
     },
     handleClose() {
       this.accessoryTFs = false
@@ -273,15 +398,23 @@ export default {
       })
         .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 = []
-          //   }
-          // }
+          for (var i = 0; i < response.records.length; i++) {
+            response.records[i].expandsStatus = false
+            response.records[i].carNumber =
+              response.records[i].driverCarInfoList[0].carNumber
+            response.records[i].carModel =
+              response.records[i].driverCarInfoList[0].carModel
+            response.records[i].carLength =
+              response.records[i].driverCarInfoList[0].carLength
+            //   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
@@ -375,4 +508,7 @@ export default {
 .findValue {
   margin: 0 10px;
 }
+/deep/.el-icon-arrow-right {
+  display: none;
+}
 </style>

+ 75 - 9
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -221,8 +221,12 @@
               prop="contractNo"
               class="el-car bg-right"
             >
-              <el-radio v-model="item.radio" label="1">私人账号</el-radio>
-              <el-radio v-model="item.radio" label="2">企业账户</el-radio>
+              <el-radio v-model="item.accountTypeFlag" label="1"
+                >私人账号</el-radio
+              >
+              <el-radio v-model="item.accountTypeFlag" label="2"
+                >企业账户</el-radio
+              >
             </ws-form-item>
             <!--账号-->
             <ws-form-item label="账号" span="1" prop="bankCard" class="el-car">
@@ -232,6 +236,25 @@
                 maxlength="100"
                 size="small"
               />
+              <el-upload
+                :headers="headers"
+                :action="uploadPath"
+                :show-file-list="false"
+                :on-success="uploadSuccessHandle"
+                class="avatar-uploader"
+                accept=".jpg, .jpeg, .png, .gif"
+                ><img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  alt=""
+                />
+              </el-upload>
             </ws-form-item>
             <!--开户行-->
             <ws-form-item
@@ -250,7 +273,7 @@
             <!--姓名-->
             <ws-form-item
               label="姓名"
-              v-if="item.radio == 1"
+              v-if="item.accountTypeFlag == 1"
               span="1"
               prop="payeeName"
               class="el-car"
@@ -283,7 +306,7 @@
             <!--身份证号-->
             <ws-form-item
               label="身份证号"
-              v-if="item.radio == 1"
+              v-if="item.accountTypeFlag == 1"
               span="1"
               prop="payeeNumberCard"
               class="el-car"
@@ -298,11 +321,35 @@
             <!--身份证附件-->
             <ws-form-item
               label="身份证附件"
-              v-if="item.radio == 1"
+              v-if="item.accountTypeFlag == 1"
               span="1"
               prop="cardAddressUrl"
               class="el-car"
             >
+              <el-upload
+                :headers="headers"
+                action="https://www.zthymaoyi.com/upload/admin"
+                :show-file-list="false"
+                :on-success="uploadSuccessHandle"
+                class="avatar-uploader"
+                accept=".jpg, .jpeg, .png, .gif"
+                ><img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  alt=""
+                />
+              </el-upload>
+              <span v-if="item.addressUrlArray.length > 0">{{
+                item.addressUrlArray.length
+              }}</span>
+              <span v-if="item.addressUrlArray.length == 0">未上传</span>
+              <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
               <!-- <ws-input
             v-model="deptBudgetList.driverPayeeInfo.personNo"
             placeholder="请输入身份证附件"
@@ -411,6 +458,7 @@ export default {
       size: 10,
       value1: '',
       unitList: [],
+      accessoryBankTFs: false,
       freightspace: [
         {
           carNumber: '',
@@ -424,12 +472,12 @@ export default {
       ],
       freightspace1: [
         {
-          account_type: '',
-          radio: '1',
+          accountTypeFlag: '1',
           payeeName: '',
           payeeNumberCard: '',
           compName: '',
           bankDeposit: '',
+          addressUrlArray: [],
           bankCard: '',
         },
       ],
@@ -458,6 +506,9 @@ export default {
       }
       this.age = age
     },
+    bankcardfujian(item) {
+      this.accessoryBankTFs = true
+    },
     loaddata() {
       // 车型
       packList({ constId: 'TRAN1' })
@@ -476,6 +527,20 @@ export default {
       this.listDate.level = 'city'
       this.listDate.country = this.name
     },
+    uploadSuccessHandle(e, file) {
+      const that = this
+      this.upForm.personNoImg = e.url
+      this.upForm.type = 'driver'
+      this.submiting = true
+      // personShibie(this.upForm).then((response) => {
+      //   this.list.unshift(response.data.data)
+      //   this.upForm.driver = response.data.data.driver
+      //   this.upForm.driverNo = response.data.data.driverNo
+      //   this.upForm.driverAddress = response.data.data.driverAddress
+      //   this.upFormVisible = true
+      //   this.submiting = false
+      // })
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {
       this.dialogViewSpareMoney = false
@@ -498,13 +563,13 @@ export default {
     },
     add1() {
       this.freightspace1.push({
-        account_type: '',
-        radio: '1',
+        accountTypeFlag: '1',
         payeeName: '',
         payeeNumberCard: '',
         compName: '',
         bankDeposit: '',
         bankCard: '',
+        addressUrlArray: [],
       })
     },
     del1(index) {
@@ -512,6 +577,7 @@ export default {
         this.freightspace1.splice(index, 1)
       }
     },
+    identitycardfujian(item) {},
     handleChange(value) {
       this.selectedOptions = value
     },

+ 855 - 0
src/views/tranManagement/tranManagementDriverLook.vue

@@ -0,0 +1,855 @@
+//添加司机
+<template>
+  <div class="container">
+    <el-row>
+      <el-col :span="12">
+        <h2 class="bg-left title">添加新司机</h2>
+      </el-col>
+      <el-col :span="12" class="bg-right">
+        <el-button
+          class="bg-bottom"
+          type="primary"
+          size="small"
+          @click="returnsales()"
+          ><img
+            width="6"
+            height="10"
+            style="vertical-align: bottom; margin-right: 3px"
+            src="../../../public/img/lujing.png"
+            alt=""
+          />返回</el-button
+        >
+      </el-col>
+    </el-row>
+
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div class="flex">
+        <div class="driver">司机信息</div>
+        <ws-info-table>
+          <!--司机姓名-->
+          <ws-form-item
+            label="姓名"
+            span="1"
+            prop="contractNo"
+            class="readonly bg-right"
+          >
+            <ws-input
+              v-model="deptBudgetList.driverName"
+              placeholder="请输入司机姓名"
+              maxlength="20"
+              size="small"
+            />
+          </ws-form-item>
+          <!--手机号-->
+          <ws-form-item
+            label="手机号"
+            span="1"
+            prop="driverPhone"
+            class="readonly"
+          >
+            <ws-input
+              v-model="deptBudgetList.driverPhone"
+              placeholder="请输入手机号"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+
+          <!--常驻城市-->
+          <ws-form-item label="常驻城市" span="1" prop="acceptanceMethod">
+            <el-cascader
+              :options="options_"
+              v-model="selectedOptions"
+              clearable
+              size="large"
+              placeholder="请选择常驻城市"
+              style="width: 200%"
+              class="el-cascader"
+              @change="handleChange"
+            />
+          </ws-form-item>
+
+          <!--身份证号-->
+          <ws-form-item
+            label="身份证号"
+            span="1"
+            prop="driverNo"
+            class="readonly"
+          >
+            <ws-input
+              v-model="deptBudgetList.numberCard"
+              placeholder="请输入身份证号"
+              maxlength="100"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
+        {{ age }}
+      </div>
+    </ws-form>
+
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div
+        style="width: 100%"
+        class="flex position"
+        v-for="(item, index) in freightspace"
+      >
+        <div class="flex">
+          <div class="driver">货车信息-{{ index + 1 }}</div>
+          <ws-info-table class="el-table">
+            <!--车牌号-->
+            <ws-form-item
+              label="车牌号"
+              span="1"
+              prop="carNumber"
+              class="forlist"
+              width="400px"
+            >
+              <ws-input
+                v-model="item.carNumber"
+                placeholder="请输入车牌号"
+                maxlength="20"
+                size="small"
+              />
+            </ws-form-item>
+            <!--车型-->
+            <ws-form-item label="车型" span="1" prop="carModel" class="forlist">
+              <ws-select
+                v-model="item.carModel"
+                placeholder=""
+                class="typeselect"
+                @change="selectcarModel"
+              >
+                <ws-option
+                  v-for="item in carModelList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+            <!--车长-->
+            <ws-form-item
+              label="不含车头车长(米)"
+              span="1"
+              prop="carLength"
+              class="forlist"
+            >
+              <ws-select
+                v-model="item.carLength"
+                placeholder=""
+                class="typeselect"
+                @change="selectcarLength"
+              >
+                <ws-option
+                  v-for="item in carLengthList"
+                  :key="item.constKey"
+                  :label="item.constValue"
+                  :value="item.constValue"
+                />
+              </ws-select>
+            </ws-form-item>
+            <!--载重-->
+            <ws-form-item label="载重" span="1" prop="carLoad" class="forlist">
+              <ws-input
+                v-model="item.carLoad"
+                placeholder="请输入载重"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+
+            <!--出厂年份-->
+            <ws-form-item
+              label="出厂年份"
+              span="1"
+              prop="yearManufacture"
+              class="forlist"
+            >
+              <ws-input
+                v-model="item.yearManufacture"
+                placeholder="请输入年份"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+          </ws-info-table>
+          <img
+            width="22"
+            height="22"
+            class="add"
+            @click="add"
+            src="../../../public/img/add.png"
+            alt=""
+          />
+          <img
+            width="22"
+            height="22"
+            class="del"
+            @click="del(index)"
+            src="../../../public/img/del.png"
+            alt=""
+          />
+        </div>
+      </div>
+    </ws-form>
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div
+        style="width: 100%"
+        class="flex position"
+        v-for="(item, index) in freightspace1"
+      >
+        <div class="flex">
+          <div class="driver">收款人账户信息-{{ index + 1 }}</div>
+          <ws-info-table class="el-table">
+            <!--账户类型-->
+            <ws-form-item
+              label="账户类型"
+              span="1"
+              prop="contractNo"
+              class="el-car bg-right"
+            >
+              <el-radio v-model="item.radio" label="1">私人账号</el-radio>
+              <el-radio v-model="item.radio" label="2">企业账户</el-radio>
+            </ws-form-item>
+            <!--账号-->
+            <ws-form-item label="账号" span="1" prop="bankCard" class="el-car">
+              <ws-input
+                v-model="item.bankCard"
+                placeholder="请输入账号"
+                maxlength="100"
+                size="small"
+              />
+              <el-upload
+                :headers="headers"
+                :action="uploadPath"
+                :show-file-list="false"
+                :on-success="uploadSuccessHandle"
+                class="avatar-uploader"
+                accept=".jpg, .jpeg, .png, .gif"
+                ><img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  alt=""
+                />
+              </el-upload>
+            </ws-form-item>
+            <!--开户行-->
+            <ws-form-item
+              label="开户行"
+              span="1"
+              prop="bankDeposit"
+              class="el-car"
+            >
+              <ws-input
+                v-model="item.bankDeposit"
+                placeholder="请输入开户行"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <!--姓名-->
+            <ws-form-item
+              label="姓名"
+              v-if="item.radio == 1"
+              span="1"
+              prop="payeeName"
+              class="el-car"
+              width="150px"
+            >
+              <ws-input
+                v-model="item.payeeName"
+                placeholder="请输入姓名"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <!--企业名称-->
+            <ws-form-item
+              label="企业名称"
+              v-else
+              span="1"
+              prop="compName"
+              class="el-car"
+              width="150px"
+            >
+              <ws-input
+                v-model="item.compName"
+                placeholder="请输入企业名称"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+
+            <!--身份证号-->
+            <ws-form-item
+              label="身份证号"
+              v-if="item.radio == 1"
+              span="1"
+              prop="payeeNumberCard"
+              class="el-car"
+            >
+              <ws-input
+                v-model="item.payeeNumberCard"
+                placeholder="请输入身份证号"
+                maxlength="100"
+                size="small"
+              />
+            </ws-form-item>
+            <!--身份证附件-->
+            <ws-form-item
+              label="身份证附件"
+              v-if="item.radio == 1"
+              span="1"
+              prop="cardAddressUrl"
+              class="el-car"
+            >
+              <el-upload
+                :headers="headers"
+                action="https://www.zthymaoyi.com/upload/admin"
+                :show-file-list="false"
+                :on-success="uploadSuccessHandle"
+                class="avatar-uploader"
+                accept=".jpg, .jpeg, .png, .gif"
+                ><img
+                  width="18"
+                  height="20"
+                  style="
+                    vertical-align: text-top;
+                    position: relative;
+                    top: -1px;
+                  "
+                  src="../../../public/img/fujian.png"
+                  alt=""
+                />
+              </el-upload>
+              <span v-if="item.addressUrlArray.length > 0">{{
+                item.addressUrlArray.length
+              }}</span>
+              <span v-if="item.addressUrlArray.length == 0">未上传</span>
+              <!-- <i @click="fujian(scope.row)" class="el-icon-paperclip iconCss"></i> -->
+              <!-- <ws-input
+            v-model="deptBudgetList.driverPayeeInfo.personNo"
+            placeholder="请输入身份证附件"
+            maxlength="100"
+            size="small"
+          /> -->
+            </ws-form-item>
+          </ws-info-table>
+          <img
+            width="22"
+            height="22"
+            class="add"
+            @click="add1"
+            src="../../../public/img/add.png"
+            alt=""
+          />
+          <img
+            width="22"
+            height="22"
+            class="del"
+            @click="del1(index)"
+            src="../../../public/img/del.png"
+            alt=""
+          />
+        </div>
+      </div>
+    </ws-form>
+    <ws-form
+      ref="deptBudgetList"
+      :rules="mainReportAdd"
+      :model="deptBudgetList"
+    >
+      <div class="flex">
+        <div class="driver">相关附件</div>
+        <ws-upload
+          ref="upload"
+          table-name="maintain_work_order"
+          oss-key="mainPlan"
+          :comp-id="compId"
+          :appendix-ids="appendixIdsAdd"
+          :vesselId="deptBudgetList.addressUrl"
+          :size-limit="size"
+          @uploadSuccess="uploadSuccess"
+          @onChange="onChange"
+          accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
+        />
+      </div>
+    </ws-form>
+    <!-- 提交 -->
+    <div style="text-align: right; padding: 10px" class="center">
+      <el-button
+        class="bg-bottom"
+        type="primary"
+        size="small"
+        @click="submit(deptBudgetList)"
+        >提交</el-button
+      >
+    </div>
+  </div>
+</template>
+<script>
+import { provinceAndCityData, CodeToText } from 'element-china-area-data'
+import { lookDriver } from '@/model/transport/index'
+import WsUpload from '@/components/WsUpload'
+import mapDrag from '@/components/mapdrag/mapdrag'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    mapDrag,
+  },
+  watch: {
+    vesselId(val) {
+      this.getVesselData()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    let self = this
+    return {
+      deptBudgetList: {
+        totalStorage: 0,
+        drivercarInfo: {
+          goodsName: '',
+        },
+        driverPayeeInfo: {},
+      },
+      radio: '1',
+      carModelList: [],
+      carLengthList: [],
+      options_: provinceAndCityData,
+      heightData: '600px',
+      zoom: 7,
+      selectedOptions: [],
+      center: [116.244694, 39.517344],
+      window: '',
+      district: null,
+      listDate: { country: '中国', level: 'country', city: '' },
+      citylist: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      mainReportAdd: {},
+      appendixIdsAdd: '',
+      size: 10,
+      value1: '',
+      unitList: [],
+      accessoryBankTFs: false,
+      freightspace: [
+        {
+          carNumber: '',
+          carModel: '高栏',
+          carModelKey: '1',
+          carLength: '13',
+          carLengthKey: '1',
+          carLoad: '',
+          yearManufacture: '',
+        },
+      ],
+      freightspace1: [
+        {
+          account_type: '',
+          radio: '1',
+          payeeName: '',
+          payeeNumberCard: '',
+          compName: '',
+          bankDeposit: '',
+          addressUrlArray: [],
+          bankCard: '',
+        },
+      ],
+      name: '',
+      age: '',
+    }
+  },
+  activated() {
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  computed: {},
+  methods: {
+    IdCard(UUserCard) {
+      //获取年龄
+      var myDate = new Date()
+      var month = myDate.getMonth() + 1
+      var day = myDate.getDate()
+      var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
+      if (
+        UUserCard.substring(10, 12) < month ||
+        (UUserCard.substring(10, 12) == month &&
+          UUserCard.substring(12, 14) <= day)
+      ) {
+        age++
+      }
+      this.age = age
+    },
+    bankcardfujian(item) {
+      this.accessoryBankTFs = true
+    },
+    loaddata() {
+      lookDriver({ id: this.$route.query.id })
+        .toPromise()
+        .then((response) => {
+          this.deptBudgetList = response
+        })
+      //   // 车型
+      //   packList({ constId: 'TRAN1' })
+      //     .toPromise()
+      //     .then((response) => {
+      //       this.carModelList = response
+      //     })
+      //   // 车长
+      //   packList({ constId: 'TRAN2' })
+      //     .toPromise()
+      //     .then((response) => {
+      //       this.carLengthList = response
+      //     })
+    },
+    confirmPositioncity() {
+      this.listDate.level = 'city'
+      this.listDate.country = this.name
+    },
+    uploadSuccessHandle(e, file) {
+      const that = this
+      this.upForm.personNoImg = e.url
+      this.upForm.type = 'driver'
+      this.submiting = true
+      // personShibie(this.upForm).then((response) => {
+      //   this.list.unshift(response.data.data)
+      //   this.upForm.driver = response.data.data.driver
+      //   this.upForm.driverNo = response.data.data.driverNo
+      //   this.upForm.driverAddress = response.data.data.driverAddress
+      //   this.upFormVisible = true
+      //   this.submiting = false
+      // })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    add() {
+      this.freightspace.push({
+        carNumber: '',
+        carModel: '高栏',
+        carModelKey: '1',
+        carLength: '13',
+        carLengthKey: '1',
+        carLoad: '',
+        yearManufacture: '',
+      })
+    },
+    del(index) {
+      if (this.freightspace.length > 1) {
+        this.freightspace.splice(index, 1)
+      }
+    },
+    add1() {
+      this.freightspace1.push({
+        account_type: '',
+        radio: '1',
+        payeeName: '',
+        payeeNumberCard: '',
+        compName: '',
+        bankDeposit: '',
+        bankCard: '',
+        addressUrlArray: [],
+      })
+    },
+    del1(index) {
+      if (this.freightspace1.length > 1) {
+        this.freightspace1.splice(index, 1)
+      }
+    },
+    identitycardfujian(item) {},
+    handleChange(value) {
+      this.selectedOptions = value
+    },
+    returnsales() {
+      this.$router.push({ path: 'tranManagementDriver' })
+    },
+    // confirmPosition() {
+    //   this.draggable = false
+    // },
+    // 上传附件
+    uploadSuccess(data, files, url) {
+      console.log(data, files, url)
+
+      // this.deptBudgetList.
+      // this.formData.append('files', files)
+      // this.feedbackObj.uploadNameAttachment = data.appendixName
+      // this.feedbackObj.pathUploadAttachment = data.appendixPath
+      // // this.newAppendixs = files
+      // this.onChangeFlag = true
+    },
+    selectcarModel(e) {
+      for (var i = 0; i < this.carModelList.length; i++) {
+        if (this.carModelList[i].constValue == e) {
+          this.deptBudgetList.carModelKey = this.carModelList[i].constKey
+        }
+      }
+    },
+    selectcarLength(e) {
+      for (var i = 0; i < this.carLengthList.length; i++) {
+        if (this.carLengthList[i].constValue == e) {
+          this.deptBudgetList.carLengthKey = this.carLengthList[i].constKey
+        }
+      }
+    },
+    onChange(files) {
+      this.fileNum = files
+      this.$refs.upload.handleSaveBill().then((res) => {
+        console.log(files)
+      })
+    },
+
+    submit() {
+      console.log(this.freightspace)
+
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.deptBudgetList.residentCityProvincial =
+            CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.residentCityMunicipal =
+            CodeToText[this.selectedOptions[1]]
+          this.deptBudgetList.driverCarInfoList = this.freightspace
+          this.deptBudgetList.driverPayeeInfoList = this.freightspace1
+          addDriver(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.$router.push({ path: 'tranManagementDriver' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.position {
+  position: relative;
+}
+.add,
+.del {
+  position: absolute;
+  right: -38px;
+  top: 9px;
+  cursor: pointer;
+}
+.del {
+  right: -70px;
+}
+.amap-page-container {
+  width: 300px;
+  height: 300px;
+}
+.el-form {
+  padding: 0 10%;
+}
+/deep/.ws-info-table .el-form-item {
+  border-right: 1px solid #cdd2dc;
+  border-bottom: 1px solid #cdd2dc;
+}
+.readonly {
+  position: relative;
+}
+.title {
+  position: relative;
+}
+.el-car {
+  width: 413px;
+}
+.title::before {
+  content: '';
+  display: inline-block;
+  width: 5px;
+  height: 30px;
+  background: #5473e8;
+  position: absolute;
+  left: 0;
+}
+.el-col {
+  background: #f6f7fc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__content {
+  padding: 0 25px;
+  border-left: 1px solid #cdd2dc;
+  background: #fafbfc;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 140px;
+  text-align: center;
+  background: #f0f2f6;
+  // border: 1px solid #cdd2dc;
+}
+.button-container {
+  display: flex;
+  flex-wrap: nowrap;
+  justify-content: space-between;
+  align-items: center;
+  background-color: #fff;
+  width: 100%;
+  height: 50px;
+  padding: 0 10px;
+  & > div {
+    margin-left: 10px;
+    display: flex;
+    flex-wrap: nowrap;
+    flex-direction: row;
+    & > span {
+      line-height: 50px;
+    }
+  }
+
+  /deep/.auditFlow-box {
+    position: unset;
+    margin-left: 10px;
+    &/deep/.auditFlow-icon {
+      width: auto;
+      padding-right: 30px;
+    }
+    &/deep/.auditFlow-main {
+      position: absolute;
+    }
+  }
+}
+.box-app {
+  display: inline-block;
+  float: left;
+  margin-left: 30px;
+  line-height: 50px;
+}
+/deep/.el-dialog {
+  .el-form-item {
+    margin-bottom: 0 !important;
+    .el-input--medium {
+      textarea {
+        min-height: 100px !important;
+      }
+    }
+  }
+}
+.collapse-bottom {
+  margin-bottom: 20px;
+}
+.input-main .textarea .el-textarea__inner {
+  width: 100%;
+  z-index: 1;
+}
+.bg-left {
+  padding-left: 30px;
+}
+.bg-right {
+  padding-right: 10px;
+  text-align: right;
+}
+.bg-bottom {
+  margin: 15px 0px;
+}
+.wenzi {
+  width: 900px;
+  margin: 0 auto;
+}
+.wenzi h3 {
+  display: inline-block;
+  left: 10px;
+}
+.wenzi p {
+  display: inline-block;
+}
+.center {
+  width: 900px;
+  margin: 0 auto;
+}
+.el-form-item__label {
+  text-align: center;
+}
+.el-table {
+  width: 1240px;
+}
+.ce {
+  width: 900px;
+  margin: 0 auto;
+}
+.driver {
+  width: 120px;
+  margin-top: 10px;
+  font-weight: bold;
+}
+
+// 控制select为只读的时候显示样式
+/deep/.ws-class-table-col {
+  height: auto;
+  padding: 0px 2px;
+  /deep/.el-input__inner {
+    padding: 0px 2px;
+  }
+}
+.winseaview-view {
+  padding: 0 0 20px;
+}
+.container {
+  overflow: scroll;
+  height: 93vh;
+}
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  width: 80px;
+}
+/deep/.ws-info-table .el-form-item {
+  width: 25%;
+}
+.el-textarea__inner {
+  display: none;
+}
+.el-form {
+  margin-top: 50px;
+}
+.readonly {
+  width: 16%;
+}
+.el-cascader {
+  width: 145px;
+}
+.forlist {
+  width: 20%;
+}
+.el-form-item.forlist.is-success.el-form-item--small {
+  width: 20%;
+}
+.el-form-item.forlist.el-form-item--small {
+  width: 20%;
+}
+.el-form-item.readonly.is-success.el-form-item--small.showLableToopTip {
+  width: 20%;
+}
+.el-form-item.el-car.el-form-item--small {
+  width: 33.3%;
+}
+</style>

+ 1 - 1
src/views/warehouse/component/router/index.js

@@ -25,7 +25,7 @@ const warehouseManagementRouter = {
         keepAlive: true
         // module: 'procurement.sparepart.applDetail'
       },
-      hidden: true
+       hidden: true
     },
 
     {

+ 30 - 36
src/views/warehouse/warehouseManagementAdd.vue

@@ -128,10 +128,10 @@
             />
           </ws-form-item>
           <!--备注(选项)-->
-          <ws-form-item label="备注(选)" span="1" prop="placeDelivery">
+          <ws-form-item label="备注(选)" span="1" prop="placeDelivery">
             <ws-input
               v-model="item.remark"
-              placeholder="请输入交货地"
+              placeholder="请输入备注"
               maxlength="20"
               size="small"
             />
@@ -188,7 +188,7 @@
 //  import { getVesselOne } from '@/model/procurement/basic'
 //  import { dayjs } from 'base-core-lib'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { addList, addxiala, editxiala, delxiala } from '@/model/warehouse/index'
+import { addList, addxiala, editxiala, delxiala ,xiala} from '@/model/warehouse/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -264,7 +264,9 @@ export default {
       list: [],
     }
   },
-  activated() {},
+  activated(){
+    this.loaddata()
+  },
   computed: {
     totalStorage: function () {
       var maxStorage = 0
@@ -308,6 +310,7 @@ export default {
     },
     returnsales() {
       this.$router.push({ path: 'warehouseManagementList' })
+      this.deptBudgetList = {}
     },
     // confirmPosition() {
     //   this.draggable = false
@@ -329,6 +332,14 @@ export default {
         console.log(files)
       })
     },
+     loaddata() {
+      // 仓库名称
+      xiala({ compId: sessionStorage.getItem('ws-pf_compId') })
+        .toPromise()
+        .then((response) => {
+          this.packtypeList = response
+        })
+    },
 
     submit() {
        if(!this.deptBudgetList.warehouseName){
@@ -362,24 +373,30 @@ export default {
         })
         return
       }
-       if(!this.selectedOptions){
+       if(!this.deptBudgetList.personPhone){
         this.$message({
-          message: '仓库所在地不能为空!',
+          message: '负责人电话不能为空!',
           type: 'warning',
         })
         return
       }
-
-       if(!this.deptBudgetList.detailedAddress){
+      if(this.deptBudgetList.personPhone.length != 11){
         this.$message({
-          message: '详细地址不能为空!',
+          message: '手机号输入有误!',
           type: 'warning',
         })
         return
       }
-       if(this.deptBudgetList.warehouseName.length < 2 || this.deptBudgetList.warehouseName.length > 20){
+      //  if(!this.deptBudgetList.warehousePrivate){
+      //   this.$message({
+      //     message: '仓库所在地不能为空!',
+      //     type: 'warning',
+      //   })
+      //   return
+      // }
+       if(!this.deptBudgetList.detailedAddress){
         this.$message({
-          message: '详细地址长度不符合要求!',
+          message: '详细地址不能为空!',
           type: 'warning',
         })
         return
@@ -392,31 +409,6 @@ export default {
         })
         return
       }
-      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.personPhone.length > 11) {
-        this.$message({
-          message: '手机号输入有误',
-          type: 'warning',
-        })
-        return
-      }
       if (
         this.deptBudgetList.detailedAddress.length < 2 ||
         this.deptBudgetList.detailedAddress.length > 20
@@ -427,6 +419,7 @@ export default {
         })
         return
       }
+      // freightspace
       for (var i = 0; i < this.freightspace.length; i++) {
         for (var j = i + 1; j < this.freightspace.length; j++) {
           console.log(
@@ -468,6 +461,7 @@ export default {
                 .then((response) => {
                   this.$message.success('添加成功')
                   this.$router.push({ path: 'warehouseManagementList' })
+                  this.deptBudgetList = {}
                 })
             } else {
               EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 15 - 4
src/views/warehouse/warehouseManagementDelete.vue

@@ -35,12 +35,16 @@
           </template>
         </el-table-column>
         <el-table-column prop="warehouseName" label="仓库名称">
+
         </el-table-column>
-        <el-table-column prop="warehouseLocation" label="仓库所在地">
+        <el-table-column prop="warehousePrivate" label="仓库所在地">
+          <template scope="scope">
+            {{scope.row.warehousePrivate}}{{scope.row.warehouseCity}}{{scope.row.warehouseArea}}
+          </template>
         </el-table-column>
-        <el-table-column prop="nowStorage" label="应余库存(吨)">
+        <el-table-column prop="residual" label="应余库存(吨)">
         </el-table-column>
-        <el-table-column prop="personCharge;" label="负责人"> </el-table-column>
+        <el-table-column prop="personCharge" label="负责人"> </el-table-column>
 
         <el-table-column prop="address" label="操作" width="200">
           <template slot-scope="scope">
@@ -67,7 +71,6 @@
 </template>
 <script>
 import {
-  getList,
   delectlist,
   deletewarehouse,
   hide,
@@ -166,6 +169,7 @@ export default {
     },
     //删除
     handleDelete(row) {
+      if(row.residual == 0){
     // console.log(row)
     this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
       cancelButtonText: '取消',
@@ -190,6 +194,13 @@ export default {
       .catch(() => {
         return false
       })
+      }else{
+         this.$message({
+            message: '还有应余库存,不能删除此仓库!',
+            type: 'warning',
+          })
+          return
+      }
   },
     //隐藏
     handleHide(row) {

+ 383 - 4
src/views/warehouse/warehouseManagementDelivery.vue

@@ -365,7 +365,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight <= 0 ||
         this.deptBudgetList.grossWeight > 10000 ||
         (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
           String(this.deptBudgetList.grossWeight).length -
@@ -446,6 +446,197 @@ export default {
           type: 'warning',
         })
         return
+      }
+       //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
       }
       this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
         cancelButtonText: '取消',
@@ -493,7 +684,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight <= 0 ||
         this.deptBudgetList.grossWeight > 10000 ||
         (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
           String(this.deptBudgetList.grossWeight).length -
@@ -535,7 +726,7 @@ export default {
         return
       }
       if (
-        this.deptBudgetList.netWeight < 0 ||
+        this.deptBudgetList.netWeight <= 0 ||
         this.deptBudgetList.netWeight >= 10000
       ) {
         this.$message({
@@ -616,10 +807,197 @@ export default {
         })
         return
       }
-     
+       //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
 
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
 
+       //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
 
+        //不完整粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
        this.$confirm(`确定提交出库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -861,6 +1239,7 @@ export default {
   text-align: left;
   margin-left: 0px;
 }
+
 .small-title {
   position: relative;
   padding: 10px;

+ 76 - 7
src/views/warehouse/warehouseManagementEdit.vue

@@ -257,14 +257,12 @@ export default {
   },
 computed : {
    totalStorage :function() {
-     var sum = 0
+     var sum  = 0
      if(this.deptBudgetList.warehousePositionInfoList){
        for(var i = 0;i < this.deptBudgetList.warehousePositionInfoList.length; i++ ){
-
-      sum += this.deptBudgetList.warehousePositionInfoList[i].maxStorage
-     }
+      sum += Number(this.deptBudgetList.warehousePositionInfoList[i].maxStorage)
      }
-     
+     }    
      return sum
     },
 },
@@ -272,6 +270,7 @@ computed : {
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
+      this.deptBudgetList = {}
     },
     marker: function (item) {
       this.deptBudgetList.warehousePositioning =
@@ -392,6 +391,76 @@ computed : {
 
     //提交
     submit() {
+       if(!this.deptBudgetList.warehouseName){
+        this.$message({
+          message: '仓库名称不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if(this.deptBudgetList.warehouseName.length < 2 || this.deptBudgetList.warehouseName.length > 20){
+        this.$message({
+          message: '仓库名长度不符合要求!',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.personCharge){
+        this.$message({
+          message: '负责人不能为空!',
+          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){
+        this.$message({
+          message: '负责人电话不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if(this.deptBudgetList.personPhone.length != 11){
+        this.$message({
+          message: '手机号输入有误!',
+          type: 'warning',
+        })
+        return
+      }
+       if(!this.deptBudgetList.detailedAddress){
+        this.$message({
+          message: '详细地址不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      
+      if(this.totalStorage <= 0){
+        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.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.baseId = this.baseId
@@ -400,9 +469,9 @@ computed : {
           edit(this.deptBudgetList)
             .toPromise()
             .then((response) => {
-              this.$message.success('编辑成功')
-              this.deptBudgetList = {}
+              this.$message.success('编辑成功')     
               this.$router.push({ path: 'warehouseManagementList' })
+              this.deptBudgetList = {}
             })
         } else {
           //EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))

+ 135 - 80
src/views/warehouse/warehouseManagementIoss.vue

@@ -23,7 +23,7 @@
     <div class="center">
       <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
         <h2>
-          {{ deptBudgetList1.warehouseName }}
+          {{ deptBudgetList1.warehouseName }}
           <span class="position"> {{ deptBudgetList1.binNumber }}仓位 </span>
         </h2>
         <!-- 货名 -->
@@ -130,17 +130,13 @@
   </div>
 </template>
 <script>
-import {
-  goodsname,
-  ioss,
-  submitioss,
-} from '@/model/warehouse/index'
+import { goodsname, ioss, submitioss } from '@/model/warehouse/index'
 
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import { mapActions, mapGetters, mapState } from 'vuex'
+import { mapActions, mapGetters, mapState } from 'vuex'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
-import { dayjs} from 'base-core-lib'
+import { dayjs } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -149,7 +145,7 @@ export default {
   },
   watch: {
     vesselId(val) {
-      this.getList()
+      this.loaddata()
     },
     isShow(val) {
       this.showType = val
@@ -179,22 +175,23 @@ export default {
       // 提交类型
       submitType: true,
       selectpackingMethod: {},
-      goodnameList:[],
+      goodnameList: [],
       size: 10,
+
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       packtypeList: {},
-      deptBudgetList1:[],
+      deptBudgetList1: [],
       date: {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList:{
-        physicalInventory:0
+      deptBudgetList: {
+        physicalInventory: 0,
       },
       historyList: [],
-       rules: {
+      rules: {
         netWeight: [
           {
             required: true,
@@ -212,55 +209,70 @@ export default {
       accessoryTFs: false,
     }
   },
-   computed:{
+  computed: {
     ...mapGetters([
       'userInfo',
-      'isFullScren',
-      'tagWel',
-      'tagList',
-      'isCollapse',
-      'tag',
-      'logsLen',
-      'logsFlag',
-      'language',
-    ]),
-    ioss1 :function() {
-     return (this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
+      'isFullScren',
+      'tagWel',
+      'tagList',
+      'isCollapse',
+      'tag',
+      'logsLen',
+      'logsFlag',
+      'language',
+    ]),
+    ioss1: function () {
+      return (
+        this.deptBudgetList.cumulativeStockIn -
+        this.deptBudgetList.cumulativeStockOut -
+        this.deptBudgetList.physicalInventory
+      )
     },
-    surplusInventory1: function(){
-      return this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut
+    surplusInventory1: function () {
+      return (
+        this.deptBudgetList.cumulativeStockIn -
+        this.deptBudgetList.cumulativeStockOut
+      )
     },
-    inventoryRatio1 : function(){
-      var loss=(this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.cumulativeStockOut)-this.deptBudgetList.physicalInventory
-      var defect=this.deptBudgetList.cumulativeStockIn-this.deptBudgetList.physicalInventory
-      if((loss/defect)==1){
-        var num=0
-      }else{
+    inventoryRatio1: function () {
+      var loss =
+        this.deptBudgetList.cumulativeStockIn -
+        this.deptBudgetList.cumulativeStockOut -
+        this.deptBudgetList.physicalInventory
+      var defect =
+        this.deptBudgetList.cumulativeStockIn -
+        this.deptBudgetList.physicalInventory
+      if (loss / defect == 1) {
+        var num = 0
+      } else {
         // .占比=损耗量÷(累计入库-实际库存)
-        num = Math.floor((loss/defect)*1000000)/1000
+        num = Math.floor((loss / defect) * 1000000) / 1000
       }
-     
-     return num;
+      // this.deptBudgetList.inventoryRatio = this.deptBudgetList.inventoryRatio.toFixed(3)
+      //  this.deptBudgetList.inventoryRatio = num
+       return num
     },
-      
-
-   },
+  },
   activated() {
     //cg.viewBudget
     //cg.viewSpareMoney
     // this.getVesselData();
     this.loaddata()
     this.showType = this.isShow
+    console.log(this.deptBudgetList)
   },
-   mounted() {
+
+  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.$route.query.baseId
-    this.deptBudgetList1.positionId=this.$route.query.positionId
+    this.deptBudgetList1.binNumber = this.deptBudgetList.binNumber
+    this.deptBudgetList1.baseId = this.$route.query.baseId
+    this.deptBudgetList1.positionId = this.deptBudgetList.positionId
+    this.loaddata() 
+      // 货名
     // this.deptBudgetList.inventoryRatio=((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory)*100
     // this.deptBudgetList.ioss=(deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory
     // this.deptBudgetList1.goodsNameKey=this.deptBudgetList.goodsNameKey
@@ -269,32 +281,56 @@ export default {
   methods: {
     //返回按钮
     returnWarehouse() {
+       this.deptBudgetList= {}
       this.$router.push({ path: 'warehouseManagementList' })
     },
     //提交按钮
-    submit(){
-       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.qualityInspector= this.userInfo.showRoleName
-       for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].goodsName == this.deptBudgetList.goodsName) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
-        }
+    submit() {
+      if(this.deptBudgetList.physicalInventory <= 0){
+        this.$message({
+          message: '请填写实际库存!',
+          type: 'warning',
+        })
+        return
       }
-         this.deptBudgetList.compId = this.compId
+
+      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.qualityInspector = this.userInfo.showRoleName
+          for (var i = 0; i < this.goodnameList.length; i++) {
+            if (
+              this.goodnameList[i].goodsName == this.deptBudgetList.goodsName
+            ) {
+              this.deptBudgetList.goodsNameKey = this.goodnameList[
+                i
+              ].goodsNameKey
+            }
+          }
+          this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
-          console.log(this.deptBudgetList)
-         submitioss(this.deptBudgetList)
+                  console.log(this.deptBudgetList)
+          submitioss(this.deptBudgetList)
             .toPromise()
             .then((response) => {
               this.$message.success('提交成功')
+              this.deptBudgetList = {}
               this.$router.push({ path: 'warehouseManagementList' })
             })
         } else {
@@ -338,26 +374,34 @@ export default {
       console.log(`当前页: ${val}`)
       this.getList()
     },
-    changeioss(e){
-        for (var i = 0; i < this.goodnameList.length; i++) {
+    changeioss(e) {
+      if(!this.deptBudgetList.baseId){
+        this.deptBudgetList.baseId = this.$route.query.baseId
+        this.deptBudgetList.positionId = this.deptBudgetList1.positionId
+        this.deptBudgetList.binNumber = this.deptBudgetList1.binNumber
+      }
+      for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].goodsName == e) {
           this.deptBudgetList.goodsNameKey = this.goodnameList[i].goodsNameKey
         }
-      }  
+      }
       this.ioss()
     },
-     ioss(){
-      ioss(
-        this.deptBudgetList
-      )
+    ioss() {
+      ioss({baseId:this.deptBudgetList.baseId,
+positionId: this.deptBudgetList.positionId,
+goodsNameKey:this.deptBudgetList.goodsNameKey,
+goodsName:this.deptBudgetList.goodsName,
+})
         .toPromise()
         .then((response) => {
-         this.deptBudgetList=response     
+          this.deptBudgetList = response
         })
     },
-     loaddata() {
+    loaddata() {
+     
       // 货名
-      goodsname({positionId : this.$route.query.positionId})
+      goodsname({ positionId: this.$route.query.positionId })
         .toPromise()
         .then((response) => {
           this.goodnameList = response
@@ -369,15 +413,26 @@ export default {
           this.searchType = this.taskTypeList[i].type
         }
       }
-    },  
-   
-    // deletecontract(){},
+    },
+    // // 关闭 dialog时 处理文件url 初始化upload组件
+    // handleCloe() {
+    //   this.dialogViewSpareMoney = false
+    // },
+    // history(row) {
+    //   console.log(row)
+    //   billoperatehis({ id: row.id })
+    //     .toPromise()
+    //     .then((response) => {
+    //       this.historyList = response
+    //     })
+    // },
+
     //删除
-    approve() {},
-    listQuery() {},
-    total() {},
-    clearfiltQuery() {},
-    selectCrtDuty() {},
+    // approve() {},
+    // listQuery() {},
+    // total() {},
+    // clearfiltQuery() {},
+    // selectCrtDuty() {},
   },
 }
 </script>

+ 22 - 11
src/views/warehouse/warehouseManagementList.vue

@@ -170,6 +170,7 @@
         </el-table-column>
       </el-table>
     </div>
+   
   </div>
 </template>
 <script>
@@ -182,7 +183,7 @@ import {
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
-import { dayjs, fmoney, EventBus } from 'base-core-lib'
+import { EventBus } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -227,6 +228,7 @@ export default {
       warehouseList: [],
       deptBudgetList: {},
       historyList: [],
+      deptBudgetTotal: 0,
       pickerBeginDateBefore: {
         disabledDate: (time) => {
           return time.getTime() > Date.now()
@@ -258,6 +260,7 @@ export default {
     },
     //入库
     warehousing(item) {
+     
       var free = 0
       for (var i = 0; i < item.warehouseNumViewList.length; i++) {
         free += Number(item.warehouseNumViewList[i].storage)
@@ -269,7 +272,8 @@ export default {
           positionId: item.binNumberId,
           warehouseName: item.warehouseName,
           binNumber: item.binNumber,
-          capacity:item.capacity - free ,
+          capacity: item.capacity - free,
+          id: item.id,
         },
       })
     },
@@ -306,15 +310,17 @@ export default {
     },
     //待完成//传参
     nocomplete(row) {
-      this.$router.push({
-        path: 'warehouseManagementNoComplete',
-        query: {
-          baseId: row.warehouseId,
-          positionId: row.binNumberId,
-          warehouseName: row.warehouseName,
-          binNumber: row.binNumber,
-        },
-      })
+      if (row.number > 0) {
+        this.$router.push({
+          path: 'warehouseManagementNoComplete',
+          query: {
+            baseId: row.warehouseId,
+            positionId: row.binNumberId,
+            warehouseName: row.warehouseName,
+            binNumber: row.binNumber,
+          },
+        })
+      }
     },
     //记录
     record(item) {
@@ -550,6 +556,11 @@ export default {
 /deep/.el-table tr th.is-leaf:first-child {
   border-left: 1px solid #e9ecf7;
 }
+/deep/.el-table .el-table__header .cell,
+/deep/.el-table .el-table__body .cell {
+  -webkit-line-clamp: 10;
+  max-height: 400px;
+}
 .record,
 .adjustment {
   display: inline-block;

+ 16 - 26
src/views/warehouse/warehouseManagementLook.vue

@@ -74,7 +74,7 @@
           </ws-form-item>
           <!--总储量(吨)-->
           <ws-form-item label="总储量(吨)" span="1" prop="totalStorage">
-            {{ deptBudgetList.totalStorage }}
+            {{ totalStorage }}
           </ws-form-item>
         </ws-info-table>
 
@@ -87,12 +87,6 @@
               prop="binNumber"
               class="forlist"
             >
-              <!-- <ws-input
-              v-model.number="item.binNumber"
-              placeholder="请输入仓位编号"
-              maxlength="100"
-              size="small"
-            /> -->
               {{ item.binNumber }}
             </ws-form-item>
             <!--最大储量(吨)-->
@@ -102,32 +96,15 @@
               prop="maxStorage"
               class="forlist"
             >
-              <!-- <ws-input
-              v-model="item.maxStorage"
-              placeholder="请输入最大储量(吨)"
-              maxlength="20"
-              size="small"
-            /> -->
               {{ item.maxStorage }}
             </ws-form-item>
             <!--现有储量-->
             <ws-form-item label="现有储量" span="1" prop="nowStorage">
-              <!-- <ws-input
-              v-model="item.nowStorage"
-              placeholder="请输入现有储量"
-              maxlength="100"
-              size="small"
-            /> -->
+    
               {{ item.nowStorage }}
             </ws-form-item>
             <!--备注(选填)-->
             <ws-form-item label="备注(选填)" span="1" prop="remark">
-              <!-- <ws-input
-              v-model="item.remark"
-              placeholder="请输入备注(选项)"
-              maxlength="100"
-              size="small"
-            /> -->
               {{ item.remark }}
             </ws-form-item>
           </ws-info-table>
@@ -211,13 +188,26 @@ export default {
     }
   },
   activated() {
-    this.loaddata()
+    this.selectpackingMethod()
     this.showType = this.isShow
+    this.loaddata()
   },
+  computed : {
+   totalStorage :function() {
+     var sum  = 0
+     if(this.deptBudgetList.warehousePositionInfoList){
+       for(var i = 0;i < this.deptBudgetList.warehousePositionInfoList.length; i++ ){
+      sum += Number(this.deptBudgetList.warehousePositionInfoList[i].maxStorage)
+     }
+     }    
+     return sum
+    },
+},
   methods: {
     //返回按钮
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
+      this.deptBudgetList = {}
     },
     dateFormat(fmt, date) {
       let ret

+ 49 - 27
src/views/warehouse/warehouseManagementNoComplete.vue

@@ -42,10 +42,10 @@
           </el-table-column>
           <el-table-column prop="goodsName" label="货名"> </el-table-column>
           <el-table-column
-            prop="grossWeight;"
+            prop="grossWeight"
             label="毛重(吨)"
           ></el-table-column>
-          <el-table-column prop=" tare" label="皮重(吨)"> </el-table-column>
+          <el-table-column prop="tare" label="皮重(吨)"> </el-table-column>
           <el-table-column
             prop="netWeight"
             label="净重(吨)"
@@ -120,14 +120,12 @@
 <script>
 import {
   complete,
-  export1,
-  billoperatehis,
   delInOut,
   // deletewarehouse,
   // warehouseName,
   // addstorageputList,
 } from '@/model/warehouse/index'
-import { downloadFile } from '@/utils/batchDown'
+// import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 import { dayjs } from 'base-core-lib'
@@ -170,7 +168,6 @@ export default {
       improved: [],
       row: [],
       deptBudgetList1: [],
-
       // 提交类型
       submitType: true,
       selectpackingMethod: {},
@@ -185,7 +182,6 @@ export default {
       contractList: [],
       deptBudgetList: {},
       historyList: [],
-
       // inOutDate:null,
       pickerBeginDateBefore: {
         disabledDate: (time) => {
@@ -201,7 +197,6 @@ export default {
     // this.getVesselData();
     this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
     this.binNumber = this.$route.params.binNumber
-
     //接参
     this.getList(this.$route.query.baseId, this.$route.query.positionId)
     this.showType = this.isShow
@@ -214,33 +209,61 @@ export default {
     //编辑
     edits(row) {
       if (row.inOutFlag == 2) {
+        this.$store.dispatch('app/setdeptBudgetList', row)
         this.$router.push({
           path: 'warehouseManagementPerfectput',
           query: {
-            warehouseName: row.warehouseName,
-            binNumber: row.binNumber,
-            baseId: row.warehouseId,
-            positionId: row.binNumberId,
+             id:row.id,
+             agent:row.agent,
+             baseId: row.baseId,
+             binNumber: row.binNumber,
+             carNo:row.carNo,
+             compId:row.compId,
+             contractNo:row.contractNo,
+             goodsName:row.goodsName,
+             goodsNameKey:row.goodsNameKey,
+             grade:row.grade,
+             grossWeight:row.grossWeight,
+             inOutDate:row.inOutDate,
+             inOutFlag:row.inOutFlag,
+             inOutType:row.inOutType,
+             inOutTypeKey:row.inOutTypeKey,
+             netWeight:row.netWeight,
+             positionId: row.positionId,
+             statusFlag:row.statusFlag,
+             tare:row.tare,
+             warehouseName: row.warehouseName,  
+             warehouseInOutDetail:row.warehouseInOutDetail
           },
         })
       } else if(row.inOutFlag==1){
+        this.$store.dispatch('app/setdeptBudgetList', row)
+      // this.$store.commit('deptBudgetList',row)
         this.$router.push({
           path: 'warehouseManagementPerfectDelivery',
           query: {
-            warehouseName: row.warehouseName,
-            binNumber: row.binNumber,
-            baseId: row.warehouseId,
-            positionId: row.binNumberId,
-            goodsName:row.goodsName,
-            grossWeight:row.grossWeight,
-            tare:row.tare,
-            netWeight:row.netWeight,
-            grade:row.grade,
-            agent:row.agent,
-            carNo:row.carNo,
-            inOutDate:row.inOutDate,
-            contractNo:row.contractNo,
-            inOutType:row.inOutType,
+             id:row.id,
+             agent:row.agent,
+             baseId: row.baseId,
+             binNumber: row.binNumber,
+             carNo:row.carNo,
+             compId:row.compId,
+             contractNo:row.contractNo,
+             goodsName:row.goodsName,
+             goodsNameKey:row.goodsNameKey,
+             grade:row.grade,
+             grossWeight:row.grossWeight,
+             inOutDate:row.inOutDate,
+             inOutFlag:row.inOutFlag,
+             inOutType:row.inOutType,
+             inOutTypeKey:row.inOutTypeKey,
+             netWeight:row.netWeight,
+             positionId: row.positionId,
+             statusFlag:row.statusFlag,
+             tare:row.tare,
+             warehouseName: row.warehouseName,  
+             warehouseInOutDetail:row.warehouseInOutDetail
+
           }
           })
       }
@@ -320,7 +343,6 @@ export default {
               this.getList(row.baseId,row.positionId)
             })
             .catch((response) => {
-
             })
         })
         .catch(() => {

+ 393 - 107
src/views/warehouse/warehouseManagementPerfectDelivery.vue

@@ -23,7 +23,7 @@
       </el-col>
     </el-row>
 
-    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
       <div class="basicInformation">
         <h2>
           {{ this.deptBudgetList1.warehouseName }}库
@@ -36,7 +36,7 @@
           <!-- 货名 -->
           <ws-form-item label="货名" span="1">
             <ws-select
-              v-model="deptBudgetList.goodsName"
+              v-model="dataList.goodsName"
               placeholder=""
               class="typeselect"
               @change="selectgoodsName"
@@ -53,7 +53,7 @@
           <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
             <ws-input
               @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
+              v-model="dataList.grossWeight"
               placeholder="请输入毛重"
               maxlength="20"
               size="small"
@@ -69,7 +69,7 @@
           >
             <ws-input
               @input="tarechange"
-              v-model="deptBudgetList.tare"
+              v-model="dataList.tare"
               placeholder="请输入皮重"
               maxlength="100"
               size="small"
@@ -79,7 +79,8 @@
           <!--净重(吨)-->
           <ws-form-item label="净重(吨)" span="1" prop="netWeight">
             <ws-input
-              v-model.number="deptBudgetList.netWeight"
+            :readonly="readonly"
+              v-model.number="dataList.netWeight"
               placeholder="不可编辑,自动计算"
               type="number"
               maxlength="120"
@@ -89,7 +90,7 @@
           <!-- 品级 -->
           <ws-form-item label="品级" span="1" class="readonly">
             <ws-select
-              v-model="deptBudgetList.grade"
+              v-model="dataList.grade"
               placeholder=""
               class="typeselect"
               @change="selectpackingMethod"
@@ -106,7 +107,7 @@
           <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
             <ws-input
-              v-model="deptBudgetList.agent"
+              v-model="dataList.agent"
               placeholder="请输入出库经办人姓名"
               maxlength="100"
               size="small"
@@ -120,16 +121,16 @@
             class="deliverydate"
           >
             <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
+              v-model="dataList.inOutDate"
               type="date"
               placeholder="请选择出库日期"
               value-format="yyyy-MM-dd"
             />
           </ws-form-item>
-          <!-- 库类型 -->
+          <!-- 库类型 -->
           <ws-form-item label="出库类型" span="1">
             <ws-select
-              v-model="deptBudgetList.inOutType"
+              v-model="dataList.inOutType"
               placeholder=""
               class="typeselect"
               @change="selectstorageType"
@@ -146,7 +147,7 @@
           <!--车牌号-->
           <ws-form-item label="车牌号" span="1" prop="sourceGoods">
             <ws-input
-              v-model="deptBudgetList.carNo"
+              v-model="dataList.carNo"
               placeholder="请输入车牌号"
               maxlength="20"
               size="small"
@@ -156,7 +157,7 @@
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
             <ws-input
-              v-model="deptBudgetList.contractNo"
+              v-model="dataList.contractNo"
               placeholder="请输入合同编号"
               maxlength="100"
               size="small"
@@ -171,7 +172,7 @@
         oss-key="mainPlan"
         :comp-id="compId"
         :appendix-ids="appendixIdsAdd"
-        :vesselId="deptBudgetList.addressUrl"
+        :vesselId="dataList.addressUrl"
         :size-limit="size"
         @uploadSuccess="uploadSuccess"
         @onChange="onChange"
@@ -179,10 +180,10 @@
       />
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
-        <!--检员-->
+        <!--检员-->
         <ws-form-item label="质检员" span="1" prop="qualityInspector">
           <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
             maxlength="120"
             size="small"
@@ -194,7 +195,7 @@
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              v-model="dataList.warehouseInOutDetail.waterContent"
               placeholder="请输入水分占比"
               maxlength="120"
               size="small"
@@ -203,7 +204,7 @@
           <!--杂质(%)<=-->
           <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              v-model="dataList.warehouseInOutDetail.impurity"
               placeholder="请输入杂质占比"
               maxlength="120"
               size="small"
@@ -212,7 +213,7 @@
           <!--容重(克/升)>=-->
           <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              v-model="dataList.warehouseInOutDetail.bulkDensity"
               placeholder="请输入容重"
               maxlength="120"
               size="small"
@@ -221,7 +222,7 @@
           <!--霉变粒(%)<=-->
           <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
+              v-model="dataList.warehouseInOutDetail.mildewGrain"
               placeholder="请输入霉变粒占比"
               maxlength="120"
               size="small"
@@ -230,7 +231,7 @@
           <!--热损伤(%)<=-->
           <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
+              v-model="dataList.warehouseInOutDetail.jiaorenli"
               placeholder="请输入热损伤占比"
               maxlength="120"
               size="small"
@@ -239,7 +240,7 @@
           <!--不完整粒(%)<=-->
           <ws-form-item label="不完整粒(%)<=" span="1" prop="imperfectGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              v-model="dataList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入不完整粒占比"
               maxlength="120"
               size="small"
@@ -271,6 +272,7 @@ import { pullDown, addstorageputList } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
+import { mapActions, mapGetters, mapState } from 'vuex'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
 export default {
@@ -280,13 +282,15 @@ export default {
     Pagination,
   },
   watch: {
-    // vesselId(val) {
-    //   this.getList()
-    // },
     isShow(val) {
       this.showType = val
     },
   },
+  computed:{
+    ...mapGetters([
+      'deptBudgetList',
+    ]),
+  },
   data() {
     return {
       //弹出框
@@ -300,6 +304,7 @@ export default {
       showType: true,
       // 年
       year: '',
+      readonly:true,
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
@@ -336,7 +341,18 @@ export default {
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList: {
+      dataList: {
+        id:'',
+        grossWeight:'',
+        contractNo:'',
+        tare:'',
+        netWeight:'',
+        grade:'',
+        agent:'',
+        carNo:'',
+        inOutDate:'',
+        inOutType:'',
+        goodsName:'',
         warehouseInOutDetail: {},
       },
       historyList: [],
@@ -349,27 +365,38 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
+  activated() {
     this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.getList()
-    this.deptBudgetList.goodsName= this.$route.query.goodsName
-    this.deptBudgetList.grossWeight = this.$route.query.grossWeight
-    this.deptBudgetList.tare = this.$route.query.tare
-    this.deptBudgetList.netWeight = this.$route.query.netWeight
-    this.deptBudgetList.grade = this.$route.query.grade
-    this.deptBudgetList.agent = this.$route.query.agent
-    this.deptBudgetList.carNo = this.$route.query.carNo
-    this.deptBudgetList.inOutDate = this.$route.query.inOutDate
-    this.deptBudgetList.contractNo = this.$route.query.contractNo
-    this.deptBudgetList.inOutType = this.$route.query.inOutType
+    this.dataList.id=this.$route.query.id
+    this.dataList.grossWeight=this.$route.query.grossWeight
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.baseId = this.$route.query.baseId
+    this.dataList.positionId = this.$route.query.positionId
+    this.dataList.warehouseName = this.$route.query.warehouseName
+    this.dataList.binNumber = this.$route.query.binNumber
+    this.dataList.tare = this.$route.query.tare
+    this.dataList.netWeight = this.$route.query.netWeight
+    this.dataList.grade = this.$route.query.grade
+    this.dataList.agent = this.$route.query.agent
+    this.dataList.carNo = this.$route.query.carNo
+    this.dataList.inOutDate = this.$route.query.inOutDate
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.inOutType = this.$route.query.inOutType
+    this.dataList.compId = this.$route.query.compId
+    this.dataList.goodsName = this.$route.query.goodsName
+    this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+    this.dataList.inOutFlag = this.$route.inOutFlag
+    this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+    this.dataList.statusFlag = this.$route.statusFlag
+    this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
+    console.log(this.dataList)
   },
   methods: {
     //返回按钮
     revert() {
-      this.$router.push({ path: 'warehouseManagementNoComplete' })
+      this.$router.go(-1)
     },
     //暂存按钮
     temporaryStorage() {
@@ -379,14 +406,14 @@ export default {
         type: 'warning',
       })
         .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
+          this.$refs.dataList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
+              this.dataList.compId = sessionStorage.getItem(
                 'ws-pf_compId'
               )
-              this.deptBudgetList.inOutFlag = 1
-              this.deptBudgetList.statusFlag = 1
-              addstorageputList(this.deptBudgetList)
+              this.dataList.inOutFlag = 1
+              this.dataList.statusFlag = 1
+              addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {
                   this.$message.success('暂存成功')
@@ -404,83 +431,365 @@ export default {
     },
     //提交按钮
     submit() {
+        if (!this.dataList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
       if (
-        this.deptBudgetList.warehouseInOutDetail.qualityInspector.length < 2 ||
-        deptBudgetList.warehouseInOutDetail.qualityInspector > 10
+        this.dataList.grossWeight <= 0 ||
+        this.dataList.grossWeight > 10000 ||
+        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+          String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
       ) {
         this.$message({
-          message: '质检员姓名长度错误!',
+          message: '毛重输入错误',
           type: 'warning',
         })
         return
       }
-      this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.inOutFlag = 1
-          this.deptBudgetList.statusFlag = 3
-          addstorageputList(this.deptBudgetList)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'warehouseManagementList' })
-            })
-        } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
+      if (
+        this.dataList.tare < 0 ||
+        this.dataList.tare > 10000 ||
+        (String(this.dataList.tare).indexOf('.') != -1 &&
+          String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.agent.length < 2 ||
+        this.dataList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if (!this.dataList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.contractNo.length < 6 ||
+        this.dataList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (this.dataList.netWeight > this.$route.query.capacity) {
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+       //自检员
+      if (this.dataList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.dataList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
         }
-      })
-    },
-    //暂存按钮
-    returnWarehouse() {
-      this.$refs.deptBudgetList.validate((valid) => {
+      }
+      if (this.dataList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.waterContent < 1 ||
+          this.dataList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.dataList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.dataList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.dataList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.dataList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.impurity < 1 ||
+          this.dataList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.dataList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.dataList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.dataList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.dataList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.dataList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      this.$refs.dataList.validate((valid) => {
         if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.statusFlag = 1
-          addstorageputList(this.deptBudgetList)
+          this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.dataList.inOutFlag = 1
+          this.dataList.statusFlag = 3
+          addstorageputList(this.dataList)
             .toPromise()
             .then((response) => {
               this.$message.success('添加成功')
               this.$router.push({ path: 'warehouseManagementList' })
             })
         } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+         EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false
         }
       })
     },
     tarechange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
         )
       }
     },
     grossWeightchange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
         )
       }
     },
     selectgoodsName(e) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          this.dataList.goodsNameKey = this.goodnameList[i].constKey
         }
       }
     },
     selectpackingMethod(e) {
       for (var i = 0; i < this.packtypeList.length; i++) {
         if (this.packtypeList[i].constValue == e) {
-          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+          this.dataList.packingMethodKey = this.packtypeList[i].constKey
         }
       }
     },
     selectstorageType(e) {
       for (var i = 0; i < this.storageType.length; i++) {
         if (this.storageType[i].constValue == e) {
-          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+          this.dataList.inOutTypeKey = this.storageType[i].constKey
         }
       }
     },
@@ -511,7 +820,7 @@ export default {
           this.gradeList = response
         })
       // 类型
-      pullDown({ constId: 'CON5' })
+      pullDown({ constId: 'CON6' })
         .toPromise()
         .then((response) => {
           this.storageType = response
@@ -557,31 +866,6 @@ export default {
           this.historyList = response
         })
     },
-
-    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(){},
     //删除
     approve() {},
     listQuery() {},
@@ -645,7 +929,6 @@ export default {
 /deep/.el-form-item__label {
   width: 160px;
 }
-
 //选填
 /deep/.el-form-item {
   width: 50%;
@@ -690,6 +973,9 @@ export default {
   text-align: left;
   margin-left: 0px;
 }
+/deep/[data-v-d228e17e] .el-form-item__label {
+    width: 60px;
+}
 .small-title {
   position: relative;
   padding: 10px;
@@ -719,7 +1005,7 @@ export default {
   background-color: #f6f7fc;
 }
 /deep/.neifor .el-input--small .el-input__inner {
-  width: 120%;
+  width: 100%;
 }
 .el-input__inner {
   width: 150px;

+ 411 - 65
src/views/warehouse/warehouseManagementPerfectput.vue

@@ -22,7 +22,7 @@
       </el-col>
     </el-row>
 
-    <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
+    <ws-form ref="dataList" :model="dataList" :rules="rules">
       <div class="basicInformation">
         <h2>
           {{ deptBudgetList1.warehouseName }}库
@@ -33,7 +33,7 @@
           <!-- 货名 -->
           <ws-form-item label="货名" span="1">
             <ws-select
-              v-model="deptBudgetList.goodsName"
+              v-model="dataList.goodsName"
               placeholder=""
               class="typeselect"
               @change="selectgoodsName"
@@ -50,7 +50,7 @@
           <ws-form-item label="毛重(吨)" span="1" prop="grossWeight">
             <ws-input
               @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
+              v-model="dataList.grossWeight"
               placeholder="请输入毛重"
               maxlength="20"
               size="small"
@@ -66,7 +66,7 @@
           >
             <ws-input
               @input="tarechange"
-              v-model="deptBudgetList.tare"
+              v-model="dataList.tare"
               placeholder="请输入皮重"
               maxlength="100"
               size="small"
@@ -76,7 +76,8 @@
           <!--净重(吨)-->
           <ws-form-item label="净重(吨)" span="1" prop="netWeight">
             <ws-input
-              v-model.number="deptBudgetList.netWeight"
+            :readonly="readonly"
+              v-model.number="dataList.netWeight"
               placeholder="不可编辑,自动计算"
               type="number"
               maxlength="120"
@@ -86,7 +87,7 @@
           <!-- 品级 -->
           <ws-form-item label="品级" span="1" class="readonly">
             <ws-select
-              v-model="deptBudgetList.grade"
+              v-model="dataList.grade"
               placeholder=""
               class="typeselect"
               @change="selectpackingMethod"
@@ -103,30 +104,30 @@
           <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
             <ws-input
-              v-model="deptBudgetList.agent"
+              v-model="dataList.agent"
               placeholder="请输入出库经办人姓名"
               maxlength="100"
               size="small"
             />
           </ws-form-item>
-          <!--库日期-->
+          <!--库日期-->
           <ws-form-item
-            label="库日期"
+            label="库日期"
             span="1"
             prop="inOutDate"
             class="deliverydate"
           >
             <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
+              v-model="dataList.inOutDate"
               type="date"
-              placeholder="请选择库日期"
+              placeholder="请选择库日期"
               value-format="yyyy-MM-dd"
             />
           </ws-form-item>
           <!-- 入库类型 -->
-          <ws-form-item label="库类型" span="1">
+          <ws-form-item label="库类型" span="1">
             <ws-select
-              v-model="deptBudgetList.inOutType"
+              v-model="dataList.inOutType"
               placeholder=""
               class="typeselect"
               @change="selectstorageType"
@@ -143,7 +144,7 @@
           <!--车牌号-->
           <ws-form-item label="车牌号" span="1" prop="sourceGoods">
             <ws-input
-              v-model="deptBudgetList.carNo"
+              v-model="dataList.carNo"
               placeholder="请输入车牌号"
               maxlength="20"
               size="small"
@@ -153,7 +154,7 @@
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
             <ws-input
-              v-model="deptBudgetList.contractNo"
+              v-model="dataList.contractNo"
               placeholder="请输入合同编号"
               maxlength="100"
               size="small"
@@ -168,7 +169,7 @@
         oss-key="mainPlan"
         :comp-id="compId"
         :appendix-ids="appendixIdsAdd"
-        :vesselId="deptBudgetList.addressUrl"
+        :vesselId="dataList.addressUrl"
         :size-limit="size"
         @uploadSuccess="uploadSuccess"
         @onChange="onChange"
@@ -176,10 +177,10 @@
       />
       <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
-        <!--检员-->
+        <!--检员-->
         <ws-form-item label="质检员" span="1" prop="qualityInspector">
           <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
+            v-model="dataList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
             maxlength="120"
             size="small"
@@ -192,7 +193,7 @@
           <!--水分(%)<=-->
           <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              v-model="dataList.warehouseInOutDetail.waterContent"
               placeholder="请输入水分占比"
               maxlength="120"
               size="small"
@@ -201,7 +202,7 @@
           <!--杂质(%)<=-->
           <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              v-model="dataList.warehouseInOutDetail.impurity"
               placeholder="请输入杂质占比"
               maxlength="120"
               size="small"
@@ -210,7 +211,7 @@
           <!--容重(克/升)>=-->
           <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              v-model="dataList.warehouseInOutDetail.bulkDensity"
               placeholder="请输入容重"
               maxlength="120"
               size="small"
@@ -219,7 +220,7 @@
           <!--霉变粒(%)<=-->
           <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
+              v-model="dataList.warehouseInOutDetail.mildewGrain"
               placeholder="请输入霉变粒占比"
               maxlength="120"
               size="small"
@@ -228,7 +229,7 @@
           <!--热损伤(%)<=-->
           <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
+              v-model="dataList.warehouseInOutDetail.jiaorenli"
               placeholder="请输入热损伤占比"
               maxlength="120"
               size="small"
@@ -237,7 +238,7 @@
           <!--不完整粒(%)<=-->
           <ws-form-item label="不完整粒(%)<=" span="1" prop="imperfectGrain">
             <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              v-model="dataList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入不完整粒占比"
               maxlength="120"
               size="small"
@@ -268,6 +269,7 @@
 import { pullDown, addstorageputList } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
+import { mapActions, mapGetters, mapState } from 'vuex'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
 import { dayjs, EventBus } from 'base-core-lib'
@@ -285,6 +287,11 @@ export default {
       this.showType = val
     },
   },
+  computed:{
+    ...mapGetters([
+      'deptBudgetList',
+    ]),
+  },
   data() {
     return {
       //弹出框
@@ -299,6 +306,7 @@ export default {
       // 年
       year: '',
       deptBudgetTotal: 0,
+      readonly:true,
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
@@ -312,6 +320,7 @@ export default {
       storageType: [],
       appendixIdsAdd: '',
       uploadSuccess: {},
+      warehouseInOutDetail:{},
       onChange: {},
       deptBudgetList1: [],
       gradeList: [],
@@ -334,7 +343,18 @@ export default {
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList: {
+      dataList: {
+        id:'',
+        grossWeight:'',
+        contractNo:'',
+        tare:'',
+        netWeight:'',
+        grade:'',
+        agent:'',
+        carNo:'',
+        inOutDate:'',
+        inOutType:'',
+        goodsName:'',
         warehouseInOutDetail: {},
       },
       historyList: [],
@@ -346,28 +366,37 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {
-    console.log(this.$route.query)
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
+   activated() {
     this.deptBudgetList1.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
     this.getList()
-    this.deptBudgetList.goodsName= this.$route.query.goodsName
-    this.deptBudgetList.grossWeight = this.$route.query.grossWeight
-    this.deptBudgetList.tare = this.$route.query.tare
-    this.deptBudgetList.netWeight = this.$route.query.netWeight
-    this.deptBudgetList.grade = this.$route.query.grade
-    this.deptBudgetList.agent = this.$route.query.agent
-    this.deptBudgetList.carNo = this.$route.query.carNo
-    this.deptBudgetList.inOutDate = this.$route.query.inOutDate
-    this.deptBudgetList.contractNo = this.$route.query.contractNo
-    this.deptBudgetList.inOutType = this.$route.query.inOutType
+    this.dataList.id=this.$route.query.id
+    this.dataList.grossWeight=this.$route.query.grossWeight
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.baseId = this.$route.query.baseId
+    this.dataList.positionId = this.$route.query.positionId
+    this.dataList.warehouseName = this.$route.query.warehouseName
+    this.dataList.binNumber = this.$route.query.binNumber
+    this.dataList.tare = this.$route.query.tare
+    this.dataList.netWeight = this.$route.query.netWeight
+    this.dataList.grade = this.$route.query.grade
+    this.dataList.agent = this.$route.query.agent
+    this.dataList.carNo = this.$route.query.carNo
+    this.dataList.inOutDate = this.$route.query.inOutDate
+    this.dataList.contractNo = this.$route.query.contractNo
+    this.dataList.inOutType = this.$route.query.inOutType
+    this.dataList.compId = this.$route.query.compId
+    this.dataList.goodsName = this.$route.query.goodsName
+    this.dataList.goodsNameKey = Number(this.$route.query.goodsNameKey)
+    this.dataList.inOutFlag = this.$route.inOutFlag
+    this.dataList.inOutTypeKey = Number(this.$route.query.inOutTypeKey)
+    this.dataList.statusFlag = this.$route.statusFlag
+    this.dataList.warehouseInOutDetail = this.$route.query.warehouseInOutDetail
   },
   methods: {
     //返回按钮
     revert() {
-      this.$router.push({ path: 'warehouseManagementNoComplete' })
+      this.$router.go(-1)
     },
     //暂存按钮
     temporaryStorage() {
@@ -377,14 +406,14 @@ export default {
         type: 'warning',
       })
         .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
+          this.$refs.dataList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
+              this.dataList.compId = sessionStorage.getItem(
                 'ws-pf_compId'
               )
-              this.deptBudgetList.inOutFlag = 1
-              this.deptBudgetList.statusFlag = 1
-              addstorageputList(this.deptBudgetList)
+              this.dataList.inOutFlag = 2
+              this.dataList.statusFlag = 1
+              addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {
                   this.$message.success('暂存成功')
@@ -402,21 +431,331 @@ export default {
     },
     //提交按钮
     submit() {
-      console.log(123456)
+       if (!this.dataList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.grossWeight) {
+        this.$message({
+          message: '毛重不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.grossWeight <= 0 ||
+        this.dataList.grossWeight > 10000 ||
+        (String(this.dataList.grossWeight).indexOf('.') != -1 &&
+          String(this.dataList.grossWeight).length -
+            (String(this.dataList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+    
+      if (
+        this.dataList.tare < 0 ||
+        this.dataList.tare > 10000 ||
+        (String(this.dataList.tare).indexOf('.') != -1 &&
+          String(this.dataList.tare).length -
+            (String(this.dataList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.agent) {
+        this.$message({
+          message: '经办人不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.agent.length < 2 ||
+        this.dataList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+       if (!this.dataList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.carNo) {
+        this.$message({
+          message: '车牌号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.dataList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.dataList.contractNo) {
+        this.$message({
+          message: '合同编号不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.dataList.contractNo.length < 6 ||
+        this.dataList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+
+      if (this.dataList.netWeight > this.$route.query.capacity) {
+        this.$message({
+          message: '入库量大于该仓库容量!',
+          type: 'warning',
+        })
+        return
+      }
+       //自检员
+      if (this.dataList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.dataList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.dataList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.dataList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.dataList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.waterContent < 1 ||
+          this.dataList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.dataList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.dataList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.dataList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.dataList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.impurity < 1 ||
+          this.dataList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.dataList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.dataList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.dataList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.dataList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.dataList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.dataList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.dataList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.dataList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.dataList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.dataList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.dataList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.dataList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.dataList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.dataList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.dataList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.dataList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.dataList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.dataList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.dataList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
       this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
       })
         .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
+          this.$refs.dataList.validate((valid) => {
             if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
+              this.dataList.compId = sessionStorage.getItem(
                 'ws-pf_compId'
               )
-              this.deptBudgetList.inOutFlag = 1
-              this.deptBudgetList.statusFlag = 3
-              addstorageputList(this.deptBudgetList)
+              this.dataList.inOutFlag = 2
+              this.dataList.statusFlag = 3
+              addstorageputList(this.dataList)
                 .toPromise()
                 .then((response) => {
                   this.$message.success('添加成功')
@@ -434,11 +773,11 @@ export default {
     },
     //暂存按钮
     returnWarehouse() {
-      this.$refs.deptBudgetList.validate((valid) => {
+      this.$refs.dataList.validate((valid) => {
         if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.statusFlag = 1
-          addstorageputList(this.deptBudgetList)
+          this.dataList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.dataList.statusFlag = 1
+          addstorageputList(this.dataList)
             .toPromise()
             .then((response) => {
               this.$message.success('添加成功')
@@ -451,37 +790,37 @@ export default {
       })
     },
     tarechange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
         )
       }
     },
     grossWeightchange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
+      if (this.dataList.grossWeight && this.dataList.tare) {
+        this.dataList.netWeight = Number(
+          this.dataList.grossWeight - this.dataList.tare
         )
       }
     },
     selectgoodsName(e) {
       for (var i = 0; i < this.goodnameList.length; i++) {
         if (this.goodnameList[i].constValue == e) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+          this.dataList.goodsNameKey = this.goodnameList[i].constKey
         }
       }
     },
     selectpackingMethod(e) {
       for (var i = 0; i < this.packtypeList.length; i++) {
         if (this.packtypeList[i].constValue == e) {
-          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
+          this.dataList.packingMethodKey = this.packtypeList[i].constKey
         }
       }
     },
     selectstorageType(e) {
       for (var i = 0; i < this.storageType.length; i++) {
         if (this.storageType[i].constValue == e) {
-          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
+          this.dataList.inOutTypeKey = this.storageType[i].constKey
         }
       }
     },
@@ -647,6 +986,13 @@ export default {
   width: 160px;
 }
 
+//质检员
+/deep/[data-v-58803672] .el-form-item__label {
+    width: 60px;
+}
+[data-v-58803672] .el-form-item__label {
+    width: 60px;
+}
 //选填
 /deep/.el-form-item {
   width: 50%;
@@ -720,7 +1066,7 @@ export default {
   background-color: #f6f7fc;
 }
 /deep/.neifor .el-input--small .el-input__inner {
-  width: 120%;
+  width: 100%;
 }
 .el-input__inner {
   width: 150px;

+ 456 - 60
src/views/warehouse/warehouseManagementPut.vue

@@ -26,12 +26,12 @@
       <div class="basicInformation">
         <h2>
           <img
-          style="position: relative; top: 2px"
-          width="19"
-          height="19"
-          src="../../../public/img/cangku.png"
-          alt=""
-        />
+            style="position: relative; top: 2px"
+            width="19"
+            height="19"
+            src="../../../public/img/cangku.png"
+            alt=""
+          />
           {{ deptBudgetList.warehouseName }}库
           <span class="position"> {{ deptBudgetList.binNumber }}仓位 </span>
         </h2>
@@ -186,7 +186,7 @@
           <ws-input
             v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
-            maxlength="120"
+            maxlength="10"
             size="small"
           />
         </ws-form-item>
@@ -199,7 +199,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.waterContent"
               placeholder="请输入水分占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -208,7 +208,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.impurity"
               placeholder="请输入杂质占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -217,7 +217,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
               placeholder="请输入容重"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -226,7 +226,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
               placeholder="请输入霉变粒占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -235,7 +235,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
               placeholder="请输入热损伤占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -244,7 +244,7 @@
             <ws-input
               v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
               placeholder="请输入不完整粒占比"
-              maxlength="120"
+              maxlength="40"
               size="small"
             />
           </ws-form-item>
@@ -388,8 +388,8 @@ export default {
         })
         return
       }
-      if(!this.deptBudgetList.grossWeight){
-         this.$message({
+      if (!this.deptBudgetList.grossWeight) {
+        this.$message({
           message: '毛重不能为空',
           type: 'warning',
         })
@@ -409,8 +409,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.tare){
-         this.$message({
+      if (!this.deptBudgetList.tare) {
+        this.$message({
           message: '皮重不能为空',
           type: 'warning',
         })
@@ -430,8 +430,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.agent){
-         this.$message({
+      if (!this.deptBudgetList.agent) {
+        this.$message({
           message: '经办人不能为空',
           type: 'warning',
         })
@@ -447,8 +447,29 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
+       if (!this.deptBudgetList.grade) {
+        this.$message({
+          message: '品级不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.inOutDate) {
+        this.$message({
+          message: '入库日期不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.inOutType) {
+        this.$message({
+          message: '入库类型不能为空!',
+          type: 'warning',
+        })
+        return
+      }
+      if (!this.deptBudgetList.carNo) {
+        this.$message({
           message: '车牌号不能为空',
           type: 'warning',
         })
@@ -461,8 +482,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
           message: '合同编号不能为空',
           type: 'warning',
         })
@@ -479,15 +500,206 @@ export default {
         return
       }
 
-      
-      if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+      if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
         this.$message({
           message: '入库量大于该仓库容量!',
           type: 'warning',
         })
         return
       }
-      this.$confirm(`确定提交入库信息`, {
+       //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      this.deptBudgetList.id = this.$route.query.id
+        this.$confirm(`确定提交入库信息`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
         type: 'warning',
@@ -515,17 +727,19 @@ export default {
         .catch(() => {
           return false
         })
+    
+      
     },
     temporaryStorage() {
-       if (!this.deptBudgetList.goodsName) {
+      if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空',
           type: 'warning',
         })
         return
       }
-      if(!this.deptBudgetList.grossWeight){
-         this.$message({
+      if (!this.deptBudgetList.grossWeight) {
+        this.$message({
           message: '毛重不能为空',
           type: 'warning',
         })
@@ -545,8 +759,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.tare){
-         this.$message({
+      if (!this.deptBudgetList.tare) {
+        this.$message({
           message: '皮重不能为空',
           type: 'warning',
         })
@@ -566,8 +780,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.agent){
-         this.$message({
+      if (!this.deptBudgetList.agent) {
+        this.$message({
           message: '经办人不能为空',
           type: 'warning',
         })
@@ -583,8 +797,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
+      if (!this.deptBudgetList.carNo) {
+        this.$message({
           message: '车牌号不能为空',
           type: 'warning',
         })
@@ -597,8 +811,8 @@ export default {
         })
         return
       }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
+      if (!this.deptBudgetList.contractNo) {
+        this.$message({
           message: '合同编号不能为空',
           type: 'warning',
         })
@@ -614,13 +828,204 @@ export default {
         })
         return
       }
-       if(this.deptBudgetList.netWeight > this.$route.query.capacity){
+      if (this.deptBudgetList.netWeight > this.$route.query.capacity) {
         this.$message({
           message: '入库量大于该仓库容量!',
           type: 'warning',
         })
         return
       }
+      //自检员
+      if (this.deptBudgetList.warehouseInOutDetail.qualityInspector) {
+        if (
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length <
+            2 ||
+          this.deptBudgetList.warehouseInOutDetail.qualityInspector.length > 10
+        ) {
+          this.$message({
+            message: '质检员姓名长度错误!',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      if (this.deptBudgetList.warehouseInOutDetail.waterContent) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.waterContent)) {
+          this.$message({
+            message: '水分(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.waterContent < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.waterContent > 40 ||
+          (String(
+            this.deptBudgetList.warehouseInOutDetail.waterContent
+          ).indexOf('.') != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.waterContent)
+              .length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.waterContent
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '水分(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+      //杂质
+      if (this.deptBudgetList.warehouseInOutDetail.impurity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.impurity)) {
+          this.$message({
+            message: '杂质(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.impurity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.impurity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.impurity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.impurity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.impurity
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '杂质(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+       //霉变
+      if (this.deptBudgetList.warehouseInOutDetail.mildewGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.mildewGrain)) {
+          this.$message({
+            message: '霉变粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.mildewGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.mildewGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.mildewGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '霉变粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+       //热损伤
+      if (this.deptBudgetList.warehouseInOutDetail.jiaorenli) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.jiaorenli)) {
+          this.$message({
+            message: '热损伤(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.jiaorenli > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.jiaorenli).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.jiaorenli
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '热损伤(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+
+        //不完整粒(%)
+      if (this.deptBudgetList.warehouseInOutDetail.imperfectGrain) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.imperfectGrain)) {
+          this.$message({
+            message: '不完整粒(%)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.imperfectGrain > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.imperfectGrain).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.imperfectGrain
+              ).indexOf('.') +
+                1) >
+              2)
+        ) {
+          this.$message({
+            message: '不完整粒(%)输入错误! 取值范围1-40之间且可以保留2小数',
+            type: 'warning',
+          })
+          return
+        }
+      }
+      //容重
+       if (this.deptBudgetList.warehouseInOutDetail.bulkDensity) {
+        if (isNaN(this.deptBudgetList.warehouseInOutDetail.bulkDensity)) {
+          this.$message({
+            message: '容重(克/升)非数字!',
+            type: 'warning',
+          })
+          return
+        }
+        if (
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity < 1 ||
+          this.deptBudgetList.warehouseInOutDetail.bulkDensity > 40 ||
+          (String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).indexOf(
+            '.'
+          ) != -1 &&
+            String(this.deptBudgetList.warehouseInOutDetail.bulkDensity).length -
+              (String(
+                this.deptBudgetList.warehouseInOutDetail.bulkDensity
+              ).indexOf('.') +
+                1) >
+              0)
+        ) {
+          this.$message({
+            message: '容重(克/升)输入错误! 取值范围1-40之间且是整数',
+            type: 'warning',
+          })
+          return
+        }
+      }
       this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -781,6 +1186,7 @@ export default {
     }
   }
 }
+
 .title {
   position: relative;
   padding-left: 10px;
@@ -815,9 +1221,7 @@ export default {
   height: 2000px;
   margin: 0 auto;
 }
-/deep/.el-form-item__label {
-  width: 160px;
-}
+
 //选填
 /deep/.el-form-item {
   width: 50%;
@@ -839,25 +1243,15 @@ export default {
 }
 //仓位
 
-.position{
-background: #AFB5CB;
-border-radius: 2px;
-font-size: 12px;
-color: #FFFFFF;
-line-height: 20px;
-display: inline-grid;
-padding: 2px 4px;
+.position {
+  background: #afb5cb;
+  border-radius: 2px;
+  font-size: 12px;
+  color: #ffffff;
+  line-height: 20px;
+  display: inline-grid;
+  padding: 2px 4px;
 }
-// .position {
-//   width: 52px;
-//   height: 20px;
-//   background: #afb5cb;
-//   border-radius: 2px;
-//   font-size: 12px;
-//   font-family: PingFangSC-Medium, PingFang SC;
-//   color: #ffffff;
-//   line-height: 20px;
-// }
 //表格文字
 /deep/.ws-info-table .el-form-item .el-form-item__label {
   text-align: left;
@@ -902,7 +1296,9 @@ padding: 2px 4px;
   background-color: #f6f7fc;
 }
 
-/deep/.neifor .el-input--small .el-input__inner{
+/deep/.neifor .el-input--small .el-input__inner {
   width: 100%;
 }
+
+
 </style>

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

@@ -187,7 +187,7 @@
               <span style="color: #8890b1">{{ scope.row.carNo }}</span>
             </template>
           </el-table-column>
-          <el-table-column prop="qualityInspector" label="经办人">
+          <el-table-column prop="agent" label="经办人">
           </el-table-column>
           <el-table-column prop="buyer" label="内勤"> </el-table-column>
           <el-table-column prop="addressUrl" label="附件">

+ 1 - 1
vue.config.js

@@ -143,8 +143,8 @@ module.exports = {
         // target: 'https://product-server.winsea.com/', //目标地址
         // target: 'http://standard-dev.winsea.com/', //目标地址
         // target: 'http://localhost:8090/',
+        // target: 'http://192.168.1.121:8090/',
         target: 'http://192.168.1.119: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/',