瀏覽代碼

前端gjy

gjy 4 年之前
父節點
當前提交
4a6b64f2ba

+ 6 - 0
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -199,6 +199,12 @@
       >
         <div class="driver">
           运输阶段{{ index + 1 }} {{ item.processNo }}
+          <el-checkbox
+            v-if="index == deptBudgetList.tranProcessInfoList.length - 1"
+            v-model="item.endFlag"
+            label="1"
+            >最终阶段</el-checkbox
+          >
           <img
             width="22"
             height="22"

+ 12 - 7
src/views/tranManagement/tranManagementDriver.vue

@@ -301,7 +301,14 @@
       @on-cancel="handleClose"
     >
       <p>查看附件</p>
-      <ws-upload
+      <div
+        style="display: inline-block; margin: 5px"
+        v-for="item in appendixIdss"
+      >
+        <img width="100" height="100" :src="item" alt="" />
+      </div>
+
+      <!-- <ws-upload
         ref="upload"
         table-name="maintain_work_order"
         oss-key="mainPlan"
@@ -312,7 +319,7 @@
         :size-limit="size"
         @uploadSuccess="uploadSuccess"
         accept=".jpg, .jpeg, .png, .pdf, .doc, .zip, .rar"
-      />
+      /> -->
     </WinseaContentModal>
     <!-- <WinseaContentModal
       v-model="accessoryTFs"
@@ -412,6 +419,7 @@ export default {
           return time.getTime() > Date.now()
         },
       },
+      appendixIdss: [],
       accessoryTFs: false,
     }
   },
