scan2.vue 2.93 KB
<template>
  <div class="content">
    <div style="width: 100%;text-align: center;font-weight: 600;">油漆暂存间巡查</div>
    <table>
      <tr>
        <td colspan="5">
          巡查情况记录:
          <button @click="ww()">清空</button>
          <br/>
          <textarea style="width: 98%;" name="" id="" cols="30" rows="10" v-model="record"> </textarea>
        </td>
      </tr>

      <tr>
        <td colspan="3">巡查结果:
          <j-search-select-tag placeholder="请选择" v-model="result" :dictOptions="searchOptions">
          </j-search-select-tag>
        </td>
      </tr>

      <tr>
        <td colspan="3">巡查人:
          <a-input v-model="recorder" style="width: 40%"></a-input>
        </td>
      </tr>

      <tr style="height: 5px;">
        <td colspan="5" style="text-align: center;">
          <button style="width: 20rem;height: 3rem;" @click="submit">提交</button>
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
import {addInspectDetail} from '@/api/api'


export default {
  data() {
    return {
      record: '',
      recorder: '',
      recordDate: '',
      result: '',
      dynamicModels: {},
      dictModel: [],
      searchOptions: [{
        text: "正常",
        value: "正常"
      }, {
        text: "异常",
        value: "异常"
      }],
    }
  },
  created() {

  },
  methods: {
    ww() {
      this.record = '';
    },

    submit() {
      if (this.result == '') {
        this.$message.error("请选择巡查结果!!")
        return false;
      }
      let params = {
        'remark': this.record,
        'headerId': '1820650054843150338',
        'name': this.recorder,
        'result': this.result,
      }
      addInspectDetail(params).then((res) => {
        if (res.success) {
          this.$message.success("提交成功!")
          this.record = '';
          this.recorder = '';
        } else {
          this.$message.error(res.message)
        }
      })
    },
  }
  ,
  mounted() {
  }
  ,
}
</script>

<style scoped>
.app-body {
  width: 100%;
  height: 100%;
}

.content {
  width: 99.1%;
  height: 100%;
  border: 1px solid yellowgreen;
  margin: 0 auto;
  overflow: auto;
}

body {
  font-size: 1rem;
}

table,
td,
th {
  border-collapse: collapse;
  border-spacing: 0;
}

table {
  width: 100%;
  margin-top: 10px;
}

td,
th {
  border: 2px solid #000000;
  padding: 5px 10px;
}

th {
  background: #42b983;
  font-size: 3vw;
  font-weight: 400;
  color: #fff;
  cursor: pointer;
}

.font {
  font-size: 2.8vw;
}

tr:nth-of-type(odd) {
  background: #fff;
}

tr:nth-of-type(even) {
  background: #eee;
}

button {
  outline: none;
  padding: 5px 8px;
  color: #fff;
  border: 1px solid #bcbcbc;
  border-radius: 3px;
  background-color: #009a61;
  cursor: pointer;
}

button:hover {
  opacity: 0.8;
}

.text-center {
  text-align: center;
}
</style>

<style lang="less">
.app_container {
  width: 100%;
  height: 100%;
  background: #ffff !important;
}
</style>