Browse Source

前端gjy

gjy 4 years ago
parent
commit
e0fc432c48

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

@@ -8,3 +8,13 @@ export const API_GET_bank = '/driverViewInfo/bankShibie'
 export const API_POST_TRAN_LOOK = '/tranTaskInfo/getTranTask'
 //运输任务-添加-根据仓库类型选库名
 export const API_GET_TRAN_TASK_WAREHOUSE = '/tranTaskInfo/selectWarehouseList'
+//合同编号下拉
+export const API_GET_WAREHOUSE_NO = '/warehouseBaseInfo/selectContractNoList'
+// 运输任务添加
+export const API_POST_TRAN_ADD = '/tranTaskInfo/api/addTranTask'
+// 运输任务删除
+export const API_POST_TRAN_DEL = '/tranTaskInfo/api/deleteTranTask'
+// 运输任务-查看
+export const API_GET_TRAN_EXAMINE = '/tranTaskInfo/getTranTask'
+// 运输任务-编辑
+export const API_GET_TRAN_EDIT = '/tranTaskInfo/api/editTranTask'

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

@@ -7,6 +7,10 @@ import {
     API_POST_PERSON,
     API_POST_TRAN_LOOK,
     API_GET_TRAN_TASK_WAREHOUSE,
+    API_GET_WAREHOUSE_NO,
+    API_POST_TRAN_DEL,
+    API_GET_TRAN_EXAMINE,
+    API_GET_TRAN_EDIT
 } from '@/api/V2/taskspost'
 //运输任务列表
 export const gain = appRx.get(API_GET_TRAN_LIST, errorCatcher, errorHandle, filter)
@@ -17,4 +21,12 @@ export const getidentity = appRx.get(API_POST_PERSON, errorCatcher, errorHandle,
 //运输任务查看
 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)
+export const getwarehousename = appRx.get(API_GET_TRAN_TASK_WAREHOUSE, errorCatcher, errorHandle, filter)
+//临时出入库合同编号下拉
+export const xialaNo = appRx.get(API_GET_WAREHOUSE_NO, errorCatcher, errorHandle, filter)
+//运输任务-删除
+export const deltran = appRx.post(API_POST_TRAN_DEL, errorCatcher, errorHandle, filter)
+//运输任务-查看
+export const examinetran = appRx.get(API_GET_TRAN_EXAMINE, errorCatcher, errorHandle, filter)
+//运输任务-编辑
+export const edittran = appRx.post(API_GET_TRAN_EDIT, errorCatcher, errorHandle, filter)

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

@@ -4,8 +4,6 @@ import { appRx } from '../defalutConfig/indexRx'
 import {
     API_GET_TRAN_DRIVERINFO,
     API_POST_TRAN_DRIVERINFOADD,
-    API_GET_TRAN_LIST,
-    API_POST_TRAN_ADD,
     API_GET_DRIVERINFO_GETDRIVER,
     API_POST_DELETE_DRIVER,
     API_POST_DISABLE_DRIVER,
@@ -17,15 +15,11 @@ import {
     API_GET_PRAAMETER,
     API_POST_TRAN_LOOK,
     API_GET_AUTOMOBILE_TRAN_LIST
-} from '@/api/V2/transport'
+} from '@/api/V2/taskspost'
 // 司机列表
 export const selectDriver = appRx.get(API_GET_TRAN_DRIVERINFO, errorCatcher, errorHandle, filter)
 // 添加司机信息
 export const addDriver = appRx.post(API_POST_TRAN_DRIVERINFOADD, errorCatcher, errorHandle, filter)
-//运输任务列表
-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 lookDriver = appRx.get(API_GET_DRIVERINFO_GETDRIVER, errorCatcher, errorHandle, filter)
 // 司机管理-删除

+ 125 - 590
src/views/taskManagement/tranManagementLook.vue

@@ -24,201 +24,128 @@
     <ws-form ref="deptBudgetList" :model="deptBudgetList" :rules="rules">
       <div class="basicInformation">
         <ws-info-table>
-         <!--任务编号-->
-          <ws-form-item label="任务编号" span="1" prop="grossWeight">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入任务编号"
-              maxlength="20"
-              size="small"
-            />
+          <!--任务编号-->
+          <ws-form-item label="任务编号" span="1" prop="taskNo">
+            {{ deptBudgetList.taskNo }}
           </ws-form-item>
           <!--合同编号(选填)-->
-          <ws-form-item label="合同编号(选填)" span="1" prop="grossWeight">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入合同编号"
-              maxlength="20"
-              size="small"
-            />
+          <ws-form-item label="合同编号(选填)" span="1" prop="contractNo">
+            {{ deptBudgetList.contractNo }}
           </ws-form-item>
           <!--货名-->
-          <ws-form-item
-            label="货名"
-            span="1"
-            prop="tare"
-            class="readonly"
-          >
-            <ws-input
-              @input="tarechange"
-              v-model="deptBudgetList.tare"
-              placeholder="请输入货名"
-              maxlength="100"
-              size="small"
-            />
+          <ws-form-item label="货名" span="1" prop="goodsName" class="readonly">
+            {{ deptBudgetList.goodsName }}
           </ws-form-item>
           <!-- 重量(吨) -->
