ソースを参照

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

zhongtianhaoyuan 4 年 前
コミット
3c974302dd

+ 4 - 5
src/api/V2/contract/index.js

@@ -19,11 +19,10 @@ export const API_GET_BILL_OPERATE_HIS = '/billOperateHis/query/commonBillOperate
 // 修改状态
 export const API_POST_EDITSTATUS = '/contractManagementInfo/editStatus'
 //删除销售合同
-export const API_POST_CONTRACT_DELETE ='/contractManagementInfo/deleteInfo '
+export const API_POST_CONTRACT_DELETE = '/contractManagementInfo/deleteInfo '
 //销售合同修改编辑 
 
-export const API_POST_EDITINFO ='/contractManagementInfo/editInfo'
-
-
-                                         
+export const API_POST_EDITINFO = '/contractManagementInfo/editInfo'
+// 获取负责人
+export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
 

+ 10 - 0
src/api/V2/taskspost/index.js

@@ -0,0 +1,10 @@
+// 运输任务列表
+export const API_GET_TRAN_LIST = '/tranTaskInfo/selectTranTaskInfoPage'
+// 识别身份证
+export const API_POST_PERSON = '/driverViewInfo/personShibie'
+// 识别银行卡号
+export const API_GET_bank = '/driverViewInfo/bankShibie'
+//运输任务查看
+export const API_POST_TRAN_LOOK = '/tranTaskInfo/getTranTask'
+//运输任务-添加-根据仓库类型选库名
+export const API_GET_TRAN_TASK_WAREHOUSE = '/tranTaskInfo/selectWarehouseList'

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

@@ -24,3 +24,5 @@ export const API_POST_EDIT_DRIVER = '/driverViewInfo/api/editInfo'
 export const API_GET_PRAAMETER = '/commonSysParameter/getInfo'
 //运输任务查看
 export const API_POST_TRAN_LOOK = '/tranTaskInfo/getTranTask'
+// 汽运调度列表
+export const API_GET_AUTOMOBILE_TRAN_LIST = '/tranProcessInfo/selectTranProcessInfo'

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

@@ -46,6 +46,8 @@ export const API_POST_WAREHOUSE_CLEARANCEE = '/warehouseBaseInfo/api/editCleared
 export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
 // 获取负责人
 export const API_GET_STAFF = '/staff/query/getStaffListByCompId'
+//临时库记录
+export const API_GET_WAREHOUSE_RECORDSS ='/warehouseInOutInfo/selectInfoTemporary'
 
 //临时出库货名下拉
 export const API_GET_GOODSNAME_XIALA = '/warehouseInOutInfo/selectTemporaryGoodsNameList'

+ 4 - 0
src/lang/zh.js

@@ -509,6 +509,8 @@
     warehouseManagementPerfectDelivery: '编辑',
     tranManagementTransport: '运输任务',
     tranManagementDriverEdit: '编辑司机',
+    // 任务管理
+    taskManagement: '任务管理',
 
     tranManagementLook: '运输任务查看',
     tranManagementTransportAdd: '运输任务添加',
@@ -4734,6 +4736,8 @@
   tranManagementTransporTationFire: {
     tranManagementTransporTationFire: '火运调度'
   },
