loulijun2021
2022-07-16 392f9468875a8721c17c4e15c288333017cac4a1
1.修改bug2.工序检验实现部分3.缺陷定义实现部分
已添加2个文件
已修改17个文件
1697 ■■■■■ 文件已修改
src/api/user.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/zlgl.js 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/images/xkd_newlogo.png 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Navbar.vue 143 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jcsz/jsqd.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jcsz/wldw.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/jcsz/yhqd.vue 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/login/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sbgl/sbqd.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/gd.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/scdd.vue 39 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/sckbg.vue 237 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/template.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/xtsz/bmgz.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zlgl/gxjy.vue 492 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zlgl/qxdy.vue 492 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/chda.vue 79 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/gxdy.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/gylx.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/user.js
@@ -29,3 +29,10 @@
    params: data
  })
}
export function UpdateUserPassword(data) {
  return request({
    url: '/Login/UpdateUserPassword',
    method: 'post',
    params: data
  })
}
src/api/zlgl.js
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,88 @@
import request from '@/utils/request'
// è´¨é‡ç®¡ç†,缺陷定义查询列表
export function DedectSearch(data) {
  return request({
    url: 'QualityManagement/DedectSearch',
    method: 'get',
    params: data
  })
}
// è´¨é‡ç®¡ç†ï¼Œç¼ºé™·å®šä¹‰æ–°å¢žã€ç¼–辑提交
export function AddUpdateDedect(data) {
  return request({
    url: 'QualityManagement/AddUpdateDedect',
    method: 'post',
    data
  })
}
// è´¨é‡ç®¡ç†ï¼Œç¼ºé™·å®šä¹‰åˆ é™¤
export function DeleteDedect(data) {
  return request({
    url: 'QualityManagement/DeleteDedect',
    method: 'post',
    params: data
  })
}
// å·¥åºæ£€éªŒæ ‡å‡†åˆ—表查询
export function StepCheckStanedSearch(data) {
  return request({
    url: 'QualityManagement/StepCheckStanedSearch',
    method: 'get',
    params: data
  })
}
// å·¥åºæ£€éªŒæ ‡å‡†ç¼–辑获取数据
export function EditStepCheckStanedSearch(data) {
  return request({
    url: 'QualityManagement/EditStepCheckStanedSearch',
    method: 'post',
    params: data
  })
}
// å·¥åºæ£€éªŒæ ‡å‡†æ–°å¢žã€ç¼–辑获取检验项目下拉列表
export function StepCheckItemSelect() {
  return request({
    url: 'QualityManagement/StepCheckItemSelect',
    method: 'get'
  })
}
// å·¥åºæ£€éªŒæ ‡å‡†æ–°å¢žã€ç¼–辑提交
export function AddUpdateStepCheckStaned(opertype, data) {
  return request({
    url: 'QualityManagement/AddUpdateStepCheckStaned?opertype=' + opertype,
    method: 'post',
    data
  })
}
// å·¥åºæ£€éªŒé¡¹ç›®åˆ—表查询
export function StepCheckItemSearch(data) {
  return request({
    url: 'QualityManagement/StepCheckItemSearch',
    method: 'get',
    params: data
  })
}
// å·¥åºæ£€éªŒé¡¹ç›®æ–°å¢žã€ç¼–辑提交
export function AddUpdateStepCheckItem(data) {
  return request({
    url: 'QualityManagement/AddUpdateStepCheckItem',
    method: 'post',
    data
  })
}
// å·¥åºæ£€éªŒé¡¹ç›®åˆ é™¤
export function DeleteStepCheckItem(data) {
  return request({
    url: 'QualityManagement/DeleteStepCheckItem',
    method: 'post',
    params: data
  })
}
src/assets/images/xkd_newlogo.png
src/layout/components/Navbar.vue
@@ -15,7 +15,7 @@
          <!--          <i class="el-icon-caret-bottom" />-->
        </div>
        <el-dropdown-menu slot="dropdown" class="user-dropdown">
        <el-dropdown-menu slot="dropdown" class="user-dropdown" style="text-align: center">
          <!--          <router-link to="/">-->
          <!--            <el-dropdown-item>-->
          <!--              Home-->
@@ -27,16 +27,44 @@
          <!--          <a target="_blank" href="https://panjiachen.github.io/vue-element-admin-site/#/">-->
          <!--            <el-dropdown-item>Docs</el-dropdown-item>-->
          <!--          </a>-->
          <!--          <el-dropdown-item @click.native="logout">-->
          <!--            <span style="display:block;">修改密码</span>-->
          <!--          </el-dropdown-item>-->
          <!--          divided-->
          <el-dropdown-item @click.native="logout">
            <span style="display:block;">退出</span>
          <el-dropdown-item @click.native="editPassword">
            <span style="display:block;">修改密码</span>
          </el-dropdown-item>
          <el-dropdown-item divided @click.native="logout">
            <span style="display:block;font-weight: bolder">退出</span>
          </el-dropdown-item>
        </el-dropdown-menu>
      </el-dropdown>
    </div>
    <el-dialog
      title="修改密码"
      :visible.sync="dialogVisible"
      width="500px"
      :close-on-click-modal="false"
      @close="handleClose"
      @closed="handleClose"
    >
      <el-form ref="dialogForm" :rules="formRules" :model="form" label-width="100px">
        <!--        <el-form-item label="用户编码:">-->
        <!--          <div>{{ usercode }}</div>-->
        <!--        </el-form-item>-->
        <!--        <el-form-item label="用户名称:">-->
        <!--          <div> {{ username }}</div>-->
        <!--        </el-form-item>-->
        <el-form-item label="密码:" prop="password">
          <el-input v-model="form.password" style="width: 220px;" />
        </el-form-item>
        <el-form-item label="新密码:" prop="newpassword">
          <el-input v-model="form.newpassword" style="width: 220px;" />
        </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>
        </div>
      </span>
    </el-dialog>
  </div>
