mxx před 4 roky
rodič
revize
b8a500cea5

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

@@ -0,0 +1,2 @@
+export const API_GET_TRAN_DRIVERINFO = '/driverViewInfo/selectDriverInfoPage'
+export const API_POST_TRAN_DRIVERINFOADD = '/driverViewInfo/api/addInfo'

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

@@ -21,7 +21,6 @@ export const API_POST_WAREHOUSE_EDIT = '/warehouseBaseInfo/api/editWarehouse'
 export const API_GET_WAREHOUSE_IOSS = '/warehouseInventoryCountInfo/getInfo'
 //货名下拉
 export const API_GET_WAREHOUSE_NAME = '/warehousePositionStorageInfo/selectGoodsName'
-
 // 货名等下拉
 export const API_GET_CUSTOMDROPDOWN_CUSTOMDROPDOWN = `/commonSysParameter/getInfo`
 // 入库添加
@@ -35,3 +34,5 @@ export const API_GET_WAREHOUSE_INVENTORYCOUNT = '/warehouseInventoryCountInfo/se
 export const API_POST_STORAGE_IOSS = '/warehouseInventoryCountInfo/addInventory'
 //待完善记录
 export const API_GET_WAREHOUSE_COMPLETE = '/warehouseInOutInfo/selectWarehouseInOutInfo'
+// 编辑删除仓位
+export const API_POST_WAREHOUSE_DEL_POSITION = '/warehousePositionInfo/api/deleteWarehousePosition'

+ 9 - 1
src/lang/zh.js

@@ -501,9 +501,12 @@
     warehouseManagementRecord:'记录',
     warehouseManagementNoComplete:'待完成',
     warehouseManagementPerfectput:'编辑',
+    //运输管理
+    tranManagement: '运输管理',
+    tranManagementDriver:'司机管理',
+    tranManagementDriverAdd:'添加司机',
     warehouseManagementPerfectDelivery:'编辑',
 
-
     // 采购模块
     procurement: '采购管理',
     sparepart: '备件采购',
@@ -4699,6 +4702,11 @@
     warehouseManagementPerfectDelivery:'编辑',
 
   },
+  //运输管理
+  tranManagement:{
+    tranManagementDriver:'司机管理',
+    tranManagementDriverAdd:'添加司机',
+  },
   // 年度培训
   annualTraining: {
     trainingResults: '培训结果',

+ 11 - 0
src/model/transport/index.js

@@ -0,0 +1,11 @@
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
+import { appRx } from '../defalutConfig/indexRx'
+
+import {
+    API_GET_TRAN_DRIVERINFO,
+    API_POST_TRAN_DRIVERINFOADD
+} 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)

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

@@ -17,6 +17,7 @@ import {
     API_GET_WAREHOUSE_INVENTORYCOUNT,
     API_POST_STORAGE_IOSS,
     API_GET_WAREHOUSE_COMPLETE,
+    API_POST_WAREHOUSE_DEL_POSITION
 } from '@/api/V2/warehouse'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
