loulijun2021
2022-09-07 ef9633e0d1689fd8869170f3aa0af6c90c2e5e7f
src/views/scgl/scdd.vue
@@ -49,29 +49,29 @@
            <el-form-item label="产品名称" style=" display: flex;">
              <el-input v-model="form.partname" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="产品规格" style=" display: flex;">
            <el-form-item v-show="isExpandForm" label="产品规格" style=" display: flex;">
              <el-input v-model="form.partspec" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="创建人员" style=" display: flex;">
            <el-form-item v-show="isExpandForm" label="创建人员" style=" display: flex;">
              <el-input v-model="form.creatuser" style="width: 200px" placeholder="请输入" />
            </el-form-item>
            <el-form-item label="预计开工时间" label-width="100px" style=" display: flex;font-size: 14px;margin-top: 3px">
            <el-form-item v-show="isExpandForm" label="预计开工时间" label-width="100px" style=" line-height: 40px;;display: flex;font-size: 14px;">
              <el-date-picker
                v-model="form.paystartdate"
                type="daterange"
                range-separator="~"
                class="timeMini"
                size="mini"
                style="width: 250px;display: flex;line-height: 34px;height: 34px;font-size: 14px!important;"
                style="width: 200px;display: flex;line-height: 34px;height: 34px;"
                :clearable="false"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              />
              <!--              font-size: 14px!important;-->
              <!--              :picker-options="expireTimeOption"-->
            </el-form-item>
            <el-form-item label="预计完工时间" label-width="100px" style=" display: flex;font-size: 14px;margin-top: 3px">
            <el-form-item v-show="isExpandForm" label="预计完工时间" label-width="100px" style=" display: flex;font-size: 14px;">
              <el-date-picker
                v-model="form.payenddate"
                type="daterange"
@@ -79,7 +79,7 @@
                class="timeMini"
                range-separator="~"
                start-placeholder="开始日期"
                style="width: 250px;display: flex;line-height: 34px ;height: 34px ;font-size: 14px !important;"
                style="width: 200px;display: flex;line-height: 34px ;height: 34px ;"
                end-placeholder="结束日期"
                size="mini"
              />
@@ -95,7 +95,7 @@
              <!--              />-->
            </el-form-item>
          </div>
          <div style="min-height: 100px">
          <div>
            <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2;justify-content: end">
              <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
              <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
@@ -132,13 +132,23 @@
          </div>
        </el-form>
      </div>
      <div class="elTableDiv">
      <div
        class="bodyTopFormExpand"
        @click="isExpandForm=!isExpandForm"
      >
        <i
          :class="!isExpandForm?'el-icon-arrow-down':'el-icon-arrow-up'"
          :style="{color:'#42B983'}"
        /></div>
      <div class="elTableDiv" style="margin-top: 0">
        <el-table
          :data="tableData"
          :height="tableHeight+'px'"
          :height="isExpandForm?tableHeight:(tableHeight+40)+'px'"
          border
          :row-class-name="tableRowClassName"
          :style="{width: 100+'%',height:tableHeight+'px',}"
          :style="{width: 100+'%',height:isExpandForm?tableHeight:(tableHeight+40)+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
@@ -156,7 +166,7 @@
              <el-radio
                v-model="radioSelectedId"
                :label="row.id"
                style="color: transparent;padding-left: 15px; margin-right: -25px;"
                style="color: transparent;padding-left: 10px;"
                @change.native="getCurrentRow(row.id)"
              />
            </template>
@@ -374,22 +384,11 @@
            style="width: 200px"
          />
        </el-form-item>
        <!--        <el-form-item label="交付时间" prop="">-->
        <!--          <el-date-picker-->
        <!--            v-model="dialogForm.markqty"-->
        <!--            type="date"-->
        <!--            style="width: 200px"-->
        <!--            placeholder="选择日期"-->
        <!--          />-->
        <!--          <el-input v-model="dialogForm.OrgName" style="width: 200px" />-->
        <!--        </el-form-item>-->
      </el-form>
      <span slot="footer" class="dialog-footer">
        <div class="footerButton">
          <el-button @click="dialogVisibleCancel">取 消</el-button>
          <el-button type="primary" @click="dialogVisibleConfirm">下 达</el-button>
          <el-button type="primary" :disabled="sendButtonIsDisabled" @click="dialogVisibleConfirm">下 达</el-button>
        </div>
      </span>
    </el-dialog>
@@ -484,7 +483,8 @@
          { required: true, message: '请输入下单单数', trigger: ['blur', 'change'] }
        ]
      }
      },
      isExpandForm: false
      // expireTimeOption: {
      //   disabledDate(time) {
      //     return time.getTime() > Date.now() - 8.64e6 // 如果没有后面的-8.64e6就是不可以选择今天的
@@ -669,6 +669,8 @@
      this.dialogForm.markqty = ''
      this.dialogForm.ordernum = ''
      this.dialogForm.relse_qty = ''
      this.sendButtonIsDisabled = false
      this.$refs.dialogForm.clearValidate()
    },
    // 对话框取消
@@ -677,9 +679,15 @@
    },
    // 对话框确认
    dialogVisibleConfirm() {
      this.dialogForm.markqty = parseFloat(this.dialogForm.markqty)
      this.dialogForm.erpqty = parseFloat(this.dialogForm.erpqty)
      this.dialogForm.relse_qty = parseFloat(this.dialogForm.relse_qty)
      this.dialogForm.ordernum = parseFloat(this.dialogForm.ordernum)
      if (this.dialogForm.markqty < 1 || this.dialogForm.markqty > this.dialogForm.erpqty - this.dialogForm.relse_qty) {
        return this.$message.info('下单数量超出可下单数的范围!')
      }
      console.log(this.dialogForm.ordernum < this.dialogForm.markqty)
      if (this.dialogForm.ordernum < 1 || this.dialogForm.ordernum > this.dialogForm.markqty) {
        return this.$message.info('下单单数超出可下单单数的范围!')
      }
@@ -698,7 +706,7 @@
            'ordernum': this.dialogForm.ordernum,
            'relse_qty': this.dialogForm.relse_qty
          }
          console.log(data)
          this.sendButtonIsDisabled = true
          MarkSaveErpOrder(data).then(res => {
            if (res.code === '200') {
              this.$message.success('下达成功!')
@@ -715,7 +723,7 @@
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 85
        this.tableHeight = this.mainHeight - 260
        this.tableHeight = this.mainHeight - 250
        this.isIpad = window.innerHeight < 769 && window.innerWidth < 1367
        if (this.isIpad) {
@@ -734,7 +742,7 @@
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep  .el-range-input{
  font-size: 14px !important;
  //font-size: 14px !important;
}
::v-deep .el-range__icon{
  line-height: 28px !important;
@@ -743,7 +751,7 @@
  line-height: 28px !important;
}
::v-deep .el-range-input{
  font-size: 14px ;
  font-size: 14px;
}
::v-deep .el-range-separator{
  display: flex;
@@ -837,6 +845,11 @@
  margin-bottom: 0;
}
.elTableDiv {
  ::v-deep .el-radio__label {
    display: none;
  }
}
</style>
<style>
.el-table .custom-row {