</template>
@@ -44,10 +72,10 @@
import { mapGetters } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb'
import Hamburger from '@/components/Hamburger'
import { getCookie, removeCookie, removeToken } from '@/utils/auth'
import { logout } from '@/api/user'
import { resetRouter } from '@/router'
import { getCookie } from '@/utils/auth'
import { UpdateUserPassword } from '@/api/user'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
  components: {
    Breadcrumb,
@@ -60,11 +88,37 @@
    ])
  },
  created() {
    this.usercode = getCookie('navTabId')
    this.username = getCookie('admin')
  },
  data() {
    const validatePassword = (rule, value, callback) => {
      if (!value) {
        return callback(new Error('请输入密码!'))
      } else {
        if (SER_HZ.test(value)) {
          return callback(new Error('密码不能为中文!'))
        } else {
          callback()
        }
      }
    }
    return {
      username: ''
      usercode: '',
      username: '',
      form: {
        password: '',
        newpassword: ''
      },
      dialogVisible: false,
      formRules: {
        password: [
          { required: true, validator: validatePassword, trigger: ['blur', 'change'] }
        ],
        newpassword: [
          { required: true, validator: validatePassword, trigger: ['blur', 'change'] }
        ]
      }
    }
  },
  methods: {
@@ -75,6 +129,36 @@
      await this.$store.dispatch('user/logout')
      this.$message.success('退出成功!')
      this.$router.push(`/login`)
    },
    editPassword() {
      this.dialogVisible = true
    },
    dialogVisibleCancel() {
      this.dialogVisible = false
    },
    dialogVisibleConfirm() {
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const data = {
            usercode: this.usercode,
            username: this.username,
            password: this.form.password,
            newpassword: this.form.newpassword
          }
          console.log(data)
          UpdateUserPassword(data).then(res => {
            if (res.code === '200') {
              this.$message.success('修改成功!')
              this.dialogVisible = false
            }
          })
        }
      })
    },
    handleClose() {
      this.form.password = ''
      this.form.newpassword = ''
      this.$refs.dialogForm.clearValidate()
    }
  }
}
@@ -86,7 +170,7 @@
  overflow: hidden;
  position: relative;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,21,41,.08);
  box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
  .hamburger-container {
    line-height: 46px;
@@ -94,7 +178,7 @@
    float: left;
    cursor: pointer;
    transition: background .3s;
    -webkit-tap-highlight-color:transparent;
    -webkit-tap-highlight-color: transparent;
    &:hover {
      background: rgba(0, 0, 0, .025)
@@ -139,11 +223,12 @@
        margin-top: 5px;
        position: relative;
        cursor: pointer;
        .headerImg{
        .headerImg {
          margin: 5px;
        }
        .headerName{
        .headerName {
          font-weight: bolder;
        }
@@ -164,5 +249,33 @@
      }
    }
  }
  .footerButton {
    display: flex;
    justify-content: end;
  }
  ::v-deep .el-button--primary {
    background-color: #42b983 !important;
    height: 30px;
    display: flex;
    align-items: center;
    //border: 1px solid $main_color;
    border: none;
    padding: 0 20px;
  }
  ::v-deep .el-button--default {
    background-color: #ffffff !important;
    height: 30px;
    display: flex;
    align-items: center;
    padding: 0 20px;
  }
  ::v-deep .el-input__inner {
    height: 30px;
    line-height: 30px;
  }
}
</style>
src/views/jcsz/jsqd.vue
@@ -104,23 +104,25 @@
            sortable="custom"
          />
          <el-table-column
            prop="lm_date"
            prop="is_user"
            label="关联用户"
            width="120"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <i class="el-icon-user-solid" @click="userClick(row)" />
              <i v-if="row.is_user==='Y'" class="el-icon-user-solid" @click="userClick(row)" />
              <i v-if="row.is_user==='N'" class="el-icon-user-solid" style="color: #E4E7ED" @click="userClick(row)" />
            </template>
          </el-table-column>
          <el-table-column
            prop="lm_date"
            prop="is_right"
            label="分配权限"
            sortable="custom"
            width="120"
          >
            <template slot-scope="{row}">
              <i class="el-icon-share" @click="rightClick(row)" />
              <i v-if="row.is_right==='Y'" class="el-icon-share" @click="rightClick(row)" />
              <i v-if="row.is_right==='N'" class="el-icon-share" style="color: #E4E7ED" @click="rightClick(row)" />
            </template>
          </el-table-column>
          <el-table-column
@@ -941,6 +943,7 @@
      const res = await SaveRoleAssoctUser(userMultipleArr, this.dialogFormUser.rolecode)
      if (res.code === '200') {
        this.$message.success('保存成功!')
        await this.getRoleSearch()
        this.userDialogVisible = false
      }
    },
@@ -1188,6 +1191,7 @@
      const res = await SaveUserAssoctRight(rightSubmit, rolecode, usercode)
      if (res.code === '200') {
        this.$message.success('保存成功!')
        await this.getRoleSearch()
        this.dialogVisibleRight = false
      }
    },
src/views/jcsz/wldw.vue
@@ -226,6 +226,22 @@
        }
      }
    }
    const validateMobile = (rule, value, callback) => {
      if (!value) {
        callback()
        // return callback(new Error('请输入电话号码'))
      } else {
        const mobile = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/ // é•¿å·
        const mobile2 = /^[0-9]{6}$/ // çŸ­å·
        if (mobile.test(value) || mobile2.test(value)) {
          callback()
          // return callback(new Error('电话号码不符合规则'))
        } else {
          return callback(new Error('电话号码不符合规则'))
          // callback()
        }
      }
    }
    return {
      mainHeight: 0,
      tableHeight: 0,
@@ -271,6 +287,9 @@
        ],
        checkboxIsSelected: [
          { required: true, message: '请选择供方属性', trigger: ['blur', 'change'] }
        ],
        contact: [
          { required: true, validator: validateMobile, trigger: ['blur', 'change'] }
        ]
      }
src/views/jcsz/yhqd.vue
@@ -176,7 +176,8 @@
            label="关联角色"
          >
            <template slot-scope="{row}">
              <i class="el-icon-share" @click="roleClick({row})" />
              <i v-if="row.is_role==='Y'" class="el-icon-share" @click="roleClick({row})" />
              <i v-if="row.is_role==='N'" class="el-icon-share" style="color: #E4E7ED" @click="roleClick({row})" />
            </template>
          </el-table-column>
          <el-table-column
@@ -880,6 +881,7 @@
      const res = await SaveUserAssoctRole(this.dialogFormRoles.roleTreeSelectedArr, this.dialogFormRoles.usercode)
      if (res.code === '200') {
        this.$message.success('保存成功!')
        await this.getUserSearch()
        this.dialogVisibleRoles = false
      }
    },
@@ -1167,9 +1169,9 @@
      if (row.group_name.trim().length < 1) {
        return this.$message.info('班组名称不能为空!')
      }
      if (row.description.trim().length < 1) {
        return this.$message.info('班组描述不能为空!')
      }
      // if (row.description.trim().length < 1) {
      //   return this.$message.info('班组描述不能为空!')
      // }
      const data = {
        code: row.group_code,
        name: row.group_name,
src/views/login/index.vue
@@ -51,7 +51,7 @@
        <div class="title-container">
          <div class="title_img" />
          <h3 class="title">新凯迪制造云平台</h3>
          <!--          <h3 class="title">新凯迪制造云平台</h3>-->
        </div>
        <el-form-item prop="username">
@@ -103,7 +103,7 @@
        <el-button
          :loading="loading"
          type="primary"
          style="width:100%;margin-bottom:30px;"
          style="width:100%;margin-top:20px;"
          @click.native.prevent="handleLogin"
        >登录
        </el-button>
@@ -336,10 +336,11 @@
    align-items: center;
    .title_img {
      background: url("../../assets/images/xkd_logo.png");
      width: 200px;
      height: 100px;
      background: url("../../assets/images/xkd_newlogo.png") no-repeat;
      width: 300px;
      height: 200px;
      margin: -50px 0 20px;
      background-size: 100% 100%;
    }
    .title {
src/views/sbgl/sbqd.vue
@@ -331,7 +331,7 @@
          </el-select>
        </el-form-item>
        <el-form-item label="稼动率" prop="ratio">
          <el-input v-model="dialogForm.ratio" style="width: 195px" />
          <el-input v-model="dialogForm.ratio" style="width: 175px" />
          <span style="margin-left: 10px">%</span>
        </el-form-item>
@@ -612,7 +612,7 @@
        importdate: '',
        workshopcode: '',
        linecode: '',
        status: '',
        status: 'Y',
        ratio: ''
      },
      DeviceGroupDialogArr: [], // è®¾å¤‡ç»„数组
@@ -784,7 +784,7 @@
      this.dialogForm.importdate = ''
      this.dialogForm.workshopcode = ''
      // this.dialogForm.linecode = ''
      this.dialogForm.status = ''
      this.dialogForm.status = 'Y'
      this.dialogForm.ratio = ''
      this.$refs.dialogForm.clearValidate()
    },