@@ -51,4 +52,8 @@ export const adjustmentrecordList = appRx.get(API_GET_WAREHOUSE_INVENTORYCOUNT,
 export const submitioss = appRx.post(API_POST_STORAGE_IOSS, errorCatcher, errorHandle, filter)
 //待完善记录
 export const complete = appRx.get(API_GET_WAREHOUSE_COMPLETE, errorCatcher, errorHandle, filter)
+// 编辑删除仓位
+
+export const delPosition = appRx.post(API_POST_WAREHOUSE_DEL_POSITION, errorCatcher, errorHandle, filter)
+
 

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

@@ -0,0 +1,49 @@
+import Layout from '@/layout/index';
+
+const tranManagementRouter = {
+  path: '/tranManagement',
+  component: Layout,
+  redirect: '/tranManagement',
+  name: 'tranManagement',
+  alwaysShow: true, // will always show the root menu
+  meta: {
+    title: 'tranManagement',
+    module: 'tranManagement',
+    icon: 'cg'
+  },
+  children: [
+      //司机管理
+    {
+      path: 'tranManagementDriver',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementDriver'),
+      name: 'tranManagementDriver',
+      meta: {
+        title: 'tranManagementDriver',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver',
+        permissicon: [],
+        keepAlive: true
+      }
+    },
+    //添加司机
+    {
+      path: 'tranManagementDriverAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementDriverAdd'),
+      name: 'tranManagementDriverAdd',
+      meta: {
+        title: 'tranManagementDriverAdd',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementDriverAdd',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+    
+  ],
+
+};
+
+export default tranManagementRouter;

+ 384 - 0
src/views/tranManagement/tranManagementDriver.vue

@@ -0,0 +1,384 @@
+<!--司机管理-->
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="20">
+      <template slot="right">
+        <ws-button
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >添加</ws-button
+        >
+      </template>
+      <template slot="left">
+        <!-- <ws-select
+          v-model="searchTypeText"
+          placeholder="请选择所在城市"
+          :value="searchType"
+          @change="selecttaskType"
+        >
+        <ws-option
+            v-for="item in options_"
+            :key="item.value"
+            :label="item.label"
+            :value="item.label"
+          />
+        </ws-select> -->
+        <el-cascader
+            :options="options_"
+            v-model="searchTypeText"
+            clearable
+            size="large"
+            placeholder="请选择所在城市"
+            style="width: 30%"
+            @change="selecttaskType"
+          />
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按司机姓名、手机号、车牌号、身份证号查找"
+          clearable
+          maxlength="200"
+          type="input"
+          class="findValue"
+        ></ws-input>
+         <ws-button
+          type="primary"
+          @click="handleLook()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >查找</ws-button
+        >
+      </template>
+    </BaseHeaderLayout>
+    <div class="connert">
+      <el-table
+        class="wenzi"
+        :data="driverList"
+        style="width: 100%; margin-top: 20px"
+        fit
+        height="780"
+      >
+        <el-table-column type="index" label="序号">
+            <template scope="scope">
+            <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
+            <span v-else>{{ scope.$index + 1 }}</span>
+            </template>
+        </el-table-column>
+        <el-table-column prop="driverName" label="姓名" width="100">
+        </el-table-column>
+        <el-table-column prop="numberCard" label="身份证号" width="200">
+        </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>
+         <el-table-column prop="binNumber" label="常驻城市" width="120">
+        </el-table-column>
+         <el-table-column prop="carModel" label="车型" width="80">
+        </el-table-column>
+         <el-table-column prop="carLength" label="车长" width="80">
+        </el-table-column>
+         <el-table-column prop="addressUrl" label="附件">
+        <template slot-scope="scope">
+          <img
+            width="18"
+            height="20"
+            style="vertical-align: text-top; position: relative; top: -1px"
+            src="../../../public/img/fujian.png"
+            @click="fujian(scope.row)"
+            alt=""
+          />
+          <span v-if="scope.row.addressUrlArray.length > 0">{{
+            scope.row.addressUrlArray.length
+          }}</span>
+        </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>
+      </el-table>
+       <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :current-page="currentPage"
+      :page-size="deptCircularPage.pageSize"
+      layout="total, sizes, prev, pager, next, jumper"
+      :total="deptBudgetTotal"
+    >
+    </el-pagination>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  selectDriver,
+  billoperatehis,
+} from '@/model/transport/index'
+import Pagination from '@/components/Pagination'
+import { regionData,CodeToText } from 'element-china-area-data'
+import WsUpload from '@/components/WsUpload'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
+export default {
+  name: 'viewSpareMoney',
+  components: {
+    WsUpload,
+    Pagination,
+  },
+  watch: {
+    vesselId(val) {
+      this.getList()
+    },
+    isShow(val) {
+      this.showType = val
+    },
+  },
+  data() {
+    return {
+      //弹出框
+      dialogViewSpareMoney: false,
+      dialogApproveFormVisible: false,
+      options_: regionData,
+      // 表格显示数据
+      tableDate: [],
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      deptBudgetTotal: 0,
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchKeyWord: '',
+      contractType: 2,
+      startDate: null,
+      endDate: null,
+      searchTypeText:'',
+      // 提交类型
+      submitType: true,
+      size: 10,
+      spanArr: [],
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      date: {
+        year: dayjs().format('YYYY'),
+        month: dayjs().format('MM'),
+      },
+      driverList: [],
+      deptBudgetList: {},
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    console.log(regionData)
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    //查找
+    handleLook() {
+      this.currentPage = 1
+      this.getList()
+    },
+    //添加
+    handleAdd() {
+      this.$router.push({ path: 'tranManagementDriverAdd' })
+    },
+    //编辑
+    handleEdit() {
+      this.$router.push({ path: 'warehouseManagementEdit' })
+    },
+    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')
+          )
+        }
+      }
+      return fmt
+    },
+    handleClose() {
+      this.accessoryTFs = false
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`)
+      this.pageSize = val
+      this.getList()
+    },
+    handleCurrentChange(val) {
+      this.currentPage = val
+      console.log(`当前页: ${val}`)
+      this.getList()
+    },
+    getList() {
+      selectDriver({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
+      })
+        .toPromise()
+        .then((response) => {
+          for (var i = 0; i < response.records.length; i++) {
+            if (response.records[i].addressUrl != null) {
+              response.records[i].addressUrlArray = response.records[
+                i
+              ].addressUrl.split(',')
+            } else {
+              response.records[i].addressUrlArray = []
+            }
+          }
+          this.deptCircularPage.currentPage = response.current
+          this.deptCircularPage.pageSize = response.size
+          this.deptBudgetTotal = response.total
+          this.driverList = response
+        })
+    },
+    editClick(row) {
+      var status = ''
+      if (row.status == '待执行' || row.status == '已完成') {
+        status = '执行中'
+      } else if (row.status == '执行中') {
+        status = '已完成'
+      }
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`是否将状态改为${status}`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          editstatus({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '状态修改成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    selecttaskType(e) {
+      this.selectedOptions = e
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      console.log(row)
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      this.startDate = this.dateFormat('YYYY-mm-dd', this.value2[0])
+      this.endDate = this.dateFormat('YYYY-mm-dd', this.value2[1])
+      this.currentPage = 1
+      this.getList()
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.findValue {
+  margin: 0 10px;
+}
+</style>

+ 691 - 0
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -0,0 +1,691 @@
+//添加司机
+<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.warehouseName"
+            placeholder="请输入司机姓名"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--手机号-->
+        <ws-form-item label="手机号" span="1" prop="driverPhone" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.personCharge"
+            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.personCharge"
+            placeholder="请输入身份证号"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+      </ws-info-table>
+    </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">货车信息</div>
+      <ws-info-table class="el-table">
+        
+        <!--车牌号-->
+        <ws-form-item
+          label="车牌号"
+          span="1"
+          prop="carNumber"
+          class="forlist"
+          width="400px"
+        >
+          <ws-input
+            v-model="deptBudgetList.drivercarInfo.carNumber"
+            placeholder="请输入车牌号"
+            maxlength="20"
+            size="small"
+          />
+        </ws-form-item>
+        <!--车型-->
+        <ws-form-item label="车型" span="1" prop="carModel" class="forlist">
+          <ws-select
+            v-model="deptBudgetList.drivercarInfo.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="readonly">
+           <ws-select
+            v-model="deptBudgetList.drivercarInfo.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="readonly" width="150px">
+          <ws-input
+            v-model="deptBudgetList.drivercarInfo.carLoad"
+            placeholder="请输入载重"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--出厂年份-->
+        <ws-form-item label="出厂年份" span="1" prop="yearManufacture" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.drivercarInfo.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">收款人账户信息</div>
+      <ws-info-table class="el-table">
+        
+        <!--账户类型-->
+        <ws-form-item
+          label="账户类型"
+          span="1"
+          prop="contractNo"
+          class="readonly bg-right"
+        >
+          <el-radio v-model="radio" label="1">私人账号</el-radio>
+          <el-radio v-model="radio" label="2">企业账户</el-radio>
+        </ws-form-item>
+        <!--账号-->
+        <ws-form-item label="账号" span="1" prop="bankCard" class="el-car">
+          <ws-input
+            v-model="deptBudgetList.driverPayeeInfo.bankCard"
+            placeholder="请输入账号"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--开户行-->
+        <ws-form-item label="开户行" span="1" prop="bankDeposit" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.driverPayeeInfo.bankDeposit"
+            placeholder="请输入开户行"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--姓名-->
+        <ws-form-item label="姓名" v-if="radio==1" span="1" prop="payeeName" class="readonly" width="150px">
+          <ws-input
+            v-model="deptBudgetList.driverPayeeInfo.payeeName"
+            placeholder="请输入姓名"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--企业名称-->
+        <ws-form-item label="企业名称" v-else span="1" prop="compName" class="readonly" width="150px">
+          <ws-input
+            v-model="deptBudgetList.driverPayeeInfo.compName"
+            placeholder="请输入企业名称"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+
+        <!--身份证号-->
+        <ws-form-item label="身份证号" v-if="radio==1" span="1" prop="payeeNumberCard" class="readonly">
+          <ws-input
+            v-model="deptBudgetList.driverPayeeInfo.payeeNumberCard"
+            placeholder="请输入身份证号"
+            maxlength="100"
+            size="small"
+          />
+        </ws-form-item>
+        <!--身份证附件-->
+        <ws-form-item label="身份证附件" v-if="radio==1" span="1" prop="cardAddressUrl" class="readonly">
+          <!-- <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 { regionData, CodeToText, TextToCode } from 'element-china-area-data'
+import {
+  packList
+} from '@/model/contarct/index'
+import {
+  addDriver
+} 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_: regionData,
+      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: [],
+      freightspace: [{ carNumber: '', carModel: '', carLength: '', carLoad: '', yearManufacture: '' }],
+      freightspace1: [{account_type:''  }],
+      name: '',
+    }
+  },
+  activated() {
+    this.deptBudgetList.drivercarInfo.carModel = '高栏'
+    this.deptBudgetList.drivercarInfo.carLength = '13'
+    this.loaddata()
+    this.showType = this.isShow
+  },
+  computed: {
+  },
+  methods: {
+    loaddata() {
+      // 车型
+      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
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleClose() {
+      this.dialogViewSpareMoney = false
+    },
+    add() {
+      this.freightspace.push({
+        carNumber: '',
+        carModel: '',
+        carLength: '',
+        carLoad: '',
+        yearManufacture: '',
+      })
+    },
+    del(index) {
+      if (this.freightspace.length > 1) {
+        this.freightspace.splice(index, 1)
+      }
+    },
+    add1() {
+      this.freightspace1.push({
+        binNumber: '',
+        maxStorage: '',
+        remark: '',
+      })
+    },
+    del1(index) {
+      if (this.freightspace1.length > 1) {
+        this.freightspace1.splice(index, 1)
+      }
+    },
+    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.warehousePrivate =
+            CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.warehouseCity =
+            CodeToText[this.selectedOptions[1]]
+          this.deptBudgetList.warehouseArea =
+            CodeToText[this.selectedOptions[2]]
+          this.deptBudgetList.warehousePositionInfoList = this.freightspace
+          this.deptBudgetList.totalStorage = this.totalStorage
+          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%;
+}
+</style>

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

@@ -1,4 +1,4 @@
-npm install vue-amap --save// 仓库添加
+
 <template>
   <div class="container">
     <el-row>

+ 24 - 13
src/views/warehouse/warehouseManagementDelete.vue

@@ -1,9 +1,7 @@
 //删除仓库
 <template>
-
-  <div class="homepage"> 
+  <div class="homepage">
     <el-row>
-
       <el-col :span="20">
         <h2 class="bg-left title">删除库房</h2>
       </el-col>
@@ -73,10 +71,22 @@
               >删除</ws-button
             >
           </template> -->
-           <template slot-scope="scope">
-            <div class="record" v-if="scope.row.showFlag == 0" @click="handleHide(scope.row)">显示</div>
-            <div class="record" v-if="scope.row.showFlag == 1" @click="handleHide(scope.row)">隐藏</div>
-            <div class="adjustment"  @click="handleDelete(scope.row)">删除</div>
+          <template slot-scope="scope">
+            <div
+              class="record"
+              v-if="scope.row.showFlag == 0"
+              @click="handleHide(scope.row)"
+            >
+              显示
+            </div>
+            <div
+              class="record"
+              v-if="scope.row.showFlag == 1"
+              @click="handleHide(scope.row)"
+            >
+              隐藏
+            </div>
+            <div class="adjustment" @click="handleDelete(scope.row)">删除</div>
           </template>
         </el-table-column>
       </el-table>
@@ -514,14 +524,15 @@ export default {
 }
 
 //表格文字居中
-/deep/.el-table th.is-leaf,/deep/.el-table td {
-    text-align: center;
+/deep/.el-table th.is-leaf,
+/deep/.el-table td {
+  text-align: center;
 }
 //表格数据文字
- /deep/.el-table .el-table__body .cell{
-   font-size: 14px;
- } 
- .record,
+/deep/.el-table .el-table__body .cell {
+  font-size: 14px;
+}
+.record,
 .adjustment {
   display: inline-block;
   color: #5878e8;

+ 158 - 162
src/views/warehouse/warehouseManagementDelivery.vue

@@ -21,16 +21,13 @@
         >
       </el-col>
     </el-row>
-
     <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
       <div class="basicInformation">
         <h2>
           {{ deptBudgetList.warehouseName }}库
-           <span class="position">
-          {{deptBudgetList.binNumber }}仓位
-          </span>
+          <span class="position"> {{ deptBudgetList.binNumber }}仓位 </span>
         </h2>
-       <div class="small-title">基本信息</div>
+        <div class="small-title">基本信息</div>
         <ws-info-table>
           <!-- 货名 -->
           <ws-form-item label="货名" span="1">
@@ -43,8 +40,8 @@
               <ws-option
                 v-for="item in goodnameList"
                 :key="item.constKey"
-                :label="item.constValue"
-                :value="item.constValue"
+                :label="item.goodsName"
+                :value="item.goodsName"
               />
             </ws-select>
           </ws-form-item>
@@ -58,7 +55,6 @@
               size="small"
             />
           </ws-form-item>
-
           <!--皮重(吨)-->
           <ws-form-item
             label="皮重(吨)"
@@ -74,10 +70,10 @@
               size="small"
             />
           </ws-form-item>
-
           <!--净重(吨)-->
           <ws-form-item label="净重(吨)" span="1" prop="netWeight">
             <ws-input
+              :readonly="readonly"
               v-model.number="deptBudgetList.netWeight"
               placeholder="不可编辑,自动计算"
               type="number"
@@ -101,7 +97,6 @@
               />
             </ws-select>
           </ws-form-item>
-
           <!--经办人-->
           <ws-form-item label="经办人" span="1" prop="agent">
             <ws-input
@@ -112,7 +107,12 @@
             />
           </ws-form-item>
           <!--出库日期-->
-          <ws-form-item label="出库日期" span="1" prop="inOutDate" class="deliverydate">
+          <ws-form-item
+            label="出库日期"
+            span="1"
+            prop="inOutDate"
+            class="deliverydate"
+          >
             <ws-date-picker
               v-model="deptBudgetList.inOutDate"
               type="date"
@@ -136,7 +136,6 @@
               />
             </ws-select>
           </ws-form-item>
-
           <!--车牌号-->
           <ws-form-item label="车牌号" span="1" prop="sourceGoods">
             <ws-input
@@ -146,7 +145,6 @@
               size="small"
             />
           </ws-form-item>
-
           <!--合同编号-->
           <ws-form-item label="合同编号" span="1" prop="contractNo">
             <ws-input
@@ -158,7 +156,7 @@
           </ws-form-item>
         </ws-info-table>
       </div>
-       <div class="small-title">上传仓库照片</div>
+      <div class="small-title">上传仓库照片</div>
       <ws-upload
         ref="upload"
         table-name="maintain_work_order"
@@ -171,10 +169,10 @@
         @onChange="onChange"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
       />
-     <div class="small-title">化验数据(选填)</div>
+      <div class="small-title">化验数据(选填)</div>
       <div class="inspector">
-       <!--自检员-->
-        <ws-form-item label="质检员" span="1" prop="qualityInspector" >
+        <!--自检员-->
+        <ws-form-item label="质检员" span="1" prop="qualityInspector">
           <ws-input
             v-model="deptBudgetList.warehouseInOutDetail.qualityInspector"
             placeholder="请输入质检员姓名"
@@ -182,65 +180,64 @@
             size="small"
           />
         </ws-form-item>
-        </div>
-        <div class="neifor">
-      <ws-info-table>
-        <!--水分(%)<=-->
-        <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
-          <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.waterContent"
-            placeholder="请输入水分占比"
-            maxlength="120"
-            size="small"
-          />
-        </ws-form-item>
-        <!--杂质(%)<=-->
-        <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
-          <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.impurity"
-            placeholder="请输入杂质占比"
-            maxlength="120"
-            size="small"
-          />
-        </ws-form-item>
-        <!--容重(克/升)>=-->
-        <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
-          <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-            placeholder="请输入容重"
-            maxlength="120"
-            size="small"
-          />
-        </ws-form-item>
-        <!--霉变粒(%)<=-->
-        <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
-          <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
-            placeholder="请输入霉变粒占比"
-            maxlength="120"
-            size="small"
-          />
-        </ws-form-item>
-        <!--热损伤(%)<=-->
-        <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
-          <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
-            placeholder="请输入热损伤占比"
-            maxlength="120"
-            size="small"
-          />
-        </ws-form-item>
-        <!--不完整粒(%)<=-->
-        <ws-form-item label="不完整粒(%)<=" span="1" prop="imperfectGrain">
-          <ws-input
-            v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
-            placeholder="请输入不完整粒占比"
-            maxlength="120"
-            size="small"
-          />
-        </ws-form-item>
-       
-      </ws-info-table>
+      </div>
+      <div class="neifor">
+        <ws-info-table>
+          <!--水分(%)<=-->
+          <ws-form-item label="水分(%)<=" span="1" prop="waterContent">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.waterContent"
+              placeholder="请输入水分占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--杂质(%)<=-->
+          <ws-form-item label="杂质(%)<=" span="1" prop="impurity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.impurity"
+              placeholder="请输入杂质占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--容重(克/升)>=-->
+          <ws-form-item label="容重(克/升)>=" span="1" prop="bulkDensity">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
+              placeholder="请输入容重"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--霉变粒(%)<=-->
+          <ws-form-item label="霉变粒(%)<=" span="1" prop="mildewGrain">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.mildewGrain"
+              placeholder="请输入霉变粒占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--热损伤(%)<=-->
+          <ws-form-item label="热损伤(%)<=" span="1" prop="jiaorenli">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.jiaorenli"
+              placeholder="请输入热损伤占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+          <!--不完整粒(%)<=-->
+          <ws-form-item label="不完整粒(%)<=" span="1" prop="imperfectGrain">
+            <ws-input
+              v-model="deptBudgetList.warehouseInOutDetail.imperfectGrain"
+              placeholder="请输入不完整粒占比"
+              maxlength="120"
+              size="small"
+            />
+          </ws-form-item>
+        </ws-info-table>
       </div>
       <div style="text-align: right; padding: 10px">
         <el-button
@@ -262,7 +259,7 @@
   </div>
 </template>
 <script>
-import { pullDown, addstorageputList } from '@/model/warehouse/index'
+import { pullDown, addstorageputList, goodsname } from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -293,6 +290,7 @@ export default {
       tableDate: [],
       // 是否显示
       showType: true,
+      readonly: true,
       // 年
       year: '',
       deptBudgetTotal: 0,
@@ -388,120 +386,136 @@ export default {
     },
     //提交按钮
     submit() {
-      if (this.deptBudgetList.goodsName=="") {
+      if (!this.deptBudgetList.goodsName) {
         this.$message({
           message: '货名不能为空!',
           type: 'warning',
         })
         return
       }
-       if (this.deptBudgetList.grossWeight=="") {
+      if (!this.deptBudgetList.grossWeight) {
         this.$message({
           message: '毛重不能为空!',
           type: 'warning',
         })
         return
       }
-       if (isNaN(this.deptBudgetList.grossWeight) && this.deptBudgetList.grossWeight>0 && this.deptBudgetList.grossWeight <= 10000) {
+      if (
+        isNaN(this.deptBudgetList.grossWeight) &&
+        this.deptBudgetList.grossWeight > 0 &&
+        this.deptBudgetList.grossWeight <= 10000
+      ) {
         this.$message({
           message: '毛重输入错误!',
           type: 'warning',
         })
         return
       }
-      if (this.deptBudgetList.tare=="") {
+      if (!this.deptBudgetList.tare) {
         this.$message({
           message: '皮重不能为空!',
           type: 'warning',
         })
         return
       }
-      if (isNaN(this.deptBudgetList.tare) && this.deptBudgetList.tare>0 && this.deptBudgetList.tare <= 10000) {
+      if (
+        isNaN(this.deptBudgetList.tare) &&
+        this.deptBudgetList.tare > 0 &&
+        this.deptBudgetList.tare <= 10000
+      ) {
         this.$message({
           message: '皮重输入错误!',
           type: 'warning',
         })
         return
       }
-       if (this.deptBudgetList.netWeight=="") {
+      if (!this.deptBudgetList.netWeight) {
         this.$message({
           message: '净重不能为空!',
           type: 'warning',
         })
         return
       }
-       if (isNaN(this.deptBudgetList.netWeight) && this.deptBudgetList.tare>0 && this.deptBudgetList.tare <= 10000) {
+      if (
+        isNaN(this.deptBudgetList.netWeight) &&
+        this.deptBudgetList.tare > 0 &&
+        this.deptBudgetList.tare <= 10000
+      ) {
         this.$message({
           message: '净重输入错误!',
           type: 'warning',
         })
         return
-      }  
-       if (this.deptBudgetList.grade=="") {
+      }
+      if (!this.deptBudgetList.grade) {
         this.$message({
           message: '品级不能为空!',
           type: 'warning',
         })
         return
       }
-        if (this.deptBudgetList.agent=="") {
+      if (!this.deptBudgetList.agent) {
         this.$message({
           message: '经办人不能为空!',
           type: 'warning',
         })
         return
       }
-       if (this.deptBudgetList.agent.length<2 && this.deptBudgetList.agent.length>10) {
+      if (
+        this.deptBudgetList.agent.length < 2 &&
+        this.deptBudgetList.agent.length > 10
+      ) {
         this.$message({
           message: '经办人姓名输入有误!',
           type: 'warning',
         })
         return
       }
-       if (this.deptBudgetList.inOutDate=="") {
+      if (!this.deptBudgetList.inOutDate) {
         this.$message({
           message: '出库日期不能为空!',
           type: 'warning',
         })
         return
       }
-      if (this.deptBudgetList.inOutType=="") {
+      if (!this.deptBudgetList.inOutType) {
         this.$message({
           message: '出库类型不能为空!',
           type: 'warning',
         })
         return
       }
-      if (this.deptBudgetList.carNo=="") {
+      if (!this.deptBudgetList.carNo) {
         this.$message({
           message: '车牌号不能为空!',
           type: 'warning',
         })
         return
       }
-       if (this.deptBudgetList.carNo.length != 7) {
+      if (this.deptBudgetList.carNo.length != 7) {
         this.$message({
           message: '车牌号输入有误!',
           type: 'warning',
         })
         return
       }
-       if (this.deptBudgetList.contractNo=="") {
+      if (!this.deptBudgetList.contractNo) {
         this.$message({
           message: '合同编号不能为空!',
           type: 'warning',
         })
         return
       }
-       if (this.deptBudgetList.contractNo.length < 6 && this.deptBudgetList.contractNo.length > 20) {
+      if (
+        this.deptBudgetList.contractNo.length < 6 &&
+        this.deptBudgetList.contractNo.length > 20
+      ) {
         this.$message({
           message: '合同编号输入有误!',
           type: 'warning',
         })
         return
       }
-
-
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
@@ -519,24 +533,6 @@ export default {
         }
       })
     },
-    //暂存按钮
-    returnWarehouse() {
-      this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.statusFlag = 1
-          addstorageputList(this.deptBudgetList)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'warehouseManagementList' })
-            })
-        } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          return false
-        }
-      })
-    },
     tarechange(e) {
       if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
         this.deptBudgetList.netWeight = Number(
@@ -587,7 +583,7 @@ export default {
     },
     getList() {
       // 货名
-      pullDown({ constId: 'CON2' })
+      goodsname({ positionId: this.$route.query.positionId })
         .toPromise()
         .then((response) => {
           this.goodnameList = response
@@ -646,29 +642,29 @@ export default {
         })
     },
 
-    async exportlist() {
-      const { data } = await export1(
-        {
-          compId: sessionStorage.getItem('ws-pf_compId'),
-          contractType: this.contractType,
-          currentPage: this.currentPage,
-          pageSize: this.pageSize,
-          searchType: this.searchType,
-          searchKeyWord: this.searchKeyWord,
-          startDate: this.startDate,
-          endDate: this.endDate,
-        },
-        {},
-        { responseType: 'blob' }
-      ).toPromise()
-      downloadFile({
-        res: data,
-        fileName: `${
-          this.date.year + (this.date.month ? `-${this.date.month}` : '')
-        }_采购合同`,
-        type: 'xls',
-      })
-    },
+    // async exportlist() {
+    //   const { data } = await export1(
+    //     {
+    //       compId: sessionStorage.getItem('ws-pf_compId'),
+    //       contractType: this.contractType,
+    //       currentPage: this.currentPage,
+    //       pageSize: this.pageSize,
+    //       searchType: this.searchType,
+    //       searchKeyWord: this.searchKeyWord,
+    //       startDate: this.startDate,
+    //       endDate: this.endDate,
+    //     },
+    //     {},
+    //     { responseType: 'blob' }
+    //   ).toPromise()
+    //   downloadFile({
+    //     res: data,
+    //     fileName: `${
+    //       this.date.year + (this.date.month ? `-${this.date.month}` : '')
+    //     }_采购合同`,
+    //     type: 'xls',
+    //   })
+    // },
     // deletecontract(){},
     //删除
     approve() {},
@@ -751,30 +747,30 @@ export default {
 }
 .center {
   margin-top: -60px;
-    width: 80%;
+  width: 80%;
 }
 //仓位
-.position{
- width: 52px;
-height: 20px;
-background: #AFB5CB;
-border-radius: 2px;
-font-size: 12px;
-font-family: PingFangSC-Medium, PingFang SC;
-color: #FFFFFF;
-line-height: 20px;
+.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;
-font-size: 14px;
-font-family: PingFangSC-Regular, PingFang SC;
-font-weight: 400;
-color: #8890B1;
-line-height: 16px;
+/deep/.ws-info-table .el-form-item .el-form-item__label {
+  text-align: center;
+  font-size: 14px;
+  font-family: PingFangSC-Regular, PingFang SC;
+  font-weight: 400;
+  color: #8890b1;
+  line-height: 16px;
 }
 //质检员
-.inspector .el-form-item__content{
+.inspector .el-form-item__content {
   text-align: left;
   margin-left: 0px;
 }
@@ -793,19 +789,19 @@ line-height: 16px;
   top: 13px;
 }
 //下面列表
-.neifor{
+.neifor {
   width: 80%;
-  background-color: #F6F7FC;
+  background-color: #f6f7fc;
 }
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__label{
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__label {
   width: 35%;
   text-align: center;
 }
-/deep/.neifor .ws-info-table .el-form-item .el-form-item__content{
+/deep/.neifor .ws-info-table .el-form-item .el-form-item__content {
   width: 60%;
-  background-color: #F6F7FC;
+  background-color: #f6f7fc;
 }
-/deep/.neifor .el-input--small .el-input__inner{
+/deep/.neifor .el-input--small .el-input__inner {
   width: 120%;
 }
 </style>

+ 68 - 4
src/views/warehouse/warehouseManagementEdit.vue

@@ -96,7 +96,7 @@
             />
           </ws-form-item>
         </ws-info-table>
-        <div v-for="item in deptBudgetList.warehousePositionInfoList">
+        <div v-for="(item, index) in deptBudgetList.warehousePositionInfoList">
           <ws-info-table>
             <!--仓位编号-->
             <ws-form-item label="仓位编号" span="1" prop="binNumber">
@@ -125,6 +125,22 @@
                 size="small"
               />
             </ws-form-item>
+            <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, item)"
+              src="../../../public/img/del.png"
+              alt=""
+            />
           </ws-info-table>
         </div>
       </ws-form>
@@ -162,7 +178,13 @@
   </div>
 </template>
 <script>
-import { xiala, billoperatehis, getLook, edit } from '@/model/warehouse/index'
+import {
+  xiala,
+  billoperatehis,
+  getLook,
+  edit,
+  delPosition,
+} from '@/model/warehouse/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -205,6 +227,7 @@ export default {
       startDate: null,
       endDate: null,
       unitList: [],
+      baseId: '',
       // 提交类型
       submitType: true,
       size: 10,
@@ -231,7 +254,7 @@ export default {
     this.loaddata()
     this.showType = this.isShow
   },
-  
+
   methods: {
     //返回按钮
     returnWarehouse() {
@@ -268,13 +291,52 @@ export default {
       this.getList()
     },
     selectpackingMethod(e) {
-      console.log(e)
       for (var i = 0; i < this.packtypeList.length; i++) {
         if (this.packtypeList[i].warehouseName == e) {
+          this.baseId = this.packtypeList[i].id
           this.getLook(this.packtypeList[i].id)
         }
       }
     },
+    add() {
+      this.deptBudgetList.warehousePositionInfoList.push({
+        binNumber: '',
+        maxStorage: '',
+        remark: '',
+      })
+    },
+    del(index, item) {
+      if (item.nowStorage > 0) {
+        this.$message.warning('尚有剩余库存,不可删除')
+      } else {
+        this.$confirm(`此操作将永久删除该仓位的全部信息,是否确定删除`, {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning',
+        })
+          .then(() => {
+            if (item.id) {
+              delPosition({ id: item.id })
+                .toPromise()
+                .then((response) => {
+                  this.$message.success('删除成功')
+                })
+                .catch((response) => {
+                  EventBus.$emit(
+                    'error',
+                    this.$t('showMessage.asteriskRequired')
+                  )
+                })
+            }
+            if (this.deptBudgetList.warehousePositionInfoList.length > 1) {
+              this.deptBudgetList.warehousePositionInfoList.splice(index, 1)
+            }
+          })
+          .catch(() => {
+            return false
+          })
+      }
+    },
     loaddata() {
       // 仓库名称
       xiala({ compId: sessionStorage.getItem('ws-pf_compId') })
@@ -319,12 +381,14 @@ export default {
     submit() {
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
+          this.deptBudgetList.baseId = this.baseId
           this.deptBudgetList.compId = this.compId
           this.deptBudgetList.contractType = 1
           edit(this.deptBudgetList)
             .toPromise()
             .then((response) => {
               this.$message.success('编辑成功')
+              this.deptBudgetList = {}
               this.$router.push({ path: 'warehouseManagementList' })
             })
         } else {

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

@@ -150,7 +150,6 @@ export default {
         year: dayjs().format('YYYY'),
         month: dayjs().format('MM'),
       },
-
       contractList: [],
       deptBudgetList:{
         physicalInventory:0
@@ -188,8 +187,8 @@ export default {
       if((loss/defect)==1){
         var num=0
       }else{
- // .占比=损耗量÷(累计入库-实际库存)
-     var num = Math.floor((loss/defect)*1000000)/1000
+        // .占比=损耗量÷(累计入库-实际库存)
+        num = Math.floor((loss/defect)*1000000)/1000
       }
      
      return num;
@@ -211,8 +210,8 @@ export default {
     this.deptBudgetList1.binNumber = this.$route.query.binNumber
    this.deptBudgetList1.baseId=this.$route.query.baseId
     this.deptBudgetList1.positionId=this.$route.query.positionId
-    this.deptBudgetList.inventoryRatio=((deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory)/(deptBudgetList.cumulativeStockIn-deptBudgetList.physicalInventory)*100
-    this.deptBudgetList.ioss=(deptBudgetList.cumulativeStockIn-deptBudgetList.cumulativeStockOut)-deptBudgetList.physicalInventory
+    // 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
     // this.getList()
   },

+ 23 - 1
src/views/warehouse/warehouseManagementIossRecord.vue

@@ -22,7 +22,17 @@
       </el-col>
     </el-row>
     <div class="connert">
-      <h2>鲅鱼圈一号库 102仓位</h2>
+      <h2>
+        <img
+          style="position: relative; top: 2px"
+          width="19"
+          height="19"
+          src="../../../public/img/cangku.png"
+          alt=""
+        />
+        <span style="color: #323233">{{ deptBudgetList.warehouseName }}库</span>
+        <span class="ware">{{ binNumber }}仓位</span>
+      </h2>
       <el-table
         class="wenzi"
         :data="contractList.records"
@@ -137,6 +147,7 @@ export default {
       contractList: [],
       deptBudgetList: {},
       historyList: [],
+      binNumber: '',
       deptBudgetTotal: 0,
       currentPage: 1,
       pageSize: 10,
@@ -150,6 +161,7 @@ export default {
     this.deptBudgetList.baseId = this.$route.query.baseId
     this.deptBudgetList.positionId = this.$route.query.positionId
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
+    this.binNumber = this.$route.query.binNumber
     this.getList()
     this.showType = this.isShow
   },
@@ -337,6 +349,16 @@ export default {
   width: 62px;
   text-align: right;
 }
+.ware {
+  font-size: 12px;
+  color: rgb(255, 255, 255);
+  background: rgb(175, 181, 203);
+  padding: 3px;
+  position: relative;
+  top: -1px;
+  border-radius: 3px;
+  text-align: center;
+}
 .title {
   position: relative;
 }

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

@@ -80,8 +80,7 @@
              @click="edits(scope.row)"
             v-hasPermission="
               `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-            "
-           
+            "    
             >编辑</ws-button
           > -->
           <!-- <ws-button
@@ -107,14 +106,12 @@
             size="small"
             @click="returnWarehouse()"
             >关闭</el-button
-          >
-          
+          >    
         </div>
      
     </div>
      </ws-form>
   </div>
-
 </template>
 <script>
 import {
@@ -238,7 +235,6 @@ export default {
             positionId: row.binNumberId,
           }
           })
-        
       }
      
     },

+ 167 - 59
src/views/warehouse/warehouseManagementPut.vue

@@ -77,6 +77,7 @@
           <!--净重(吨)-->
           <ws-form-item label="净重(吨)" span="1" prop="netWeight">
             <ws-input
+              readonly="readonly"
               v-model="deptBudgetList.netWeight"
               placeholder="不可编辑,自动计算"
               maxlength="120"
@@ -141,7 +142,7 @@
           </ws-form-item>
 
           <!--车牌号-->
-          <ws-form-item label="车牌号" span="1" prop="sourceGoods">
+          <ws-form-item label="车牌号" span="1" prop="carNo">
             <ws-input
               v-model="deptBudgetList.carNo"
               placeholder="请输入车牌号"
@@ -310,6 +311,7 @@ export default {
       // 提交类型
       submitType: true,
       storageType: [],
+      readonly: true,
       appendixIdsAdd: '',
       uploadSuccess: {},
       onChange: {},
@@ -353,16 +355,22 @@ export default {
     this.deptBudgetList.warehouseName = this.$route.query.warehouseName
     this.deptBudgetList.binNumber = this.$route.query.binNumber
     this.getList()
+    this.deptBudgetList.goodsName = '玉米'
+    this.deptBudgetList.goodsNameKey = '1'
+    this.deptBudgetList.grade = '一等品'
+    this.deptBudgetList.gradeKey = '1'
+    this.deptBudgetList.inOutType = '采购入库'
+    this.deptBudgetList.inOutTypeKey = '1'
   },
   activated() {
-  //   //cg.viewBudget
-  //   //cg.viewSpareMoney
-  //   // this.getVesselData();
-  //   console.log(2222)
-  //   this.getList()
-  //   console.log(1111)
-  //   this.showType = this.isShow
-  // this.getList(this.$route.query.baseId,)
+    //   //cg.viewBudget
+    //   //cg.viewSpareMoney
+    //   // this.getVesselData();
+    //   console.log(2222)
+    //   this.getList()
+    //   console.log(1111)
+    //   this.showType = this.isShow
+    // this.getList(this.$route.query.baseId,)
   },
   methods: {
     //返回按钮
@@ -371,58 +379,160 @@ export default {
     },
     //提交按钮
     submit() {
-      this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.inOutFlag = 2
-          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
-        }
-      })
-    },
-    // 暂存按钮
-    returnWarehouse() {
-      this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.statusFlag = 1
-          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.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.car.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      this.$confirm(`确定提交入库信息`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
       })
-    },ubmit() {
-      this.$refs.deptBudgetList.validate((valid) => {
-        if (valid) {
-          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-          this.deptBudgetList.inOutFlag = 2
-          addstorageputList(this.deptBudgetList)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('添加成功')
-              this.$router.push({ path: 'warehouseManagementList' })
-            })
-        } else {
-          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+        .then(() => {
+          this.$refs.deptBudgetList.validate((valid) => {
+            if (valid) {
+              this.deptBudgetList.compId = sessionStorage.getItem(
+                'ws-pf_compId'
+              )
+              this.deptBudgetList.inOutFlag = 2
+              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
+            }
+          })
+        })
+        .catch(() => {
           return false
-        }
-      })
+        })
     },
     temporaryStorage() {
+      if (!this.deptBudgetList.goodsName) {
+        this.$message({
+          message: '货名不能为空',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.grossWeight < 0 ||
+        this.deptBudgetList.grossWeight > 10000 ||
+        (String(this.deptBudgetList.grossWeight).indexOf('.') != -1 &&
+          String(this.deptBudgetList.grossWeight).length -
+            (String(this.deptBudgetList.grossWeight).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '毛重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.tare < 0 ||
+        this.deptBudgetList.tare > 10000 ||
+        (String(this.deptBudgetList.tare).indexOf('.') != -1 &&
+          String(this.deptBudgetList.tare).length -
+            (String(this.deptBudgetList.tare).indexOf('.') + 1) >
+            3)
+      ) {
+        this.$message({
+          message: '皮重输入错误',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.car.length < 2 ||
+        this.deptBudgetList.agent.length > 10
+      ) {
+        this.$message({
+          message: '经办人输入有误',
+          type: 'warning',
+        })
+        return
+      }
+      if (this.deptBudgetList.carNo.length > 7) {
+        this.$message({
+          message: '车牌号输入错误,请输入7个字符之内',
+          type: 'warning',
+        })
+        return
+      }
+      if (
+        this.deptBudgetList.contractNo.length < 6 ||
+        this.deptBudgetList.contractNo.length > 20
+      ) {
+        this.$message({
+          message: '合同编号长度不符合要求,请输入6-20个字符之内',
+          type: 'warning',
+        })
+        return
+      }
       this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
         cancelButtonText: '取消',
         confirmButtonText: '确定',
@@ -451,7 +561,6 @@ export default {
         .catch(() => {
           return false
         })
-
     },
     tarechange(e) {
       if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
@@ -622,7 +731,6 @@ export default {
 /deep/.el-form-item__label {
   width: 160px;
 }
-
 //选填
 /deep/.el-form-item {
   width: 50%;

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

@@ -172,11 +172,21 @@
             </template>
           </el-table-column>
           <el-table-column prop="inOutDate" label="出入库日期">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.inOutDate }}</span>
+            </template>
           </el-table-column>
           <el-table-column prop="inOutType" label="类型"> </el-table-column>
           <el-table-column prop="contractNo" label="合同编号">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.contractNo }}</span>
+            </template>
+          </el-table-column>
+          <el-table-column prop="carNo" label="车牌号">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.carNo }}</span>
+            </template>
           </el-table-column>
-          <el-table-column prop="carNo" label="车牌号"> </el-table-column>
           <el-table-column prop="qualityInspector" label="经办人">
           </el-table-column>
           <el-table-column prop="buyer" label="内勤"> </el-table-column>
@@ -197,6 +207,9 @@
             </template>
           </el-table-column>
           <el-table-column prop="createDate" label="录入时间">
+            <template slot-scope="scope">
+              <span style="color: #8890b1">{{ scope.row.createDate }}</span>
+            </template>
           </el-table-column>
         </el-table>
         <div style="text-align: center; padding: 10px">
@@ -328,6 +341,7 @@ export default {
           baseId: this.deptBudgetList.baseId,
           positionId: this.deptBudgetList.positionId,
           warehouseName: this.deptBudgetList.warehouseName,
+          binNumber: this.binNumber,
         },
       })
     },

+ 2 - 1
vue.config.js

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