大件运输联网系统前端代码
guoshilong
2023-01-02 dd0838214cd86dcdec93c89687a7e6f457b58dc2
修改时间选择变为范围选择;新增发起事务前需完善企业信息
11 files modified
159 ■■■■ changed files
src/const/application/application.js 43 ●●●● patch | view | raw | blame | history
src/const/applicationDelay/applicationDelay.js 40 ●●●● patch | view | raw | blame | history
src/views/application/application.vue 15 ●●●● patch | view | raw | blame | history
src/views/applicationDelay/applicationDelay.vue 1 ●●●● patch | view | raw | blame | history
src/views/enterprise/enterprise.vue 8 ●●●● patch | view | raw | blame | history
src/views/work/process/audit/detail.vue 2 ●●● patch | view | raw | blame | history
src/views/work/process/audit/form.vue 8 ●●●●● patch | view | raw | blame | history
src/views/work/process/audit/handle.vue 10 ●●●●● patch | view | raw | blame | history
src/views/work/process/delayAudit/detail.vue 1 ●●●● patch | view | raw | blame | history
src/views/work/process/delayAudit/form.vue 8 ●●●●● patch | view | raw | blame | history
src/views/work/start.vue 23 ●●●●● patch | view | raw | blame | history
src/const/application/application.js
@@ -55,23 +55,42 @@
          disabled:false,
          rules: [{required: true, trigger: ['blur','change'],validator:mobileValidate}]
        },
        // {
        //   label: "通行开始时间",
        //   prop: "startPassTime",
        //   type: "date",
        //   format:'yyyy-MM-dd',
        //   valueFormat:'yyyy-MM-dd',
        //   labelWidth:labelWidth,
        //   disabled:false,
        //   pickerOptions: {
        //     disabledDate(time) {
        //       return time.getTime() < Date.now();
        //     },
        //   }
        // },
        // {
        //   label: "通行结束时间",
        //   prop: "endPassTime",
        //   type: "date",
        //   format:'yyyy-MM-dd',
        //   valueFormat:'yyyy-MM-dd',
        //   labelWidth:labelWidth,
        //   disabled:false,
        // },
        {
          label: "通行开始时间",
          prop: "startPassTime",
          type: "date",
          label: "通行时间段",
          prop: "passTime",
          type: "daterange",
          format:'yyyy-MM-dd',
          valueFormat:'yyyy-MM-dd',
          labelWidth:labelWidth,
          disabled:false,
        },
        {
          label: "通行结束时间",
          prop: "endPassTime",
          type: "date",
          format:'yyyy-MM-dd',
          valueFormat:'yyyy-MM-dd',
          labelWidth:labelWidth,
          disabled:false,
          pickerOptions: {
            disabledDate(time) {
              return time.getTime() < Date.now();
            },
          }
        },
        {
          label: "起运机构",
src/const/applicationDelay/applicationDelay.js
@@ -42,23 +42,38 @@
      },
      rules: [{required: true, trigger: ['blur','change'],message:'请输入申请编号'}]
    },
    // {
    //   label: "通行开始时间",
    //   labelWidth:labelWidth,
    //   prop: "delayStartTime",
    //   type: "date",
    //   format:'yyyy-MM-dd',
    //   valueFormat:'yyyy-MM-dd',
    //   disabled:false,
    // },
    // {
    //   label: "通行结束时间",
    //   labelWidth:labelWidth,
    //   prop: "delayEndTime",
    //   type: "date",
    //   format:'yyyy-MM-dd',
    //   valueFormat:'yyyy-MM-dd',
    //   disabled:false,
    // },
    {
      label: "通行开始时间",
      labelWidth:labelWidth,
      prop: "delayStartTime",
      type: "date",
      label: "通行时间段",
      prop: "passTime",
      type: "daterange",
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      disabled:false,
    },
    {
      label: "通行结束时间",
      labelWidth:labelWidth,
      prop: "delayEndTime",
      type: "date",
      format:'yyyy-MM-dd',
      valueFormat:'yyyy-MM-dd',
      disabled:false,
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() < Date.now();
        },
      },
      rules: [{required: true, trigger: ['blur','change'],message:'请输入通行时间段'}]
    },
    {
      label: "起运机构",
@@ -123,6 +138,7 @@
      prop: "remark",
      type: "textarea",
      minRows:2,
      hide: true
    },
    {
      label: "办理进度",
src/views/application/application.vue
@@ -33,9 +33,6 @@
        <el-button icon="el-icon-tickets" :size="size" :type="type" @click="polishApplication(row.id)">补正</el-button>
        <el-button v-if="permit" icon="el-icon-tickets" :size="size" :type="type">受 理</el-button>
        <el-button v-if="permit" icon="el-icon-tickets" :size="size" :type="type" @click="rejectApplication(row)">不予受理</el-button>
<!--        <el-button icon="el-icon-delete" :size="size" :type="type">车辆变更</el-button>-->
<!--        <el-button icon="el-icon-delete" :size="size" :type="type">延 期</el-button>-->
<!--        <el-button icon="el-icon-delete" :size="size" :type="type">撤 销</el-button>-->
      </template>
      <!--按钮自定义-End-->
@@ -100,6 +97,16 @@
      },
      permit(){
        return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false
      }
    },
    watch:{
      'form.passTime':{
        handler(newVal){
          if (newVal){
            this.form.startPassTime = newVal[0]
            this.form.endPassTime = newVal[1]
          }
        }
      }
    },
    methods: {
@@ -234,7 +241,7 @@
        let catId = car.id
        let goods = this.form.goodsEntity
        let goodsId = goods.id
        this.form.endPassTime = basic.endPassTime
        this.form.passTime = [basic.startPassTime,basic.endPassTime]
        let form = this.form
        //保留原form中的字段
        let common = Object.assign({},form)
src/views/applicationDelay/applicationDelay.vue
@@ -183,6 +183,7 @@
          //转换数据类型
          this.data.forEach(e=>{
            e.status = e.status.toString()
            e.passTime = [e.delayStartTime,e.delayEndTime]
          })
          this.loading = false;
src/views/enterprise/enterprise.vue
@@ -79,8 +79,8 @@
        return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false
      }
    },
    created() {
      if (this.permit){
    mounted() {
      if (!this.permit){
        this.getEnterpriseDetailByUserId()
      }
    },
@@ -219,8 +219,8 @@
          if (res.data.code == 200){
            this.form = res.data.data
            this.form.account = this.userInfo.account
            const group = this.findObject(this.option.group,"account");
            group.disabled = true
            const account = this.findObject(this.option.group,"account");
            account.disabled = true
          }
        })
      }