@@ -912,9 +912,9 @@
      if (row.name.trim().length < 1) {
        return this.$message.info('类型名称不能为空!')
      }
      if (row.remark.trim().length < 1) {
        return this.$message.info('类型描述不能为空!')
      }
      // if (row.remark.trim().length < 1) {
      //   return this.$message.info('类型描述不能为空!')
      // }
      const data = {
        'code': row.code,
        'name': row.name,
@@ -1026,9 +1026,9 @@
      if (row.eqptype_code.trim().length < 1) {
        return this.$message.info('所属设备类型不能为空!')
      }
      if (row.remark.trim().length < 1) {
        return this.$message.info('分组描述不能为空!')
      }
      // if (row.remark.trim().length < 1) {
      //   return this.$message.info('分组描述不能为空!')
      // }
      const data = {
        'code': row.code,
        'name': row.name,
src/views/scgl/gd.vue
@@ -190,7 +190,7 @@
            prop="route_name"
            label="工艺路线"
            sortable="custom"
            width="120"
            width="130"
          />
          <el-table-column
src/views/scgl/scdd.vue
@@ -121,7 +121,7 @@
        <el-button
          type="primary"
          icon="el-icon-refresh-right"
          @click="reset('update')"
          @click="syncERP"
        >同步ERP
        </el-button>
        <el-button
@@ -206,6 +206,12 @@
          <el-table-column
            prop="qty"
            label="订单数量"
            width="150"
            sortable="custom"
          />
          <el-table-column
            prop="relse_qty"
            label="已下单数量"
            width="150"
            sortable="custom"
          />
@@ -498,12 +504,33 @@
      this.form.prop = prop
      this.getErpOrderSearch()
    },
    // åŒæ­¥ERP
    async  syncERP() {
      const loading = this.$loading({
        lock: true,
        text: '正在同步ERP,请稍等...',
        spinner: 'el-icon-loading',
        customClass: 'osloading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
      setTimeout(() => {
        loading.close()
      }, 2000)
      // const res = await xxx()
      // if (res.code==='200'){
      setTimeout(() => {
        loading.close()
        this.getErpOrderSearch()
      }, 2000)
      // }
    },
    // æŸ¥è¯¢
    search() {
      this.getErpOrderSearch()
    },
    // é‡ç½®
    reset(val) {
    reset() {
      this.form.erporderstus = ''
      this.form.erpordercode = ''
      this.form.partcode = ''
@@ -513,9 +540,6 @@
      this.form.creatuser = ''
      this.form.createdate = ''
      this.getErpOrderSearch()
      if (val.length > 0) {
        this.$message.success('ERP已同步!')
      }
    },
    // å•选框选中获取当前行信息
    getCurrentRow(wo) {
@@ -820,3 +844,8 @@
}
</style>
<style>
.osloading{
  font-size: 40px;
}
</style>
src/views/scgl/sckbg.vue
@@ -303,7 +303,7 @@
            @pagination="getMesOrderStepSearch"
          />
        </el-tab-pane>
        <el-tab-pane v-if="false" label="工序检验">
        <el-tab-pane label="工序检验">
          <div style="margin-left: 10px;margin-top:10px;display: flex;flex-direction: column">
            <div style="margin-bottom: 10px;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />扫码信息
@@ -318,38 +318,40 @@
                @keyup.enter.native="val=>enterNative(val,'GXproduceCode')"
              />
            </div>
            <div style="line-height: 40px; display: flex;margin-top: 20px">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">工单编码:</div>
                <div>PX00120012312</div>
              </div>
            <!--        å…­é¡¹ä¿¡æ¯      -->
            <div style="display:flex;margin-top: 10px;align-items: center">
              <div style="display: flex;">
                <div style="width: 90px">产品编码:</div>
                <div>123-446-789</div>
                <div style="display: flex;margin-right: 50px">
                  <div style="width: 90px">工单编码:</div>
                  <div style="width: 100px">PX00120012312</div>
                </div>
                <div style="display: flex;">
                  <div style="width: 90px">产品编码:</div>
                  <div style="width: 100px">123-446-789</div>
                </div>
              </div>
              <div style="display: flex;margin-left: 30px;">
                <div style="display: flex;margin-right: 50px">
                  <div style="width: 90px">产品名称:</div>
                  <div style="width: 100px">PX00120012312</div>
                </div>
                <div style="display: flex;">
                  <div style="width: 90px">产品规格:</div>
                  <div style="width: 100px">123-446-789</div>
                </div>
              </div>
              <div style=" display: flex;margin-left: 30px;">
                <div style="display: flex;margin-right: 50px">
                  <div style="width: 90px">工序编码:</div>
                  <div>PX00120012312</div>
                </div>
                <div style="display: flex;">
                  <div style="width: 90px">工序名称:</div>
                  <div>123-446-789</div>
                </div>
              </div>
            </div>
            <div style="line-height: 40px; display: flex;">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">产品名称:</div>
                <div>PX00120012312</div>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">产品规格:</div>
                <div>123-446-789</div>
              </div>
            </div>
            <div style="line-height: 40px; display: flex;">
              <div style="display: flex;margin-right: 50px">
                <div style="width: 90px">工序编码:</div>
                <div>PX00120012312</div>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">工序名称:</div>
                <div>123-446-789</div>
              </div>
            </div>
            <div style="margin: 20px 0;font-size: 14px">
            <div style="margin: 10px 0;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />检验标准信息
            </div>
            <div style="display: flex;align-items: center">
@@ -358,6 +360,7 @@
                v-model="dialogForm.aaa"
                style="width: 200px;"
                placeholder="请选择"
                filterable
              >
                <el-option
                  v-for="item in ARR"
@@ -366,11 +369,12 @@
                  :value="item.code"
                />
              </el-select>
              <div style="width: 90px;margin-left: 50px;">检验标准:</div>
              <div style="width: 90px;margin-left: 50px;">检验人员:</div>
              <el-select
                v-model="dialogForm.aaa"
                style="width: 200px;"
                placeholder="请选择"
                filterable
              >
                <el-option
                  v-for="item in ARR"
@@ -380,8 +384,109 @@
                />
              </el-select>
            </div>
            <div style="margin: 20px 0;font-size: 14px">
            <div style="margin: 10px 0;font-size: 14px">
              <i class="el-icon-s-operation" style="color:#42b983; margin-right: 5px" />检验项信息
            </div>
            <div>
              <el-button type="primary" @click="add">新增</el-button>
            </div>
            <div style="margin-top: 10px">
              <el-table
                :data="JYTableData"
                :height="(tableHeight-195)+'px'"
                border
                stripe
                :style="{width: 100+'%',height:tableHeight+'px',}"
                highlight-current-row
                :header-cell-style="this.$headerCellStyle"
                :cell-style="this.$cellStyle"
                @sort-change="JYsortChange"
              >
                <el-table-column
                  prop="RowNum"
                  label="序号"
                />
                <!--                <el-table-column-->
                <!--                  prop="bm"-->
                <!--                  label="检验项目编码"-->
                <!--                  sortable="custom"-->
                <!--                />-->
                <el-table-column
                  prop="mc"
                  sortable="custom"
                  label="检验项目名称"
                >
                  <!--                  <template slot-scope="{row}">-->
                  <!--                    <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="请输入" />-->
                  <!--                    <div v-else> {{ row.group_code }}</div>-->
                  <!--                  </template>-->
                </el-table-column>
                <el-table-column
                  prop="ms"
                  label="检验标准描述"
                  sortable="custom"
                >
                  <!--                  <template slot-scope="{row}">-->
                  <!--                    <el-input v-if="row.isVisible===1" v-model="row.group_code" placeholder="请输入" />-->
                  <!--                    <div v-else> {{ row.group_code }}</div>-->
                  <!--                  </template>-->
                </el-table-column>
                <el-table-column
                  prop="jg"
                  label="检验结果"
                  sortable="custom"
                >
                  <template slot-scope="{row}">
                    <div style="justify-content: flex-start ;">
                      <el-radio v-model="radio" label="1">备选项</el-radio>
                      <el-radio v-model="radio" label="2">备选项</el-radio>
                    </div>
                  </template>
                </el-table-column>
                <el-table-column
                  label="操作"
                >
                  <template slot-scope="{row}">
                    <div class="operationClass">
                      <el-button v-if="row.isVisible===0" type="text" @click="del(row)">删除</el-button>
                      <el-button v-if="row.isVisible===1" type="text" @click="confirm(row)">确认</el-button>
                      <el-button v-if="row.isVisible===1" type="text" @click="cancel(row)">取消</el-button>
                    </div>
                  </template>
                </el-table-column>
              </el-table>
            </div>
            <!--   æ£€éªŒç»“æžœ   å’Œ  æ£€éªŒå¤‡æ³¨      -->
            <div style="display: flex;margin-top: 20px;align-items: center">
              <div style="display: flex;margin-right: 50px;align-items: center">
                <div style="width: 90px">检验结果:</div>
                <el-select
                  v-model="dialogForm.aaa"
                  style="width: 200px;"
                  placeholder="请选择"
                  filterable
                >
                  <el-option
                    v-for="item in ARR"
                    :key="item.code"
                    :label="item.name"
                    :value="item.code"
                  />
                </el-select>
              </div>
              <div style="display: flex;">
                <div style="width: 90px">检验备注:</div>
                <!--                <el-input v-model="row.group_code" placeholder="请输入" />-->
              </div>
            </div>
            <div style="display: flex;margin: 20px 0;align-items: center">
              <el-button type="primary">首检保存</el-button>
              <el-button type="primary" style="margin-left: 50px">巡检保存</el-button>
              <el-button type="primary" style="margin-left: 50px">完工检保存</el-button>
              <el-button type="info" style="margin-left: 50px">取消</el-button>
            </div>
          </div>
        </el-tab-pane>
@@ -747,6 +852,7 @@
  SavaMesOrderStepReport
} from '@/api/scgl'
import { urlAddRandomNo, webapp_urlprotocol_startup, webapp_ws_ajax_run, webapp_ws_autoupdate } from '@/utils/grwebapp'
import { UserGroupDelete } from '@/api/jcsz'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
@@ -890,8 +996,11 @@
        // order: 'asc', // æŽ’序字段
        // page: 1, // ç¬¬å‡ é¡µ
        // rows: 20 // æ¯é¡µå¤šå°‘条
      }
      },
      JYTableData: [
        { RowNum: 1, bm: '001', mc: '尺寸', ms: '无', jg: '我是结果', isVisible: 0 }
      ], // æ£€éªŒé¡¹ä¿¡æ¯è¡¨æ ¼
      radio: ''
    }
  },
  created() {
@@ -963,14 +1072,14 @@
        this.$nextTick(() => {
          this.getMesOrderStepSearch()
          $("input[name='produceCode']")[0].focus()
          // this.WXform.orderstepqrcode = ''
          this.WXform.orderstepqrcode = ''
        })
      }
      if (this.$refs.elTabs.currentName === '1') {
        this.$nextTick(() => {
          this.getMesOrderWxStepSearch()
          $("input[name='WXproduceCode']")[0].focus()
          // this.form.orderstepqrcode = ''
          this.form.orderstepqrcode = ''
        })
      }
      if (this.$refs.elTabs.currentName === '2') {
@@ -1472,6 +1581,62 @@
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 80
      })
    },
    /*
  *检验项信息
  * */
    JYsortChange({ column, prop, order }) {
      if (order === 'descending') {
        order = 'desc'
      } else if (order === 'ascending') {
        order = 'asc'
      } else {
        order = 'desc'
      }
      this.GXform.order = order
      this.GXform.prop = prop
      // this.getOrganizationSearch()
    },
    // èŽ·å–å·¥åºåˆ—è¡¨
    // getList(){
    //
    // },
    //  æ–°å¢ž
    add() {
      // this.JYTableData.forEach(item => {
      //   item.isVisible = 0
      // })
      let number = Math.random() * Math.random()// ä½œä¸ºåˆ é™¤æ—¶çš„æ ‡è¯†ç¬¦
      number = number === 0 ? (10 + Math.random()) : number
      // const data = { group_code: '', group_name: '', description: '', isVisible: 1, number: number }
      // this.JYTableData.unshift(data)
    },
    // åˆ é™¤
    del() {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        // UserGroupDelete({ UserGrupCode: row.group_code }).then(res => {
        //   if (res.code === '200') {
        //     this.$message.success('删除成功!')
        //     this.getUserGroupSearch()
        //   }
        // })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    //  ç¡®è®¤
    confirm() {
    },
    //  å–消
    cancel() {
    }
  }
}
src/views/template.vue
@@ -134,8 +134,7 @@
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" :rules="dialogFormRules" :model="dialogForm" label-width="80px">
        <el-form-item label="组织类型" prop="OrgType" />
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
        <el-form-item label="组织编码" prop="OrgCode">
          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
        </el-form-item>