-          <ws-form-item label="重量(吨)" span="1" prop="grossWeight">
-            <ws-input
-              @input="grossWeightchange"
-              v-model="deptBudgetList.grossWeight"
-              placeholder="请输入重量(吨)"
-              maxlength="20"
-              size="small"
-            />
-            
+          <ws-form-item label="重量(吨)" span="1" prop="weight">
+            {{ deptBudgetList.weight }}
           </ws-form-item>
-
         </ws-info-table>
         <div class="inspector">
-            <!-- 始发地 -->
-              <ws-form-item label="始发地" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="deptBudgetList.netWeight"
-              placeholder="请输入始发地"
-              maxlength="120"
-              size="small"
-            />
+          <!-- 始发地 -->
+          <ws-form-item
+            class="address"
+            label="始发地"
+            span="1"
+            prop="netWeight"
+          >
+            {{ deptBudgetList.startPrivate }}/{{ deptBudgetList.startCity
+            }}{{ deptBudgetList.startArea
+            }}{{ deptBudgetList.startDetailedAddress }}
           </ws-form-item>
           <!--终到地-->
-          <ws-form-item label="终到地" span="1" prop="netWeight">
-            <ws-input
-              readonly="readonly"
-              v-model="deptBudgetList.netWeight"
-              placeholder="请输入始发地"
-              maxlength="120"
-              size="small"
-            />
-            </ws-form-item>
-            <span class="zi">运输方式</span>
-           <el-checkbox-group v-model="checkList"> 
-          <el-checkbox label="汽运"></el-checkbox>
-          <el-checkbox label="火运"></el-checkbox>
-          <el-checkbox label="船运"></el-checkbox>
-        </el-checkbox-group>
-          </div>
-      </div>
-      <div class="driver">运输阶段-{{index + 1}}</div>
-     <div class="neifor">
-        <ws-info-table class="el-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-info-table>
-      <!-- </div>
-      <div class="nei"> -->
-         <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="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入发货人电话"
-              maxlength="120"
-              size="small"
-            />
+          <ws-form-item
+            class="address"
+            label="终到地"
+            span="1"
+            prop="netWeight"
+          >
+            {{ deptBudgetList.endPrivate }}/{{ deptBudgetList.endCity
+            }}{{ deptBudgetList.endArea
+            }}{{ deptBudgetList.endDetailedAddress }}
           </ws-form-item>
-        </ws-info-table>
+          <span class="zi">运输方式</span>
+          <el-checkbox-group v-model="checkList">
+            <el-checkbox disabled label="汽运"></el-checkbox>
+            <el-checkbox disabled label="火运"></el-checkbox>
+            <el-checkbox disabled label="船运"></el-checkbox>
+          </el-checkbox-group>
+        </div>
       </div>
-      <div class="nei">
-         <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="bulkDensity">
-            <ws-input
-              v-model="deptBudgetList.warehouseInOutDetail.bulkDensity"
-              placeholder="请输入收货人电话"
-              maxlength="120"
-              size="small"
-            />
-          </ws-form-item>
-        </ws-info-table>
+      <div v-for="(item, index) in deptBudgetList.tranProcessInfoList">
+        <div class="driver">运输阶段-{{ item.processNo }}{{ index + 1 }}</div>
+        <div class="neifor">
+          <ws-info-table class="el-table">
+            <!--运输方式-->
+            <ws-form-item label="运输方式" span="1" prop="tranType">
+              {{ item.tranType }}
+            </ws-form-item>
+            <!--发货日期-->
+            <ws-form-item label="发货日期" span="1" prop="deliveryDateStart">
+              {{ item.deliveryDateStart }}
+            </ws-form-item>
+            <!--最晚到货日期-->
+            <ws-form-item label="最晚到货日期" span="1" prop="deliveryDateEnd">
+              {{ item.deliveryDateEnd }}
+            </ws-form-item>
+          </ws-info-table>
+          <!-- </div>
+      <div class="nei"> -->
+          <ws-info-table>
+            <!--发货日期-->
+            <ws-form-item label="发货地区" span="1" prop="waterContent">
+              {{ item.sendPrivate }}/{{ item.sendCity }}{{ item.sendArea }}
+            </ws-form-item>
+            <!--发货地详细地址-->
+            <ws-form-item
+              label="发货地详细地址"
+              span="1"
+              prop="sendDetailedAddress"
+            >
+              {{ item.sendDetailedAddress }}
+            </ws-form-item>
+            <!--发货人-->
+            <ws-form-item label="发货人" span="1" prop="sender">
+              {{ item.sender }}
+            </ws-form-item>
+            <!--发货人电话-->
+            <ws-form-item label="发货人电话" span="1" prop="senderPhone">
+              {{ item.senderPhone }}
+            </ws-form-item>
+          </ws-info-table>
+        </div>
+        <div class="nei">
+          <ws-info-table>
+            <!--发货日期-->
+            <ws-form-item label="收货地区" span="1" prop="waterContent">
+              {{ item.receivePrivate }}/{{ item.receiveCity
+              }}{{ item.receiveArea }}
+            </ws-form-item>
+            <!--发货地详细地址-->
+            <ws-form-item
+              label="收货地详细地址"
+              span="1"
+              prop="receiveDetailedAddress"
+            >
+              {{ item.receiveDetailedAddress }}
+            </ws-form-item>
+            <!--发货人-->
+            <ws-form-item label="收货人" span="1" prop="receiver">
+              {{ item.receiver }}
+            </ws-form-item>
+            <!--发货人电话-->
+            <ws-form-item label="收货人电话" span="1" prop="receiverPhone">
+              {{ item.receiverPhone }}
+            </ws-form-item>
+          </ws-info-table>
+        </div>
       </div>
       <div style="text-align: right; padding: 10px">
         <el-button
           class="bg-bottom-up"
           type="primary"
           size="small"