src/views/work/process/audit/detail.vue
@@ -109,7 +109,7 @@
      let catId = car.id
      let goods = this.form.goodsEntity
      let goodsId = goods.id
      this.form.endPassTime = basic.endPassTime
      this.form.passTime = [basic.startPassTime,basic.endPassTime]
      let form = this.form
      //保留原form中的字段
      let common = Object.assign({},form)
src/views/work/process/audit/form.vue
@@ -25,6 +25,14 @@
  computed: {
    ...mapGetters(["permission", 'userInfo']),
  },
  watch:{
    'form.passTime':{
      handler(newVal){
        this.form.startPassTime = newVal[0]
        this.form.endPassTime = newVal[1]
      }
    }
  },
  created() {
    this.controlOption('open')
    this.processDefinitionId = this.$route.params.processDefinitionId;
src/views/work/process/audit/handle.vue
@@ -263,6 +263,14 @@
      cloneForm:{},
    }
  },
  watch:{
    'form.passTime':{
      handler(newVal){
        this.form.startPassTime = newVal[0]
        this.form.endPassTime = newVal[1]
      }
    }
  },
  created() {
    this.init();
  },
@@ -460,7 +468,7 @@
      let catId = car.id
      let goods = this.form.goodsEntity
      let goodsId = goods.id
      this.form.endPassTime = basic.endPassTime
      this.form.passTime = [basic.startPassTime,basic.endPassTime]
      let form = this.form
      //保留原form中的字段
      let common = Object.assign({}, form)
src/views/work/process/delayAudit/detail.vue
@@ -75,6 +75,7 @@
        const data = res.data;
        if (data.success) {
          this.form = data.data;
          this.form.passTime = [this.form.delayStartTime,this.form.delayEndTime]
        }
      })
    },
src/views/work/process/delayAudit/form.vue
@@ -29,6 +29,14 @@
      option: option
    }
  },
  watch:{
    'form.passTime':{
      handler(newVal){
        this.form.delayStartTime = newVal[0]
        this.form.delayEndTime = newVal[1]
      }
    }
  },
  created() {
    this.processDefinitionId = this.$route.params.processDefinitionId;
  },
src/views/work/start.vue
@@ -58,6 +58,7 @@
  import {mapGetters} from "vuex";
  import {startList} from "@/api/work/work";
  import {flowCategory, flowRoute} from "@/util/flow";
  import {getDetailByUserId} from "@/api/enterprise/enterprise";
  export default {
    data() {
@@ -151,7 +152,7 @@
      }
    },
    computed: {
      ...mapGetters(["permission", "flowRoutes"]),
      ...mapGetters(["permission", "flowRoutes","userInfo"]),
      ids() {
        let ids = [];
        this.selectionList.forEach(ele => {
@@ -159,6 +160,12 @@
        });
        return ids.join(",");
      },
      permit(){
        return this.userInfo.role_name == 'admin' || this.userInfo.role_name == 'administrator' ? true:false
      },
    },
    created() {
      this.getEnterpriseDetailByUserId()
    },
    methods: {
      searchReset() {
@@ -208,6 +215,20 @@
          this.loading = false;
          this.selectionClear();
        });
      },
      getEnterpriseDetailByUserId(){
        getDetailByUserId(this.userInfo.user_id).then(res=>{
          if (res.data.code == 200){
            if (res.data.data && !this.permit){
              this.$alert('请先完善企业信息', '提示', {
                confirmButtonText: '确定',
                callback: ()=>{
                  this.$router.push("/enterprise/enterprise")
                }
              });
            }
          }
        })
      }
    }
  };