src/views/xtsz/bmgz.vue
@@ -157,7 +157,7 @@
          <el-input
            v-model="dialogForm.incbit"
            oninput="value=value.replace(/[^0-9.]/g,'')"
            oninput="value=value.replace(/[^0-9]/g,'')"
            style="width: 220px"
          />
        </el-form-item>
src/views/zlgl/gxjy.vue
@@ -1,11 +1,497 @@
<template />
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
        <el-form
          ref="form"
          :model="form"
          label-width="80px"
          inline
          style="display: flex;justify-content: space-between"
        >
          <div class="elForm">
            <el-form-item label="项目编码" style=" display: flex;">
              <el-input v-model="form.defectcode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="项目名称" style=" display: flex;">
              <el-input v-model="form.itemname" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="项目描述" style=" display: flex;">
              <el-input v-model="form.itemdescr" style="width: 200px" placeholder="请输入" />
            </el-form-item>
          </div>
          <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
            <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          :height="tableHeight+'px'"
          border
          stripe
          :style="{width: 100+'%',height:tableHeight+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sortChange"
        >
          <!--          <el-table-column-->
          <!--            type="selection"-->
          <!--            width="50"-->
          <!--          />-->
          <el-table-column
            prop="RowNum"
            width="50"
            label="序号"
          />
          <el-table-column
            prop="org_code"
            label="组织编码"
            sortable="custom"
          />
          <el-table-column
            prop="org_name"
            label="组织名称"
            sortable="custom"
          />
          <el-table-column
            prop="description"
            label="组织类型"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.description==='F'">工厂</div>
              <div v-if="row.description==='D'">部门</div>
              <div v-if="row.description==='W'">车间</div>
              <div v-if="row.description==='K'">科室</div>
              <div v-if="row.description==='L'">生产线</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="parentorg_name"
            label="上级单位"
            sortable="custom"
          />
          <el-table-column
            prop="lm_user"
            label="创建人员"
            sortable="custom"
          />
          <el-table-column
            prop="lm_date"
            label="创建时间"
            sortable="custom"
          />
          <el-table-column
            label="操作"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!--分页-->
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getDedectSearch"
      />
    </div>
    <el-dialog
      :title="operation==='add'?'新增':'编辑'"
      :visible.sync="dialogVisible"
      width="800px"
      top="15vh"
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
        <el-form-item label="项目类型" prop="OrgCode">
          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
        </el-form-item>
        <el-form-item label="项目名称" prop="OrgName">
          <el-input v-model="dialogForm.OrgName" style="width: 200px" />
        </el-form-item>
        <el-form-item label="项目描述" prop="OrgName">
          <el-input v-model="dialogForm.OrgName" type="textarea" 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>
        </div>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