-          @click="submit()"
+          @click="revert()"
           >关闭</el-button
         >
       </div>
@@ -226,7 +153,7 @@
   </div>
 </template>
 <script>
-import { lookTranTask ,gain } from '@/model/transport/index'
+import { examinetran } from '@/model/tasksport/index'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
 // import { dayjs, fmoney, EventBus } from 'base-core-lib'
@@ -248,7 +175,7 @@ export default {
   data() {
     return {
       //多选按钮
-      checkList:[],
+      checkList: [],
       //弹出框
       dialogViewSpareMoney: false,
       dialogApproveFormVisible: false,
@@ -296,9 +223,7 @@ export default {
         month: dayjs().format('MM'),
       },
       contractList: [],
-      deptBudgetList: {
-        warehouseInOutDetail: {},
-      },
+      deptBudgetList: {},
       historyList: [],
 
       pickerBeginDateBefore: {
@@ -309,415 +234,22 @@ export default {
       accessoryTFs: false,
     }
   },
-  mounted() {
-    this.deptBudgetList.baseId = this.$route.query.baseId
-    this.deptBudgetList.positionId = this.$route.query.positionId
-    this.deptBudgetList.warehouseName = this.$route.query.warehouseName
-    this.deptBudgetList.binNumber = this.$route.query.binNumber
-    this.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,)
+    this.getList()
   },
   methods: {
-
     //返回按钮
     revert() {
       this.$router.push({ path: 'tranManagementTransport' })
     },
-    //提交按钮
-    submit() {
-      if (!this.deptBudgetList.goodsName) {
-        this.$message({
-          message: '货名不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if(!this.deptBudgetList.grossWeight){
-         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){
-         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.agent){
-         this.$message({
-          message: '经办人不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.agent.length < 2 ||
-        this.deptBudgetList.agent.length > 10
-      ) {
-        this.$message({
-          message: '经办人输入有误',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
-          message: '车牌号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.deptBudgetList.carNo.length > 7) {
-        this.$message({
-          message: '车牌号输入错误,请输入7个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
-          message: '合同编号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.contractNo.length < 6 ||
-        this.deptBudgetList.contractNo.length > 20
-      ) {
-        this.$message({
-          message: '合同编号长度不符合要求,请输入6-20个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-
-      
-      if(this.deptBudgetList.netWeight > this.$route.query.capacity){
-        this.$message({
-          message: '入库量大于该仓库容量!',
-          type: 'warning',
-        })
-        return
-      }
-      this.$confirm(`确定提交入库信息`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .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){
-         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){
-         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.agent){
-         this.$message({
-          message: '经办人不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.agent.length < 2 ||
-        this.deptBudgetList.agent.length > 10
-      ) {
-        this.$message({
-          message: '经办人输入有误',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.carNo){
-         this.$message({
-          message: '车牌号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (this.deptBudgetList.carNo.length > 7) {
-        this.$message({
-          message: '车牌号输入错误,请输入7个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-       if(!this.deptBudgetList.contractNo){
-         this.$message({
-          message: '合同编号不能为空',
-          type: 'warning',
-        })
-        return
-      }
-      if (
-        this.deptBudgetList.contractNo.length < 6 ||
-        this.deptBudgetList.contractNo.length > 20
-      ) {
-        this.$message({
-          message: '合同编号长度不符合要求,请输入6-20个字符之内',
-          type: 'warning',
-        })
-        return
-      }
-       if(this.deptBudgetList.netWeight > this.$route.query.capacity){
-        this.$message({
-          message: '入库量大于该仓库容量!',
-          type: 'warning',
-        })
-        return
-      }
-      this.$confirm(`暂存后可在待完成页面查看,确定暂存`, {
-        cancelButtonText: '取消',
-        confirmButtonText: '确定',
-        type: 'warning',
-      })
-        .then(() => {
-          this.$refs.deptBudgetList.validate((valid) => {
-            if (valid) {
-              this.deptBudgetList.compId = sessionStorage.getItem(
-                'ws-pf_compId'
-              )
-              this.deptBudgetList.inOutFlag = 2
-              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
-            }
-          })
-        })
-        .catch(() => {
-          return false
-        })
-    },
-    tarechange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
-        )
-      }
-    },
-    grossWeightchange(e) {
-      if (this.deptBudgetList.grossWeight && this.deptBudgetList.tare) {
-        this.deptBudgetList.netWeight = Number(
-          this.deptBudgetList.grossWeight - this.deptBudgetList.tare
-        )
-      }
-    },
-    selectgoodsName(e) {
-      for (var i = 0; i < this.goodnameList.length; i++) {
-        if (this.goodnameList[i].constValue == e) {
-          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
-        }
-      }
-    },
-    selectpackingMethod(e) {
-      for (var i = 0; i < this.packtypeList.length; i++) {
-        if (this.packtypeList[i].constValue == e) {
-          this.deptBudgetList.packingMethodKey = this.packtypeList[i].constKey
-        }
-      }
-    },
-    selectstorageType(e) {
-      for (var i = 0; i < this.storageType.length; i++) {
-        if (this.storageType[i].constValue == e) {
-          this.deptBudgetList.inOutTypeKey = this.storageType[i].constKey
-        }
-      }
-    },
-    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() {
-      // 货名
-      pullDown({ constId: 'CON2' })
-        .toPromise()
-        .then((response) => {
-          this.goodnameList = response
-        })
-      // 品级
-      pullDown({ constId: 'CON3' })
-        .toPromise()
-        .then((response) => {
-          this.gradeList = response
-        })
-      // 类型
-      pullDown({ constId: 'CON5' })
+      examinetran({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
-          this.storageType = response
+          this.checkList = response.tranType.split(',')
+          this.deptBudgetList = response
         })
     },
-    selecttaskType(e) {
-      for (var i = 0; i < this.taskTypeList.length; i++) {
-        if (this.taskTypeList[i].value == e) {
-          this.searchType = this.taskTypeList[i].type
-        }
-      }
-    },
-    fujian(row) {
-      if (
-        row.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
-        EventBus.$emit(
-          'warning',
-          this.$t('system.noticeCircular.NoInformation')
-        )
-      } else {
-        this.accessoryTFs = true
-      }
-      this.appendixIdss = row.receiveAttachmentPath
-    },
-    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
-    //     })
-    // },
-    // deletecontract(){},
-    //删除
     approve() {},
     listQuery() {},
   },
@@ -774,6 +306,9 @@ export default {
   height: 2000px;
   margin: 0 auto;
 }
+/deep/.address.el-form-item {
+  width: 100%;
+}
 /deep/.el-form-item__label {
   width: 160px;
 }
@@ -798,14 +333,14 @@ export default {
 }
 //仓位
 
-.position{
-background: #AFB5CB;
-border-radius: 2px;
-font-size: 12px;
-color: #FFFFFF;
-line-height: 20px;
-display: inline-grid;
-padding: 2px 4px;
+.position {
+  background: #afb5cb;
+  border-radius: 2px;
+  font-size: 12px;
+  color: #ffffff;
+  line-height: 20px;
+  display: inline-grid;
+  padding: 2px 4px;
 }
 // .position {
 //   width: 52px;
@@ -865,22 +400,22 @@ padding: 2px 4px;
 // /deep/.neifor .el-input--small .el-input__inner{
 //   width: 100%;
 // }
-.inspector  {
+.inspector {
   text-align: left;
   margin-left: -350px;
   // margin-top: 50px;
   width: 700px;
   margin-left: -100px;
 }
-.ws-info-table .el-form-item{
+.ws-info-table .el-form-item {
   width: 300px;
 }
 //多选
-.el-checkbox-group{
+.el-checkbox-group {
   margin-left: 160px;
   margin-top: -20px;
 }
-.zi{
+.zi {
   margin-left: 100px;
 }
 //底部表格

+ 56 - 125
src/views/taskManagement/tranManagementTransport.vue

@@ -8,11 +8,11 @@
         >
       </template>
       <template slot="left">
-        <ws-button class="but" type="primary" @click="handle()">
+        <ws-button class="but" type="primary" @click="handlestatus(1)">
           执行中</ws-button
         >
-        <ws-button class="but" @click="handleLook()">已完成</ws-button>
-        <ws-button class="but" @click="handleEdit()">全部任务</ws-button>
+        <ws-button class="but" @click="handlestatus(2)">已完成</ws-button>
+        <ws-button class="but" @click="handlestatus('')">全部任务</ws-button>
       </template>
       <template slot="left">
         <ws-input
@@ -61,76 +61,43 @@
     <div>
       <el-table
         class="wenzi"
-        :data="gainList"
+        :data="gainList.records"
         style="width: 100%; margin-top: 20px"
         height="780"
       >
-        <el-table-column prop="index" label="序号" width="80">
+        <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=" taskNo" label="运输任务编号" width="80">
+        <el-table-column prop="taskNo" label="运输任务编号" width="80">
         </el-table-column>
-        <el-table-column prop=" contractNo" label="合同编号">
+        <el-table-column prop="contractNo" label="合同编号"> </el-table-column>
+        <el-table-column prop=" weight" class="table_td" label="货物(吨数)">
           <template slot-scope="scope">
-            <div
-              v-if="scope.row.capacity != 'null' && scope.row.capacity != null"
-            >
-              {{ scope.row.capacity }}
-            </div>
+            {{ scope.row.goodsName }}({{ scope.row.weight }})
           </template>
         </el-table-column>
-        <el-table-column prop=" weight" 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 prop="tranType" class="table_td" label="运输方式">
         </el-table-column>
-        <el-table-column prop=" start" 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 prop="" class="table_td" label="起点">
+          <template slot-scope="scope">
+            {{ scope.row.startPrivate }}{{ scope.row.startCity
+            }}{{ scope.row.startArea }}{{ scope.row.startDetailedAddress }}
+          </template>
         </el-table-column>
         <el-table-column
           prop="currentTransferAddress"
           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="end" class="table_td" label="终点">
-          <!-- <template slot-scope="scope"> -->
-          <!-- <div
-              style="height: 24px"
-              v-for="(item, i) in scope.row.warehouseNumViewList"
-            >
-              {{ item.storage }}
-            </div> -->
-          <!-- </template> -->
+          <template slot-scope="scope">
+            {{ scope.row.endPrivate }}{{ scope.row.endCity
+            }}{{ scope.row.endArea }}{{ scope.row.endDetailedAddress }}
+          </template>
         </el-table-column>
 
         <el-table-column prop="status" label="状态">
@@ -187,47 +154,21 @@
         </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')}`
-              "
-            >
+            <ws-button class="completed" @click="nocomplete(scope.row)">
               查看
             </ws-button>
-            <ws-button
-              class="putstorage"
-              @click="warehousing(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
-            >
+            <ws-button class="putstorage" @click="delivery(scope.row)">
               编辑
             </ws-button>
-            <ws-button
-              class="deliverystorage"
-              @click="delivery(scope.row)"
-              v-hasPermission="
-                `${$permission('PERMISSIONS.PURSPAPPLINFO_CREATEINSTORE')}`
-              "
-            >
-              删除
-            </ws-button>
+            <ws-button @click="deleteclick(scope.row)"> 删除 </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 { gain } from '@/model/transport/index'
+import { gain, deltran } from '@/model/tasksport/index'
 import { downloadFile } from '@/utils/batchDown'
 import Pagination from '@/components/Pagination'
 import WsUpload from '@/components/WsUpload'
@@ -297,6 +238,27 @@ export default {
       this.currentPage = 1
       this.getList()
     },
+    deleteclick(row) {
+      //cancelButtonClass: "btn-custom-cancel"
+      this.$confirm(`运输任务删除后不可恢复,是否确定删除?`, {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning',
+      })
+        .then(() => {
+          console.log(row)
+          deltran({
+            id: row.id,
+          })
+            .toPromise()
+            .then((response) => {
+              this.getList()
+            })
+        })
+        .catch(() => {
+          return false
+        })
+    },
     getList() {
       gain({
         compId: sessionStorage.getItem('ws-pf_compId'),
@@ -310,16 +272,16 @@ export default {
           this.gainList = response
         })
     },
+    handlestatus(status) {
+      this.searchType = status
+      this.getList()
+    },
     //编辑
     delivery(item) {
       this.$router.push({
         path: 'tranManagementTransportEdit',
         query: {
-          baseId: item.warehouseId,
-          positionId: item.binNumberId,
-          warehouseName: item.warehouseName,
-          binNumber: item.binNumber,
-          capacity: item.capacity,
+          id: item.id,
         },
       })
     },
@@ -375,42 +337,11 @@ export default {
     nocomplete(row) {
       this.$router.push({
         path: 'tranManagementLook',
-        // query: {
-        //   baseId: row.warehouseId,
-        //   positionId: row.binNumberId,
-        //   warehouseName: row.warehouseName,
-        //   binNumber: row.binNumber,
-        // },
+        query: {
+          id: row.id,
+        },
       })
     },
-    //记录
-    // 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: 'tranManagementLook' })

+ 269 - 153
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -55,13 +55,12 @@
             v-model="deptBudgetList.contractNo"
             placeholder="请输入合同编号"
             class="typeselect"
-            @change="selectcontractNo"
           >
             <el-option
               v-for="item in contractNoList"
               :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+              :label="item.contractNo"
+              :value="item.contractNo"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -82,7 +81,6 @@
         </el-form-item>
         <el-form-item label="重量(吨)" span="1" prop="weight">
           <el-input
-            @input="grossWeightchange"
             v-model="deptBudgetList.weight"
             placeholder="请输入重量"
             maxlength="20"
@@ -99,16 +97,15 @@
             >临时库发货</el-radio
           >
           <el-select
-            v-model="deptBudgetList.contractNo"
-            placeholder="货名"
+            v-model="deptBudgetList.sendWarehouse"
+            placeholder="选择仓库"
             class="typeselect"
-            @change="selectstorageType"
           >
             <el-option
-              v-for="item in storageType"
+              v-for="item in warehouseList"
               :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+              :label="item.warehouseName"
+              :value="item.warehouseName"
             ></el-option>
           </el-select>
         </div>
@@ -130,7 +127,7 @@
           class="bg-right start-address"
         >
           <el-input
-            v-model="deptBudgetList.driverName"
+            v-model="deptBudgetList.startDetailedAddress"
             placeholder="请输入始发地详细地址"
             maxlength="20"
             size="small"
@@ -143,16 +140,16 @@
           class="start-address"
         >
           <el-select
-            v-model="deptBudgetList.contractNo"
-            placeholder="货名"
+            v-model="deptBudgetList.receiveWarehouse"
+            :disabled="warehouse"
+            placeholder="收货苦点"
             class="typeselect"
-            @change="selectstorageType"
           >
             <el-option
-              v-for="item in storageType"
+              v-for="item in warehouseList"
               :key="item.constKey"
-              :label="item.constValue"
-              :value="item.constValue"
+              :label="item.warehouseName"
+              :value="item.warehouseName"
             ></el-option>
           </el-select>
         </el-form-item>
@@ -173,14 +170,14 @@
           />
         </el-form-item>
         <el-form-item
-          label="始发地详细地址"
+          label="终到地详细地址"
           span="1"
-          prop="startDetailedAddress"
+          prop="endDetailedAddress"
           class="bg-right start-address"
         >
           <el-input
-            v-model="deptBudgetList.driverName"
-            placeholder="请输入始发地详细地址"
+            v-model="deptBudgetList.endDetailedAddress"
+            placeholder="请输入终到地详细地址"
             maxlength="20"
             size="small"
           ></el-input>
@@ -198,11 +195,10 @@
       <div
         style="width: 100%"
         class="position"
-        v-for="(item, index) in freightspace"
+        v-for="(item, index) in deptBudgetList.tranProcessInfoList"
       >
         <div class="driver">
-          运输阶段-{{ index + 1 }}
-          {{ deptBudgetList.taskNo }}
+          运输阶段{{ index + 1 }} {{ item.processNo }}
           <img
             width="22"
             height="22"
@@ -223,13 +219,17 @@
         <ws-info-table>
           <el-form-item label="运输方式" span="1" prop="waterContent">
             <el-select
-              v-model="deptBudgetList.contractNo"
-              placeholder="货名"
+              v-model="item.tranType"
+              placeholder="运输方式"
               class="typeselect"
-              @change="selectstorageType"
+              @change="
+                (val) => {
+                  selecttaskwayList(val, index)
+                }
+              "
             >
               <el-option
-                v-for="item in storageType"
+                v-for="item in taskwayList"
                 :key="item.constKey"
                 :label="item.constValue"
                 :value="item.constValue"
@@ -237,58 +237,69 @@
             </el-select>
           </el-form-item>
           <el-form-item label="发货日期" span="1" prop="impurity">
-            <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
-              maxlength="20"
-              size="small"
-            ></el-input>
+            <ws-date-picker
+              v-model="item.deliveryDateStart"
+              type="date"
+              placeholder="请选择发货日期"
+              value-format="yyyy-MM-dd"
+            />
           </el-form-item>
           <el-form-item label="最晚到货日期" span="1" prop="bulkDensity">
+            <ws-date-picker
+              v-model="item.deliveryDateEnd"
+              type="date"
+              placeholder="请选择最晚到货日期"
+              value-format="yyyy-MM-dd"
+            />
+          </el-form-item>
+          <el-form-item
+            label="本阶段运输重量(吨)"
+            span="1"
+            prop="bulkDensity"
+          >
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
-              maxlength="20"
+              v-model="item.weight"
+              placeholder="请输入本阶段运输重量"
               size="small"
             ></el-input>
           </el-form-item>
         </ws-info-table>
         <ws-info-table>
           <el-form-item label="发货地区" span="1" prop="waterContent">
-            <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="item.selectedOptions"
+              clearable
+              size="large"
+              placeholder="请选择发货地区"
+              style="width: 200%"
+              @change="
+                (val) => {
+                  handleChange3(val, index)
+                }
+              "
+            />
           </el-form-item>
           <el-form-item label="发货地详细地址" span="1" prop="impurity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入发地详细地址"
+              v-model="item.sendDetailedAddress"
+              placeholder="请输入发地详细地址"
               maxlength="20"
               size="small"
             ></el-input>
           </el-form-item>
           <el-form-item label="发货人" span="1" prop="bulkDensity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.sender"
+              placeholder="请输入发货人"
               maxlength="20"
               size="small"
             ></el-input>
           </el-form-item>
           <el-form-item label="发货人电话" span="1" prop="bulkDensity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.senderPhone"
+              placeholder="请输入发货人电话"
               maxlength="20"
               size="small"
             ></el-input>
@@ -296,40 +307,40 @@
         </ws-info-table>
         <ws-info-table>
           <el-form-item label="收货地区" span="1" prop="bulkDensity">
-            <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="item.selectedOptions1"
+              clearable
+              size="large"
+              placeholder="请选择收货地区"
+              style="width: 200%"
+              @change="
+                (val) => {
+                  handleChange4(val, index)
+                }
+              "
+            />
           </el-form-item>
           <el-form-item label="收货地详细地址" span="1" prop="impurity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.receiveDetailedAddress"
+              placeholder="请输入收货地详细地址"
               maxlength="20"
               size="small"
             ></el-input>
           </el-form-item>
           <el-form-item label="收货人" span="1" prop="bulkDensity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.receiver"
+              placeholder="请输入收货人"
               maxlength="20"
               size="small"
             ></el-input>
           </el-form-item>
           <el-form-item label="收货人电话" span="1" prop="bulkDensity">
             <el-input
-              v-model="deptBudgetList.driverName"
-              placeholder="请输入始发地详细地址"
+              v-model="item.receiverPhone"
+              placeholder="请输入收货人电话"
               maxlength="20"
               size="small"
             ></el-input>
@@ -352,7 +363,7 @@
 <script>
 import { packList } from '@/model/contarct/index'
 import { regionData, CodeToText, TextToCode } from 'element-china-area-data'
-import { addTranTask, getwarehousename } from '@/model/tasksport/index'
+import { addtrantask, getwarehousename, xialaNo } from '@/model/tasksport/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
 export default {
@@ -379,7 +390,30 @@ export default {
         goodsName: '玉米',
         goodsNameKey: 1,
         warehouseType: '1',
-        driverPayeeInfo: {},
+        tranProcessInfoList: [
+          {
+            processNo: '',
+            tranType: '汽运',
+            tranTypeKey: '1',
+            deliveryDateStart: '',
+            deliveryDateEnd: '',
+            weight: '13',
+            selectedOptions: [],
+            selectedOptions1: [],
+            sendPrivate: '',
+            sendCity: '',
+            sendArea: '',
+            receivePrivate: '',
+            receiveCity: '',
+            receiveArea: '',
+            sendDetailedAddress: '',
+            receiveDetailedAddress: '',
+            sender: '',
+            receiver: '',
+            senderPhone: '',
+            receiverPhone: '',
+          },
+        ],
       },
       radio: '1',
       options_: regionData,
@@ -387,32 +421,21 @@ export default {
       zoom: 7,
       selectedOptions: [],
       selectedOptions1: [],
-      center: [116.244694, 39.517344],
       window: '',
       district: null,
       goodnameList: [],
       listDate: { country: '中国', level: 'country', city: '' },
       citylist: [],
       taskType: [],
+      taskwayList: [],
       contractNoList: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
       mainReportAdd: {},
       appendixIdsAdd: '',
-
+      warehouseList: [],
       size: 10,
       value1: '',
       unitList: [],
-      freightspace: [
-        {
-          waterContent: '',
-          taskType: '高栏',
-          goodsName: '1',
-          weight: '13',
-          carLengthKey: '1',
-          carLoad: '',
-          yearManufacture: '',
-        },
-      ],
       name: '',
       age: '',
     }
@@ -421,7 +444,19 @@ export default {
     this.loaddata()
     this.showType = this.isShow
   },
-  computed: {},
+  computed: {
+    warehouse: function () {
+      if (
+        this.deptBudgetList.taskType == '销售出库' ||
+        this.deptBudgetList.taskType == '贸易服务出库' ||
+        this.deptBudgetList.taskType == '暂存出库'
+      ) {
+        return true
+      } else {
+        return false
+      }
+    },
+  },
   methods: {
     // 获取当前年月日
     getdate() {
@@ -460,18 +495,33 @@ export default {
         .then((response) => {
           this.goodnameList = response
         })
+      // 任务类型
       packList({ constId: 'TRAN3' })
         .toPromise()
         .then((response) => {
           this.taskType = response
         })
+      // 运输方式
+      packList({ constId: 'TRAN6' })
+        .toPromise()
+        .then((response) => {
+          this.taskwayList = response
+        })
+
       getwarehousename({
         compId: this.compId,
         warehouseType: this.deptBudgetList.warehouseType,
       })
         .toPromise()
         .then((response) => {
-          this.taskType = response
+          this.warehouseList = response
+        })
+      xialaNo({
+        compId: this.compId,
+      })
+        .toPromise()
+        .then((response) => {
+          this.contractNoList = response
         })
       // // 车型
       // packList({ constId: 'TRAN1' })
@@ -495,85 +545,151 @@ export default {
       this.dialogViewSpareMoney = false
     },
     add() {
-      this.freightspace.push({
-        carNumber: '',
-        carModel: '高栏',
-        carModelKey: '1',
-        carLength: '13',
-        carLengthKey: '1',
-        carLoad: '',
-        yearManufacture: '',
+      this.deptBudgetList.tranProcessInfoList.push({
+        tranType: '汽运',
+        tranTypeKey: '1',
+        deliveryDateStart: '',
+        deliveryDateEnd: '',
+        weight: '13',
+        selectedOptions: [],
+        selectedOptions1: [],
+        sendPrivate: '',
+        sendCity: '',
+        sendArea: '',
+        receivePrivate: '',
+        receiveCity: '',
+        receiveArea: '',
+        sendDetailedAddress: '',
+        receiveDetailedAddress: '',
+        sender: '',
+        receiver: '',
+        senderPhone: '',
+        receiverPhone: '',
       })
     },
     del(index) {
-      if (this.freightspace.length > 1) {
-        this.freightspace.splice(index, 1)
+      if (this.deptBudgetList.tranProcessInfoList.length > 1) {
+        this.deptBudgetList.tranProcessInfoList.splice(index, 1)
       }
     },
     handleChange(value) {
       this.selectedOptions = value
+      this.deptBudgetList.startPrivate = CodeToText[value[0]]
+      this.deptBudgetList.startCity = CodeToText[value[1]]
+      this.deptBudgetList.startArea = CodeToText[value[2]]
     },
     handleChange1(value) {
       this.selectedOptions1 = value
+      this.deptBudgetList.endPrivate = CodeToText[value[0]]
+      this.deptBudgetList.endCity = CodeToText[value[1]]
+      this.deptBudgetList.endArea = CodeToText[value[2]]
+    },
+    handleChange3(value, index) {
+      this.deptBudgetList.tranProcessInfoList[index].sendPrivate =
+        CodeToText[value[0]]
+      this.deptBudgetList.tranProcessInfoList[index].sendCity =
+        CodeToText[value[1]]
+      this.deptBudgetList.tranProcessInfoList[index].sendArea =
+        CodeToText[value[2]]
+    },
+    handleChange4(value, index) {
+      this.deptBudgetList.tranProcessInfoList[index].receivePrivate =
+        CodeToText[value[0]]
+      this.deptBudgetList.tranProcessInfoList[index].receiveCity =
+        CodeToText[value[1]]
+      this.deptBudgetList.tranProcessInfoList[index].receiveArea =
+        CodeToText[value[2]]
     },
     returnsales() {
       this.$router.push({ path: 'tranManagementTransport' })
     },
-  },
-  selecttaskType(e) {
-    for (var i = 0; i < this.taskType.length; i++) {
-      if (this.taskType[i].constValue == e) {
-        this.deptBudgetList.taskTypeKey = this.taskType[i].constKey
+    selecttaskType(e) {
+      for (var i = 0; i < this.taskType.length; i++) {
+        if (this.taskType[i].constValue == e) {
+          this.deptBudgetList.taskTypeKey = this.taskType[i].constKey
+        }
       }
-    }
-  },
-  selectcontractNo(e) {
-    for (var i = 0; i < this.contractNoList.length; i++) {
-      if (this.contractNoList[i].constValue == e) {
-        this.deptBudgetList.contractNoKey = this.contractNoList[i].constKey
+    },
+    selecttaskwayList(e, index) {
+      for (var i = 0; i < this.taskwayList.length; i++) {
+        if (this.taskwayList[i].constValue == e) {
+          this.deptBudgetList.tranProcessInfoList[index].tranTypeKey =
+            this.taskwayList[i].constKey
+        }
       }
-    }
-  },
-  selectgoodsname(e) {
-    for (var i = 0; i < this.goodnameList.length; i++) {
-      if (this.goodnameList[i].constValue == e) {
-        this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+    },
+    selectgoodsname(e) {
+      for (var i = 0; i < this.goodnameList.length; i++) {
+        if (this.goodnameList[i].constValue == e) {
+          this.deptBudgetList.goodsNameKey = this.goodnameList[i].constKey
+        }
       }
-    }
-  },
-  onChange(files) {
-    this.fileNum = files
-    this.$refs.upload.handleSaveBill().then((res) => {
-      console.log(files)
-    })
-  },
-
-  submit() {
-    console.log(this.freightspace)
+    },
+    onChange(files) {
+      this.fileNum = files
+      this.$refs.upload.handleSaveBill().then((res) => {
+        console.log(files)
+      })
+    },
 
-    this.$refs.deptBudgetList.validate((valid) => {
-      if (valid) {
-        this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
-        // this.deptBudgetList.residentCityProvincial =
-        //   CodeToText[this.selectedOptions[0]]
-        // this.deptBudgetList.residentCityMunicipal =
-        //   CodeToText[this.selectedOptions[1]]
-        // this.deptBudgetList.driverCarInfoList = this.freightspace
-        // this.deptBudgetList.driverPayeeInfoList = this.freightspace1
-        addTranTask(this.deptBudgetList)
-          .toPromise()
-          .then((response) => {
-            this.$message.success('添加成功')
-            this.$router.push({ path: 'tranManagementTransport' })
-          })
-      } else {
-        EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
-        return false
-      }
-    })
-  },
-  resetForm(deptBudgetList) {
-    this.$refs[deptBudgetList].resetFields()
+    submit() {
+      this.$refs.deptBudgetList.validate((valid) => {
+        if (valid) {
+          for (
+            var i = 0;
+            i < this.deptBudgetList.tranProcessInfoList.length;
+            i++
+          ) {
+            this.deptBudgetList.tranProcessInfoList[i].processNo =
+              this.deptBudgetList.taskNo + (i + 1)
+          }
+          this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
+          this.deptBudgetList.tranType = this.checkList.toString()
+          addtrantask(this.deptBudgetList)
+            .toPromise()
+            .then((response) => {
+              this.$message.success('添加成功')
+              this.deptBudgetList = {
+                taskNo: '',
+                totalStorage: 0,
+                goodsName: '玉米',
+                goodsNameKey: 1,
+                warehouseType: '1',
+                tranProcessInfoList: [
+                  {
+                    processNo: '',
+                    tranType: '汽运',
+                    deliveryDateStart: '',
+                    deliveryDateEnd: '',
+                    weight: '13',
+                    selectedOptions: [],
+                    selectedOptions1: [],
+                    sendPrivate: '',
+                    sendCity: '',
+                    sendArea: '',
+                    receivePrivate: '',
+                    receiveCity: '',
+                    receiveArea: '',
+                    sendDetailedAddress: '',
+                    receiveDetailedAddress: '',
+                    sender: '',
+                    receiver: '',
+                    senderPhone: '',
+                    receiverPhone: '',
+                  },
+                ],
+              }
+              this.$router.push({ path: 'tranManagementTransport' })
+            })
+        } else {
+          EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
+          return false
+        }
+      })
+    },
+    resetForm(deptBudgetList) {
+      this.$refs[deptBudgetList].resetFields()
+    },
   },
 }
 </script>

File diff suppressed because it is too large
+ 475 - 431
src/views/taskManagement/tranManagementTransportEdit.vue


+ 1 - 1
vue.config.js

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

Some files were not shown because too many files changed in this diff