@@ -610,10 +618,7 @@ export default {
       // this.selectedOptions = e
     },
     fujian(row) {
-      if (
-        row.receiveAttachmentPath === null ||
-        row.receiveAttachmentPath === ''
-      ) {
+      if (row.addressUrl === null || row.addressUrl === '') {
         EventBus.$emit(
           'warning',
           this.$t('system.noticeCircular.NoInformation')
@@ -621,7 +626,7 @@ export default {
       } else {
         this.accessoryTFs = true
       }
-      this.appendixIdss = row.receiveAttachmentPath
+      this.appendixIdss = row.addressUrlArray
     },
     handleExamine(row) {
       this.$router.push({

+ 154 - 20
src/views/tranManagement/tranManagementDriverAdd.vue

@@ -89,7 +89,7 @@
             />
           </ws-form-item>
         </ws-info-table>
-        {{ age }}岁
+        <span v-if="age">{{ age }}岁</span>
       </div>
     </ws-form>
 
@@ -144,19 +144,22 @@
               prop="carLength"
               class="forlist"
             >
-              <ws-select
+              <el-select
                 v-model="item.carLength"
                 placeholder=""
                 class="typeselect"
                 @change="selectcarLength"
+                filterable
+                allow-create
+                default-first-option
               >
-                <ws-option
+                <el-option
                   v-for="item in carLengthList"
                   :key="item.constKey"
                   :label="item.constValue"
                   :value="item.constValue"
                 />
-              </ws-select>
+              </el-select>
             </ws-form-item>
             <!--载重-->
             <ws-form-item label="载重" span="1" prop="carLoad" class="forlist">
@@ -523,6 +526,7 @@ import { packList } from '@/model/contarct/index'
 import { getidentity, getbank, addDriver } from '@/model/transport/index'
 import WsUpload from '@/components/WsUpload'
 import mapDrag from '@/components/mapdrag/mapdrag'
+import { dayjs, fmoney, EventBus } from 'base-core-lib'
 export default {
   name: 'viewSpareMoney',
   components: {
@@ -551,13 +555,9 @@ export default {
       carModelList: [],
       carLengthList: [],
       options_: provinceAndCityData,
-      heightData: '600px',
-      zoom: 7,
       selectedOptions: [],
-      center: [116.244694, 39.517344],
       window: '',
       district: null,
-      listDate: { country: '中国', level: 'country', city: '' },
       citylist: [],
       compId: sessionStorage.getItem('ws-pf_compId'),
       mainReportAdd: {},
@@ -635,10 +635,6 @@ export default {
           this.carLengthList = response
         })
     },
-    confirmPositioncity() {
-      this.listDate.level = 'city'
-      this.listDate.country = this.name
-    },
     uploadSuccessHandle(index, e, fileList) {
       console.log(index, e, fileList)
       const that = this
@@ -775,10 +771,127 @@ export default {
     },
 
     submit() {
+      if (!this.deptBudgetList.driverName) {
+        EventBus.$emit('error', '司机姓名不能为空')
+        return
+      }
+      if (
+        this.deptBudgetList.driverName.length < 2 ||
+        this.deptBudgetList.driverName.length > 10
+      ) {
+        EventBus.$emit('error', '司机姓名输入错误')
+        return
+      }
+      if (!this.deptBudgetList.driverPhone) {
+        EventBus.$emit('error', '司机手机不能为空')
+        return
+      }
+      if (this.deptBudgetList.driverPhone.length != 11) {
+        console.log(this.deptBudgetList.driverPhone.length)
+        EventBus.$emit('error', '司机手机号输入有误')
+        return
+      }
+      if (!this.deptBudgetList.numberCard) {
+        EventBus.$emit('error', '司机身份证不能为空')
+        return
+      }
+      if (this.deptBudgetList.numberCard.length != 18) {
+        EventBus.$emit('error', '司机身份证号输入错误')
+        return
+      }
+      for (var i = 0; i < this.freightspace.length; i++) {
+        if (this.freightspace[i].carNumber == '') {
+          EventBus.$emit('error', '车牌号不能为空')
+          return
+        }
+        if (this.freightspace[i].carNumber.length != 7) {
+          EventBus.$emit('error', '车牌号输入错误')
+          return
+        }
+        if (this.freightspace[i].carLoad == '') {
+          EventBus.$emit('error', '载重不能为空')
+          return
+        }
+        if (this.freightspace[i].carLength > 50) {
+          EventBus.$emit('error', '载重量输入错误')
+          return
+        }
+        if (this.freightspace[i].yearManufacture == '') {
+          EventBus.$emit('error', '出厂年份不能为空')
+          return
+        }
+        if (this.freightspace[i].yearManufacture.length != 4) {
+          EventBus.$emit('error', '出厂年份输入错误')
+          return
+        }
+      }
+      for (var i = 0; i < this.freightspace1.length; i++) {
+        if (this.freightspace1[i].bankCard == '') {
+          EventBus.$emit('error', '银行卡账号不能为空')
+          return
+        }
+        if (this.freightspace1[i].bankDeposit == '') {
+          EventBus.$emit('error', '开户行不能为空')
+          return
+        }
+        if (this.freightspace1[i].bankDepositBranch == '') {
+          EventBus.$emit('error', '开户支行不能为空')
+          return
+        }
+        if (
+          this.freightspace1[i].accountTypeFlag == 1 &&
+          this.freightspace1[i].payeeName == ''
+        ) {
+          EventBus.$emit('error', '收款人姓名不能为空')
+          return
+        }
+        if (
+          this.freightspace1[i].accountTypeFlag == 1 &&
+          this.freightspace1[i].payeeNumberCard == ''
+        ) {
+          EventBus.$emit('error', '收款人身份证号码不能为空')
+          return
+        }
+        if (
+          (this.freightspace1[i].accountTypeFlag == 1 &&
+            this.freightspace1[i].payeeName.length < 2) ||
+          (this.freightspace1[i].accountTypeFlag == 1 &&
+            this.freightspace1[i].payeeName.length > 10)
+        ) {
+          EventBus.$emit('error', '收款人姓名输入错误')
+          return
+        }
+        console.log(this.freightspace1[i].payeeNumberCard != 18)
+        if (
+          this.freightspace1[i].accountTypeFlag == 1 &&
+          this.freightspace1[i].payeeNumberCard.length != 18
+        ) {
+          EventBus.$emit('error', '收款人身份证号输入错误')
+          return
+        }
+        if (
+          this.freightspace1[i].accountTypeFlag == 2 &&
+          this.freightspace1[i].compName == ''
+        ) {
+          EventBus.$emit('error', '企业名称不能为空')
+          return
+        }
+        if (
+          (this.freightspace1[i].accountTypeFlag == 2 &&
+            this.freightspace1[i].compName.length < 2) ||
+          (this.freightspace1[i].accountTypeFlag == 2 &&
+            this.freightspace1[i].compName.length > 30)
+        ) {
+          EventBus.$emit('error', '企业名称输入有误')
+          return
+        }
+      }
       var arr = []
       for (let key in this.addressUrls) {
+        console.log(this.addressUrls[key])
         arr.push(this.addressUrls[key])
       }
+
       this.$refs.deptBudgetList.validate((valid) => {
         if (valid) {
           this.deptBudgetList.compId = sessionStorage.getItem('ws-pf_compId')
@@ -789,14 +902,35 @@ export default {
           this.deptBudgetList.addressUrl = arr.toString()
           this.deptBudgetList.driverCarInfoList = this.freightspace
           this.deptBudgetList.driverPayeeInfoList = this.freightspace1
-          console.log(this.deptBudgetList)
-          addDriver(this.deptBudgetList)
-            .toPromise()
-            .then((response) => {
-              this.$message.success('添加成功')
-              this.deptBudgetList = {}
-              this.$router.push({ path: 'tranManagementDriver' })
-            })
+          // addDriver(this.deptBudgetList)
+          //   .toPromise()
+          //   .then((response) => {
+          //     this.$message.success('添加成功')
+          //     this.deptBudgetList = {}
+          //     this.freightspace = [
+          //       {
+          //         carNumber: '',
+          //         carModel: '高栏',
+          //         carModelKey: '1',
+          //         carLength: '13',
+          //         carLengthKey: '1',
+          //         carLoad: '',
+          //         yearManufacture: '',
+          //       },
+          //     ]
+          //     this.freightspace1 = [
+          //       {
+          //         accountTypeFlag: '1',
+          //         payeeName: '',
+          //         payeeNumberCard: '',
+          //         compName: '',
+          //         bankDeposit: '',
+          //         addressUrlArray: [],
+          //         bankCard: '',
+          //       },
+          //     ]
+          //     this.$router.push({ path: 'tranManagementDriver' })
+          //   })
         } else {
           EventBus.$emit('error', this.$t('showMessage.asteriskRequired'))
           return false

+ 18 - 6
src/views/tranManagement/tranManagementVehicleDispatching.vue

@@ -160,7 +160,8 @@
                 prop="driverName"
                 class="siji"
               >
-                <ws-select
+                <el-select
+                  :disabled="item.disabled"
                   v-model="item.driver"
                   placeholder="请选择司机"
                   class="typeselect"
@@ -170,13 +171,13 @@
                     }
                   "
                 >
-                  <ws-option
+                  <el-option
                     v-for="(items, index) in carList"
                     :key="index"
                     :label="items.driverName"
                     :value="items.driverName"
                   />
-                </ws-select>
+                </el-select>
               </ws-form-item>
               <!--司机电话-->
               <ws-form-item
@@ -185,7 +186,8 @@
                 prop="impurity"
                 class="siji"
               >
-                <ws-select
+                <el-select
+                  :disabled="item.disabled"
                   v-model="item.driverPhone"
                   placeholder="请选择司机"
                   class="typeselect"
@@ -195,13 +197,13 @@
                     }
                   "
                 >
-                  <ws-option
+                  <el-option
                     v-for="(items, index) in carList"
                     :key="index"
                     :label="items.driverPhone"
                     :value="items.driverPhone"
                   />
-                </ws-select>
+                </el-select>
               </ws-form-item>
               <!--车牌号-->
               <ws-form-item label="车牌号" span="1" prop="carNo" class="siji">
@@ -383,6 +385,7 @@ export default {
         carModel: '',
         carModelKey: '',
         carNumber: '',
+        disabled: false,
         tranType: '1',
       })
     },
@@ -426,7 +429,15 @@ export default {
       seeCat({ id: this.$route.query.id })
         .toPromise()
         .then((response) => {
+          if (response.tranCarInfoList.length > 0) {
+            for (var i = 0; i < response.tranCarInfoList.length; i++) {
+              if (response.tranCarInfoList[i].id) {
+                response.tranCarInfoList[i].disabled = true
+              }
+            }
+          }
           this.deptBudgetList = response
+          console.log(this.deptBudgetList)
           if (this.deptBudgetList.tranCarInfoList.length == 0) {
             this.deptBudgetList.tranCarInfoList = [
               {
@@ -438,6 +449,7 @@ export default {
                 carModel: '',
                 carModelKey: '',
                 carNumber: '',
+                disabled: false,
                 tranType: '1',
               },
             ]