import { DedectSearch } from '@/api/zlgl'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
  name: 'Gxjy'
  name: 'GXJY',
  components: {
    Pagination
  },
  data() {
    const validateName = (rule, value, callback) => {
      if (!value) {
        return callback(new Error('请输入编码'))
      } else {
        if (SER_HZ.test(value)) {
          return callback(new Error('编码不能为中文'))
        } else {
          callback()
        }
      }
    }
    return {
      mainHeight: 0,
      tableHeight: 0,
      form: {
        itemcode: '', // é¡¹ç›®ä»£ç 
        itemname: '', // é¡¹ç›®åç§°
        itemdescr: '', // é¡¹ç›®æè¿°
        prop: 'lm_date', // æŽ’序字段
        order: 'desc', // æŽ’序字段
        page: 1, // ç¬¬å‡ é¡µ
        rows: 20 // æ¯é¡µå¤šå°‘条
      },
      OrgTypeArr: [
        { label: '工厂', value: 'F' },
        { label: '部门', value: 'D' },
        { label: '车间', value: 'W' },
        { label: '科室', value: 'K' },
        { label: '生产线', value: 'L' }
      ],
      total: 10,
      tableData: [],
      dialogVisible: false,
      dialogForm: {
        OrgType: '',
        OrgCode: '',
        OrgName: '',
        SupUnit: ''// ä¸Šçº§å•位
      },
      operation: '',
      dialogFormRules: {
        OrgType: [
          { required: true, message: '请输入选择类型', trigger: ['blur', 'change'] }
        ],
        OrgCode: [
          { required: true, validator: validateName, trigger: ['blur', 'change'] }
        ],
        OrgName: [
          { required: true, message: '请输入名称', trigger: ['blur', 'change'] }
        ]
      }
    }
  },
  created() {
    this.getDedectSearch()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods: {
    async getDedectSearch() {
      const res = await DedectSearch(this.form)
      this.tableData = res.data
      this.total = res.count
    },
    // æŽ’序改变时
    sortChange({ column, prop, order }) {
      if (order === 'descending') {
        order = 'desc'
      } else if (order === 'ascending') {
        order = 'asc'
      } else {
        order = 'desc'
      }
      this.form.order = order
      this.form.prop = prop
      this.getDedectSearch()
    },
    // æŸ¥è¯¢
    search() {
      this.getDedectSearch()
    },
    upload() {
    },
    // é‡ç½®
    reset() {
      this.form.OrgCode = ''
      this.form.OrgName = ''
      this.form.OrgType = ''
      this.form.UserName = ''
      this.getDedectSearch()
    },
    // æ–°å¢žæŒ‰é’®
    add(operation) {
      this.operation = operation
      this.dialogVisible = true
    },
    // ä¿®æ”¹æŒ‰é’®
    edit(operation, row) {
      this.operation = operation
      this.dialogVisible = true
      this.$nextTick(() => {
        this.dialogForm.OrgCode = row.org_code
        this.dialogForm.OrgName = row.org_name
        this.dialogForm.SupUnit = row.parent_id
      })
    },
    // åˆ é™¤æŒ‰é’®
    async del(row) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        DeleteOrganization({ orgid: row.code }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            this.getDedectSearch()
          }
        })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    // å¯¹è¯æ¡†å…³é—­äº‹ä»¶
    handleClose() {
      this.dialogForm.OrgType = ''
      this.dialogForm.OrgCode = ''
      this.dialogForm.OrgName = ''
      this.dialogForm.SupUnit = ''
      this.$refs.dialogForm.clearValidate()
    },
    // å¯¹è¯æ¡†å–消
    dialogVisibleCancel() {
      this.dialogVisible = false
    },
    // å¯¹è¯æ¡†ç¡®è®¤
    dialogVisibleConfirm() {
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const data = {
            OrganCode: this.dialogForm.OrgCode,
            OrganName: this.dialogForm.OrgName,
            OperType: this.operation === 'add' ? 'Add' : 'Update',
            Operator: getCookie('admin')
          }
          AddUpdateOrganization(data).then(res => {
            if (res.code === '200') {
              this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
              this.dialogVisible = false
              this.getDedectSearch()
            } else {
              this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
            }
          })
        }
      })
    },
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 100
      })
    }
  }
}
</script>
<style scoped>
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select .el-input__inner:focus{
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected{
  color: $main_color;
}
::v-deep .el-checkbox__inner:hover{
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus{
  border-color: $main_color;
}
</style>
src/views/zlgl/qxdy.vue
@@ -1,11 +1,497 @@
<template />
<template>
  <div>
    <div class="body" :style="{height:mainHeight+'px'}">
      <div style="padding: 10px 5px 0 0">
        <el-form
          ref="form"
          :model="form"
          label-width="80px"
          inline
          style="display: flex;justify-content: space-between"
        >
          <div class="elForm">
            <el-form-item label="缺陷代码" style=" display: flex;">
              <el-input v-model="form.defectcode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="缺陷名称" style=" display: flex;">
              <el-input v-model="form.defectname" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="缺陷描述" style=" display: flex;">
              <el-input v-model="form.defectdescr" style="width: 200px" placeholder="请输入" />
            </el-form-item>
          </div>
          <div style="display: flex;align-items: start;margin-top: 5px;z-index: 2">
            <el-button type="primary" icon="el-icon-search" @click="search">查询</el-button>
            <el-button type="info" icon="el-icon-refresh" @click="reset">重置</el-button>
          </div>
        </el-form>
      </div>
      <el-divider />
      <div style="margin-left: 10px;display: flex">
        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <el-button type="primary" icon="el-icon-upload2" @click="upload">导入</el-button>
      </div>
      <el-divider />
      <div class="elTableDiv">
        <el-table
          :data="tableData"
          :height="tableHeight+'px'"
          border
          stripe
          :style="{width: 100+'%',height:tableHeight+'px',}"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          @sort-change="sortChange"
        >
          <!--          <el-table-column-->
          <!--            type="selection"-->
          <!--            width="50"-->
          <!--          />-->
          <el-table-column
            prop="RowNum"
            width="50"
            label="序号"
          />
          <el-table-column
            prop="org_code"
            label="组织编码"
            sortable="custom"
          />
          <el-table-column
            prop="org_name"
            label="组织名称"
            sortable="custom"
          />
          <el-table-column
            prop="description"
            label="组织类型"
            sortable="custom"
          >
            <template slot-scope="{row}">
              <div v-if="row.description==='F'">工厂</div>
              <div v-if="row.description==='D'">部门</div>
              <div v-if="row.description==='W'">车间</div>
              <div v-if="row.description==='K'">科室</div>
              <div v-if="row.description==='L'">生产线</div>
            </template>
          </el-table-column>
          <el-table-column
            prop="parentorg_name"
            label="上级单位"
            sortable="custom"
          />
          <el-table-column
            prop="lm_user"
            label="创建人员"
            sortable="custom"
          />
          <el-table-column
            prop="lm_date"
            label="创建时间"
            sortable="custom"
          />
          <el-table-column
            label="操作"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button type="text" @click="edit('edit',row)">编辑</el-button>
                <el-button type="text" @click="del(row)">删除</el-button>
              </div>
            </template>
          </el-table-column>
        </el-table>
      </div>
      <!--分页-->
      <pagination
        v-show="total>0"
        :total="total"
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="prev, pager, next,sizes"
        popper-class="select_bottom"
        @pagination="getDedectSearch"
      />
    </div>
    <el-dialog
      :title="operation==='add'?'新增':'编辑'"
      :visible.sync="dialogVisible"
      width="800px"
      top="15vh"
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" inline :rules="dialogFormRules" :model="dialogForm" label-width="80px">
        <el-form-item label="缺陷类型" prop="OrgCode">
          <el-input v-model="dialogForm.OrgCode" :disabled="operation!=='add'" style="width: 200px" />
        </el-form-item>
        <el-form-item label="缺陷名称" prop="OrgName">
          <el-input v-model="dialogForm.OrgName" style="width: 200px" />
        </el-form-item>
        <el-form-item label="缺陷描述" prop="OrgName">
          <el-input v-model="dialogForm.OrgName" type="textarea" 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>
        </div>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import Pagination from '@/components/Pagination'
import { AddUpdateOrganization, DeleteOrganization, OrganizationSearch, PrentOrganization } from '@/api/jcsz'
import { getCookie } from '@/utils/auth'
import { DedectSearch } from '@/api/zlgl'
const SER_HZ = /^[\u4e00-\u9fa5]+$/
export default {
  name: 'Dyqx'
  name: 'QXDY',
  components: {
    Pagination
  },
  data() {
    const validateName = (rule, value, callback) => {
      if (!value) {
        return callback(new Error('请输入编码'))
      } else {
        if (SER_HZ.test(value)) {
          return callback(new Error('编码不能为中文'))
        } else {
          callback()
        }
      }
    }
    return {
      mainHeight: 0,
      tableHeight: 0,
      form: {
        defectcode: '', // ç¼ºé™·ä»£ç 
        defectname: '', // ç¼ºé™·åç§°
        defectdescr: '', // ç¼ºé™·æè¿°
        prop: 'lm_date', // æŽ’序字段
        order: 'desc', // æŽ’序字段
        page: 1, // ç¬¬å‡ é¡µ
        rows: 20 // æ¯é¡µå¤šå°‘条
      },
      OrgTypeArr: [
        { label: '工厂', value: 'F' },
        { label: '部门', value: 'D' },
        { label: '车间', value: 'W' },
        { label: '科室', value: 'K' },
        { label: '生产线', value: 'L' }
      ],
      total: 10,
      tableData: [],
      dialogVisible: false,
      dialogForm: {
        OrgType: '',
        OrgCode: '',
        OrgName: '',
        SupUnit: ''// ä¸Šçº§å•位
      },
      operation: '',
      dialogFormRules: {
        OrgType: [
          { required: true, message: '请输入选择类型', trigger: ['blur', 'change'] }
        ],
        OrgCode: [
          { required: true, validator: validateName, trigger: ['blur', 'change'] }
        ],
        OrgName: [
          { required: true, message: '请输入名称', trigger: ['blur', 'change'] }
        ]
      }
    }
  },
  created() {
    this.getDedectSearch()
  },
  mounted() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
  },
  methods: {
    async getDedectSearch() {
      const res = await DedectSearch(this.form)
      this.tableData = res.data
      this.total = res.count
    },
    // æŽ’序改变时
    sortChange({ column, prop, order }) {
      if (order === 'descending') {
        order = 'desc'
      } else if (order === 'ascending') {
        order = 'asc'
      } else {
        order = 'desc'
      }
      this.form.order = order
      this.form.prop = prop
      this.getDedectSearch()
    },
    // æŸ¥è¯¢
    search() {
      this.getDedectSearch()
    },
    upload() {
    },
    // é‡ç½®
    reset() {
      this.form.OrgCode = ''
      this.form.OrgName = ''
      this.form.OrgType = ''
      this.form.UserName = ''
      this.getDedectSearch()
    },
    // æ–°å¢žæŒ‰é’®
    add(operation) {
      this.operation = operation
      this.dialogVisible = true
    },
    // ä¿®æ”¹æŒ‰é’®
    edit(operation, row) {
      this.operation = operation
      this.dialogVisible = true
      this.$nextTick(() => {
        this.dialogForm.OrgCode = row.org_code
        this.dialogForm.OrgName = row.org_name
        this.dialogForm.SupUnit = row.parent_id
      })
    },
    // åˆ é™¤æŒ‰é’®
    async del(row) {
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        DeleteOrganization({ orgid: row.code }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            this.getDedectSearch()
          }
        })
      }).catch(() => {
        this.$message.info('已取消删除')
      })
    },
    // å¯¹è¯æ¡†å…³é—­äº‹ä»¶
    handleClose() {
      this.dialogForm.OrgType = ''
      this.dialogForm.OrgCode = ''
      this.dialogForm.OrgName = ''
      this.dialogForm.SupUnit = ''
      this.$refs.dialogForm.clearValidate()
    },
    // å¯¹è¯æ¡†å–消
    dialogVisibleCancel() {
      this.dialogVisible = false
    },
    // å¯¹è¯æ¡†ç¡®è®¤
    dialogVisibleConfirm() {
      this.$refs.dialogForm.validate(valid => {
        if (valid) {
          const data = {
            OrganCode: this.dialogForm.OrgCode,
            OrganName: this.dialogForm.OrgName,
            OperType: this.operation === 'add' ? 'Add' : 'Update',
            Operator: getCookie('admin')
          }
          AddUpdateOrganization(data).then(res => {
            if (res.code === '200') {
              this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
              this.dialogVisible = false
              this.getDedectSearch()
            } else {
              this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
            }
          })
        }
      })
    },
    // èŽ·å–é¡µé¢é«˜åº¦
    getHeight() {
      this.$nextTick(() => {
        this.mainHeight = window.innerHeight - 250
        this.tableHeight = this.mainHeight - 100
      })
    }
  }
}
</script>
<style scoped>
<style lang="scss" scoped>
$main_color: #42b983;
::v-deep .el-button--primary {
  background-color: $main_color !important;
  height: 30px;
  display: flex;
  align-items: center;
  //border: 1px solid $main_color;
  border: none;
  padding: 0 20px;
}
::v-deep .el-button--primary:hover {
  border: none;
}
::v-deep .el-button--info {
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-pagination.is-background .el-pager li:not(.disabled).active {
  background-color: $main_color !important;
}
::v-deep .el-dialog__footer {
  display: flex;
  justify-content: flex-end;
}
.footerButton {
  display: flex;
  justify-content: end;
}
::v-deep .el-button--default {
  background-color: #ffffff !important;
  height: 30px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
::v-deep .el-button--default:hover {
  color: #606266;
}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  background-color: $main_color;
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color !important;
}
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner {
  border-color: $main_color;
  background-color: $main_color;
}
::v-deep .el-input__inner {
  height: 30px;
  line-height: 30px;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-table .caret-wrapper {
  transform: scale(0.8);
}
::v-deep .cell {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}
::v-deep .el-button--text {
  color: $main_color;
  font-size: 14px;
  cursor: pointer;
}
.operationClass {
  height: 23px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.el-icon-share {
  color: $main_color;
  cursor: pointer;
}
.el-checkbox.is-bordered.is-checked {
  border-color: $main_color;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-indeterminate .el-checkbox__inner {
  border-color: $main_color;
  background: $main_color;
}
::v-deep .el-checkbox__input.is-checked + .el-checkbox__label {
  color: $main_color !important;
}
::v-deep .el-checkbox.is-bordered + .el-checkbox.is-bordered {
  margin: 10px 30px 0px 0;
}
::v-deep .el-radio__input.is-checked + .el-radio__label {
  color: $main_color;
}
::v-deep .el-radio.is-bordered + .el-radio.is-bordered {
  margin: 10px 30px 0px 0;
}
.body ::v-deep .el-divider {
  border: 1px solid #eee;
  width: 99%;
  margin: 10px auto;
}
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
::v-deep .el-input__inner:focus {
  border-color: $main_color;
}
::v-deep .el-select .el-input__inner:focus{
  border-color: $main_color;
}
::v-deep .el-select-dropdown__item.selected{
  color: $main_color;
}
::v-deep .el-checkbox__inner:hover{
  border-color: $main_color;
}
::v-deep .el-textarea__inner:focus{
  border-color: $main_color;
}
</style>
src/views/zzmx/chda.vue
@@ -169,10 +169,12 @@
          <el-table-column
            label="工艺路线"
            width="80"
            prop="proute_id"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <i class="el-icon-share" @click="routeClick(row)" />
                <i v-if="row.proute_id==='Y'" class="el-icon-share" @click="routeClick(row)" />
                <i v-if="row.proute_id==='N'" style="color: #E4E7ED" class="el-icon-share" @click="routeClick(row)" />
              </div>
            </template>
          </el-table-column>
@@ -237,23 +239,6 @@
            />
          </el-select>
        </el-form-item>
        <el-form-item label="所属仓库" prop="warehousecode">
          <el-select
            v-model="dialogForm.warehousecode"
            filterable
            :popper-append-to-body="false"
            style="width: 200px"
            placeholder="请选择"
          >
            <!--            @focus="getWareHouseSelect2"-->
            <el-option
              v-for="item in storehouseArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="存货类型" prop="stocktypecode">
          <el-select
            v-model="dialogForm.stocktypecode"
@@ -266,6 +251,23 @@
            <el-option
              v-for="item in stocktypeArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
            />
          </el-select>
        </el-form-item>
        <el-form-item label="所属仓库" prop="warehousecode">
          <el-select
            v-model="dialogForm.warehousecode"
            filterable
            :popper-append-to-body="false"
            style="width: 200px"
            placeholder="请选择"
          >
            <!--            @focus="getWareHouseSelect2"-->
            <el-option
              v-for="item in storehouseArr"
              :key="item.code"
              :label="item.name"
              :value="item.code"
@@ -289,11 +291,12 @@
            />
          </el-select>
        </el-form-item>
        <el-form-item label="最小库存" prop="minstockqty">
          <el-input v-model="dialogForm.minstockqty" style="width: 200px" />
        </el-form-item>
        <el-form-item label="最大库存" prop="maxstockqty">
          <el-input v-model="dialogForm.maxstockqty" style="width: 200px" />
          <el-input v-model="dialogForm.maxstockqty" oninput="value=value.replace(/[^0-9]/g,'')" style="width: 200px" />
          <el-form-item label="最小库存" prop="minstockqty" style="margin-left: 10px">
            <el-input v-model="dialogForm.minstockqty" oninput="value=value.replace(/[^0-9]/g,'')" style="width: 200px" />
          </el-form-item>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
@@ -362,7 +365,12 @@
          sortable="custom"
        >
          <template slot-scope="{row}">
            <el-input v-if="row.isVisible===1" v-model="row.digdect" placeholder="请输入" />
            <el-input
              v-if="row.isVisible===1"
              v-model="row.digdect"
              oninput="value=value.replace(/[^0-9]/g,'')"
              placeholder="请输入"
            />
            <div v-else> {{ row.digdect }}</div>
          </template>
        </el-table-column>
@@ -600,21 +608,21 @@
        uomcode: [
          { required: true, message: '请选择使用单位', trigger: ['blur', 'change'] }
        ],
        warehousecode: [
          { required: true, message: '请选择所属仓库', trigger: ['blur', 'change'] }
        ],
        // warehousecode: [
        //   { required: true, message: '请选择所属仓库', trigger: ['blur', 'change'] }
        // ],
        stocktypecode: [
          { required: true, message: '请选择存货类型', trigger: ['blur', 'change'] }
        ],
        materialtypecode: [
          { required: true, message: '请输入物料类型', trigger: ['blur', 'change'] }
        ],
        minstockqty: [
          { required: true, message: '请输入最小库存', trigger: ['blur', 'change'] }
        ],
        maxstockqty: [
          { required: true, message: '请输入最大库存', trigger: ['blur', 'change'] }
        ]
        // minstockqty: [
        //   { required: true, message: '请输入最小库存', trigger: ['blur', 'change'] }
        // ],
        // maxstockqty: [
        //   { required: true, message: '请输入最大库存', trigger: ['blur', 'change'] }
        // ]
      },
      officeDialogVisible: false,
@@ -722,7 +730,7 @@
    async   edit(operation, row) {
      this.operation = operation
      this.dialogVisible = true
      await this.stocktypecodeChange(row.stocktypecode, 'dialogForm')
      // await this.stocktypecodeChange(row.stocktypecode, 'dialogForm')
      this.$nextTick(() => {
        this.dialogForm.id = row.id
        this.dialogForm.materialcode = row.partcode
@@ -783,8 +791,8 @@
            warehousecode: this.dialogForm.warehousecode,
            stocktypecode: this.dialogForm.stocktypecode,
            materialtypecode: this.dialogForm.materialtypecode,
            minstockqty: this.dialogForm.minstockqty,
            maxstockqty: this.dialogForm.maxstockqty,
            minstockqty: this.dialogForm.minstockqty === '' ? 0 : this.dialogForm.minstockqty,
            maxstockqty: this.dialogForm.maxstockqty === '' ? 0 : this.dialogForm.maxstockqty,
            OperType: this.operation === 'add' ? 'Add' : 'Update'
          }
          AddUpdateInventoryFile(data).then(res => {
@@ -949,6 +957,7 @@
      const res = await SaveInventoryFile(this.dialogFormRoute.projectCode, data)
      if (res.code === '200') {
        this.$message.success('保存成功!')
        await this.getInventoryFileSelect()
        this.dialogVisibleRoute = false
      }
    },
src/views/zzmx/gxdy.vue
@@ -128,19 +128,23 @@
          />
          <el-table-column
            label="关联工作站"
            prop="is_eqp"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <i class="el-icon-share" @click="workClick(row)" />
                <i v-if="row.is_eqp==='Y'" class="el-icon-share" @click="workClick(row)" />
                <i v-if="row.is_eqp==='N'" class="el-icon-share" style="color: #E4E7ED" @click="workClick(row)" />
              </div>
            </template>
          </el-table-column>
          <el-table-column
            label="关联缺陷"
            prop="is_defect"
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <i class="el-icon-share" @click="defectClick(row)" />
                <i v-if="row.is_defect==='Y'" class="el-icon-share" @click="defectClick(row)" />
                <i v-if="row.is_defect==='N'" class="el-icon-share" style="color: #E4E7ED;" @click="defectClick(row)" />
              </div>
            </template>
          </el-table-column>
@@ -409,7 +413,7 @@
        'stepcode': '',
        'stepname': '',
        'steptypecode': '',
        'enable': '',
        'enable': 'Y',
        'description': '',
        'OperType': ''
      },
@@ -534,7 +538,7 @@
      this.dialogForm.stepcode = ''
      this.dialogForm.stepname = ''
      this.dialogForm.steptypecode = ''
      this.dialogForm.enable = ''
      this.dialogForm.enable = 'Y'
      this.dialogForm.description = ''
      this.$refs.dialogForm.clearValidate()
    },
@@ -806,7 +810,7 @@
        console.log('3.第三种情况  åŠå¶ä¸ºé›¶  å…¨å¶ä¸ä¸ºé›¶')
        console.log(obj.code, 12)
        this.workDialogForm.workGatherArr.forEach((item, index) => {
          if (item.code === obj.code) {
          if (item.code === checkedFatherCode) {
            this.workDialogForm.workGatherArr[index].isSelected2 = true
            this.workDialogForm.workCodeSelectedGatherArr.push(obj.code)
            this.$nextTick(() => {
@@ -863,6 +867,7 @@
      const res = await SaveStepAssociationEqp(this.workDialogForm.stepcode, data)
      if (res.code === '200') {
        this.$message.success('保存成功!')
        await this.getStepSearch()
        this.workDialogVisible = false
      }
    },
@@ -909,6 +914,7 @@
      const res = await SaveStepAssociationDefect(this.defectTreeCode, data)
      if (res.code === '200') {
        this.$message.success('保存成功!')
        await this.getStepSearch()
        this.defectDialogVisible = false
      }
    }
src/views/zzmx/gylx.vue
@@ -5,12 +5,12 @@
        <el-form
          ref="form"
          :model="form"
          label-width="80px"
          label-width="100px"
          inline
          style="display: flex;justify-content: space-between"
        >
          <div class="elForm">
            <el-form-item label="工艺编码" style=" display: flex;">
            <el-form-item label="工艺路线编码" style=" display: flex;">
              <el-input v-model="form.routecode" placeholder="请输入" style="width: 200px" />
            </el-form-item>
            <el-form-item label="工艺名称" style=" display: flex;">
@@ -127,9 +127,9 @@
      @closed="handleClose"
      @close="handleClose"
    >
      <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="80px">
      <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="110px">
        <div style="display: flex">
          <el-form-item label="工艺编码" prop="code" style="margin-right: 20px">
          <el-form-item label="工艺路线编码" prop="code" style="margin-right: 20px">
            <el-input v-model="dialogForm.code" :disabled="operation!=='add'" style="width: 220px" />
          </el-form-item>
          <el-form-item label="工艺名称" prop="name">
@@ -303,7 +303,7 @@
        id: '',
        code: '',
        name: '',
        enable: '',
        enable: 'Y',
        description: '',
        Data: []
      },
@@ -316,7 +316,7 @@
      selectedName: '', // é€‰ä¸­çš„名称
      autocompleteValue: '', // å¯æœç´¢è¾“入框中的值
      routeArr: [], // å·¥è‰ºè®¾ç½®ä¸‹æ‹‰æ‰€æœ‰å€¼
      addDisabled: false, // æ·»åŠ æŒ‰é’®æ˜¯å¦å¯ç‚¹å‡»
      addDisabled: true, // æ·»åŠ æŒ‰é’®æ˜¯å¦å¯ç‚¹å‡»
      editDisabled: true, // ä¿®æ”¹æŒ‰é’®æ˜¯å¦å¯ç‚¹å‡»
      mouseFocusPosition: 0, // é¼ æ ‡èšç„¦çš„位置
      operation: '',
@@ -399,6 +399,9 @@
          flag2 = true
        }
      })
      if (tag.stepname === this.autocompleteValue.trim()) {
        flag2 = false
      }
      if (flag2) {
        return this.$message.info('此工序已选,请选择其它工序!')
      }
@@ -597,12 +600,13 @@
    handleClose() {
      this.dialogForm.code = ''
      this.dialogForm.name = ''
      this.dialogForm.enable = ''
      this.dialogForm.enable = 'Y'
      this.dialogForm.description = ''
      this.dialogForm.Data = []
      this.dynamicTags = [
        { editDisabled: true, stepcode: 'Step01', seq: 1, stepname: ' ', effect: 'light' }
      ]
      this.addDisabled = true
      this.$refs.dialogForm.clearValidate()
    },
    // å¯¹è¯æ¡†å–消
@@ -704,8 +708,11 @@
  color: #606266;
}
//::v-deep .el-dialog__body {
//  padding: 20px 100px !important;
//}
::v-deep .el-dialog__body {
  padding: 20px 100px !important;
  padding: 20px 60px !important;
}
::v-deep .el-radio__input.is-checked .el-radio__inner {
@@ -828,8 +835,8 @@
  position: absolute;
  margin-left: -7px;
  z-index: 2;
  width: 15px;
  height: 15px !important;
  width: 16px;
  height: 16px !important;
  font-size: 12px;
  text-align: center;
  line-height: 15px;