+  // 任务管理
+  tranManagement: '任务管理',
   // 年度培训
   annualTraining: {
     trainingResults: '培训结果',

+ 4 - 2
src/model/contarct/index.js

@@ -15,7 +15,7 @@ import {
     API_GET_CONTRACT_MANAGEMENTINFO,
     API_POST_EDITINFO,
     API_POST_CONTRACT_DELETE,
-    API_POST_CLEARANCE,
+    API_GET_STAFF
 } from '@/api/V2/contract'
 // 列表
 export const getList = appRx.get(API_GET_CONTRACT_TENANT, errorCatcher, errorHandle, filter)
@@ -37,9 +37,11 @@ export const billoperatehis = appRx.get(API_GET_BILL_OPERATE_HIS, errorCatcher,
 // 修改状态
 export const editstatus = appRx.post(API_POST_EDITSTATUS, errorCatcher, errorHandle, filter)
 //删除销售合同
-export const deletecontract = appRx.post(API_POST_CONTRACT_DELETE,errorCatcher,errorHandle,filter) 
+export const deletecontract = appRx.post(API_POST_CONTRACT_DELETE, errorCatcher, errorHandle, filter)
 //修改销售合同编辑
 export const editInfo = appRx.post(API_POST_EDITINFO, errorCatcher, errorHandle, filter)
+//获取负责人
+export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
 
 
 

+ 20 - 0
src/model/tasksport/index.js

@@ -0,0 +1,20 @@
+import { errorCatcher, errorHandle, filter } from 'base-core-lib'
+import { appRx } from '../defalutConfig/indexRx'
+
+import {
+    API_GET_TRAN_LIST,
+    API_POST_TRAN_ADD,
+    API_POST_PERSON,
+    API_POST_TRAN_LOOK,
+    API_GET_TRAN_TASK_WAREHOUSE,
+} from '@/api/V2/taskspost'
+//运输任务列表
+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 getidentity = appRx.get(API_POST_PERSON, errorCatcher, errorHandle, filter)
+//运输任务查看
+export const lookTranTask = appRx.get(API_POST_TRAN_LOOK, errorCatcher, errorHandle, filter)
+//运输任务-添加-根据仓库类型选库名
+export const getwarehousename = appRx.get(API_GET_TRAN_TASK_WAREHOUSE, errorCatcher, errorHandle, filter)

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

@@ -16,6 +16,7 @@ import {
     API_POST_EDIT_DRIVER,
     API_GET_PRAAMETER,
     API_POST_TRAN_LOOK,
+    API_GET_AUTOMOBILE_TRAN_LIST
 } from '@/api/V2/transport'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
@@ -44,4 +45,6 @@ export const editdriver = appRx.post(API_POST_EDIT_DRIVER, errorCatcher, errorHa
 // 司机管理-车头、车型
 export const packList = appRx.get(API_GET_PRAAMETER, errorCatcher, errorHandle, filter)
 //运输任务查看
-export const lookTranTask = appRx.get(API_POST_TRAN_LOOK, errorCatcher, errorHandle, filter)
+export const lookTranTask = appRx.get(API_POST_TRAN_LOOK, errorCatcher, errorHandle, filter)
+//汽运调度列表
+export const automobileList = appRx.get(API_GET_AUTOMOBILE_TRAN_LIST, errorCatcher, errorHandle, filter)

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

@@ -23,9 +23,11 @@ import {
     API_POST_WAREHOUSE_CLEARANCEE,
     API_GET_WAREHOUSE_NO,
     API_GET_STAFF,
+    API_GET_WAREHOUSE_RECORDSS,
     API_GET_GOODSNAME_XIALA,
     API_GET_WAREHOUSE_LIST
 } from '@/api/V2/warehouse'
+// import { app } from 'electron'
 // 列表
 export const getList = appRx.get(API_GET_WAREHOUSE_BASEINFO, errorCatcher, errorHandle, filter)
 // 添加
@@ -68,13 +70,15 @@ export const increase = appRx.post(API_POST_WAREHOUSE_ADD, errorCatcher, errorHa
 export const clearancee = appRx.post(API_POST_WAREHOUSE_CLEARANCEE, errorCatcher, errorHandle, filter)
 //获取负责人
 export const getstaff = appRx.get(API_GET_STAFF, errorCatcher, errorHandle, filter)
+//临时库记录
+export const recordss = appRx.get(API_GET_WAREHOUSE_RECORDSS, errorCatcher , errorHandle , filter)
 
 //临时出库货名下拉
 export const goodsnameXiala = appRx.get(API_GET_GOODSNAME_XIALA, errorCatcher, errorHandle, filter)
 //临时库待完成
 export const completeList = appRx.get(API_GET_WAREHOUSE_LIST, errorCatcher, errorHandle, filter)
 //临时出入库合同编号下拉
-export const xialaNo = appRx.get(API_GET_WAREHOUSE_NO,errorCatcher,errorHandle,filter)
+export const xialaNo = appRx.get(API_GET_WAREHOUSE_NO, errorCatcher, errorHandle, filter)
 
 
 

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

@@ -4,12 +4,7 @@
   <div>
     <BaseHeaderLayout :leftSpan="10">
       <template slot="left">
-        <ws-button
-          type="primary"
-          @click="handleAdd()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
+        <ws-button type="primary" @click="handleAdd()"
           ><img
             width="13"
             height="13"

+ 46 - 11
src/views/contractManagement/purchaseContractAdd.vue

@@ -321,20 +321,20 @@
           span="1"
           prop="packingMethod"
         >
-          <ws-select
-            v-model="deptBudgetList.packingMethod"
+          <el-select
+            v-model="deptBudgetList.personCharge"
             placeholder="请选择临时库负责人"
-            class="typeselect"
-            :value="value1"
-            @change="selectpackingMethod"
+            filterable
+            :filter-method="dataFilter"
+            @change="selectstaff"
           >
-            <ws-option
-              v-for="item in packtypeList"
-              :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
             />
-          </ws-select>
+          </el-select>
         </ws-form-item>
       </ws-info-table>
       <div class="wenzi">
@@ -554,6 +554,7 @@ import {
   addxiala,
   editxiala,
   delxiala,
+  getstaff,
 } from '@/model/contarct/index'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
 import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -600,6 +601,8 @@ export default {
         //   { min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' },
         // ],
       },
+      options: [],
+      staffList: [],
       appendixIdsAdd: '',
       size: 10,
       // uploadSuccess: {},
@@ -661,10 +664,42 @@ export default {
     this.deptBudgetList.contractProcessInfo.gradeKey = 1
     this.deptBudgetList.contractGoodsInfo.grade = '一等品'
     this.deptBudgetList.contractGoodsInfo.gradeKey = 1
+    console.log(1111)
+    getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+      .toPromise()
+      .then((response) => {
+        this.options = response
+        this.staffList = response
+      })
     this.loaddata()
     this.showType = this.isShow
   },
   methods: {
+    dataFilter(val) {
+      this.deptBudgetList.personCharge = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
     // 关闭 dialog时 处理文件url 初始化upload组件
     handleClose() {
       this.dialogViewSpareMoney = false

+ 52 - 21
src/views/contractManagement/purchaseContractEdit.vue

@@ -62,7 +62,6 @@
         </ws-form-item>
         <!-- 交货方式 -->
         <ws-form-item label="结算方式" span="1" prop="settlementMethod">
-          
           <ws-input
             v-model="deptBudgetList.settlementMethod"
             maxlength="100"
@@ -312,19 +311,20 @@
           prop="packingMethod"
           v-show="deptBudgetList.deliverType == 1"
         >
-          <ws-select
-            v-model="deptBudgetList.packingMethod"
-            placeholder=""
-            class="typeselect"
-            @change="selectpackingMethod"
+          <el-select
+            v-model="deptBudgetList.personCharge"
+            placeholder="请选择临时库负责人"
+            filterable
+            :filter-method="dataFilter"
+            @change="selectstaff"
           >
-            <ws-option
-              v-for="item in packtypeList"
-              :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.staffName"
+              :value="item.staffName"
             />
-          </ws-select>
+          </el-select>
         </ws-form-item>
       </ws-info-table>
       <base-card>
@@ -528,6 +528,7 @@ import {
   delxiala,
   examineList,
   editInfo,
+  getstaff,
 } from '@/model/contarct/index'
 import WsUpload from '@/components/WsUpload'
 import { EventBus, dayjs } from 'base-core-lib'
@@ -572,6 +573,8 @@ export default {
       mainReportAdd: {},
       list: {},
       unitList: [],
+      options: [],
+      staffList: [],
       packtypeList: [],
       goodnameList: [],
       gradeList: [],
@@ -588,10 +591,41 @@ export default {
   },
 
   activated() {
+    getstaff({ compId: sessionStorage.getItem('ws-pf_compId') })
+      .toPromise()
+      .then((response) => {
+        this.options = response
+        this.staffList = response
+      })
     this.loaddata()
     this.showType = this.isShow
   },
   methods: {
+    dataFilter(val) {
+      this.deptBudgetList.personCharge = val
+      if (val) {
+        //val存在
+        this.options = this.staffList.filter((item) => {
+          if (
+            !!~item.staffName.indexOf(val) ||
+            !!~item.staffName.toUpperCase().indexOf(val.toUpperCase())
+          ) {
+            return true
+          }
+        })
+      } else {
+        //val为空时,还原数组
+        this.options = this.staffList
+      }
+    },
+    selectstaff(e) {
+      for (var i = 0; i < this.staffList.length; i++) {
+        if (this.staffList[i].staffName == e) {
+          this.deptBudgetList.personPhone = this.staffList[i].staffMobilePhone
+          this.deptBudgetList.personChargeKey = this.staffList[i].staffId
+        }
+      }
+    },
     handleChange(value) {
       this.selectedOptions = value
     },
@@ -603,7 +637,6 @@ export default {
       examineList({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
-         
           if (response.weight) {
             response.weight = String(response.weight)
           }
@@ -634,10 +667,10 @@ export default {
             ].code
           this.selectedOptions1 = tmp1
           this.deptBudgetList = response
-          if(this.deptBudgetList.deliverType == 1){
-            this.deptBudgetList.deliverType1 = "我方自提"
-          }else if(this.deptBudgetList.deliverType == 2){
-            this.deptBudgetList.deliverType1 = "对方送货" 
+          if (this.deptBudgetList.deliverType == 1) {
+            this.deptBudgetList.deliverType1 = '我方自提'
+          } else if (this.deptBudgetList.deliverType == 2) {
+            this.deptBudgetList.deliverType1 = '对方送货'
           }
         })
       // 包装方式
@@ -645,7 +678,6 @@ export default {
         .toPromise()
         .then((response) => {
           this.packtypeList = response
-          
         })
       // 验收方式
       this.getUnitList()
@@ -702,7 +734,6 @@ export default {
       })
         .toPromise()
         .then((response) => {
-           
           this.unitList = response
           let currItem
           this.unitList.forEach((item, index, arr) => {
@@ -715,7 +746,6 @@ export default {
           if (currItem) {
             this.selectContract(currItem.constValue)
           }
-          
         })
     },
     // 关闭 dialog时 处理文件url 初始化upload组件
@@ -1266,7 +1296,8 @@ export default {
       }
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
-          this.deptBudgetList.sourceProvince = CodeToText[this.selectedOptions[0]]
+          this.deptBudgetList.sourceProvince =
+            CodeToText[this.selectedOptions[0]]
           this.deptBudgetList.sourceCity = CodeToText[this.selectedOptions[1]]
           this.deptBudgetList.sourceArea = CodeToText[this.selectedOptions[2]]
           this.deptBudgetList.deliveryProvince =

+ 83 - 0
src/views/taskManagement/component/routers/route.js

@@ -0,0 +1,83 @@
+import Layout from '@/layout/index';
+
+const tranManagementRouter = {
+
+  path: '/taskManagement',
+  component: Layout,
+  redirect: '/taskManagement',
+  name: 'taskManagement',
+  alwaysShow: true, // will always show the root menu
+  meta: {
+    title: 'taskManagement',
+    module: 'taskManagement',
+    icon: 'cg'
+  },
+  children: [
+    //运输任务
+    {
+      path: 'tranManagementTransport',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransport'),
+      name: 'tranManagementTransport',
+      meta: {
+        title: 'tranManagementTransport',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementTransport',
+        permissicon: [],
+        keepAlive: true
+      },
+
+      // hidden: true
+    },
+    //运输查看
+    {
+      path: 'tranManagementLook',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementLook'),
+      name: 'tranManagementLook',
+      meta: {
+        title: 'tranManagementLook',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementLook',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+    //运输添加
+    {
+      path: 'tranManagementTransportAdd',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransportAdd'),
+      name: 'tranManagementTransportAdd',
+      meta: {
+        title: 'tranManagementTransportAdd',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementTransportAdd',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+    },
+    //运输编辑
+    {
+      path: 'tranManagementTransportEdit',
+      component: () =>
+        import(/* webpackChunkName: "applDetail" */ '@/views/taskManagement/tranManagementTransportEdit'),
+      name: 'tranManagementTransportEdit',
+      meta: {
+        title: 'tranManagementTransportEdit',
+        shortcutEntrance: 'tranManagement',
+        module: 'tranManagement.tranManagementDriver.tranManagementTransportEdit',
+        permissicon: [],
+        keepAlive: true
+      },
+      hidden: true
+
+    },
+
+  ],
+
+};
+
+export default tranManagementRouter;

+ 0 - 0
src/views/tranManagement/tranManagementLook.vue → src/views/taskManagement/tranManagementLook.vue


+ 645 - 0
src/views/taskManagement/tranManagementTransporTationFire.vue

@@ -0,0 +1,645 @@
+//火运调度
+<template>
+  <div>
+    <BaseHeaderLayout :leftSpan="20">
+      <template slot="left">
+        <ws-button
+          class="but"
+          type="primary"
+          @click="handleAdd()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+        >
+          执行中</ws-button
+        >
+        <ws-button
+          class="but"
+          @click="handleLook()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >已完成</ws-button
+        >
+        <ws-button
+          class="but"
+          @click="handleEdit()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          >全部任务</ws-button
+        >
+      </template>
+      <!-- 接单开始 -->
+      <template slot="left">
+        <ws-date-picker
+          v-model="deptBudgetList.inOutDate"
+          type="date"
+          placeholder="请选择开始日期"
+          value-format="yyyy-MM-dd"
+        />
+        <span>至</span>
+        <ws-date-picker
+          v-model="deptBudgetList.inOutDate"
+          type="date"
+          placeholder="请选择结束日期"
+          value-format="yyyy-MM-dd"
+        />
+        <ws-input
+          v-model="searchKeyWord"
+          placeholder="可按照合同编号、买方名称、卖方名称进行查找"
+          clearable
+          maxlength="500"
+          type="input"
+          class="findValue"
+        ></ws-input>
+        <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+        <ws-button
+          class="find"
+          type="primary"
+          @click="find()"
+          v-hasPermission="
+            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+          "
+          ><img
+            width="16"
+            height="16"
+            style="
+              vertical-align: text-top;
+              position: relative;
+              top: 0px;
+              left: -8px;
+            "
+            src="../../../public/img/sousuo.png"
+            alt=""
+        /></ws-button>
+      </template>
+    </BaseHeaderLayout>
+    <div>
+      <el-table
+        class="wenzi"
+        :data="warehouseList"
+        style="width: 100%; margin-top: 20px"
+        height="780"
+      >
+        <el-table-column prop="warehouseName" label="序号" width="80">
+        </el-table-column>
+        <el-table-column prop="binNumber" label="运输任务编号" width="80">
+        </el-table-column>
+        <el-table-column prop="capacity" label="货名">
+          <template slot-scope="scope">
+            <div
+              v-if="scope.row.capacity != 'null' && scope.row.capacity != null"
+            >
+              {{ scope.row.capacity }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column class="table_td" label="重量(吨)">
+          <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.inNetWeight }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column class="table_td" label="发货">
+          <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.outNetWeight }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column class="table_td" label="收货">
+          <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.storage }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column class="table_td" label="运输周期">
+          <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.storage }}
+            </div>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="status" label="状态">
+          <template slot-scope="scope">
+            <el-popover
+              placement="left"
+              :width="285"
+              trigger="click"
+              visible-arrow="false"
+              @show="history(scope.row)"
+            >
+              <template>
+                <span slot="reference">
+                  <span
+                    v-if="scope.row.status == '待执行'"
+                    class="executory"
+                  ></span>
+                  <span
+                    v-if="scope.row.status == '执行中'"
+                    class="inExecution"
+                  ></span>
+                  <span v-if="scope.row.status == '已完成'" class="done"></span
+                  >{{ scope.row.status }}
+                </span>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">XXXXX</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div
+                      v-if="index != historyList.length - 1"
+                      class="vertical-line"
+                    ></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
+                </div>
+              </div>
+            </el-popover>
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick(scope.row)"
+              alt=""
+            />
+          </template>
+        </el-table-column>
+        <el-table-column class="table_td" label="接单日期">
+          <template slot-scope="scope">
+            <div
+              style="height: 24px"
+              v-for="(item, i) in scope.row.warehouseNumViewList"
+            >
+              {{ item.storage }}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="seller" label="操作" width="300">
+          <template slot-scope="scope">
+            <ws-button
+              class="completed"
+              @click="nocomplete(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+            >
+              查看({{ scope.row.number }})
+            </ws-button>
+            <ws-button
+              class="putstorage"
+              @click="warehousing(scope.row)"
+              v-hasPermission="
+                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
+              "
+            >
+              车次
+            </ws-button>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column prop="address" label="操作" width="200">
+          <template slot-scope="scope">
+            <div class="record" @click="record(scope.row)">记录</div>
+            <div class="adjustment" @click="loss(scope.row)">盘损</div>
+          </template>
+        </el-table-column> -->
+      </el-table>
+    </div>
+  </div>
+</template>
+<script>
+import {
+  getList,
+  export1,
+  editstatus,
+  billoperatehis,
+} from '@/model/warehouse/index'
+import { downloadFile } from '@/utils/batchDown'
+import Pagination from '@/components/Pagination'
+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,
+      // 船舶类型
+      monetaryKey: null,
+      // 表格显示数据
+      tableDate: [],
+
+      // 是否显示
+      showType: true,
+      // 年
+      year: '',
+      currentPage: 1,
+      pageSize: 10,
+      searchType: 1,
+      searchTypeText: '未完成',
+      searchKeyWord: '',
+      contractType: 2,
+      // 提交类型
+      submitType: true,
+      size: 10,
+      spanArr: [],
+      warehouseName: '',
+      compId: sessionStorage.getItem('ws-pf_compId'),
+      deptCircularPage: {},
+      warehouseList: [],
+      deptBudgetList: {},
+      historyList: [],
+      pickerBeginDateBefore: {
+        disabledDate: (time) => {
+          return time.getTime() > Date.now()
+        },
+      },
+      accessoryTFs: false,
+    }
+  },
+  activated() {
+    //cg.viewBudget
+    //cg.viewSpareMoney
+    // this.getVesselData();
+    this.getList()
+    this.showType = this.isShow
+  },
+  methods: {
+    //出库
+    delivery(item) {
+      this.$router.push({
+        path: 'warehouseManagementDelivery',
+        query: {
+          baseId: item.warehouseId,
+          positionId: item.binNumberId,
+          warehouseName: item.warehouseName,
+          binNumber: item.binNumber,
+          capacity: item.capacity,
+        },
+      })
+    },
+    //派车
+    warehousing(item) {
+      var free = 0
+      for (var i = 0; i < item.warehouseNumViewList.length; i++) {
+        free += Number(item.warehouseNumViewList[i].storage)
+      }
+      this.$router.push({
+        path: 'tranManagementVehicleDispatching',
+        query: {
+          baseId: item.warehouseId,
+          positionId: item.binNumberId,
+          warehouseName: item.warehouseName,
+          binNumber: item.binNumber,
+          capacity: item.capacity - free,
+        },
+      })
+    },
+    getSpanArr(data) {
+      let that = this
+
+      //页面展示的数据,不一定是全部的数据,所以每次都清空之前存储的 保证遍历的数据是最新的数据。以免造成数据渲染混乱
+
+      that.spanArr = []
+
+      that.pos = 0
+
+      //遍历数据
+
+      data.forEach((item, index) => {
+        //判断是否是第一项
+
+        // if (index === 0) {
+        //   this.spanArr.push(1)
+        //   this.pos = 0
+        // } else {
+        //不是第一项时,就根据标识去存储
+        if (data[index].warehouseNumViewList.length > 1) {
+          // 查找到符合条件的数据时每次要把之前存储的数据+1
+          this.spanArr[this.pos] = data[index].warehouseNumViewList.length
+          this.spanArr.push(0)
+        } else {
+          // 没有符合的数据时,要记住当前的index
+          this.spanArr.push(1)
+          this.pos = index
+        }
+        // }
+      })
+    },
+    //查看//传参
+    nocomplete(row) {
+      this.$router.push({
+        path: 'tranManagementVehicleLook',
+        // query: {
+        //   baseId: row.warehouseId,
+        //   positionId: row.binNumberId,
+        //   warehouseName: row.warehouseName,
+        //   binNumber: row.binNumber,
+        // },
+      })
+    },
+    //记录
+    record(item) {
+      this.$router.push({
+        name: 'warehouseManagementRecord',
+        query: {
+          baseId: item.warehouseId,
+          positionId: item.binNumberId,
+          warehouseName: item.warehouseName,
+        },
+        params: {
+          remark: item.remark,
+          binNumber: item.binNumber,
+          capacity: item.capacity,
+        },
+      })
+    },
+    //盘损
+    loss(item) {
+      this.$router.push({
+        path: 'warehouseManagementIoss',
+        query: {
+          baseId: item.warehouseId,
+          positionId: item.binNumberId,
+          warehouseName: item.warehouseName,
+          binNumber: item.binNumber,
+        },
+      })
+    },
+    //查看
+    handleLook() {
+      this.$router.push({ path: 'tranManagementVehicleLook' })
+    },
+    //添加
+    handleAdd() {
+      this.$router.push({ path: 'tranManagementTransportAdd' })
+    },
+    //编辑
+    handleEdit() {
+      this.$router.push({ path: 'tranManagementTransportEdit' })
+    },
+    // 派车
+    warehousing() {
+      this.$router.push({ path: 'tranManagementVehicleDispatching' })
+    },
+    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() {
+      getList({
+        compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseName: this.warehouseName,
+      })
+        .toPromise()
+        .then((response) => {
+          this.warehouseList = 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) {
+      for (var i = 0; i < this.taskTypeList.length; i++) {
+        if (this.taskTypeList[i].value == e) {
+          this.searchType = this.taskTypeList[i].type
+        }
+      }
+    },
+    fujian(row) {
+      if (
+        row.receiveAttachmentPath === null ||
+        row.receiveAttachmentPath === ''
+      ) {
+        EventBus.$emit(
+          'warning',
+          this.$t('system.noticeCircular.NoInformation')
+        )
+      } else {
+        this.accessoryTFs = true
+      }
+      this.appendixIdss = row.receiveAttachmentPath
+    },
+    handleExamine(row) {
+      this.$router.push({
+        name: 'salesContractExamine',
+        query: { id: row.id },
+      })
+    },
+    // 关闭 dialog时 处理文件url 初始化upload组件
+    handleCloe() {
+      this.dialogViewSpareMoney = false
+    },
+    history(row) {
+      billoperatehis({ id: row.id })
+        .toPromise()
+        .then((response) => {
+          this.historyList = response
+        })
+    },
+    find() {
+      this.currentPage = 1
+      this.getList()
+    },
+    async exportlist() {
+      const { data } = await export1(
+        {
+          compId: sessionStorage.getItem('ws-pf_compId'),
+          contractType: this.contractType,
+          currentPage: this.currentPage,
+          pageSize: this.pageSize,
+          searchType: this.searchType,
+          searchKeyWord: this.searchKeyWord,
+          startDate: this.startDate,
+          endDate: this.endDate,
+        },
+        {},
+        { responseType: 'blob' }
+      ).toPromise()
+      downloadFile({
+        res: data,
+        fileName: `${
+          this.date.year + (this.date.month ? `-${this.date.month}` : '')
+        }_采购合同`,
+        type: 'xls',
+      })
+    },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.connert {
+  width: 90%;
+  margin: 0 auto;
+}
+.vertical-text-left {
+  width: 62px;
+  text-align: right;
+}
+.el-button--primary {
+  background-color: #5878e8;
+  border-color: #5878e8;
+}
+.el-button--default {
+  color: #8890b1;
+  border-color: #e8eaf1;
+}
+/deep/.base_header_layout .grid-content.right .find.el-button--primary {
+  width: 30px;
+  margin-left: 0;
+  border-top-left-radius: 0px;
+  border-bottom-left-radius: 0px;
+}
+/deep/.findValue .el-input__inner {
+  border-top-right-radius: 0px;
+  border-bottom-right-radius: 0px;
+}
+.completed.el-button--default {
+  border-color: #5878e8;
+  background-color: #f6f7fc;
+  color: #5878e8;
+}
+.putstorage.el-button--default,
+.deliverystorage.el-button--default {
+  border-color: #8890b1;
+  background-color: #fff;
+  color: #8890b1;
+}
+/deep/.el-table td,
+/deep/.el-table th.is-leaf {
+  border-right: 1px solid #e9ecf7;
+  text-align: center;
+}
+/deep/.el-table tr td:first-child,
+/deep/.el-table tr th.is-leaf:first-child {
+  border-left: 1px solid #e9ecf7;
+}
+.record,
+.adjustment {
+  display: inline-block;
+  color: #5878e8;
+  padding: 0 4px !important;
+  position: relative;
+}
+.record:after {
+  position: absolute;
+  content: '';
+  display: block;
+  top: 5px;
+  right: -2px;
+  width: 1px;
+  height: 12px;
+  background: #e9ecf7;
+}
+.el-row {
+  height: 150px;
+}
+.base_header_layout .grid-content {
+  margin-top: 80px;
+}
+.but {
+  margin-top: 150px;
+}
+.el-input--small .el-input__inner {
+  margin-left: 20px;
+}
+.el-range-editor--small.el-input__inner {
+  height: 32px;
+  margin-left: -20%;
+}
+</style>

+ 107 - 145
src/views/tranManagement/tranManagementTransport.vue → src/views/taskManagement/tranManagementTransport.vue

@@ -2,60 +2,30 @@
 <template>
   <div>
     <BaseHeaderLayout :leftSpan="20">
-     <template slot="right">
-        <ws-button
-        class="but"
-          type="primary"
-          @click="handleAdd()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
+      <template slot="right">
+        <ws-button class="but" type="primary" @click="handleAdd()"
           >添加</ws-button
         >
       </template>
       <template slot="left">
-        <ws-button
-        class="but"
-          type="primary"
-          @click="handle()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
-          >
+        <ws-button class="but" type="primary" @click="handle()">
           执行中</ws-button
         >
-        <ws-button
-        class="but"
-          @click="handleLook()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
-          >已完成</ws-button
-        >
-        <ws-button
-        class="but"
-          @click="handleEdit()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
-          >全部任务</ws-button
-        >
-        
+        <ws-button class="but" @click="handleLook()">已完成</ws-button>
+        <ws-button class="but" @click="handleEdit()">全部任务</ws-button>
       </template>
       <template slot="left">
-          <ws-input
+        <ws-input
           label="起点"
-         
           placeholder="请输入起点"
           clearable
           maxlength="200"
           type="input"
           class="find"
         ></ws-input>
-        
+
         <ws-input
-        label="终点"
-          
+          label="终点"
           placeholder="请输入终点"
           clearable
           maxlength="200"
@@ -72,27 +42,20 @@
         ></ws-input>
         <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
         <div class="search">
-            <ws-button
-          class="find"
-          type="primary"
-          @click="lookUp()"
-          v-hasPermission="
-            `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-          "
-          ><img
-            width="16"
-            height="16"
-            style="
-              vertical-align: text-top;
-              position: relative;
-              top: 0px;
-              left: -8px;
-            "
-            src="../../../public/img/sousuo.png"
-            alt=""
-        /></ws-button>
+          <ws-button class="find" type="primary" @click="lookUp()"
+            ><img
+              width="16"
+              height="16"
+              style="
+                vertical-align: text-top;
+                position: relative;
+                top: 0px;
+                left: -8px;
+              "
+              src="../../../public/img/sousuo.png"
+              alt=""
+          /></ws-button>
         </div>
-        
       </template>
     </BaseHeaderLayout>
     <div>
@@ -115,7 +78,7 @@
             </div>
           </template>
         </el-table-column>
-        <el-table-column prop=" weight" class="table_td" label="货物(吨数)" >
+        <el-table-column prop=" weight" class="table_td" label="货物(吨数)">
           <!-- <template slot-scope="scope">
             <div
               style="height: 24px"
@@ -145,7 +108,11 @@
             </div>
           </template> -->
         </el-table-column>
-        <el-table-column prop="currentTransferAddress" class="table_td" label="当前中转">
+        <el-table-column
+          prop="currentTransferAddress"
+          class="table_td"
+          label="当前中转"
+        >
           <!-- <template slot-scope="scope">
             <div
               style="height: 24px"
@@ -157,7 +124,7 @@
         </el-table-column>
         <el-table-column prop="end" class="table_td" label="终点">
           <!-- <template slot-scope="scope"> -->
-            <!-- <div
+          <!-- <div
               style="height: 24px"
               v-for="(item, i) in scope.row.warehouseNumViewList"
             >
@@ -166,59 +133,58 @@
           <!-- </template> -->
         </el-table-column>
 
-      <el-table-column prop="status" label="状态">
-        <template slot-scope="scope">
-          <el-popover
-          placement="left"
-          :width="285"
-          trigger="click"
-          visible-arrow="false"
-          @show="history(scope.row)"
-          >
-          <template>
-            <span slot="reference">
-              <span
-              v-if="scope.row.status =='待执行'"
-              class="executory"
-              ></span>
-            <span
-            v-if="scope.row.status == '执行中'"
-            class="inExecution"
-            ></span>
-            <span v-if="scope.row.status == '已完成'" class="done"></span
-            >{{scope.row.status}}
-            </span>
-          </template>
-          <div>
-              <p style="margin-top: 0; padding-left: 10px">操作历史</p>
-              <div v-for="(item, index) in historyList" class="flex">
-                <div class="vertical-text vertical-text-left">
-                  {{ item.updateDate }}
-                </div>
-                <div>
-                  <div class="vertical-circle"></div>
-                  <div
-                    v-if="index != historyList.length - 1"
-                    class="vertical-line"
-                  ></div>
-                </div>
-                <div class="vertical-text">
-                  {{ item.operateUser }}<br />{{ item.dealMsg }}
+        <el-table-column prop="status" label="状态">
+          <template slot-scope="scope">
+            <el-popover
+              placement="left"
+              :width="285"
+              trigger="click"
+              visible-arrow="false"
+              @show="history(scope.row)"
+            >
+              <template>
+                <span slot="reference">
+                  <span
+                    v-if="scope.row.status == '待执行'"
+                    class="executory"
+                  ></span>
+                  <span
+                    v-if="scope.row.status == '执行中'"
+                    class="inExecution"
+                  ></span>
+                  <span v-if="scope.row.status == '已完成'" class="done"></span
+                  >{{ scope.row.status }}
+                </span>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">操作历史</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div
+                      v-if="index != historyList.length - 1"
+                      class="vertical-line"
+                    ></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
                 </div>
               </div>
-            </div>
-          </el-popover>
-          <img
-            width="17"
-            height="18"
-            style="vertical-align: text-top; position: relative; top: -1px"
-            src="../../../public/img/edit.png"
-            @click="editClick(scope.row)"
-            alt=""
-          />
-        </template>
-       
-      </el-table-column>
+            </el-popover>
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick(scope.row)"
+              alt=""
+            />
+          </template>
+        </el-table-column>
         <el-table-column prop="seller" label="操作" width="300">
           <template slot-scope="scope">
             <ws-button
@@ -261,9 +227,7 @@
   </div>
 </template>
 <script>
-import {
-  gain,
-} from '@/model/transport/index'
+import { gain } from '@/model/transport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -296,7 +260,7 @@ export default {
       showType: true,
       // 年
       year: '',
-     gainList:[],
+      gainList: [],
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
@@ -320,32 +284,31 @@ export default {
     }
   },
   activated() {
-    
     this.getList()
     this.showType = this.isShow
   },
   methods: {
     //添加
-    add(){
-      this.$router.push({ path :'tranManagementTransportAdd'})
+    add() {
+      this.$router.push({ path: 'tranManagementTransportAdd' })
     },
     //查找
-      lookUp(){
-        this.currentPage= 1
-        this.getList()
-      },
+    lookUp() {
+      this.currentPage = 1
+      this.getList()
+    },
     getList() {
       gain({
         compId: sessionStorage.getItem('ws-pf_compId'),
-        currentPage:this.currentPage,
-        pageSize:this.pageSize,
-        searchType:this.searchType,
-        searchKeyWord:this.searchKeyWord,
-      })
-      .toPromise()
-      .then((response)=>{
-        this.gainList = response
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
+        searchType: this.searchType,
+        searchKeyWord: this.searchKeyWord,
       })
+        .toPromise()
+        .then((response) => {
+          this.gainList = response
+        })
     },
     //编辑
     delivery(item) {
@@ -373,7 +336,7 @@ export default {
           positionId: item.binNumberId,
           warehouseName: item.warehouseName,
           binNumber: item.binNumber,
-          capacity:item.capacity - free ,
+          capacity: item.capacity - free,
         },
       })
     },
@@ -644,25 +607,24 @@ export default {
   height: 12px;
   background: #e9ecf7;
 }
-.el-row{
-    height: 150px;
+.el-row {
+  height: 150px;
 }
-.base_header_layout .grid-content{
-    margin-top: 80px;
+.base_header_layout .grid-content {
+  margin-top: 80px;
 }
-.but{
-    margin-top: 150px;
+.but {
+  margin-top: 150px;
 }
-.findValue{
-    width: 50%;
-    margin-left: 25%;
+.findValue {
+  width: 50%;
+  margin-left: 25%;
 }
-/deep/.el-input--small .el-input__inner{
+/deep/.el-input--small .el-input__inner {
   margin-left: -230px;
-   width: 300px;
+  width: 300px;
 }
-.search{
+.search {
   margin-left: -100px;
 }
-
 </style>

+ 41 - 39
src/views/tranManagement/tranManagementTransportAdd.vue → src/views/taskManagement/tranManagementTransportAdd.vue

@@ -93,7 +93,7 @@
       <ws-info-table class="el-table">
         <div class="start-address">
           <el-radio v-model="deptBudgetList.warehouseType" label="1"
-            >有库发货</el-radio
+            >有库发货</el-radio
           >
           <el-radio v-model="deptBudgetList.warehouseType" label="2"
             >临时库发货</el-radio
@@ -113,19 +113,15 @@
           </el-select>
         </div>
         <el-form-item label="始发地" span="1" class="start-address">
-          <el-select
-            v-model="deptBudgetList.contractNo"
-            placeholder="货名"
-            class="typeselect"
-            @change="selectstorageType"
-          >
-            <el-option
-              v-for="item in storageType"
-              :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
-            ></el-option>
-          </el-select>
+          <el-cascader
+            :options="options_"
+            v-model="selectedOptions"
+            clearable
+            size="large"
+            placeholder="请选择始发地"
+            style="width: 200%"
+            @change="handleChange"
+          />
         </el-form-item>
         <el-form-item
           label="始发地详细地址"
@@ -166,19 +162,15 @@
           prop="contractNo"
           class="start-address"
         >
-          <el-select
-            v-model="deptBudgetList.contractNo"
-            placeholder="货名"
-            class="typeselect"
-            @change="selectstorageType"
-          >
-            <el-option
-              v-for="item in storageType"
-              :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
-            ></el-option>
-          </el-select>
+          <el-cascader
+            :options="options_"
+            v-model="selectedOptions1"
+            clearable
+            size="large"
+            placeholder="请选择终到地"
+            style="width: 200%"
+            @change="handleChange1"
+          />
         </el-form-item>
         <el-form-item
           label="始发地详细地址"
@@ -359,8 +351,8 @@
 </template>
 <script>
 import { packList } from '@/model/contarct/index'
-import { provinceAndCityData, CodeToText } from 'element-china-area-data'
-import { addTranTask } from '@/model/transport/index'
+import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
+import { addTranTask, getwarehousename } from '@/model/tasksport/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -386,13 +378,15 @@ export default {
         totalStorage: 0,
         goodsName: '玉米',
         goodsNameKey: 1,
+        warehouseType: '1',
         driverPayeeInfo: {},
       },
       radio: '1',
-      options_: provinceAndCityData,
+      options_: regionData,
       heightData: '600px',
       zoom: 7,
       selectedOptions: [],
+      selectedOptions1: [],
       center: [116.244694, 39.517344],
       window: '',
       district: null,
@@ -404,6 +398,7 @@ export default {
       compId: sessionStorage.getItem('ws-pf_compId'),
       mainReportAdd: {},
       appendixIdsAdd: '',
+
       size: 10,
       value1: '',
       unitList: [],
@@ -428,15 +423,6 @@ export default {
   },
   computed: {},
   methods: {
-    getList() {
-      addtrantask({
-        compId: sessionStorage.getItem('ws-pf_compId'),
-      })
-        .toPromise()
-        .then((response) => {
-          this.deptBudgetList = response
-        })
-    },
     // 获取当前年月日
     getdate() {
       var date = new Date()
@@ -474,6 +460,19 @@ export default {
         .then((response) => {
           this.goodnameList = response
         })
+      packList({ constId: 'TRAN3' })
+        .toPromise()
+        .then((response) => {
+          this.taskType = response
+        })
+      getwarehousename({
+        compId: this.compId,
+        warehouseType: this.deptBudgetList.warehouseType,
+      })
+        .toPromise()
+        .then((response) => {
+          this.taskType = response
+        })
       // // 车型
       // packList({ constId: 'TRAN1' })
       //   .toPromise()
@@ -514,6 +513,9 @@ export default {
     handleChange(value) {
       this.selectedOptions = value
     },
+    handleChange1(value) {
+      this.selectedOptions1 = value
+    },
     returnsales() {
       this.$router.push({ path: 'tranManagementTransport' })
     },

+ 0 - 0
src/views/tranManagement/tranManagementTransportEdit.vue → src/views/taskManagement/tranManagementTransportEdit.vue


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

@@ -12,22 +12,6 @@ const tranManagementRouter = {
     icon: 'cg'
   },
   children: [
-    //运输任务
-    {
-      path: 'tranManagementTransport',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementTransport'),
-      name: 'tranManagementTransport',
-      meta: {
-        title: 'tranManagementTransport',
-        shortcutEntrance: 'tranManagement',
-        module: 'tranManagement.tranManagementDriver.tranManagementTransport',
-        permissicon: [],
-        keepAlive: true
-      },
-
-      // hidden: true
-    },
     //火运调度
     {
       path: 'tranManagementTransporTationFire',
@@ -59,21 +43,6 @@ const tranManagementRouter = {
       },
       hidden: true
     },
-    //运输查看
-    {
-      path: 'tranManagementLook',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementLook'),
-      name: 'tranManagementLook',
-      meta: {
-        title: 'tranManagementLook',
-        shortcutEntrance: 'tranManagement',
-        module: 'tranManagement.tranManagementDriver.tranManagementLook',
-        permissicon: [],
-        keepAlive: true
-      },
-      hidden: true
-    },
     //编辑司机
     {
       path: 'tranManagementDriverEdit',
@@ -89,37 +58,6 @@ const tranManagementRouter = {
       },
       hidden: true
     },
-    //运输添加
-    {
-      path: 'tranManagementTransportAdd',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementTransportAdd'),
-      name: 'tranManagementTransportAdd',
-      meta: {
-        title: 'tranManagementTransportAdd',
-        shortcutEntrance: 'tranManagement',
-        module: 'tranManagement.tranManagementDriver.tranManagementTransportAdd',
-        permissicon: [],
-        keepAlive: true
-      },
-      hidden: true
-    },
-    //运输编辑
-    {
-      path: 'tranManagementTransportEdit',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementTransportEdit'),
-      name: 'tranManagementTransportEdit',
-      meta: {
-        title: 'tranManagementTransportEdit',
-        shortcutEntrance: 'tranManagement',
-        module: 'tranManagement.tranManagementDriver.tranManagementTransportEdit',
-        permissicon: [],
-        keepAlive: true
-      },
-      hidden: true
-
-    },
     //汽运调度
     {
       path: 'tranManagementVehicle',
@@ -164,21 +102,6 @@ const tranManagementRouter = {
       },
       hidden: 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
-    },
     //汽车调度
     {
       path: 'tranManagementVehicleDispatching',
@@ -209,21 +132,6 @@ const tranManagementRouter = {
       },
       hidden: true
     },
-    //添加运输
-    {
-      path: 'tranManagementTransportAdd',
-      component: () =>
-        import(/* webpackChunkName: "applDetail" */ '@/views/tranManagement/tranManagementTransportAdd'),
-      name: 'tranManagementTransportAdd',
-      meta: {
-        title: 'tranManagementTransportAdd',
-        shortcutEntrance: 'tranManagement',
-        module: 'tranManagement.tranManagementTransportAdd',
-        permissicon: [],
-        keepAlive: true
-      },
-      hidden: true
-    },
     //司机管理
     {
       path: 'tranManagementDriver',

+ 85 - 92
src/views/tranManagement/tranManagementVehicle.vue

@@ -4,17 +4,17 @@
     <BaseHeaderLayout :leftSpan="20">
       <template slot="left">
         <ws-button
-        class="but"
+          class="but"
           type="primary"
           @click="handleAdd()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
-          >
+        >
           执行中</ws-button
         >
         <ws-button
-        class="but"
+          class="but"
           @click="handleLook()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
@@ -22,29 +22,29 @@
           >已完成</ws-button
         >
         <ws-button
-        class="but"
+          class="but"
           @click="handleEdit()"
           v-hasPermission="
             `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
           "
           >全部任务</ws-button
-        > 
+        >
       </template>
       <!-- 接单开始 -->
       <template slot="left">
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择开始日期"
-              value-format="yyyy-MM-dd"
-            />
-            <span>至</span>
-            <ws-date-picker
-              v-model="deptBudgetList.inOutDate"
-              type="date"
-              placeholder="请选择结束日期"
-              value-format="yyyy-MM-dd"
-            />
+        <ws-date-picker
+          v-model="deptBudgetList.inOutDate"
+          type="date"
+          placeholder="请选择开始日期"
+          value-format="yyyy-MM-dd"
+        />
+        <span>至</span>
+        <ws-date-picker
+          v-model="deptBudgetList.inOutDate"
+          type="date"
+          placeholder="请选择结束日期"
+          value-format="yyyy-MM-dd"
+        />
         <ws-input
           v-model="searchKeyWord"
           placeholder="可按照合同编号、买方名称、卖方名称进行查找"
@@ -146,61 +146,58 @@
           </template>
         </el-table-column>
 
-      <el-table-column prop="status" label="状态">
-        <template slot-scope="scope">
-          <el-popover
-          placement="left"
-          :width="285"
-          trigger="click"
-          visible-arrow="false"
-          @show="history(scope.row)"
-          >
-          <template>
-            <span slot="reference">
-              <span
-              v-if="scope.row.status =='待执行'"
-              class="executory"
-              ></span>
-            <span
-            v-if="scope.row.status == '执行中'"
-            class="inExecution"
-            ></span>
-            <span v-if="scope.row.status == '已完成'" class="done"></span
-            >{{scope.row.status}}
-            </span>
-          </template>
-          <div>
-              <p style="margin-top: 0; padding-left: 10px">XXXXX</p>
-              <div v-for="(item, index) in historyList" class="flex">
-                <div class="vertical-text vertical-text-left">
-                  {{ item.updateDate }}
-                </div>
-                <div>
-                  <div class="vertical-circle"></div>
-                  <div
-                    v-if="index != historyList.length - 1"
-                    class="vertical-line"
-                  ></div>
-                </div>
-                <div class="vertical-text">
-                  {{ item.operateUser }}<br />{{ item.dealMsg }}
+        <el-table-column prop="status" label="状态">
+          <template slot-scope="scope">
+            <el-popover
+              placement="left"
+              :width="285"
+              trigger="click"
+              visible-arrow="false"
+              @show="history(scope.row)"
+            >
+              <template>
+                <span slot="reference">
+                  <span
+                    v-if="scope.row.status == '待执行'"
+                    class="executory"
+                  ></span>
+                  <span
+                    v-if="scope.row.status == '执行中'"
+                    class="inExecution"
+                  ></span>
+                  <span v-if="scope.row.status == '已完成'" class="done"></span
+                  >{{ scope.row.status }}
+                </span>
+              </template>
+              <div>
+                <p style="margin-top: 0; padding-left: 10px">XXXXX</p>
+                <div v-for="(item, index) in historyList" class="flex">
+                  <div class="vertical-text vertical-text-left">
+                    {{ item.updateDate }}
+                  </div>
+                  <div>
+                    <div class="vertical-circle"></div>
+                    <div
+                      v-if="index != historyList.length - 1"
+                      class="vertical-line"
+                    ></div>
+                  </div>
+                  <div class="vertical-text">
+                    {{ item.operateUser }}<br />{{ item.dealMsg }}
+                  </div>
                 </div>
               </div>
-            </div>
-          </el-popover>
-          <img
-            width="17"
-            height="18"
-            style="vertical-align: text-top; position: relative; top: -1px"
-            src="../../../public/img/edit.png"
-            @click="editClick(scope.row)"
-            alt=""
-          />
-          
-        </template>
-        
-
-      </el-table-column>
+            </el-popover>
+            <img
+              width="17"
+              height="18"
+              style="vertical-align: text-top; position: relative; top: -1px"
+              src="../../../public/img/edit.png"
+              @click="editClick(scope.row)"
+              alt=""
+            />
+          </template>
+        </el-table-column>
         <el-table-column prop="seller" label="操作" width="300">
           <template slot-scope="scope">
             <ws-button
@@ -234,12 +231,7 @@
   </div>
 </template>
 <script>
-import {
-  getList,
-  export1,
-  editstatus,
-  billoperatehis,
-} from '@/model/warehouse/index'
+import { automobileList } from '@/model/transport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -330,7 +322,7 @@ export default {
           positionId: item.binNumberId,
           warehouseName: item.warehouseName,
           binNumber: item.binNumber,
-          capacity:item.capacity - free ,
+          capacity: item.capacity - free,
         },
       })
     },
@@ -418,8 +410,8 @@ export default {
       this.$router.push({ path: 'tranManagementTransportEdit' })
     },
     // 派车
-    warehousing(){
-        this.$router.push({ path: 'tranManagementVehicleDispatching'})
+    warehousing() {
+      this.$router.push({ path: 'tranManagementVehicleDispatching' })
     },
     dateFormat(fmt, date) {
       let ret
@@ -457,9 +449,10 @@ export default {
       this.getList()
     },
     getList() {
-      getList({
+      automobileList({
         compId: sessionStorage.getItem('ws-pf_compId'),
-        warehouseName: this.warehouseName,
+        currentPage: this.currentPage,
+        pageSize: this.pageSize,
       })
         .toPromise()
         .then((response) => {
@@ -629,20 +622,20 @@ export default {
   height: 12px;
   background: #e9ecf7;
 }
-.el-row{
-    height: 150px;
+.el-row {
+  height: 150px;
 }
-.base_header_layout .grid-content{
-    margin-top: 80px;
+.base_header_layout .grid-content {
+  margin-top: 80px;
 }
-.but{
-    margin-top: 150px;
+.but {
+  margin-top: 150px;
 }
-.el-input--small .el-input__inner{
-    margin-left: 20px;
+.el-input--small .el-input__inner {
+  margin-left: 20px;
 }
 .el-range-editor--small.el-input__inner {
-    height: 32px;
-    margin-left: -20%;
+  height: 32px;
+  margin-left: -20%;
 }
 </style>

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

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

+ 92 - 68
src/views/warehouse/warehouseManagementDelete.vue

@@ -22,6 +22,44 @@
       </el-col>
     </el-row>
     <div class="connert">
+      <BaseHeaderLayout :leftSpan="20">
+        <template slot="left">
+          <div style="margin-top: 2px">
+            <el-radio-group
+              v-model="warehouseType"
+              @change="changeradio"
+              size="small"
+            >
+              <el-radio-button label="1">自有库</el-radio-button>
+              <el-radio-button label="2">临时库</el-radio-button>
+            </el-radio-group>
+          </div>
+        </template>
+        <template slot="right">
+          <ws-input
+            v-model="warehouseName"
+            placeholder="请输入仓库名"
+            clearable
+            maxlength="500"
+            type="input"
+            class="findValue"
+          ></ws-input>
+          <!-- v-hasPermission="'procurement.sparepart.directShip'" -->
+          <ws-button class="find" type="primary" @click="find()"
+            ><img
+              width="16"
+              height="16"
+              style="
+                vertical-align: text-top;
+                position: relative;
+                top: 0px;
+                left: -8px;
+              "
+              src="../../../public/img/sousuo.png"
+              alt=""
+          /></ws-button>
+        </template>
+      </BaseHeaderLayout>
       <el-table
         class="wenzi"
         :data="warehouseList"
@@ -37,55 +75,31 @@
         <el-table-column prop="warehouseName" label="仓库名称">
         </el-table-column>
         <el-table-column prop="warehouseLocation" 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="address" label="操作" width="200">
-          <!-- <template slot-scope="scope">
+        <el-table-column prop="personCharge" label="负责人"></el-table-column>
+        <el-table-column label="操作" width="200">
+          <template slot-scope="scope">
             <ws-button
               type="primary"
               @click="handleHide(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
               v-if="scope.row.showFlag == 0"
               >显示</ws-button
             >
             <ws-button
               type="primary"
               @click="handleHide(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
               v-if="scope.row.showFlag == 1"
               >隐藏</ws-button
             >
-            <ws-button
-              type="primary"
-              @click="handleDelete(sv-ifcope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
+            <ws-button type="primary" @click="handleDelete(scope.row)"
               >删除</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>
         </el-table-column>
       </el-table>
@@ -144,7 +158,9 @@ export default {
       show: '隐藏',
       // 提交类型
       submitType: true,
+      warehouseName: '',
       size: 10,
+      warehouseType: '1',
       compId: sessionStorage.getItem('ws-pf_compId'),
       deptCircularPage: {},
       date: {
@@ -170,11 +186,19 @@ export default {
     returnWarehouse() {
       this.$router.push({ path: 'warehouseManagementList' })
     },
-
+    changeradio(e) {
+      this.getList()
+    },
+    find() {
+      this.currentPage = 1
+      this.getList()
+    },
     //列表
     getList() {
       delectlist({
         compId: sessionStorage.getItem('ws-pf_compId'),
+        warehouseType: this.warehouseType,
+        warehouseName: this.warehouseName,
       })
         .toPromise()
         .then((response) => {
@@ -233,42 +257,42 @@ export default {
           })
       }
     },
-  },
-  handleDelete(row) {
-    // console.log(row)
-    this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
-      cancelButtonText: '取消',
-      confirmButtonText: '确定',
-      type: 'warning',
-    })
-      .then(() => {
-        deletewarehouse({ id: row.id })
-          .toPromise()
-          .then((response) => {
-            this.$notify.success({
-              title: '成功',
-              message: '删除成功',
-            })
-            this.getList()
-          })
-          .catch((response) => {
-            // console.log(3333)
-            // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-          })
-      })
-      .catch(() => {
-        return false
+    handleDelete(row) {
+      // console.log(row)
+      this.$confirm(`此操作永久删除该仓库全部信息,是否确认删除`, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
       })
+        .then(() => {
+          deletewarehouse({ id: row.id })
+            .toPromise()
+            .then((response) => {
+              this.$notify.success({
+                title: '成功',
+                message: '删除成功',
+              })
+              this.getList()
+            })
+            .catch((response) => {
+              // console.log(3333)
+              // EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
+    // deletecontract(){},
+    //删除
+    approve() {},
+    listQuery() {},
+    total() {},
+    clearfiltQuery() {},
+    selectCrtDuty() {},
+    delectlist() {},
+    deletewarehouse() {},
   },
-  // deletecontract(){},
-  //删除
-  approve() {},
-  listQuery() {},
-  total() {},
-  clearfiltQuery() {},
-  selectCrtDuty() {},
-  delectlist() {},
-  deletewarehouse() {},
 }
 </script>
 <style lang="scss" scoped>

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

@@ -17,9 +17,6 @@
         <ws-button @click="handleLook()">查看</ws-button>
         <ws-button @click="handleEdit()">编辑</ws-button>
         <ws-button @click="handleDelete()">删除</ws-button>
-        <ws-button @click="handleLook()">查看</ws-button>
-        <ws-button @click="handleEdit()">编辑</ws-button>
-        <ws-button @click="handleDelete()">删除</ws-button>
       </template>
       <template slot="left">
         <div style="margin-top: 2px">
@@ -273,7 +270,6 @@ export default {
       showType: true,
       // 年
       year: '',
-      clearancee: {},
       currentPage: 1,
       pageSize: 10,
       searchType: 1,
@@ -428,7 +424,7 @@ export default {
       }
     },
     //记录
-    record(item) {
+    record(item) { 
       this.$router.push({
         name: 'warehouseManagementRecord',
         query: {
@@ -438,6 +434,7 @@ export default {
           remark: item.remark,
           binNumber: item.binNumber,
           capacity: item.capacity,
+          warehouseType: this.warehouseType,
         },
       })
     },

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

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

+ 4 - 0
vue.config.js

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