5
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										5
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@@ -11069,6 +11069,11 @@
 | 
			
		||||
        "minimist": "^1.2.5"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "moment": {
 | 
			
		||||
      "version": "2.29.4",
 | 
			
		||||
      "resolved": "https://registry.npmmirror.com/moment/-/moment-2.29.4.tgz",
 | 
			
		||||
      "integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w=="
 | 
			
		||||
    },
 | 
			
		||||
    "mousetrap": {
 | 
			
		||||
      "version": "1.6.5",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz",
 | 
			
		||||
 
 | 
			
		||||
@@ -22,6 +22,7 @@
 | 
			
		||||
    "element-ui": "^2.15.7",
 | 
			
		||||
    "js-cookie": "^2.2.1",
 | 
			
		||||
    "lodash": "^4.17.19",
 | 
			
		||||
    "moment": "^2.29.4",
 | 
			
		||||
    "qs": "^6.9.4",
 | 
			
		||||
    "quill": "^1.3.7",
 | 
			
		||||
    "sass": "^1.26.5",
 | 
			
		||||
 
 | 
			
		||||
										
											Binary file not shown.
										
									
								
							| 
		 Before Width: | Height: | Size: 4.2 KiB  | 
@@ -1,12 +1,13 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2022-08-22 14:57:50
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2023-01-04 11:27:34
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-01-31 09:41:18
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
 | 
			
		||||
<head>
 | 
			
		||||
  <meta charset="UTF-8">
 | 
			
		||||
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
 | 
			
		||||
@@ -35,31 +36,33 @@
 | 
			
		||||
  </script>
 | 
			
		||||
 | 
			
		||||
  <!-- 开发环境 -->
 | 
			
		||||
  <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
 | 
			
		||||
  <% if (process.env.VUE_APP_NODE_ENV==='dev' ) { %>
 | 
			
		||||
    <script>
 | 
			
		||||
    window.SITE_CONFIG['apiURL'] = 'http://demo.open.renren.io/renren-security-server';
 | 
			
		||||
      window.SITE_CONFIG['apiURL'] = 'http://192.168.1.23:8080';
 | 
			
		||||
    </script>
 | 
			
		||||
  <% } %>
 | 
			
		||||
  <!-- 集成测试环境 -->
 | 
			
		||||
  <% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %>
 | 
			
		||||
    <script>
 | 
			
		||||
      window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
 | 
			
		||||
    </script>
 | 
			
		||||
  <% } %>
 | 
			
		||||
  <!-- 验收测试环境 -->
 | 
			
		||||
  <% if (process.env.VUE_APP_NODE_ENV === 'prod:uat') { %>
 | 
			
		||||
    <script>
 | 
			
		||||
      window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
 | 
			
		||||
    </script>
 | 
			
		||||
  <% } %>
 | 
			
		||||
  <!-- 生产环境 -->
 | 
			
		||||
  <% if (process.env.VUE_APP_NODE_ENV === 'prod') { %>
 | 
			
		||||
    <script>
 | 
			
		||||
      window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
 | 
			
		||||
    </script>
 | 
			
		||||
  <% } %>
 | 
			
		||||
    <% } %>
 | 
			
		||||
      <!-- 集成测试环境 -->
 | 
			
		||||
      <% if (process.env.VUE_APP_NODE_ENV==='prod:sit' ) { %>
 | 
			
		||||
        <script>
 | 
			
		||||
          window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
 | 
			
		||||
        </script>
 | 
			
		||||
        <% } %>
 | 
			
		||||
          <!-- 验收测试环境 -->
 | 
			
		||||
          <% if (process.env.VUE_APP_NODE_ENV==='prod:uat' ) { %>
 | 
			
		||||
            <script>
 | 
			
		||||
              window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
 | 
			
		||||
            </script>
 | 
			
		||||
            <% } %>
 | 
			
		||||
              <!-- 生产环境 -->
 | 
			
		||||
              <% if (process.env.VUE_APP_NODE_ENV==='prod' ) { %>
 | 
			
		||||
                <script>
 | 
			
		||||
                  window.SITE_CONFIG['apiURL'] = 'http://localhost:8080/renren-admin';
 | 
			
		||||
                </script>
 | 
			
		||||
                <% } %>
 | 
			
		||||
</head>
 | 
			
		||||
 | 
			
		||||
<body>
 | 
			
		||||
  <div id="app"></div>
 | 
			
		||||
</body>
 | 
			
		||||
 | 
			
		||||
</html>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										12
									
								
								src/App.vue
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/App.vue
									
									
									
									
									
								
							@@ -1,3 +1,10 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-06 10:13:07
 | 
			
		||||
 * @LastEditTime: 2023-04-04 10:12:00
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <transition name="el-fade-in-linear">
 | 
			
		||||
    <router-view />
 | 
			
		||||
@@ -20,7 +27,10 @@ export default {
 | 
			
		||||
    this.i18nHandle(this.$i18n.locale)
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    i18nHandle (val, oldVal) {
 | 
			
		||||
    i18nHandle(val, oldVal) {
 | 
			
		||||
      console.log(this.$i18n.locale);
 | 
			
		||||
      console.log(val)
 | 
			
		||||
      console.log(oldVal)
 | 
			
		||||
      Cookies.set('language', val)
 | 
			
		||||
      document.querySelector('html').setAttribute('lang', val)
 | 
			
		||||
      document.title = messages[val].brand.lg
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										20
									
								
								src/filters/gage/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								src/filters/gage/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Date: 2020-12-29 16:49:28
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-05-08 10:26:39
 | 
			
		||||
 * @FilePath: \basic-admin\src\filters\DataDict\index.js
 | 
			
		||||
 * @Description: 部分常量的数据字典定义
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
const table = {
 | 
			
		||||
  measurementType: {
 | 
			
		||||
      0: '计量',
 | 
			
		||||
      1:'计数',
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default function (dictTable) {
 | 
			
		||||
  return function (val) {
 | 
			
		||||
    return table?.[dictTable]?.[val]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										153
									
								
								src/filters/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										153
									
								
								src/filters/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,153 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Date: 2020-12-14 09:07:03
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-18 15:14:26
 | 
			
		||||
 * @FilePath: \basic-admin\src\filters\index.js
 | 
			
		||||
 * @Description: 过滤器定义、多语言过滤器修改
 | 
			
		||||
 */
 | 
			
		||||
// import parseTime, formatTime and set to filter
 | 
			
		||||
// export { parseTime, formatTime } from '@/utils'
 | 
			
		||||
import i18n from '@/i18n'
 | 
			
		||||
import Cookies from 'js-cookie'
 | 
			
		||||
import moment from 'moment'
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Show plural label if time is plural number 
 | 
			
		||||
 * @param {number} time
 | 
			
		||||
 * @param {string} label
 | 
			
		||||
 * @return {string}
 | 
			
		||||
 */
 | 
			
		||||
function pluralize(time, label) {
 | 
			
		||||
  if (time === 1) {
 | 
			
		||||
    return time + label
 | 
			
		||||
  }
 | 
			
		||||
  return time + label + 's'
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @param {string} type
 | 
			
		||||
 */
 | 
			
		||||
export function i18nFilter(type) {
 | 
			
		||||
  const n = i18n
 | 
			
		||||
  const keyArr = [n].concat(type.split('.'))
 | 
			
		||||
  // for (let i = 0; i < keyArr.length; i++) {
 | 
			
		||||
  //   n = n[keyArr[i]]
 | 
			
		||||
  // }
 | 
			
		||||
  // return n[Cookies.get('language')]
 | 
			
		||||
  const result = keyArr.reduce((a, b) => {
 | 
			
		||||
    return a[b] ? a[b] : a
 | 
			
		||||
  })
 | 
			
		||||
  return result?.[Cookies.get('language')] || type
 | 
			
		||||
  // return result[Cookies.get('language')] ? result[Cookies.get('language')] : result
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @param {Array} type
 | 
			
		||||
 */
 | 
			
		||||
export function i18nFilterForm(type) {
 | 
			
		||||
  // console.log(type)
 | 
			
		||||
  const n = i18n
 | 
			
		||||
  const keyArr = [n].concat(type[0].split('.'))
 | 
			
		||||
  // console.log(keyArr)
 | 
			
		||||
  // for (let i = 0; i < keyArr.length; i++) {
 | 
			
		||||
  //   n = n[keyArr[i]]
 | 
			
		||||
  // }
 | 
			
		||||
  // return n[Cookies.get('language')]
 | 
			
		||||
  const result = keyArr.reduce((a, b) => {
 | 
			
		||||
    return a[b] ? a[b] : a
 | 
			
		||||
  })
 | 
			
		||||
  // console.log(result)
 | 
			
		||||
  // console.log((result?.[Cookies.get('language')]))
 | 
			
		||||
  return type[0]+ ''+ type[1]
 | 
			
		||||
  // return result[Cookies.get('language')] ? result[Cookies.get('language')] : result
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * @param {number} time
 | 
			
		||||
 */
 | 
			
		||||
export function timeAgo(time) {
 | 
			
		||||
  const between = Date.now() / 1000 - Number(time)
 | 
			
		||||
  if (between < 3600) {
 | 
			
		||||
    return pluralize(~~(between / 60), ' minute')
 | 
			
		||||
  } else if (between < 86400) {
 | 
			
		||||
    return pluralize(~~(between / 3600), ' hour')
 | 
			
		||||
  } else {
 | 
			
		||||
    return pluralize(~~(between / 86400), ' day')
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Number formatting
 | 
			
		||||
 * like 10000 => 10k
 | 
			
		||||
 * @param {number} num
 | 
			
		||||
 * @param {number} digits
 | 
			
		||||
 */
 | 
			
		||||
export function numberFormatter(num, digits) {
 | 
			
		||||
  const si = [
 | 
			
		||||
    { value: 1E18, symbol: 'E' },
 | 
			
		||||
    { value: 1E15, symbol: 'P' },
 | 
			
		||||
    { value: 1E12, symbol: 'T' },
 | 
			
		||||
    { value: 1E9, symbol: 'G' },
 | 
			
		||||
    { value: 1E6, symbol: 'M' },
 | 
			
		||||
    { value: 1E3, symbol: 'k' }
 | 
			
		||||
  ]
 | 
			
		||||
  for (let i = 0; i < si.length; i++) {
 | 
			
		||||
    if (num >= si[i].value) {
 | 
			
		||||
      return (num / si[i].value).toFixed(digits).replace(/\.0+$|(\.[0-9]*[1-9])0+$/, '$1') + si[i].symbol
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
  return num.toString()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * 10000 => "10,000"
 | 
			
		||||
 * @param {number} num
 | 
			
		||||
 */
 | 
			
		||||
export function toThousandFilter(num) {
 | 
			
		||||
  return (+num || 0).toString().replace(/^-?\d+/g, m => m.replace(/(?=(?!\b)(\d{3})+$)/g, ','))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Upper case first char
 | 
			
		||||
 * @param {String} string
 | 
			
		||||
 */
 | 
			
		||||
export function uppercaseFirst(string) {
 | 
			
		||||
  return string.charAt(0).toUpperCase() + string.slice(1)
 | 
			
		||||
}
 | 
			
		||||
export function timeFormatter(timeObj) {
 | 
			
		||||
  if (timeObj) {
 | 
			
		||||
    return moment(timeObj).format('YYYY-MM-DD HH:mm:ss')
 | 
			
		||||
  } else {
 | 
			
		||||
    return '-'
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function DateFormatter(timeObj) {
 | 
			
		||||
  if (timeObj) {
 | 
			
		||||
    return moment(timeObj).format('YYYY-MM-DD')
 | 
			
		||||
  } else {
 | 
			
		||||
    return '-'
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function onlyTimeFormatter(timeObj) {
 | 
			
		||||
  if (timeObj) {
 | 
			
		||||
    return moment(timeObj).format('HH:mm:ss')
 | 
			
		||||
  } else {
 | 
			
		||||
    return '-'
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function handleLimit(string) {
 | 
			
		||||
  if (string.length > 10) {
 | 
			
		||||
    return string.slice(0, 10) + '......'
 | 
			
		||||
  } else {
 | 
			
		||||
    return string
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function getSimpleText(html) {
 | 
			
		||||
  var re1 = new RegExp('<.+?>', 'g')
 | 
			
		||||
  var msg = html.replace(re1, '')
 | 
			
		||||
  return msg.slice(0, 10) + '......'
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										34
									
								
								src/filters/nonconform/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								src/filters/nonconform/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Date: 2020-12-29 16:49:28
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-18 16:12:08
 | 
			
		||||
 * @FilePath: \basic-admin\src\filters\DataDict\index.js
 | 
			
		||||
 * @Description: 部分常量的数据字典定义
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
const table = {
 | 
			
		||||
  inspectionType: {
 | 
			
		||||
      0: '监控',
 | 
			
		||||
        1:'电芯来料检验',
 | 
			
		||||
        2: 'IQC抽检',
 | 
			
		||||
        3: 'IQC抽检2',
 | 
			
		||||
        4: '原料抽检',
 | 
			
		||||
        5: '进货外观检验',
 | 
			
		||||
        6: '库内原料检验',
 | 
			
		||||
        7: '来料检验',
 | 
			
		||||
        8: '胶片',
 | 
			
		||||
        9: '抽检',
 | 
			
		||||
        10: '巡检',
 | 
			
		||||
        11: '首检',
 | 
			
		||||
        12: '末检',
 | 
			
		||||
        13: '实时监测',
 | 
			
		||||
        14: 'FQC抽检',
 | 
			
		||||
        15: 'OQC抽检'
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default function (dictTable) {
 | 
			
		||||
  return function (val) {
 | 
			
		||||
    return table?.[dictTable]?.[val]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										24
									
								
								src/filters/supplier/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								src/filters/supplier/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,24 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Date: 2020-12-29 16:49:28
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-18 16:12:04
 | 
			
		||||
 * @FilePath: \basic-admin\src\filters\DataDict\index.js
 | 
			
		||||
 * @Description: 部分常量的数据字典定义
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
const table = {
 | 
			
		||||
  whether: {
 | 
			
		||||
     0: '否',
 | 
			
		||||
        1:'是',
 | 
			
		||||
  },
 | 
			
		||||
  available: {
 | 
			
		||||
     0: '不可用',
 | 
			
		||||
     1:'不可用',
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export default function (dictTable) {
 | 
			
		||||
  return function (val) {
 | 
			
		||||
    return table?.[dictTable]?.[val]
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -21,6 +21,20 @@ t.manage = '处理'
 | 
			
		||||
t.createDate = '创建时间'
 | 
			
		||||
t.keyword = '关键字:'
 | 
			
		||||
t.choose = '请选择'
 | 
			
		||||
t.save = '保存'
 | 
			
		||||
t.close = '关闭'
 | 
			
		||||
t.edit = '修改'
 | 
			
		||||
t.search = '搜索'
 | 
			
		||||
t.reset = '重置'
 | 
			
		||||
t.teamMemberChange = '团队成员变更'
 | 
			
		||||
t.conditionSearch= '条件搜索'
 | 
			
		||||
t.changeStatus = '更改状态'
 | 
			
		||||
t.all = '全部'
 | 
			
		||||
t.available = '可用'
 | 
			
		||||
t.notAvailable = '不可用'
 | 
			
		||||
t.time = '时间段'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
t.prompt = {}
 | 
			
		||||
t.prompt.title = '提示'
 | 
			
		||||
@@ -256,6 +270,227 @@ t.user.validate = {}
 | 
			
		||||
t.user.validate.confirmPassword = '确认密码与密码输入不一致'
 | 
			
		||||
t.user.select = '选择用户'
 | 
			
		||||
t.user.selecterror = '请选择一条记录'
 | 
			
		||||
 | 
			
		||||
t.basic = {}
 | 
			
		||||
t.basic.name = '名称'
 | 
			
		||||
t.basic.code = '编码'
 | 
			
		||||
t.basic.status = '状态'
 | 
			
		||||
t.basic.available = '可用'
 | 
			
		||||
t.basic.remark = '描述'
 | 
			
		||||
t.basic.specification = '规格'
 | 
			
		||||
t.basic.InspectionStage = '检验阶段'
 | 
			
		||||
t.basic.InspectionPlan = '检验计划'
 | 
			
		||||
t.basic.customerTypeName = '客户类型'
 | 
			
		||||
t.basic.productTypeName = '产品类型名称'
 | 
			
		||||
t.basic.client = '服务对象'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
t.quality = {}
 | 
			
		||||
t.quality.name = '名称'
 | 
			
		||||
t.quality.planCategory = '计划类别'
 | 
			
		||||
t.quality.fatalFlaw = '致命缺陷'
 | 
			
		||||
t.quality.acceptable = '可接受'
 | 
			
		||||
t.quality.sampleSize = '抽样数'
 | 
			
		||||
t.quality.unacceptable = '不可接受'
 | 
			
		||||
t.quality.seriousDisadvantage = '严重缺陷'
 | 
			
		||||
t.quality.minor = '轻微缺陷'
 | 
			
		||||
t.quality.total = '总计'
 | 
			
		||||
t.quality.fourPointZero = '4.0'
 | 
			
		||||
t.quality.onePointFive = '1.5'		
 | 
			
		||||
t.quality.onePointZero = '1.0'		
 | 
			
		||||
t.quality.sampleRange =	'取样范围'		
 | 
			
		||||
t.quality.sixPointFive =	'6.5'		
 | 
			
		||||
t.quality.ten =	'10'		
 | 
			
		||||
t.quality.twoPointFive = '2.5'		
 | 
			
		||||
t.quality.zeroPointFour =	'0.40'		
 | 
			
		||||
t.quality.zeroPointOne =	'0.10'		
 | 
			
		||||
t.quality.zeroPointOneFive =	'0.15'	
 | 
			
		||||
t.quality.zeroPointSixFive =	'0.65'		
 | 
			
		||||
t.quality.zeroPointTwoFive =	'0.25'	
 | 
			
		||||
t.quality.zeroPointZeroFour =	'0.040'	
 | 
			
		||||
t.quality.zeroPointZeroOne =	'0.010'	
 | 
			
		||||
t.quality.zeroPointZeroOneFive =	'0.015'	
 | 
			
		||||
t.quality.zeroPointZeroSixFive =	'0.065'	
 | 
			
		||||
t.quality.zeroPointZeroTwoFive =	'0.025'
 | 
			
		||||
t.quality.disposalMethodName =	'名称'
 | 
			
		||||
t.quality.disposalMethodCode =	'编码'
 | 
			
		||||
t.quality.judgmentMark = '判断标识'
 | 
			
		||||
t.quality.disposalMethodStatus = '状态'
 | 
			
		||||
t.quality.inspectionPositionNumber =	'序号'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
t.disqualification = {}
 | 
			
		||||
t.disqualification.inspectionTypeId = '检验类型'
 | 
			
		||||
t.disqualification.productTypeName = '产品类型'
 | 
			
		||||
t.disqualification.productName = '产品名称'
 | 
			
		||||
t.disqualification.teamName = '处置团队'
 | 
			
		||||
t.disqualification.disposalMethod = '处置方法'
 | 
			
		||||
t.disqualification.approvalProcessName = '审批流'
 | 
			
		||||
t.disqualification.title = '标题'
 | 
			
		||||
t.disqualification.productCode = '产品编号'
 | 
			
		||||
t.disqualification.orderNumber = '订单号'
 | 
			
		||||
t.disqualification.batchNo = '批号'
 | 
			
		||||
t.disqualification.supplierName = '供应商'
 | 
			
		||||
t.disqualification.reportTime = '报告时间'
 | 
			
		||||
t.disqualification.userName = '报告人'
 | 
			
		||||
t.disqualification.disposalStatus = '处置状态'
 | 
			
		||||
t.disqualification.disposalMethod = '处置方法'
 | 
			
		||||
t.disqualification.disposalTime = '处置时间'
 | 
			
		||||
t.disqualification.remark = '备注'
 | 
			
		||||
t.disqualification.approvalProcessCode = '编号'
 | 
			
		||||
t.disqualification.approvalProcessName = '名称'
 | 
			
		||||
t.disqualification.approvalProcessType = '类型'
 | 
			
		||||
t.disqualification.description = '描述'
 | 
			
		||||
t.disqualification.step = '步骤'
 | 
			
		||||
t.disqualification.team = '团队'
 | 
			
		||||
 | 
			
		||||
t.supplier = {}
 | 
			
		||||
t.supplier.code = '编码'
 | 
			
		||||
t.supplier.name = '名称'
 | 
			
		||||
t.supplier.changeStatus = '更改状态'
 | 
			
		||||
t.supplier.status = '状态'
 | 
			
		||||
t.supplier.supplierCode = '供应商编码'
 | 
			
		||||
t.supplier.supplierName = '供应商名称'
 | 
			
		||||
t.supplier.productName = '产品名称'
 | 
			
		||||
t.supplier.productCode = '产品编码'
 | 
			
		||||
t.supplier.supplierRelevance = '供应商关联产品'
 | 
			
		||||
t.supplier.abbreviation = '简称'
 | 
			
		||||
t.supplier.grade = '重要等级'
 | 
			
		||||
t.supplier.address = '地址'
 | 
			
		||||
t.supplier.ment = '供应商状态'
 | 
			
		||||
t.supplier.contact = '联系人'
 | 
			
		||||
t.supplier.contactEmail = '联系人邮箱'
 | 
			
		||||
t.supplier.contactPhone = '联系人电话'
 | 
			
		||||
t.supplier.enterpriseNature = '企业性质'
 | 
			
		||||
t.supplier.industry = '所属行业'
 | 
			
		||||
t.supplier.productService = '产品/服务'
 | 
			
		||||
t.supplier.supplierBatch = '供方批次'
 | 
			
		||||
t.supplier.supplierType = '供应商类型'
 | 
			
		||||
t.supplier.offlineTime = '下线时间'
 | 
			
		||||
t.supplier.defectiveQuantity = '不良数量'
 | 
			
		||||
t.supplier.undesirablePhenomena = '不良现象'
 | 
			
		||||
t.supplier.materialName = '物料名称'
 | 
			
		||||
t.supplier.materialCode = '物料编码'
 | 
			
		||||
t.supplier.applicationDate ='申请日期'
 | 
			
		||||
t.supplier.causeAnalysis=	'原因分析	'	
 | 
			
		||||
t.supplier.closedLoop	='闭环'
 | 
			
		||||
t.supplier.everlastMeasures	= '永久措施'	
 | 
			
		||||
t.supplier.interimMeasures= '临时措施'		
 | 
			
		||||
t.supplier.lostHour= '损失工时(h)'
 | 
			
		||||
t.supplier.place= '地点'		
 | 
			
		||||
t.supplier.problemBatch	= '问题批次'		
 | 
			
		||||
t.supplier.problemDescription ='问题描述'	
 | 
			
		||||
t.supplier.rejectionRate= '不良率(%)'
 | 
			
		||||
t.supplier.remark	= '备注'		
 | 
			
		||||
t.supplier.evaluationTemplateName = '评估模板'
 | 
			
		||||
t.supplier.startTime = '启动时间'
 | 
			
		||||
t.supplier.description = '说明'		
 | 
			
		||||
t.supplier.evaluationPeriod	= '评估时间段'		
 | 
			
		||||
t.supplier.evaluationType = '评估类型'
 | 
			
		||||
t.supplier.reminder	= '提醒人'	
 | 
			
		||||
t.supplier.title	= '标题'
 | 
			
		||||
 | 
			
		||||
t.gage = {}
 | 
			
		||||
t.gage.name = '名称'
 | 
			
		||||
t.gage.code = '编号'
 | 
			
		||||
t.gage.measurementType = '测量类型'
 | 
			
		||||
t.gage.decimalDigits = '小数点位'
 | 
			
		||||
t.gage.lsl = 'lsl'
 | 
			
		||||
t.gage.serialNo = '序号'
 | 
			
		||||
t.gage.sl = 'sl'
 | 
			
		||||
t.gage.usl = 'usl'
 | 
			
		||||
t.gage.gageName = '量具名称'
 | 
			
		||||
t.gage.gageCode = '量具编号'
 | 
			
		||||
t.gage.measurToolEvent = '量具事件'
 | 
			
		||||
t.gage.recipientName = '接收人'
 | 
			
		||||
t.gage.processUserName = '审核人'
 | 
			
		||||
t.gage.process = '审核'
 | 
			
		||||
t.gage.expectedReturnDate = '	预计归还日期'
 | 
			
		||||
t.gage.transferDate = '	转移日期'
 | 
			
		||||
t.gage.createDate = '发生日期'
 | 
			
		||||
t.gage.userDepartment = '使用部门'
 | 
			
		||||
t.gage.useLocation = '使用位置'
 | 
			
		||||
t.gage.remark = '备注'
 | 
			
		||||
t.gage.measuringToolSpecification = '规格'
 | 
			
		||||
t.gage.client = '委托单位'
 | 
			
		||||
t.gage.certificateCodeBh = '证书编号Bh'
 | 
			
		||||
t.gage.certificateCode = '证书编号'
 | 
			
		||||
t.gage.gageTypeName = '量具类型'
 | 
			
		||||
t.gage.internalInspectionCycle = '	内部校验周期'
 | 
			
		||||
t.gage.internalInspectionTime = '	内部校验时间'
 | 
			
		||||
t.gage.nextInternalInspectionTime = '下次内部校验时间'
 | 
			
		||||
t.gage.externalInspectionCycle = '	外部校验周期'
 | 
			
		||||
t.gage.externalInspectionTime = '	外部校验时间'
 | 
			
		||||
t.gage.nextExternalInspectionTime = '下次外部校验时间'
 | 
			
		||||
t.gage.description = '描述'
 | 
			
		||||
t.gage.status = '状态'
 | 
			
		||||
t.gage.belongPersonName = '所属人'
 | 
			
		||||
t.gage.certificateType = '证书类别'
 | 
			
		||||
t.gage.benchmarkMeasurTool = '基准量具'
 | 
			
		||||
t.gage.equipmentSupplier = '设备供应商'
 | 
			
		||||
t.gage.gageStatus = '量具状态'
 | 
			
		||||
t.gage.measuringToolAccuracy = '量具精度'
 | 
			
		||||
t.gage.supplierName = '供应商'
 | 
			
		||||
t.gage.endTime = '结束时间'
 | 
			
		||||
t.gage.startTime = '开始时间'
 | 
			
		||||
t.gage.to = '至'
 | 
			
		||||
t.gage.parityBit = '校验类型'
 | 
			
		||||
t.gage.verificationResult = '校验结果'
 | 
			
		||||
t.gage.calibrationUnit = '校验单位'
 | 
			
		||||
t.gage.calibrationDepartment = '校验部门'
 | 
			
		||||
t.gage.checker = '校验人'
 | 
			
		||||
t.gage.verificationFee = '校验费用'
 | 
			
		||||
t.gage.client ='委托单位'
 | 
			
		||||
t.gage.measure = '测'
 | 
			
		||||
t.gage.inspectionTime = '校验时间'
 | 
			
		||||
t.gage.measurementTime	 = '测定时间'
 | 
			
		||||
t.gage.partName	 = '品名'
 | 
			
		||||
t.gage.partName	 = '品名'
 | 
			
		||||
t.gage.partName	 = '品名'
 | 
			
		||||
t.gage.partName	 = '品名'
 | 
			
		||||
t.gage.partName	 = '品名'
 | 
			
		||||
t.gage.partName	 = '品名'
 | 
			
		||||
t.gage.partName	 = '品名'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
t.dictionary = {}
 | 
			
		||||
t.dictionary.name = '	名称'
 | 
			
		||||
t.dictionary.code = '	编码'
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export default t
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								src/icons/svg/icon-changeStatus.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/icons/svg/icon-changeStatus.svg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1 @@
 | 
			
		||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1681461907107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3503" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M187.97568 565.98528c14.88896 73.1648 51.58912 138.98752 106.09664 190.31552a32.68608 32.68608 0 0 0 27.1872 8.56064 32.7424 32.7424 0 0 0 23.60832-16.00512l42.56768-73.72288a32.768 32.768 0 0 0-4.096-38.36928 214.13376 214.13376 0 0 1-47.39072-86.06208 32.75264 32.75264 0 0 0-31.55456-24.00256H220.05248a32.68096 32.68096 0 0 0-25.34912 12.03712 32.65024 32.65024 0 0 0-6.72768 27.24864zM621.11744 717.53728a32.70656 32.70656 0 0 0-35.3536-15.64672 210.88256 210.88256 0 0 1-106.46016-4.22912 32.78336 32.78336 0 0 0-37.90848 14.9504l-41.78944 72.4224a32.74752 32.74752 0 0 0-2.42688 27.48416 32.62464 32.62464 0 0 0 19.44576 19.57376c39.58784 14.62272 81.40288 22.0416 124.2368 22.0416 35.41504 0 70.37952-5.11488 103.89504-15.22176a32.82944 32.82944 0 0 0 20.992-19.28192 32.73216 32.73216 0 0 0-2.0992-28.4416l-42.53184-73.6512zM771.584 217.3696a32.70144 32.70144 0 0 0-20.96128-7.60832c-1.89952 0-3.83488 0.19968-5.7344 0.52736a32.73728 32.73728 0 0 0-22.59968 15.872l-41.8816 72.47872a32.80384 32.80384 0 0 0 6.00064 40.30976 210.65216 210.65216 0 0 1 59.36128 98.19136 32.768 32.768 0 0 0 31.58528 24.07424h84.352a32.75776 32.75776 0 0 0 25.3184-12.00128 32.62464 32.62464 0 0 0 6.75328-27.22304c-16.09728-79.7696-59.48928-152.44288-122.19392-204.6208zM665.74848 168.27392a32.76288 32.76288 0 0 0-20.992-19.28704 359.80288 359.80288 0 0 0-103.89504-15.25248c-42.83392 0-84.64896 7.41376-124.2368 22.03648a32.78336 32.78336 0 0 0-17.01888 47.104l41.78944 72.41216a32.78336 32.78336 0 0 0 37.90848 14.9504 210.7392 210.7392 0 0 1 61.56288-9.14944c14.98624 0 30.1056 1.6384 44.89728 4.8896a32.74752 32.74752 0 0 0 35.3536-15.61088l42.53696-73.66144a32.70656 32.70656 0 0 0 2.09408-28.43136zM861.70624 526.6944h-84.352a32.73216 32.73216 0 0 0-31.58528 24.06912 210.74944 210.74944 0 0 1-59.36128 98.19648 32.73728 32.73728 0 0 0-6.00064 40.2688l41.8816 72.50944a32.70144 32.70144 0 0 0 22.59968 15.87712c1.89952 0.32768 3.83488 0.49152 5.7344 0.49152a32.67584 32.67584 0 0 0 20.96128-7.57248c62.70464-52.21376 106.09664-124.85632 122.19392-204.61568a32.6144 32.6144 0 0 0-6.75328-27.22304 32.6656 32.6656 0 0 0-25.3184-12.00128zM194.69824 449.17248a32.69632 32.69632 0 0 0 25.34912 12.03712h84.352a32.75776 32.75776 0 0 0 31.55456-24.00256 214.15424 214.15424 0 0 1 47.39072-86.0928 32.7168 32.7168 0 0 0 4.096-38.33856L344.87296 239.0528a32.8704 32.8704 0 0 0-23.60832-16.03584 32.70656 32.70656 0 0 0-4.75648-0.32768c-8.26368 0-16.3328 3.1488-22.43072 8.91904C239.5648 282.9312 202.86464 348.7488 187.97568 421.91872a32.68608 32.68608 0 0 0 6.72256 27.25376z" fill="#2c2c2c" p-id="3504"></path></svg>
 | 
			
		||||
| 
		 After Width: | Height: | Size: 2.9 KiB  | 
							
								
								
									
										11
									
								
								src/main.js
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								src/main.js
									
									
									
									
									
								
							@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2022-08-22 14:57:50
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2023-01-04 14:25:14
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-03 14:37:45
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
import Vue from 'vue'
 | 
			
		||||
@@ -23,10 +23,13 @@ import { hasPermission, getDictLabel } from '@/utils'
 | 
			
		||||
import cloneDeep from 'lodash/cloneDeep'
 | 
			
		||||
// main.js
 | 
			
		||||
import myComponents from 'code-brick-zj'
 | 
			
		||||
import * as filters from './filters' // global filters
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Object.keys(filters).forEach(key => {
 | 
			
		||||
  Vue.filter(key, filters[key])
 | 
			
		||||
})
 | 
			
		||||
Vue.config.productionTip = false
 | 
			
		||||
 | 
			
		||||
Vue.prototype.$i18nForm = filters.i18nFilterForm
 | 
			
		||||
Vue.use(Element, {
 | 
			
		||||
  size: 'default',
 | 
			
		||||
  i18n: (key, value) => i18n.t(key, value)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2022-08-24 11:19:43
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2023-01-05 14:24:29
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-18 14:28:38
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
export default {
 | 
			
		||||
@@ -13,7 +13,7 @@ export default {
 | 
			
		||||
        getDataListURL: '',
 | 
			
		||||
        deleteURL: '',
 | 
			
		||||
        statusUrl: '',
 | 
			
		||||
        exportUrl: ''
 | 
			
		||||
        exportURL: ''
 | 
			
		||||
      },
 | 
			
		||||
      addOrEditTitle: '',
 | 
			
		||||
      tableData: [],
 | 
			
		||||
@@ -164,7 +164,7 @@ export default {
 | 
			
		||||
    // 导出
 | 
			
		||||
    exportHandle(name) {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.exportUrl, { responseType: "blob" })
 | 
			
		||||
        .get(this.urlOptions.exportURL, { responseType: "blob" })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          var date = new Date();
 | 
			
		||||
          var year = date.getFullYear();
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										196
									
								
								src/mixins/basic-search.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										196
									
								
								src/mixins/basic-search.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,196 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2022-08-24 11:19:43
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-02-24 16:16:54
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
export default {
 | 
			
		||||
  data() {
 | 
			
		||||
    /* eslint-disable */
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: '',
 | 
			
		||||
        deleteURL: '',
 | 
			
		||||
        statusUrl: '',
 | 
			
		||||
        exportUrl: ''
 | 
			
		||||
      },
 | 
			
		||||
      addOrEditTitle: '',
 | 
			
		||||
      tableData: [],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 10,
 | 
			
		||||
        page: 1,
 | 
			
		||||
        total: 1,
 | 
			
		||||
      },
 | 
			
		||||
      dataListLoading: false,
 | 
			
		||||
      addOrUpdateVisible: false,
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
  },
 | 
			
		||||
  activated() {
 | 
			
		||||
    this.getDataList();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 获取数据列表
 | 
			
		||||
    getDataList() {
 | 
			
		||||
      this.dataListLoading = true;
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getDataListURL, {
 | 
			
		||||
          params: this.listQuery,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          this.dataListLoading = false;
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            this.tableData = [];
 | 
			
		||||
            this.listQuery.total = 0;
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.tableData = res.data.list;
 | 
			
		||||
          this.listQuery.total = res.data.total;
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
          this.dataListLoading = false;
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 每页数
 | 
			
		||||
    // sizeChangeHandle(val) {
 | 
			
		||||
    //   this.listQuery.limit = val;
 | 
			
		||||
    //   this.listQuery.page = 1;
 | 
			
		||||
    //   this.getDataList();
 | 
			
		||||
    // },
 | 
			
		||||
    // // 当前页
 | 
			
		||||
    // currentChangeHandle(val) {
 | 
			
		||||
    //   this.listQuery.page = val;
 | 
			
		||||
    //   this.getDataList();
 | 
			
		||||
    // },
 | 
			
		||||
    //查看
 | 
			
		||||
    searchOrUpdateHandle() {
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    handleSearchReset() {
 | 
			
		||||
      this.$refs.addOrUpdate.formClear();
 | 
			
		||||
    },
 | 
			
		||||
    cancel(id) {
 | 
			
		||||
      this.$refs["popover-" + id].showPopper = false;
 | 
			
		||||
    },
 | 
			
		||||
    //改变状态
 | 
			
		||||
    // changeStatus(id) {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .post(this.urlOptions.statusUrl, { id })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.$refs["popover-" + id].showPopper = false;
 | 
			
		||||
    //       this.$message({
 | 
			
		||||
    //         message: this.$t("prompt.success"),
 | 
			
		||||
    //         type: "success",
 | 
			
		||||
    //         duration: 500,
 | 
			
		||||
    //         onClose: () => {
 | 
			
		||||
    //           this.getDataList();
 | 
			
		||||
    //         },
 | 
			
		||||
    //       });
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => { });
 | 
			
		||||
    // },
 | 
			
		||||
    //tableBtn点击
 | 
			
		||||
    // handleClick(val) {
 | 
			
		||||
    //   if (val.type === "edit") {
 | 
			
		||||
    //     this.addOrUpdateVisible = true;
 | 
			
		||||
    //     this.addOrEditTitle = "编辑";
 | 
			
		||||
    //     this.$nextTick(() => {
 | 
			
		||||
    //       this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
    //     });
 | 
			
		||||
    //   } else if (val.type === "delete") {
 | 
			
		||||
    //     this.deleteHandle(val.data.id,val.data.name)
 | 
			
		||||
    //   }
 | 
			
		||||
    // },
 | 
			
		||||
    // 删除
 | 
			
		||||
    // deleteHandle(id, name) {
 | 
			
		||||
    //   this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
 | 
			
		||||
    //     confirmButtonText: "确定",
 | 
			
		||||
    //     cancelButtonText: "取消",
 | 
			
		||||
    //     type: "warning",
 | 
			
		||||
    //   })
 | 
			
		||||
    //     .then(() => {
 | 
			
		||||
    //       this.$http.delete(this.urlOptions.deleteURL, { data: [id] }).then(({ data }) => {
 | 
			
		||||
    //         if (data && data.code === 0) {
 | 
			
		||||
    //           this.$message({
 | 
			
		||||
    //             message: "操作成功",
 | 
			
		||||
    //             type: "success",
 | 
			
		||||
    //             duration: 1500,
 | 
			
		||||
    //             onClose: () => {
 | 
			
		||||
    //               this.getDataList();
 | 
			
		||||
    //             },
 | 
			
		||||
    //           });
 | 
			
		||||
    //         } else {
 | 
			
		||||
    //           this.$message.error(data.msg);
 | 
			
		||||
    //         }
 | 
			
		||||
    //       });
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => { });
 | 
			
		||||
    // },
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    // buttonClick(val) {
 | 
			
		||||
    //   switch (val.btnName) {
 | 
			
		||||
    //     case "search":
 | 
			
		||||
    //       this.listQuery.xm1 = val.xm1;
 | 
			
		||||
    //       this.listQuery.xm2 = val.xm2;
 | 
			
		||||
    //       this.listQuery.page = 1;
 | 
			
		||||
    //       this.getDataList();
 | 
			
		||||
    //       break;
 | 
			
		||||
    //     case "add":
 | 
			
		||||
    //       this.addOrEditTitle = '新增'
 | 
			
		||||
    //       this.addOrUpdateVisible = true;
 | 
			
		||||
    //       this.addOrUpdateHandle()
 | 
			
		||||
    //       break;
 | 
			
		||||
    //     default:
 | 
			
		||||
    //       console.log(val)
 | 
			
		||||
    //    }
 | 
			
		||||
    // },
 | 
			
		||||
    handleSearchCancel() {
 | 
			
		||||
      this.$refs.searchOrUpdate.formClear()
 | 
			
		||||
      this.searchOrUpdateVisible = false
 | 
			
		||||
      this.searchOrEditTitle = ''
 | 
			
		||||
    },
 | 
			
		||||
    handleSearchConfirm() {
 | 
			
		||||
      this.$refs.searchOrUpdate.handleConditionSearch()
 | 
			
		||||
    },
 | 
			
		||||
    searchSuccessSubmit() {
 | 
			
		||||
      this.handleSearchCancel()
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
    },
 | 
			
		||||
    // 导出
 | 
			
		||||
    // exportHandle(name) {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.exportUrl, { responseType: "blob" })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       var date = new Date();
 | 
			
		||||
    //       var year = date.getFullYear();
 | 
			
		||||
    //       var month = date.getMonth() + 1;
 | 
			
		||||
    //       var strDate = date.getDate();
 | 
			
		||||
    //       if (month >= 1 && month <= 9) {
 | 
			
		||||
    //         month = "0" + month;
 | 
			
		||||
    //       }
 | 
			
		||||
    //       if (strDate >= 0 && strDate <= 9) {
 | 
			
		||||
    //         strDate = "0" + strDate;
 | 
			
		||||
    //       }
 | 
			
		||||
    //       var currentdate = year + "-" + month + "-" + strDate;
 | 
			
		||||
    //       const blob = new Blob([res]);
 | 
			
		||||
    //       const downloadElement = document.createElement("a");
 | 
			
		||||
    //       const href = window.URL.createObjectURL(blob); // 创建下载的链接
 | 
			
		||||
    //       downloadElement.href = href;
 | 
			
		||||
    //       downloadElement.download = `${name + currentdate}.xls`; // 下载后文件名
 | 
			
		||||
    //       document.body.appendChild(downloadElement);
 | 
			
		||||
    //       downloadElement.click(); // 点击下载
 | 
			
		||||
    //       document.body.removeChild(downloadElement); // 下载完成移除元素
 | 
			
		||||
    //       window.URL.revokeObjectURL(href);
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => { });
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2022-08-24 11:19:43
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2022-09-16 14:19:44
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-07 10:26:58
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
export default {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:39
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2023-01-05 15:52:02
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-03-20 16:37:21
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
import Vue from 'vue'
 | 
			
		||||
@@ -43,7 +43,7 @@ export const moduleRoutes = {
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export function addDynamicRoute (routeParams, router) {
 | 
			
		||||
export function addDynamicRoute(routeParams, router) {
 | 
			
		||||
  // 组装路由名称, 并判断是否已添加, 如是: 则直接跳转
 | 
			
		||||
  var routeName = routeParams.routeName
 | 
			
		||||
  var dynamicRoute = window.SITE_CONFIG['dynamicRoutes'].filter(item => item.name === routeName)[0]
 | 
			
		||||
@@ -132,6 +132,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
 | 
			
		||||
  var temp = []
 | 
			
		||||
  for (var i = 0; i < menuList.length; i++) {
 | 
			
		||||
    if (menuList[i].children && menuList[i].children.length >= 1) {
 | 
			
		||||
      console.log(menuList[i].children);
 | 
			
		||||
      temp = temp.concat(menuList[i].children)
 | 
			
		||||
      continue
 | 
			
		||||
    }
 | 
			
		||||
@@ -143,7 +144,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
 | 
			
		||||
      meta: {
 | 
			
		||||
        ...window.SITE_CONFIG['contentTabDefault'],
 | 
			
		||||
        menuId: menuList[i].id,
 | 
			
		||||
        title: menuList[i].name
 | 
			
		||||
        title: menuList[i].name,
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    // eslint-disable-next-line
 | 
			
		||||
@@ -157,6 +158,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
 | 
			
		||||
      route['component'] = () => import(`@/views/modules/${URL}`)
 | 
			
		||||
    }
 | 
			
		||||
    routes.push(route)
 | 
			
		||||
    // console.log(route);
 | 
			
		||||
  }
 | 
			
		||||
  if (temp.length >= 1) {
 | 
			
		||||
    return fnAddDynamicMenuRoutes(temp, routes)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,3 +1,10 @@
 | 
			
		||||
/*
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-06 10:13:07
 | 
			
		||||
 * @LastEditTime: 2023-02-22 16:52:30
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
 */
 | 
			
		||||
import axios from 'axios'
 | 
			
		||||
import Cookies from 'js-cookie'
 | 
			
		||||
import router from '@/router'
 | 
			
		||||
 
 | 
			
		||||
@@ -1,8 +1,8 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2023-01-05 16:48:04
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-05-08 10:49:29
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
@@ -35,9 +35,11 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 通过menuId与动态(菜单)路由进行匹配跳转至指定路由
 | 
			
		||||
    gotoRouteHandle (menuId) {
 | 
			
		||||
    gotoRouteHandle(menuId) {
 | 
			
		||||
      var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(item => item.meta.menuId === menuId)[0]
 | 
			
		||||
      console.log(this.menu)
 | 
			
		||||
      if (route) {
 | 
			
		||||
        console.log(route.name)
 | 
			
		||||
        this.$router.push({ name: route.name })
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -1,10 +1,3 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zwq
 | 
			
		||||
 * @LastEditTime: 2023-01-05 15:52:01
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]">
 | 
			
		||||
    <div class="aui-sidebar__inner">
 | 
			
		||||
@@ -15,7 +8,7 @@
 | 
			
		||||
        :collapseTransition="false"
 | 
			
		||||
        class="aui-sidebar__menu"
 | 
			
		||||
      >
 | 
			
		||||
        <sub-menu v-for="menu in $store.state.sidebarMenuList" :key="menu.id" :menu="menu" />
 | 
			
		||||
        <sub-menu  v-for="menu in $store.state.sidebarMenuList" :key="menu.id" :menu="menu" />
 | 
			
		||||
      </el-menu>
 | 
			
		||||
    </div>
 | 
			
		||||
  </aside>
 | 
			
		||||
@@ -32,6 +25,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  created() {
 | 
			
		||||
    this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
 | 
			
		||||
    console.log(this.$store.state.sidebarMenuList);
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										43
									
								
								src/views/modules/basic/components/available.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										43
									
								
								src/views/modules/basic/components/available.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,43 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 09:49:36
 | 
			
		||||
 * @LastEditTime: 2023-04-17 11:10:37
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-tag
 | 
			
		||||
      v-if="injectData.controlStatus === 1 || injectData.customerTypeStatus === 1 || injectData.customerStatus === 1 || injectData.failureTypeStatus === 1 || injectData.productTypeStatus === 1"
 | 
			
		||||
      type="success">可用</el-tag>
 | 
			
		||||
    <el-tag v-else type="warning">不可用</el-tag>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										167
									
								
								src/views/modules/basic/components/control-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										167
									
								
								src/views/modules/basic/components/control-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,167 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-03-29 09:09:20
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="controlCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.controlCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="controlName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="specification" :label="$t('basic.specification')">
 | 
			
		||||
      <el-input v-model="dataForm.specification" :placeholder="$t('basic.specification')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="controlName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="controlName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="controlName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.controlName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/basic/qmsCustomerType",
 | 
			
		||||
        infoURL: "/basic/qmsCustomerType/{id}",
 | 
			
		||||
        getCodeURL: '/basic/qmsControlMode/getCode'
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: "",
 | 
			
		||||
        controlCode:null,
 | 
			
		||||
        controlName:null,
 | 
			
		||||
        customerTypeStatus:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        dictLabel: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        dictValue: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        sort: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  created () {
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      this.getControlCode()
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo();
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/basic/qmsControlMode/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    getControlCode() {
 | 
			
		||||
      // console.log(111111);
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.controlCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										126
									
								
								src/views/modules/basic/components/controlSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								src/views/modules/basic/components/controlSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,126 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-02-15 15:18:01
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form
 | 
			
		||||
    :model="dataForm"
 | 
			
		||||
    ref="dataForm"
 | 
			
		||||
    @keyup.enter.native="dataFormSubmitHandle()"
 | 
			
		||||
    label-width="120px"
 | 
			
		||||
  >
 | 
			
		||||
    <el-form-item prop="key" :label="$t('basic.name')">
 | 
			
		||||
      <el-input
 | 
			
		||||
        v-model="dataForm.key"
 | 
			
		||||
        :placeholder="$t('basic.name')"
 | 
			
		||||
        clearable
 | 
			
		||||
      ></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        key: "",
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										179
									
								
								src/views/modules/basic/components/customer-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										179
									
								
								src/views/modules/basic/components/customer-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,179 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-02-24 14:58:53
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="customerCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.customerCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customerName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.customerName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customerTypeId" :label="$t('basic.customerTypeName')">
 | 
			
		||||
      <el-select v-model="dataForm.customerTypeId" :placeholder="$t('basic.customerTypeName')">
 | 
			
		||||
        <el-option v-for="item in customerTypeList" :key="item.id" :label="item.customerTypeName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/basic/qmsCustomer",
 | 
			
		||||
        getCustomerPageListURL: "/basic/qmsCustomerType/page",
 | 
			
		||||
        infoURL: "/basic/qmsCustomer/{id}",
 | 
			
		||||
        getCodeURL: '/basic/qmsCustomer/getCode'
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
        }],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        page:1
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: "",
 | 
			
		||||
        customerCode: null,
 | 
			
		||||
        customerName: null,
 | 
			
		||||
        customerTypeId: null,
 | 
			
		||||
        customerTypeStatus: null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id,) {
 | 
			
		||||
      this.dataForm.id = id || "";
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
          params: this.listQuery,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          // this.dataListLoading = false;
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data.list);
 | 
			
		||||
            this.customerTypeList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          // console.log(1111);
 | 
			
		||||
          this.getInfo();
 | 
			
		||||
        } else {
 | 
			
		||||
          this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getCode() {
 | 
			
		||||
      // console.log(111111);
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.customerCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/basic/qmsCustomer/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { });
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => { });
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										165
									
								
								src/views/modules/basic/components/customerSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										165
									
								
								src/views/modules/basic/components/customerSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,165 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-02-20 08:52:46
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="code" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.code" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="name" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.name" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customerTypeId" :label="$t('basic.customerTypeName')">
 | 
			
		||||
      <el-select v-model="dataForm.customerTypeId" :placeholder="$t('basic.customerTypeName')">
 | 
			
		||||
        <el-option v-for="item in customerTypeList" :key="item.id" :label="item.customerTypeName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/basic/qmsCustomerType/page"
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        name: null,
 | 
			
		||||
        code: null,
 | 
			
		||||
        customerTypeId: null,
 | 
			
		||||
        customerTypeStatus: null
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getDict();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    getDict() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
          params: {
 | 
			
		||||
            limit: 999,
 | 
			
		||||
            page:1
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          console.log(res);
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            this.customerTypeList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										155
									
								
								src/views/modules/basic/components/customerType-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										155
									
								
								src/views/modules/basic/components/customerType-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,155 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-02-24 14:59:19
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
 | 
			
		||||
    label-width="120px">
 | 
			
		||||
    <el-form-item prop="customerTypeCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.customerTypeCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customerTypeName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.customerTypeName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/basic/qmsCustomerType",
 | 
			
		||||
        infoURL: "/basic/qmsCustomerType/{id}",
 | 
			
		||||
        getCodeURL: '/basic/qmsCustomerType/getCode'
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: "",
 | 
			
		||||
        customerTypeCode:null,
 | 
			
		||||
        customerTypeName:null,
 | 
			
		||||
        customerTypeStatus:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        dictLabel: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        dictValue: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        sort: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: this.$t("validate.required"),
 | 
			
		||||
            trigger: "blur",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id,) {
 | 
			
		||||
      this.dataForm.id = id || "";
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo();
 | 
			
		||||
        } else {
 | 
			
		||||
          this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getCode() {
 | 
			
		||||
      // console.log(111111);
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.customerTypeCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/basic/qmsCustomerType/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										136
									
								
								src/views/modules/basic/components/customerTypeSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										136
									
								
								src/views/modules/basic/components/customerTypeSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,136 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-02-15 14:03:55
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="code" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.code" :placeholder="$t('basic.code')" clearable></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="name" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.name" :placeholder="$t('basic.name')" clearable></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="status" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.status" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: '0',
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: '1',
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        code: null,
 | 
			
		||||
        status: null,
 | 
			
		||||
        name: null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										154
									
								
								src/views/modules/basic/components/failureType-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										154
									
								
								src/views/modules/basic/components/failureType-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,154 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-02-24 14:56:56
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="failureTypeCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.failureTypeCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="failureTypeName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.failureTypeName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="failureTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.failureTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/basic/qmsFailureType",
 | 
			
		||||
        infoURL: "/basic/qmsFailureType/{id}",
 | 
			
		||||
        getCodeURL: '/basic/qmsFailureType/getCode'
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: "",
 | 
			
		||||
        failureTypeCode:null,
 | 
			
		||||
        failureTypeName:null,
 | 
			
		||||
        failureTypeStatus:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || "";
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo();
 | 
			
		||||
        } else {
 | 
			
		||||
          this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getCode() {
 | 
			
		||||
      // console.log(111111);
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.failureTypeCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/basic/qmsFailureType/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										152
									
								
								src/views/modules/basic/components/failureTypeSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										152
									
								
								src/views/modules/basic/components/failureTypeSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,152 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-02-16 15:46:10
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="code" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.code" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="name" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.name" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="failureTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.failureTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/basic/qmsCustomerType/page"
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        name: null,
 | 
			
		||||
        code: null,
 | 
			
		||||
        failureTypeStatus: null,
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    // getDict() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       this.dataListLoading = false;
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         this.customerTypeList = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										68
									
								
								src/views/modules/basic/components/planBtn.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										68
									
								
								src/views/modules/basic/components/planBtn.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,68 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 09:49:36
 | 
			
		||||
 * @LastEditTime: 2023-04-04 14:56:08
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-button type="text" @click="emitClick()">同步所有关联产品</el-button>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        syncURL: "/basic/qmsProduct/connectAllProduct"
 | 
			
		||||
      },
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    emitClick() {
 | 
			
		||||
      const data = {
 | 
			
		||||
        id: this.injectData.id,
 | 
			
		||||
        finishInspection: this.injectData.finishInspection,
 | 
			
		||||
        incomingInspection: this.injectData.incomingInspection,
 | 
			
		||||
        outInspection: this.injectData.outInspection,
 | 
			
		||||
        processInspection: this.injectData.outInspection
 | 
			
		||||
      }
 | 
			
		||||
      this.$http.put(this.urlOptions.syncURL, { data }).then(({ data }) => {
 | 
			
		||||
        if (data && data.code === 0) {
 | 
			
		||||
          this.$message({
 | 
			
		||||
            message: "操作成功",
 | 
			
		||||
            type: "success",
 | 
			
		||||
            duration: 1500,
 | 
			
		||||
            onClose: () => {
 | 
			
		||||
              this.getDataList();
 | 
			
		||||
            },
 | 
			
		||||
          });
 | 
			
		||||
        } else {
 | 
			
		||||
          this.$message.error(data.msg);
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
      // 路由参数
 | 
			
		||||
      // const routeParams = {
 | 
			
		||||
      //   routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
      //   title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
      //   path: 'sys/dict-data',
 | 
			
		||||
      //   params: {
 | 
			
		||||
      //     dictTypeId: this.injectData.id
 | 
			
		||||
      //   }
 | 
			
		||||
      // }
 | 
			
		||||
      // 动态路由
 | 
			
		||||
      // addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										176
									
								
								src/views/modules/basic/components/product-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										176
									
								
								src/views/modules/basic/components/product-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,176 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-04 15:35:31
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="productCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.productCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.productName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productSpecs" :label="$t('basic.specification')">
 | 
			
		||||
      <el-input v-model="dataForm.productSpecs" :placeholder="$t('basic.specification')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productTypeId" :label="$t('basic.productTypeName')">
 | 
			
		||||
      <el-select v-model="dataForm.productTypeId" :placeholder="$t('basic.productTypeName')">
 | 
			
		||||
        <el-option v-for="item in typeList" :key="item.id" :label="item.productTypeName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="remark" :label="$t('basic.remark')">
 | 
			
		||||
      <el-input v-model="dataForm.remark" :placeholder="$t('basic.remark')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="productTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.productTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/basic/qmsProductType",
 | 
			
		||||
        infoURL: "/basic/qmsProductType/{id}",
 | 
			
		||||
        getCodeURL: '/basic/qmsProduct/getCode',
 | 
			
		||||
        getTypeListURL: '/basic/qmsProductType/page'
 | 
			
		||||
      },
 | 
			
		||||
      typeList:[],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        page:1
 | 
			
		||||
      },
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: "",
 | 
			
		||||
        remark:null,
 | 
			
		||||
        productCode:null,
 | 
			
		||||
        productName: null,
 | 
			
		||||
        productTypeId:null,
 | 
			
		||||
        productTypeStatus:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || "";
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo();
 | 
			
		||||
        } else {
 | 
			
		||||
          this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getCode() {
 | 
			
		||||
      // console.log(111111);
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.productTypeCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getTypeListURL,this.listQuery )
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.typeList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/basic/qmsProductType/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										129
									
								
								src/views/modules/basic/components/productSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										129
									
								
								src/views/modules/basic/components/productSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,129 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-21 14:44:31
 | 
			
		||||
 * @LastEditTime: 2023-04-04 14:39:49
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="productCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.productCode" :placeholder="$t('basic.code')" clearable></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.productName" :placeholder="$t('basic.name')" clearable></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: '0',
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: '1',
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        productName: null,
 | 
			
		||||
        productCode: null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										154
									
								
								src/views/modules/basic/components/productType-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										154
									
								
								src/views/modules/basic/components/productType-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,154 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-02-24 14:59:37
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="productTypeCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.productTypeCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productTypeName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.productTypeName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.productTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/basic/qmsProductType",
 | 
			
		||||
        infoURL: "/basic/qmsProductType/{id}",
 | 
			
		||||
        getCodeURL: '/basic/qmsProductType/getCode'
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: "",
 | 
			
		||||
        productTypeCode:null,
 | 
			
		||||
        productTypeName:null,
 | 
			
		||||
        productTypeStatus:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || "";
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo();
 | 
			
		||||
        } else {
 | 
			
		||||
          this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getCode() {
 | 
			
		||||
      // console.log(111111);
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.productTypeCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/basic/qmsProductType/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										136
									
								
								src/views/modules/basic/components/productTypeSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										136
									
								
								src/views/modules/basic/components/productTypeSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,136 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-21 14:44:31
 | 
			
		||||
 * @LastEditTime: 2023-02-21 14:45:31
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="code" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.code" :placeholder="$t('basic.code')" clearable></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="name" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.name" :placeholder="$t('basic.name')" clearable></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="status" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.status" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: '0',
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: '1',
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        code: null,
 | 
			
		||||
        status: null,
 | 
			
		||||
        name: null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										49
									
								
								src/views/modules/basic/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								src/views/modules/basic/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 14:12:10
 | 
			
		||||
 * @LastEditTime: 2023-01-31 16:47:32
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-radio v-model="injectData.incomingInspection" :label="1"
 | 
			
		||||
      >进货检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.processInspection" :label="1"
 | 
			
		||||
      >过程检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.finishInspection" :label="1"
 | 
			
		||||
      >成品检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({}),
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										242
									
								
								src/views/modules/basic/components/showProductList.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										242
									
								
								src/views/modules/basic/components/showProductList.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,242 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-02-14 14:12:11
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <base-table
 | 
			
		||||
      :table-props="tableProps"
 | 
			
		||||
      :page="listQuery.page"
 | 
			
		||||
      :limit="listQuery.limit"
 | 
			
		||||
      :table-data="tableData"
 | 
			
		||||
    >
 | 
			
		||||
      <method-btn
 | 
			
		||||
        v-if="tableBtn.length"
 | 
			
		||||
        slot="handleBtn"
 | 
			
		||||
        :width="100"
 | 
			
		||||
        label="操作"
 | 
			
		||||
        :method-list="tableBtn"
 | 
			
		||||
        @clickBtn="handleClick"
 | 
			
		||||
      />
 | 
			
		||||
    </base-table>
 | 
			
		||||
    <pagination
 | 
			
		||||
      :limit.sync="listQuery.limit"
 | 
			
		||||
      :page.sync="listQuery.page"
 | 
			
		||||
      :total="listQuery.total"
 | 
			
		||||
      @pagination="getDataList"
 | 
			
		||||
    />
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
// import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productCode",
 | 
			
		||||
    label: "编号",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productName",
 | 
			
		||||
    label: "名称",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "synchronous",
 | 
			
		||||
    btnName: "同步",
 | 
			
		||||
    showParam: {
 | 
			
		||||
      type: "&",
 | 
			
		||||
      data: [
 | 
			
		||||
        {
 | 
			
		||||
          type: "equal",
 | 
			
		||||
          name: "controlCodeId",
 | 
			
		||||
          value:null,
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "cancel",
 | 
			
		||||
    btnName: "取消关联",
 | 
			
		||||
    showParam: {
 | 
			
		||||
      type: "&",
 | 
			
		||||
      data: [
 | 
			
		||||
        {
 | 
			
		||||
          type: "unequal",
 | 
			
		||||
          name: "controlCodeId",
 | 
			
		||||
          value: null,
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  // mixins: [basicAdd],
 | 
			
		||||
  mixins: [basicPage],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsProduct/page",
 | 
			
		||||
        // submitURL: "/sys/params/",
 | 
			
		||||
        // infoURL: "/sys/params",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      productData:{},
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: "",
 | 
			
		||||
        paramCode: "",
 | 
			
		||||
        paramValue: "",
 | 
			
		||||
        remark: "",
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // paramCode: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // paramValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getDataList();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(data) {
 | 
			
		||||
      console.log();
 | 
			
		||||
      // this.dataForm.id = id || "";
 | 
			
		||||
      this.productData = data? data: {}
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.listQuery.controllerModeId = data ? data.id : null;
 | 
			
		||||
        // this.$refs["dataForm"].resetFields();
 | 
			
		||||
        // if (this.dataForm.id) {
 | 
			
		||||
        this.getDataList();
 | 
			
		||||
        // }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    handleClick() {
 | 
			
		||||
      if (val.type === "synchronous") {
 | 
			
		||||
        if (!this.listQuery.controllerModeId) {
 | 
			
		||||
          this.$message({
 | 
			
		||||
            message: '请先选择控制模式',
 | 
			
		||||
            type: 'warning'
 | 
			
		||||
          });
 | 
			
		||||
        } else {
 | 
			
		||||
          const data={
 | 
			
		||||
            controlCodeId: this.listQuery.controlCodeId,
 | 
			
		||||
            finishInspection: this.productData.finishInspection,
 | 
			
		||||
            incomingInspection: this.productData.finishInspection,
 | 
			
		||||
            processInspection:	this.productData.processInspection
 | 
			
		||||
          }
 | 
			
		||||
          this.$http['put']('/basic/qmsProduct',data).then(({ data: res }) => {
 | 
			
		||||
            if (res.code !== 0) {
 | 
			
		||||
              return this.$message.error(res.msg)
 | 
			
		||||
            }
 | 
			
		||||
            this.$message({
 | 
			
		||||
              message: this.$t('prompt.success'),
 | 
			
		||||
              type: 'success',
 | 
			
		||||
              duration: 500,
 | 
			
		||||
              onClose: () => {
 | 
			
		||||
                this.visible = false
 | 
			
		||||
                this.$emit('refreshDataList')
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
          }).catch(() => { })
 | 
			
		||||
        }
 | 
			
		||||
        // this.addOrUpdateVisible = true;
 | 
			
		||||
        // this.addOrEditTitle = "编辑";
 | 
			
		||||
        // this.$nextTick(() => {
 | 
			
		||||
        //   this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        // });
 | 
			
		||||
      } else if (val.type === 'cancel') { 
 | 
			
		||||
        const data = {
 | 
			
		||||
          controlCodeId: null,
 | 
			
		||||
          finishInspection: null,
 | 
			
		||||
          incomingInspection: null,
 | 
			
		||||
          processInspection: null
 | 
			
		||||
        }
 | 
			
		||||
        this.$http['put']('/basic/qmsProduct', data).then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg)
 | 
			
		||||
          }
 | 
			
		||||
          this.$message({
 | 
			
		||||
            message: this.$t('prompt.success'),
 | 
			
		||||
            type: 'success',
 | 
			
		||||
            duration: 500,
 | 
			
		||||
            onClose: () => {
 | 
			
		||||
              this.visible = false
 | 
			
		||||
              this.$emit('refreshDataList')
 | 
			
		||||
            }
 | 
			
		||||
          })
 | 
			
		||||
        }).catch(() => { })
 | 
			
		||||
      } 
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
        //   if (!valid) {
 | 
			
		||||
        //     return false;
 | 
			
		||||
        //   }
 | 
			
		||||
        //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
        //     "/sys/params",
 | 
			
		||||
        //     this.dataForm
 | 
			
		||||
        //   )
 | 
			
		||||
        //     .then(({ data: res }) => {
 | 
			
		||||
        //       if (res.code !== 0) {
 | 
			
		||||
        //         return this.$message.error(res.msg);
 | 
			
		||||
        //       }
 | 
			
		||||
        //       this.$message({
 | 
			
		||||
        //         message: this.$t("prompt.success"),
 | 
			
		||||
        //         type: "success",
 | 
			
		||||
        //         duration: 500,
 | 
			
		||||
        //         onClose: () => {
 | 
			
		||||
        // this.visible = false;
 | 
			
		||||
        //   this.$emit("refreshDataList");
 | 
			
		||||
        // },
 | 
			
		||||
        //       });
 | 
			
		||||
        //     })
 | 
			
		||||
        //     .catch(() => {});
 | 
			
		||||
        // });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										157
									
								
								src/views/modules/basic/components/team-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								src/views/modules/basic/components/team-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,157 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-21 16:42:11
 | 
			
		||||
 * @LastEditTime: 2023-02-24 15:08:39
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="teamCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.teamCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="teamName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.teamName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="client" :label="$t('basic.client')">
 | 
			
		||||
      <el-input v-model="dataForm.client" :placeholder="$t('basic.client')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="customerTypeStatus" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.customerTypeStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/basic/qmsTeam",
 | 
			
		||||
        infoURL: "/basic/qmsTeam/{id}",
 | 
			
		||||
        getCodeURL: '/basic/qmsTeam/getCode'
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: "",
 | 
			
		||||
        teamCode:null,
 | 
			
		||||
        teamName:null,
 | 
			
		||||
        client:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || "";
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo();
 | 
			
		||||
        } else {
 | 
			
		||||
          this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/basic/qmsTeam/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    getCode() {
 | 
			
		||||
      // console.log(111111);
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.teamCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  // console.log(1111);
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										136
									
								
								src/views/modules/basic/components/teamSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										136
									
								
								src/views/modules/basic/components/teamSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,136 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-02-22 09:40:41
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="code" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.code" :placeholder="$t('basic.code')" clearable></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="name" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.name" :placeholder="$t('basic.name')" clearable></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="status" :label="$t('basic.status')">
 | 
			
		||||
      <el-select v-model="dataForm.status" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: '0',
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: '1',
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        code: null,
 | 
			
		||||
        // status: null,
 | 
			
		||||
        name: null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										272
									
								
								src/views/modules/basic/qmsControlMode.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										272
									
								
								src/views/modules/basic/qmsControlMode.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,272 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
 | 
			
		||||
        highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="productOrEditTitle" :dialogVisible="productOrUpdateVisible"
 | 
			
		||||
        @cancel="handleProductCancel" :before-close="handleProductCancel">
 | 
			
		||||
        <show-product-list ref="productOrUpdate" @successSubmit="successSubmit"></show-product-list>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end"> </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <control-add ref="addOrUpdate" @successSubmit="successSubmit"></control-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <control-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></control-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
import basicSearch from "@/mixins/basic-search";
 | 
			
		||||
import showProductList from "./components/showProductList.vue";
 | 
			
		||||
import controlSearch from "./components/controlSearch.vue";
 | 
			
		||||
import controlAdd from "./components/control-add.vue";
 | 
			
		||||
import available from "./components/available.vue";
 | 
			
		||||
import planBtn from "./components/planBtn.vue";
 | 
			
		||||
import radio from "./components/radio.vue";
 | 
			
		||||
import i18n from "@/i18n";
 | 
			
		||||
// import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "controlCode",
 | 
			
		||||
    label: i18n.t('basic.code'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "controlName",
 | 
			
		||||
    label: i18n.t('basic.name'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "specifications",
 | 
			
		||||
    label: i18n.t('basic.specification'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "detail",
 | 
			
		||||
    label: i18n.t('basic.InspectionStage'),
 | 
			
		||||
    subcomponent: radio,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "controlStatus",
 | 
			
		||||
    label: i18n.t('basic.available'),
 | 
			
		||||
    subcomponent: available,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "remark",
 | 
			
		||||
    label: i18n.t('schedule.remark'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "valid",
 | 
			
		||||
    label: i18n.t('basic.InspectionPlan'),
 | 
			
		||||
    subcomponent: planBtn,
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: i18n.t('t.edit'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: i18n.t('t.delete'),
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsControlMode/page",
 | 
			
		||||
        deleteURL: "/basic/qmsControlMode",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      productData: {},
 | 
			
		||||
      searchOrEditTitle: "",
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      productOrEditTitle: "",
 | 
			
		||||
      addOrEditTitle: '',
 | 
			
		||||
      addOrUpdateVisible:false,
 | 
			
		||||
      productOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "关联产品列表",
 | 
			
		||||
          name: "correlation",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "取消选中",
 | 
			
		||||
          name: "cancel",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  components: {
 | 
			
		||||
    showProductList,
 | 
			
		||||
    controlSearch,
 | 
			
		||||
    controlAdd
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    handleCurrentChange(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      this.productData = val.newVal ? val.newVal: {}
 | 
			
		||||
    },
 | 
			
		||||
    setCurrent(index) {
 | 
			
		||||
      this.$refs.palletTable1.setCurrent("palletTable", index);
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // handleConfirm() {
 | 
			
		||||
    //   this.$refs.addOrUpdate.dataFormSubmitHandle();
 | 
			
		||||
    // },
 | 
			
		||||
    // conditionSearchSubmit() {},
 | 
			
		||||
    conditionSearchSubmit(key) {
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      console.log(key);
 | 
			
		||||
      this.listQuery.key = key;
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList(key);
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    // addOrUpdateHandle(productData) {
 | 
			
		||||
    //   this.addOrUpdateVisible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs.addOrUpdate.init(productData);
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.key = null;
 | 
			
		||||
          console.log(i18n  );
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "correlation":
 | 
			
		||||
          this.productOrEditTitle = "产品";
 | 
			
		||||
          this.productOrUpdateVisible = true;
 | 
			
		||||
          // this.searchOrUpdateHandle(this.productData);
 | 
			
		||||
          // this.searchOrUpdateVisible = true;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs.productOrUpdate.init(this.productData);
 | 
			
		||||
          });
 | 
			
		||||
          console.log(this.productId);
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        case "cancel":
 | 
			
		||||
          this.$refs.palletTable1.setCurrent("palletTable", -1);
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										261
									
								
								src/views/modules/basic/qmsCustomer.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										261
									
								
								src/views/modules/basic/qmsCustomer.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,261 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="4" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
 | 
			
		||||
        :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <customer-add ref="addOrUpdate" @refreshDataList="successSubmit"></customer-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <customer-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customer-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
import basicSearch from "@/mixins/basic-search";
 | 
			
		||||
import customerAdd from "./components/customer-add";
 | 
			
		||||
import customerSearch from "./components/customerSearch.vue";
 | 
			
		||||
import available from "./components/available.vue";
 | 
			
		||||
// import radio from "./components/radio.vue";
 | 
			
		||||
// import i18n from "@/i18n";
 | 
			
		||||
// import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "customerCode",
 | 
			
		||||
    label: '编码'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "customerName",
 | 
			
		||||
    label: "客户"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "customerTypeName",
 | 
			
		||||
    label: "客户类型"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "customerTypeStatus",
 | 
			
		||||
    label: "状态",
 | 
			
		||||
    subcomponent: available,
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "修改"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除"
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsCustomer/page",
 | 
			
		||||
        deleteURL: "/basic/qmsCustomerType",
 | 
			
		||||
        exportURL: '/basic/qmsCustomer/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      productData: {},
 | 
			
		||||
      searchOrEditTitle: "",
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      productOrEditTitle: "",
 | 
			
		||||
      productOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "导出",
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  components: {
 | 
			
		||||
    customerAdd,
 | 
			
		||||
    customerSearch,
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // handleConfirm() {
 | 
			
		||||
    //   this.$refs.addOrUpdate.dataFormSubmitHandle();
 | 
			
		||||
    // },
 | 
			
		||||
    // conditionSearchSubmit() {},
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // this.listQuery.key = key;
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.name = dataForm.name
 | 
			
		||||
      this.listQuery.customerTypeId = dataForm.customerTypeId
 | 
			
		||||
      this.listQuery.customerTypeStatus = dataForm.customerTypeStatus
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick() {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.customerName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    exportHandle() {
 | 
			
		||||
      this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
 | 
			
		||||
        ...this.dataForm
 | 
			
		||||
      }).then((res) => {
 | 
			
		||||
        console.log(res)
 | 
			
		||||
        // if (res !== 0) {
 | 
			
		||||
        //   return this.$message.error(res.msg) 
 | 
			
		||||
        // }
 | 
			
		||||
        let fileName = ''
 | 
			
		||||
        const contentDisposition = res.headers['content-disposition']
 | 
			
		||||
        if (contentDisposition) {
 | 
			
		||||
          const temp = res.headers['content-disposition']
 | 
			
		||||
            .split(';')[1]
 | 
			
		||||
            .split('=')[1]
 | 
			
		||||
          // 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
 | 
			
		||||
          fileName = decodeURI(temp)
 | 
			
		||||
          console.log(temp)
 | 
			
		||||
        }
 | 
			
		||||
        const blob = new Blob([res.data])
 | 
			
		||||
        const reader = new FileReader()
 | 
			
		||||
        reader.readAsDataURL(blob)
 | 
			
		||||
        reader.onload = (e) => {
 | 
			
		||||
          const a = document.createElement('a')
 | 
			
		||||
          a.download = fileName
 | 
			
		||||
          a.href = e.target.result
 | 
			
		||||
          document.body.appendChild(a)
 | 
			
		||||
          a.click()
 | 
			
		||||
          document.body.removeChild(a)
 | 
			
		||||
        }
 | 
			
		||||
      }).catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          // this.listQuery.key = "";
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.listQuery.code = null
 | 
			
		||||
          this.listQuery.name = null
 | 
			
		||||
          this.listQuery.customerTypeId = null
 | 
			
		||||
          this.listQuery.customerTypeStatus = null
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = "新增";
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs.addOrUpdate.init();
 | 
			
		||||
          });
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										268
									
								
								src/views/modules/basic/qmsCustomerType.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										268
									
								
								src/views/modules/basic/qmsCustomerType.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,268 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="3" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
 | 
			
		||||
        :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <customer-type-add ref="addOrUpdate" @successSubmit="successSubmit"></customer-type-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <customerType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></customerType-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
import basicSearch from "@/mixins/basic-search";
 | 
			
		||||
import customerTypeAdd from "./components/customerType-add";
 | 
			
		||||
import customerTypeSearch from "./components/customerTypeSearch.vue";
 | 
			
		||||
import available from "./components/available.vue";
 | 
			
		||||
import Cookies from 'js-cookie'
 | 
			
		||||
import qs from 'qs'
 | 
			
		||||
// import radio from "./components/radio.vue";
 | 
			
		||||
import i18n from "@/i18n";
 | 
			
		||||
// import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "customerTypeCode",
 | 
			
		||||
    label: '编码'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "customerTypeName",
 | 
			
		||||
    label: "名称"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "customerTypeStatus",
 | 
			
		||||
    label: "状态",
 | 
			
		||||
    subcomponent: available,
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "修改"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除"
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsCustomerType/page",
 | 
			
		||||
        deleteURL: "/basic/qmsCustomerType",
 | 
			
		||||
        exportURL: "/basic/qmsCustomerType/export",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      productData: {},
 | 
			
		||||
      addOrUpdateVisible:false,
 | 
			
		||||
      searchOrEditTitle: "",
 | 
			
		||||
      addOrEditTitle:'',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      productOrEditTitle: "",
 | 
			
		||||
      productOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "导出",
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  components: {
 | 
			
		||||
    customerTypeAdd,
 | 
			
		||||
    customerTypeSearch
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // handleConfirm() {
 | 
			
		||||
    //   this.$refs.addOrUpdate.dataFormSubmitHandle();
 | 
			
		||||
    // },
 | 
			
		||||
    // conditionSearchSubmit() {},
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      this.listQuery.name = dataForm.name
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.status = dataForm.status
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    exportHandle() {
 | 
			
		||||
      this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
 | 
			
		||||
        ...this.dataForm
 | 
			
		||||
      }).then((res) => {
 | 
			
		||||
        console.log(res)
 | 
			
		||||
        // if (res !== 0) {
 | 
			
		||||
        //   return this.$message.error(res.msg) 
 | 
			
		||||
        // }
 | 
			
		||||
        let fileName = ''
 | 
			
		||||
        const contentDisposition = res.headers['content-disposition']
 | 
			
		||||
        if (contentDisposition) {
 | 
			
		||||
          const temp = res.headers['content-disposition']
 | 
			
		||||
            .split(';')[1]
 | 
			
		||||
            .split('=')[1]
 | 
			
		||||
          // 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
 | 
			
		||||
          fileName = decodeURI(temp)
 | 
			
		||||
          console.log(temp)
 | 
			
		||||
        }
 | 
			
		||||
        const blob = new Blob([res.data])
 | 
			
		||||
        const reader = new FileReader()
 | 
			
		||||
        reader.readAsDataURL(blob)
 | 
			
		||||
        reader.onload = (e) => {
 | 
			
		||||
          const a = document.createElement('a')
 | 
			
		||||
          a.download = fileName
 | 
			
		||||
          a.href = e.target.result
 | 
			
		||||
          document.body.appendChild(a)
 | 
			
		||||
          a.click()
 | 
			
		||||
          document.body.removeChild(a)
 | 
			
		||||
        }
 | 
			
		||||
      }).catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrEditTitle = "修改"
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.name = null
 | 
			
		||||
          this.listQuery.code = null
 | 
			
		||||
          this.listQuery.status = null
 | 
			
		||||
          // console.log(i18n);
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = "新增";
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs.addOrUpdate.init();
 | 
			
		||||
          });
 | 
			
		||||
          break;
 | 
			
		||||
        // case "correlation":
 | 
			
		||||
        //   this.productOrEditTitle = "产品";
 | 
			
		||||
        //   this.productOrUpdateVisible = true;
 | 
			
		||||
        //   this.addOrUpdateHandle(this.productData);
 | 
			
		||||
        //   console.log(this.productId);
 | 
			
		||||
        //   break;
 | 
			
		||||
        // case "cancel":
 | 
			
		||||
        //   this.$refs.palletTable1.setCurrent("palletTable", -1);
 | 
			
		||||
        //   break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										209
									
								
								src/views/modules/basic/qmsFailureType.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										209
									
								
								src/views/modules/basic/qmsFailureType.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,209 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-04-17 11:03:23
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="3" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <failure-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></failure-type-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
import failureTypeAdd from "./components/failureType-add";
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import failureTypeSearch from "./components/failureTypeSearch";
 | 
			
		||||
import available from "./components/available.vue";
 | 
			
		||||
import basicSearch from "@/mixins/basic-search";
 | 
			
		||||
import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "failureTypeCode",
 | 
			
		||||
    label: i18n.t("basic.code"),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "failureTypeName",
 | 
			
		||||
    label: i18n.t("basic.name"),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "failureTypeStatus",
 | 
			
		||||
    label: "状态",
 | 
			
		||||
    subcomponent: available,
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    failureTypeSearch,
 | 
			
		||||
    failureTypeAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsFailureType/page",
 | 
			
		||||
        deleteURL: "/basic/qmsFailureType",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible:false,
 | 
			
		||||
      formConfig: [ 
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods:{
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // this.listQuery.key = key;
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.name = dataForm.name
 | 
			
		||||
      this.listQuery.failureTypeStatus = dataForm.failureTypeStatus
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrEditTitle = "修改"
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.listQuery.code = null
 | 
			
		||||
          this.listQuery.name = null
 | 
			
		||||
          this.listQuery.failureTypeStatus = null
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;   
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										251
									
								
								src/views/modules/basic/qmsProduct.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										251
									
								
								src/views/modules/basic/qmsProduct.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,251 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="2" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
 | 
			
		||||
        highlight-current-row :limit="listQuery.limit" :table-data="tableData" @current-change="handleCurrentChange">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <product-add ref="addOrUpdate" @refreshDataList="successSubmit"></product-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <product-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></product-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
import basicSearch from "@/mixins/basic-search";
 | 
			
		||||
import productSearch from "./components/productSearch.vue";
 | 
			
		||||
import productAdd from "./components/product-add.vue";
 | 
			
		||||
import available from "./components/available.vue";
 | 
			
		||||
import radio from "./components/radio.vue";
 | 
			
		||||
import i18n from "@/i18n";
 | 
			
		||||
// import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productCode",
 | 
			
		||||
    label: i18n.t('basic.code'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productName",
 | 
			
		||||
    label: i18n.t('basic.name'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productSpecs",
 | 
			
		||||
    label: i18n.t('basic.specification'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productTypeName",
 | 
			
		||||
    label: i18n.t('basic.productTypeName'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "detail",
 | 
			
		||||
    label: i18n.t('basic.InspectionStage'),
 | 
			
		||||
    subcomponent: radio,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "controlStatus",
 | 
			
		||||
    label: i18n.t('basic.available'),
 | 
			
		||||
    subcomponent: available,
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "remark",
 | 
			
		||||
    label: i18n.t('schedule.remark'),
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: i18n.t('t.edit'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: i18n.t('t.delete'),
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsProduct/page",
 | 
			
		||||
        deleteURL: "/basic/qmsProduct",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      productData: {},
 | 
			
		||||
      searchOrEditTitle: "",
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      productOrEditTitle: "",
 | 
			
		||||
      addOrEditTitle: '',
 | 
			
		||||
      addOrUpdateVisible: false,
 | 
			
		||||
      productOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  components: {
 | 
			
		||||
    productSearch,
 | 
			
		||||
    productAdd
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    handleCurrentChange(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      this.productData = val.newVal ? val.newVal : {}
 | 
			
		||||
    },
 | 
			
		||||
    setCurrent(index) {
 | 
			
		||||
      this.$refs.palletTable1.setCurrent("palletTable", index);
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // handleConfirm() {
 | 
			
		||||
    //   this.$refs.addOrUpdate.dataFormSubmitHandle();
 | 
			
		||||
    // },
 | 
			
		||||
    // conditionSearchSubmit() {},
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      this.listQuery.productName = dataForm.productName
 | 
			
		||||
      this.listQuery.productCode = dataForm.productCode
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrEditTitle = "修改"
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    // addOrUpdateHandle(productData) {
 | 
			
		||||
    //   this.addOrUpdateVisible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs.addOrUpdate.init(productData);
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.key = null;
 | 
			
		||||
          // console.log(i18n);
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "correlation":
 | 
			
		||||
          this.productOrEditTitle = "产品";
 | 
			
		||||
          this.productOrUpdateVisible = true;
 | 
			
		||||
          // this.searchOrUpdateHandle(this.productData);
 | 
			
		||||
          // this.searchOrUpdateVisible = true;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs.productOrUpdate.init(this.productData);
 | 
			
		||||
          });
 | 
			
		||||
          console.log(this.productId);
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        case "cancel":
 | 
			
		||||
          this.$refs.palletTable1.setCurrent("palletTable", -1);
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										290
									
								
								src/views/modules/basic/qmsProductType.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										290
									
								
								src/views/modules/basic/qmsProductType.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,290 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-21 14:30:17
 | 
			
		||||
 * @LastEditTime: 2023-04-17 11:03:48
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
 | 
			
		||||
        :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <product-type-add ref="addOrUpdate" @refreshDataList="successSubmit"></product-type-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <productType-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></productType-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
import basicSearch from "@/mixins/basic-search";
 | 
			
		||||
import productTypeAdd from "./components/productType-add";
 | 
			
		||||
import productTypeSearch from "./components/productTypeSearch.vue";
 | 
			
		||||
import available from "./components/available.vue";
 | 
			
		||||
import Cookies from 'js-cookie'
 | 
			
		||||
import qs from 'qs'
 | 
			
		||||
// import radio from "./components/radio.vue";
 | 
			
		||||
import i18n from "@/i18n";
 | 
			
		||||
// import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productTypeCode",
 | 
			
		||||
    label: '编码'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productTypeName",
 | 
			
		||||
    label: "名称"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "productTypeStatus",
 | 
			
		||||
    label: "状态",
 | 
			
		||||
    subcomponent: available,
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "修改"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除"
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsProductType/page",
 | 
			
		||||
        deleteURL: "/basic/qmsProductType",
 | 
			
		||||
        exportURL: "/basic/qmsProductType/export",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      productData: {},
 | 
			
		||||
      addOrUpdateVisible:false,
 | 
			
		||||
      searchOrEditTitle: "",
 | 
			
		||||
      addOrEditTitle:'',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      productOrEditTitle: "",
 | 
			
		||||
      productOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "导出",
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  components: {
 | 
			
		||||
    productTypeAdd,
 | 
			
		||||
    productTypeSearch
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // handleConfirm() {
 | 
			
		||||
    //   this.$refs.addOrUpdate.dataFormSubmitHandle();
 | 
			
		||||
    // },
 | 
			
		||||
    // conditionSearchSubmit() {},
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      this.listQuery.name = dataForm.name
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.status = dataForm.status
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    // handleCancel() {
 | 
			
		||||
    
 | 
			
		||||
    // },
 | 
			
		||||
    // handleConfirm() {
 | 
			
		||||
    //   this.$refs.addOrUpdate.dataFormSubmit()
 | 
			
		||||
    // },
 | 
			
		||||
    successSubmit() {
 | 
			
		||||
      console.log(11111);
 | 
			
		||||
      this.$refs.addOrUpdate.formClear()
 | 
			
		||||
      this.addOrUpdateVisible = false
 | 
			
		||||
      this.addOrEditTitle = ''
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
    },
 | 
			
		||||
    exportHandle() {
 | 
			
		||||
      this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
 | 
			
		||||
        ...this.dataForm
 | 
			
		||||
      }).then((res) => {
 | 
			
		||||
        console.log(res)
 | 
			
		||||
        // if (res !== 0) {
 | 
			
		||||
        //   return this.$message.error(res.msg) 
 | 
			
		||||
        // }
 | 
			
		||||
        let fileName = ''
 | 
			
		||||
        const contentDisposition = res.headers['content-disposition']
 | 
			
		||||
        if (contentDisposition) {
 | 
			
		||||
          const temp = res.headers['content-disposition']
 | 
			
		||||
            .split(';')[1]
 | 
			
		||||
            .split('=')[1]
 | 
			
		||||
          // 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
 | 
			
		||||
          fileName = decodeURI(temp)
 | 
			
		||||
          console.log(temp)
 | 
			
		||||
        }
 | 
			
		||||
        const blob = new Blob([res.data])
 | 
			
		||||
        const reader = new FileReader()
 | 
			
		||||
        reader.readAsDataURL(blob)
 | 
			
		||||
        reader.onload = (e) => {
 | 
			
		||||
          const a = document.createElement('a')
 | 
			
		||||
          a.download = fileName
 | 
			
		||||
          a.href = e.target.result
 | 
			
		||||
          document.body.appendChild(a)
 | 
			
		||||
          a.click()
 | 
			
		||||
          document.body.removeChild(a)
 | 
			
		||||
        }
 | 
			
		||||
      }).catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.productTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            console.log(val);
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrEditTitle = "修改"
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.name = null
 | 
			
		||||
          this.listQuery.code = null
 | 
			
		||||
          this.listQuery.status = null
 | 
			
		||||
          // console.log(i18n);
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          // console.log(basicPage)
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = "新增";
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs.addOrUpdate.init();
 | 
			
		||||
          });
 | 
			
		||||
          break;
 | 
			
		||||
        // case "correlation":
 | 
			
		||||
        //   this.productOrEditTitle = "产品";
 | 
			
		||||
        //   this.productOrUpdateVisible = true;
 | 
			
		||||
        //   this.addOrUpdateHandle(this.productData);
 | 
			
		||||
        //   console.log(this.productId);
 | 
			
		||||
        //   break;
 | 
			
		||||
        // case "cancel":
 | 
			
		||||
        //   this.$refs.palletTable1.setCurrent("palletTable", -1);
 | 
			
		||||
        //   break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										319
									
								
								src/views/modules/basic/qmsTeam.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										319
									
								
								src/views/modules/basic/qmsTeam.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,319 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-21 14:30:17
 | 
			
		||||
 * @LastEditTime: 2023-04-17 11:04:00
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <el-row :gutter="24">
 | 
			
		||||
      <el-col :span="14">
 | 
			
		||||
        <div class="mod-sys__user">
 | 
			
		||||
          <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
            <el-badge :value="2" class="item">
 | 
			
		||||
              <el-button type="primary" size="small" @click="conditionSearch">{{ $t("conditionSearch")}}}</el-button>
 | 
			
		||||
            </el-badge>
 | 
			
		||||
          </SearchBar>
 | 
			
		||||
          <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
 | 
			
		||||
            :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
            <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
              @clickBtn="handleClick" />
 | 
			
		||||
          </base-table>
 | 
			
		||||
          <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
            @pagination="getDataList" />
 | 
			
		||||
          <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
          <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
            @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
            <team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-add>
 | 
			
		||||
            <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
          </base-dialog>
 | 
			
		||||
          <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible"
 | 
			
		||||
            @cancel="handleSearchCancel" @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
            <team-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></team-search>
 | 
			
		||||
            <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
              <el-col :span="12">
 | 
			
		||||
                <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
                  {{ $t("close") }}
 | 
			
		||||
                </el-button>
 | 
			
		||||
                <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
			
		||||
                  $t("reset")
 | 
			
		||||
                  }}</el-button>
 | 
			
		||||
                <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
                  {{ $t("search") }}
 | 
			
		||||
                </el-button>
 | 
			
		||||
              </el-col>
 | 
			
		||||
            </el-row>
 | 
			
		||||
          </base-dialog>
 | 
			
		||||
        </div>
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span="10">
 | 
			
		||||
        <div class="mod-sys__user">
 | 
			
		||||
          <SearchBar :formConfigs="formConfigMember" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
          </SearchBar>
 | 
			
		||||
          <base-table id="palletTable" :table-props="tableProps" :page="listQuery.page" ref="palletTable1"
 | 
			
		||||
            :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
            <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
              @clickBtn="handleClick" />
 | 
			
		||||
          </base-table>
 | 
			
		||||
          <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
            @pagination="getDataList" />
 | 
			
		||||
          <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
          <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
            @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
            <team-add ref="addOrUpdate" @refreshDataList="successSubmit"></team-add>
 | 
			
		||||
            <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
          </base-dialog>
 | 
			
		||||
        </div>
 | 
			
		||||
      </el-col>"" 
 | 
			
		||||
    </el-row>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
import basicSearch from "@/mixins/basic-search";
 | 
			
		||||
import teamAdd from "./components/team-add";
 | 
			
		||||
import teamSearch from "./components/teamSearch.vue";
 | 
			
		||||
import Cookies from 'js-cookie'
 | 
			
		||||
import qs from 'qs'
 | 
			
		||||
// import radio from "./components/radio.vue";
 | 
			
		||||
import i18n from "@/i18n";
 | 
			
		||||
// import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "teamCode",
 | 
			
		||||
    label: i18n.t('basic.code')
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "teamName",
 | 
			
		||||
    label: i18n.t('basic.name')
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "client",
 | 
			
		||||
    label: i18n.t('basic.client')
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "remark",
 | 
			
		||||
    label: i18n.t('basic.remark')
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "修改"
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除"
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsTeam/page",
 | 
			
		||||
        deleteURL: "/basic/qmsTeam",
 | 
			
		||||
        exportURL: "/basic/qmsTeam/export",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      productData: {},
 | 
			
		||||
      addOrUpdateVisible: false,
 | 
			
		||||
      searchOrEditTitle: "",
 | 
			
		||||
      addOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      productOrEditTitle: "",
 | 
			
		||||
      productOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "导出",
 | 
			
		||||
          name: i18n.t('export'),
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      formConfigMember: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('teamMemberChange'),
 | 
			
		||||
          name: "change",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          // plain: true,
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  components: {
 | 
			
		||||
    teamAdd,
 | 
			
		||||
    teamSearch
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // handleConfirm() {
 | 
			
		||||
    //   this.$refs.addOrUpdate.dataFormSubmitHandle();
 | 
			
		||||
    // },
 | 
			
		||||
    // conditionSearchSubmit() {},
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      this.listQuery.name = dataForm.name
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.status = dataForm.status
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    exportHandle() {
 | 
			
		||||
      this.$http.get(this.urlOptions.exportURL, { responseType: 'blob' }, {
 | 
			
		||||
        ...this.dataForm
 | 
			
		||||
      }).then((res) => {
 | 
			
		||||
        console.log(res)
 | 
			
		||||
        // if (res !== 0) {
 | 
			
		||||
        //   return this.$message.error(res.msg) 
 | 
			
		||||
        // }
 | 
			
		||||
        let fileName = ''
 | 
			
		||||
        const contentDisposition = res.headers['content-disposition']
 | 
			
		||||
        if (contentDisposition) {
 | 
			
		||||
          const temp = res.headers['content-disposition']
 | 
			
		||||
            .split(';')[1]
 | 
			
		||||
            .split('=')[1]
 | 
			
		||||
          // 对文件名乱码转义--【Node.js】使用iconv-lite解决中文乱码
 | 
			
		||||
          fileName = decodeURI(temp)
 | 
			
		||||
          console.log(temp)
 | 
			
		||||
        }
 | 
			
		||||
        const blob = new Blob([res.data])
 | 
			
		||||
        const reader = new FileReader()
 | 
			
		||||
        reader.readAsDataURL(blob)
 | 
			
		||||
        reader.onload = (e) => {
 | 
			
		||||
          const a = document.createElement('a')
 | 
			
		||||
          a.download = fileName
 | 
			
		||||
          a.href = e.target.result
 | 
			
		||||
          document.body.appendChild(a)
 | 
			
		||||
          a.click()
 | 
			
		||||
          document.body.removeChild(a)
 | 
			
		||||
        }
 | 
			
		||||
      }).catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.customerTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrEditTitle = "修改"
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.name = null
 | 
			
		||||
          this.listQuery.code = null
 | 
			
		||||
          this.listQuery.status = null
 | 
			
		||||
          // console.log(i18n);
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = "新增";
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.$nextTick(() => {
 | 
			
		||||
            this.$refs.addOrUpdate.init();
 | 
			
		||||
          });
 | 
			
		||||
          break;
 | 
			
		||||
        // case "correlation":
 | 
			
		||||
        //   this.productOrEditTitle = "产品";
 | 
			
		||||
        //   this.productOrUpdateVisible = true;
 | 
			
		||||
        //   this.addOrUpdateHandle(this.productData);
 | 
			
		||||
        //   console.log(this.productId);
 | 
			
		||||
        //   break;
 | 
			
		||||
        // case "cancel":
 | 
			
		||||
        //   this.$refs.palletTable1.setCurrent("palletTable", -1);
 | 
			
		||||
        //   break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val);
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										134
									
								
								src/views/modules/basic/qmsTeamMember.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										134
									
								
								src/views/modules/basic/qmsTeamMember.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,134 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-01-12 09:46:23
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
     <SearchBar
 | 
			
		||||
          :formConfigs="formConfig"
 | 
			
		||||
          ref="ruleForm"
 | 
			
		||||
          @headBtnClick="buttonClick"
 | 
			
		||||
        >
 | 
			
		||||
       <el-button type="primary" size="small" plain>导入</el-button>
 | 
			
		||||
        </SearchBar>
 | 
			
		||||
      <base-table
 | 
			
		||||
        :table-props="tableProps"
 | 
			
		||||
        :page="listQuery.page"
 | 
			
		||||
        :limit="listQuery.limit"
 | 
			
		||||
        :table-data="tableData"
 | 
			
		||||
      >
 | 
			
		||||
        <method-btn
 | 
			
		||||
          v-if="tableBtn.length"
 | 
			
		||||
          slot="handleBtn"
 | 
			
		||||
          :width="100"
 | 
			
		||||
          label="操作"
 | 
			
		||||
          :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick"
 | 
			
		||||
        />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination
 | 
			
		||||
        :limit.sync="listQuery.limit"
 | 
			
		||||
        :page.sync="listQuery.page"
 | 
			
		||||
        :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList"
 | 
			
		||||
      />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog
 | 
			
		||||
        :dialogTitle="addOrEditTitle"
 | 
			
		||||
        :dialogVisible="addOrUpdateVisible"
 | 
			
		||||
        @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm"
 | 
			
		||||
        :before-close="handleCancel"
 | 
			
		||||
      >
 | 
			
		||||
        <!-- <add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page";
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import i18n from "@/i18n";
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: "paramCode",
 | 
			
		||||
    label: i18n.t("params.paramCode"),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "paramValue",
 | 
			
		||||
    label: i18n.t("params.paramValue"),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: "remark",
 | 
			
		||||
    label: i18n.t("params.remark"),
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/basic/qmsControlMode/page",
 | 
			
		||||
        deleteURL: "/basic/qmsControlMode",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
          plain: true,
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods:{
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;   
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
       }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										41
									
								
								src/views/modules/gage/components/available.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/views/modules/gage/components/available.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 09:49:36
 | 
			
		||||
 * @LastEditTime: 2023-05-08 11:09:49
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-tag v-if="injectData.gageTypeStatus === 1" type="success">可用</el-tag>
 | 
			
		||||
    <el-tag v-else type="warning">不可用</el-tag>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										376
									
								
								src/views/modules/gage/components/gage-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										376
									
								
								src/views/modules/gage/components/gage-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,376 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-05-10 14:17:09
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
    <el-form-item prop="client" :label="$t('gage.client')">
 | 
			
		||||
      <el-input v-model="dataForm.client" :placeholder="$t('gage.client')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="code" :label="$t('gage.code')">
 | 
			
		||||
      <el-input v-model="dataForm.code" :placeholder="$t('gage.code')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="name" :label="$t('gage.name')">
 | 
			
		||||
      <el-input v-model="dataForm.name" :placeholder="$t('gage.name')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="certificateType" :label="$t('gage.certificateType')">
 | 
			
		||||
      <el-select v-model="dataForm.certificateType" :placeholder="$t('gage.certificateType')">
 | 
			
		||||
        <el-option v-for="item in certificateTypeList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="certificateCodeBh" :label="$t('gage.certificateCodeBh')">
 | 
			
		||||
      <el-input v-model="dataForm.certificateCodeBh" :placeholder="$t('gage.certificateCodeBh')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="certificateCode" :label="$t('gage.certificateCode')">
 | 
			
		||||
      <el-input v-model="dataForm.certificateCode" :placeholder="$t('gage.certificateCode')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="gageTypeId" :label="$t('gage.gageTypeName')">
 | 
			
		||||
      <el-select v-model="dataForm.gageTypeId" :placeholder="$t('gage.gageTypeName')">
 | 
			
		||||
        <el-option v-for="item in gageTypeList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
 | 
			
		||||
      <el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
 | 
			
		||||
      <el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="description" :label="$t('gage.description')">
 | 
			
		||||
      <el-input v-model="dataForm.description" :placeholder="$t('gage.description')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="equipmentSupplier" :label="$t('gage.supplierName')">
 | 
			
		||||
      <el-input v-model="dataForm.equipmentSupplier" :placeholder="$t('gage.supplierName')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="internalInspectionCycle" :label="$t('gage.internalInspectionCycle')">
 | 
			
		||||
      <el-input v-model="dataForm.internalInspectionCycle" :placeholder="$t('gage.internalInspectionCycle')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="externalInspectionCycle" :label="$t('gage.externalInspectionCycle')">
 | 
			
		||||
      <el-input v-model="dataForm.externalInspectionCycle" :placeholder="$t('gage.externalInspectionCycle')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="internalInspectionTime" :label="$t('gage.internalInspectionTime')">
 | 
			
		||||
      <el-date-picker v-model="dataForm.internalInspectionTime" type="datetime"
 | 
			
		||||
        :placeholder="$t('gage.internalInspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
			
		||||
      </el-date-picker>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="externalInspectionTime" :label="$t('gage.externalInspectionTime')">
 | 
			
		||||
      <el-date-picker v-model="dataForm.externalInspectionTime" type="datetime"
 | 
			
		||||
        :placeholder="$t('gage.externalInspectionTime')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
			
		||||
      </el-date-picker>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="nextInternalInspectionTime" :label="$t('gage.nextInternalInspectionTime')">
 | 
			
		||||
      <el-date-picker v-model="dataForm.nextInternalInspectionTime" type="datetime"
 | 
			
		||||
        :placeholder="$t('gage.nextInternalInspectionTime')" format='yyyy-MM-dd HH:mm:ss'
 | 
			
		||||
        valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
			
		||||
      </el-date-picker>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="nextExternalInspectionTime" :label="$t('gage.nextExternalInspectionTime')">
 | 
			
		||||
      <el-date-picker v-model="dataForm.nextExternalInspectionTime" type="datetime"
 | 
			
		||||
        :placeholder="$t('gage.nextExternalInspectionTime')" format='yyyy-MM-dd HH:mm:ss'
 | 
			
		||||
        valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
			
		||||
      </el-date-picker>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
 | 
			
		||||
      <el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
 | 
			
		||||
        <el-option v-for="item in departmentList" :key="item.id" :label="item.name"
 | 
			
		||||
          :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="useLocation" :label="$t('gage.useLocation')">
 | 
			
		||||
      <el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="recipientName" :label="$t('gage.recipientName')">
 | 
			
		||||
      <el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
 | 
			
		||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="benchmarkMeasurTool" :label="$t('gage.benchmarkMeasurTool')">
 | 
			
		||||
      <el-radio-group v-model="dataForm.benchmarkMeasurTool">
 | 
			
		||||
        <el-radio :label="0">否</el-radio>
 | 
			
		||||
        <el-radio :label="1">是</el-radio>
 | 
			
		||||
      </el-radio-group>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="belongPerson" :label="$t('gage.belongPersonName')">
 | 
			
		||||
      <el-select v-model="dataForm.belongPerson" :placeholder="$t('gage.belongPersonName')">
 | 
			
		||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="gageStatus" :label="$t('gage.gageStatus')">
 | 
			
		||||
      <el-select v-model="dataForm.gageStatus" :placeholder="$t('gage.gageStatus')">
 | 
			
		||||
        <el-option v-for="item in gageStatusList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="remark" :label="$t('gage.remark')">
 | 
			
		||||
      <el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/gage/qmsGage",
 | 
			
		||||
        infoURL: "/gage/qmsGage/{ id }",
 | 
			
		||||
        dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
 | 
			
		||||
        getUserList: '/sys/user/page',
 | 
			
		||||
        getGageTypeList: '/gage/qmsGageType/page',
 | 
			
		||||
      },
 | 
			
		||||
      gageList: [],
 | 
			
		||||
      userList: [],
 | 
			
		||||
      gageTypeList:[],
 | 
			
		||||
      departmentList: [],
 | 
			
		||||
      processList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '未审核'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '不同意'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '同意'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        gape: 1
 | 
			
		||||
      },
 | 
			
		||||
      gageStatusList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name:'在用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '备用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '停用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 3,
 | 
			
		||||
          name: '封存'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 4,
 | 
			
		||||
          name: '报废'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 5,
 | 
			
		||||
          name: '降级使用'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      certificateTypeList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '检定证书'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '校准证书'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '检测报告'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 3,
 | 
			
		||||
          name: '自校报告'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        belongPerson:null,
 | 
			
		||||
        benchmarkMeasurTool: null,
 | 
			
		||||
        certificateCode: null,
 | 
			
		||||
        certificateCodeBh: null,
 | 
			
		||||
        certificateType: null,
 | 
			
		||||
        client: null,
 | 
			
		||||
        code: null,
 | 
			
		||||
        createDate: null,
 | 
			
		||||
        description: null,
 | 
			
		||||
        equipmentSupplier: null,
 | 
			
		||||
        externalInspectionCycle: null,
 | 
			
		||||
        externalInspectionTime: null,
 | 
			
		||||
        gageStatus: null,
 | 
			
		||||
        gageTypeId: null,
 | 
			
		||||
        id: null,
 | 
			
		||||
        internalInspectionCycle: null,
 | 
			
		||||
        internalInspectionTime: null,
 | 
			
		||||
        measuringToolAccuracy: null,
 | 
			
		||||
        measuringToolSpecification: null,
 | 
			
		||||
        name: null,
 | 
			
		||||
        nextExternalInspectionTime: null,
 | 
			
		||||
        nextInternalInspectionTime: null,
 | 
			
		||||
        recipient: null,
 | 
			
		||||
        remark: null,
 | 
			
		||||
        updateDate: null,
 | 
			
		||||
        useLocation: null,
 | 
			
		||||
        userDepartment: null,
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getData() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getUserList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.userList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.dictionaryDetailList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.departmentList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getGageTypeList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.gageTypeList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/gage/qmsGage/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										41
									
								
								src/views/modules/gage/components/gageAvailable.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/views/modules/gage/components/gageAvailable.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 09:49:36
 | 
			
		||||
 * @LastEditTime: 2023-05-09 15:39:05
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-tag v-if="injectData.gageStatus === 1" type="success">可用</el-tag>
 | 
			
		||||
    <el-tag v-else type="warning">不可用</el-tag>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										201
									
								
								src/views/modules/gage/components/gageResumeSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										201
									
								
								src/views/modules/gage/components/gageResumeSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,201 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-05-10 16:18:12
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="gageCode" :label="$t('gage.gageName')">
 | 
			
		||||
      <el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageName')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="gageName" :label="$t('gage.gageName')">
 | 
			
		||||
      <el-input v-model="dataForm.gageName" :placeholder="$t('gage.gageName')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
 | 
			
		||||
      <el-select v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
 | 
			
		||||
        <el-option v-for="item in eventList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="gageTypeId" :label="$t('gage.gageTypeName')">
 | 
			
		||||
      <el-select v-model="dataForm.gageTypeId" :placeholder="$t('gage.gageTypeName')">
 | 
			
		||||
        <el-option v-for="item in gageTypeList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="process" :label="$t('gage.process')">
 | 
			
		||||
      <el-select v-model="dataForm.process" :placeholder="$t('gage.process')">
 | 
			
		||||
        <el-option v-for="item in processList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item :label="$t('time')" prop="timeSlot">
 | 
			
		||||
      <el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
 | 
			
		||||
        valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
 | 
			
		||||
        :end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page",
 | 
			
		||||
        getGageTypeList: '/gage/qmsGageType/page'
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        gageName: null,
 | 
			
		||||
        gageCode: null,
 | 
			
		||||
        measurToolEvent: null,
 | 
			
		||||
        process: null,
 | 
			
		||||
        timeSlot:null,
 | 
			
		||||
      },
 | 
			
		||||
      gageTypeList:[],
 | 
			
		||||
      eventList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '领用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '归还'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '量具报废'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 3,
 | 
			
		||||
          name: '量具维修'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 4,
 | 
			
		||||
          name: '量具购买'
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
      processList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '未审核'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '不同意'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '同意'
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    getDict() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getGageTypeList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.gageTypeList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										215
									
								
								src/views/modules/gage/components/gageSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										215
									
								
								src/views/modules/gage/components/gageSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,215 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-05-10 16:17:59
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="code" :label="$t('gage.code')">
 | 
			
		||||
      <el-input v-model="dataForm.code" :placeholder="$t('gage.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="name" :label="$t('gage.name')">
 | 
			
		||||
      <el-input v-model="dataForm.customSamplingCode" :placeholder="$t('gage.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
 | 
			
		||||
      <el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="gageStatus" :label="$t('gage.gageStatus')">
 | 
			
		||||
      <el-select v-model="dataForm.gageStatus" :placeholder="$t('gage.gageStatus')">
 | 
			
		||||
        <el-option v-for="item in gageStatusList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="gageTypeId" :label="$t('gage.gageTypeName')">
 | 
			
		||||
      <el-select v-model="dataForm.gageTypeId" :placeholder="$t('gage.gageTypeName')">
 | 
			
		||||
        <el-option v-for="item in gageTypeList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="belongPerson" :label="$t('gage.belongPersonName')">
 | 
			
		||||
      <el-select v-model="dataForm.belongPerson" :placeholder="$t('gage.belongPersonName')">
 | 
			
		||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page",
 | 
			
		||||
        getGageTypeList: '/gage/qmsGageType/page',
 | 
			
		||||
        getUserList: '/sys/user/page',
 | 
			
		||||
      },
 | 
			
		||||
   
 | 
			
		||||
      visible: false,
 | 
			
		||||
      gageStatusList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '在用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '备用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '停用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 3,
 | 
			
		||||
          name: '封存'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 4,
 | 
			
		||||
          name: '报废'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 5,
 | 
			
		||||
          name: '降级使用'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        page: 1,
 | 
			
		||||
        limit:999
 | 
			
		||||
      },
 | 
			
		||||
      gageTypeList: [],
 | 
			
		||||
      userList:[],
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        name: null,
 | 
			
		||||
        code: null,
 | 
			
		||||
        measuringToolAccuracy: null,
 | 
			
		||||
        gageStatus: null,
 | 
			
		||||
        belongPerson: null,
 | 
			
		||||
        gageTypeId: null,
 | 
			
		||||
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    getDict() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getGageTypeList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.gageTypeList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getUserList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.userList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										199
									
								
								src/views/modules/gage/components/gageType-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										199
									
								
								src/views/modules/gage/components/gageType-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,199 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-05-08 10:34:55
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
    <el-form-item prop="code" :label="$t('gage.code')">
 | 
			
		||||
      <el-input v-model="dataForm.code" :placeholder="$t('gage.code')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="name" :label="$t('gage.name')">
 | 
			
		||||
      <el-input v-model="dataForm.name" :placeholder="$t('gage.name')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="measurementType" :label="$t('gage.measurementType')">
 | 
			
		||||
      <el-select v-model="dataForm.measurementType" :placeholder="$t('gage.measurementType')">
 | 
			
		||||
        <el-option v-for="item in measurementTypeList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="parentId" :label="$t('gage.parentId')">
 | 
			
		||||
      <el-select v-model="dataForm.parentId" :placeholder="$t('gage.parentId')">
 | 
			
		||||
        <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/gage/qmsGageType",
 | 
			
		||||
        infoURL: "/gage/qmsGageType/{ id }",
 | 
			
		||||
        getGageListURL: '/gage/qmsGage/page',
 | 
			
		||||
        // getTeamListURL: '/basic/qmsTeam/gape',
 | 
			
		||||
        // getProductURL: '/basic/qmsProduct/gape',
 | 
			
		||||
        // getSupplierListURL: '/supplier/qmsSupplier/gape'
 | 
			
		||||
      },
 | 
			
		||||
      gageList:[],
 | 
			
		||||
      // supplierList:[],
 | 
			
		||||
      // productList:[],
 | 
			
		||||
      // typeList: [],
 | 
			
		||||
      // teamList:[],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        gape: 1
 | 
			
		||||
      },
 | 
			
		||||
      measurementTypeList: [{
 | 
			
		||||
        id: 0,
 | 
			
		||||
        name: '计量'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 1,
 | 
			
		||||
        name: '计数'
 | 
			
		||||
      },
 | 
			
		||||
      ],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        measurementType: null,
 | 
			
		||||
        code: null,
 | 
			
		||||
        name:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getData() {
 | 
			
		||||
      // this.$http
 | 
			
		||||
      //   .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
			
		||||
      //   .then(({ data: res }) => {
 | 
			
		||||
      //     if (res.code === 0) {
 | 
			
		||||
      //       console.log(res.data);
 | 
			
		||||
      //       this.typeList = res.data.list
 | 
			
		||||
      //     }
 | 
			
		||||
      //   })
 | 
			
		||||
      //   .catch(() => {
 | 
			
		||||
      //   });
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getGageListURL, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.gageList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/gage/qmsGageType/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										324
									
								
								src/views/modules/gage/components/gageVerification-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										324
									
								
								src/views/modules/gage/components/gageVerification-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,324 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-05-11 09:50:14
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
    <el-form-item prop="client" :label="$t('gage.client')">
 | 
			
		||||
      <el-input v-model="dataForm.client" :placeholder="$t('gage.client')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="certificateCode" :label="$t('gage.certificateCode')">
 | 
			
		||||
      <el-input v-model="dataForm.certificateCode" :placeholder="$t('gage.certificateCode')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="verificationFee" :label="$t('gage.verificationFee')">
 | 
			
		||||
      <el-input v-model="dataForm.verificationFee" :placeholder="$t('gage.verificationFee')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="calibrationUnit" :label="$t('gage.calibrationUnit')">
 | 
			
		||||
      <el-input v-model="dataForm.calibrationUnit" :placeholder="$t('gage.calibrationUnit')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="measure" :label="$t('gage.measure')">
 | 
			
		||||
      <el-select v-model="dataForm.measure" :placeholder="$t('gage.measure')">
 | 
			
		||||
        <el-option v-for="item in measureList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="gageId" :label="$t('gage.gageName')">
 | 
			
		||||
      <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
 | 
			
		||||
        <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="inspectionTime" :label="$t('gage.inspectionTime')">
 | 
			
		||||
      <el-date-picker v-model="dataForm.inspectionTime" type="datetime" :placeholder="$t('gage.inspectionTime')"
 | 
			
		||||
        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
			
		||||
      </el-date-picker>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="calibrationDepartment" :label="$t('gage.calibrationDepartment')">
 | 
			
		||||
      <el-select v-model="dataForm.calibrationDepartment" :placeholder="$t('gage.calibrationDepartment')">
 | 
			
		||||
        <el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="parityBit" :label="$t('gage.parityBit')">
 | 
			
		||||
      <el-radio-group v-model="dataForm.parityBit">
 | 
			
		||||
        <el-radio :label="0">内部校验</el-radio>
 | 
			
		||||
        <el-radio :label="1">外部校验</el-radio>
 | 
			
		||||
      </el-radio-group>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="checker" :label="$t('gage.checker')">
 | 
			
		||||
      <el-select v-model="dataForm.checker" :placeholder="$t('gage.checker')">
 | 
			
		||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="verificationResult" :label="$t('gage.verificationResult')">
 | 
			
		||||
      <el-input v-model="dataForm.verificationResult" :placeholder="$t('gage.verificationResult')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="remark" :label="$t('gage.remark')">
 | 
			
		||||
      <el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/gage/qmsGageVerification",
 | 
			
		||||
        infoURL: "/gage/qmsGageVerification/{ id }",
 | 
			
		||||
        dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
 | 
			
		||||
        getUserList: '/sys/user/page',
 | 
			
		||||
        getGageList: '/gage/qmsGage/page',
 | 
			
		||||
      },
 | 
			
		||||
      gageList: [],
 | 
			
		||||
      userList: [],
 | 
			
		||||
      gageTypeList:[],
 | 
			
		||||
      departmentList: [],
 | 
			
		||||
      processList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '未审核'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '不同意'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '同意'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      measureList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: 'a'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: 'b'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: 'c'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        gape: 1
 | 
			
		||||
      },
 | 
			
		||||
      gageStatusList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name:'在用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '备用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '停用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 3,
 | 
			
		||||
          name: '封存'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 4,
 | 
			
		||||
          name: '报废'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 5,
 | 
			
		||||
          name: '降级使用'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      certificateTypeList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '检定证书'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '校准证书'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '检测报告'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 3,
 | 
			
		||||
          name: '自校报告'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      gageList: [],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        calibrationDepartment:null,
 | 
			
		||||
        calibrationUnit: null,
 | 
			
		||||
        certificateNo: null,
 | 
			
		||||
        checker: null,
 | 
			
		||||
        client: null,
 | 
			
		||||
        createDate: null,
 | 
			
		||||
        gageCode: null,
 | 
			
		||||
        gageId: null,
 | 
			
		||||
        id: null,
 | 
			
		||||
        inspectionTime: null,
 | 
			
		||||
        measure: null,
 | 
			
		||||
        measuringToolAccuracy: null,
 | 
			
		||||
        parityBit: null,
 | 
			
		||||
        remark: null,
 | 
			
		||||
        valid: null,
 | 
			
		||||
        verificationFee: null,
 | 
			
		||||
        verificationResult: null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getData() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getUserList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.userList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.dictionaryDetailList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.departmentList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getGageList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.gageList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/gage/qmsGageVerification/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										204
									
								
								src/views/modules/gage/components/gageVerificationSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										204
									
								
								src/views/modules/gage/components/gageVerificationSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,204 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-05-11 10:13:33
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="gageId" :label="$t('gage.gageName')">
 | 
			
		||||
      <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
 | 
			
		||||
        <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="parityBit" :label="$t('gage.parityBit')">
 | 
			
		||||
      <el-radio-group v-model="dataForm.parityBit">
 | 
			
		||||
        <el-radio :label="0">内部校验</el-radio>
 | 
			
		||||
        <el-radio :label="1">外部校验</el-radio>
 | 
			
		||||
      </el-radio-group>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item :label="$t('time')" prop="timeSlot">
 | 
			
		||||
      <el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
 | 
			
		||||
        valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
 | 
			
		||||
        :end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page",
 | 
			
		||||
        getGageTypeList: '/gage/qmsGageType/page',
 | 
			
		||||
        getUserList: '/sys/user/page',
 | 
			
		||||
        getGageList: '/gage/qmsGage/page'
 | 
			
		||||
      },
 | 
			
		||||
   
 | 
			
		||||
      visible: false,
 | 
			
		||||
      gageStatusList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '在用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '备用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '停用'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 3,
 | 
			
		||||
          name: '封存'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 4,
 | 
			
		||||
          name: '报废'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 5,
 | 
			
		||||
          name: '降级使用'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        page: 1,
 | 
			
		||||
        limit:999
 | 
			
		||||
      },
 | 
			
		||||
      gageList:[],
 | 
			
		||||
      gageTypeList: [],
 | 
			
		||||
      userList:[],
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        gageId: null,
 | 
			
		||||
        startTime: null,
 | 
			
		||||
        endTime: null,
 | 
			
		||||
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    getDict() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getGageTypeList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.gageTypeList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getGageList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.gageList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										278
									
								
								src/views/modules/gage/components/qmsGageResume-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										278
									
								
								src/views/modules/gage/components/qmsGageResume-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,278 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-05-10 13:45:58
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
    <el-form-item prop="gageId" :label="$t('gage.gageName')">
 | 
			
		||||
      <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
 | 
			
		||||
        <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="gageCode" :label="$t('gage.gageCode')">
 | 
			
		||||
      <el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageCode')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
 | 
			
		||||
      <el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
 | 
			
		||||
      <el-select v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
 | 
			
		||||
        <el-option v-for="item in eventList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
 | 
			
		||||
      <el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
 | 
			
		||||
        <el-option v-for="item in departmentList" :key="item.id" :label="item.name"
 | 
			
		||||
          :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="useLocation" :label="$t('gage.useLocation')">
 | 
			
		||||
      <el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="recipientName" :label="$t('gage.recipientName')">
 | 
			
		||||
      <el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
 | 
			
		||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="processUserName" :label="$t('gage.processUserName')">
 | 
			
		||||
      <el-select v-model="dataForm.processUserName" :placeholder="$t('gage.processUserName')">
 | 
			
		||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="process" :label="$t('gage.process')">
 | 
			
		||||
      <el-select v-model="dataForm.process" :placeholder="$t('gage.process')">
 | 
			
		||||
        <el-option v-for="item in processList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="expectedReturnDate" :label="$t('gage.expectedReturnDate')">
 | 
			
		||||
      <el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('gage.expectedReturnDate')"
 | 
			
		||||
        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
			
		||||
      </el-date-picker>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="transferDate" :label="$t('gage.transferDate')">
 | 
			
		||||
      <el-date-picker v-model="dataForm.transferDate" type="datetime" :placeholder="$t('gage.transferDate')"
 | 
			
		||||
        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
			
		||||
      </el-date-picker>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="remark" :label="$t('gage.remark')">
 | 
			
		||||
      <el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/gage/qmsGageResume",
 | 
			
		||||
        infoURL: "/gage/qmsGageResume/{ id }",
 | 
			
		||||
        dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
 | 
			
		||||
        getUserList: '/sys/user/page'
 | 
			
		||||
        // getTeamListURL: '/basic/qmsTeam/gape',
 | 
			
		||||
        // getProductURL: '/basic/qmsProduct/gape',
 | 
			
		||||
        // getSupplierListURL: '/supplier/qmsSupplier/gape'
 | 
			
		||||
      },
 | 
			
		||||
      gageList: [],
 | 
			
		||||
      userList:[],
 | 
			
		||||
      departmentList: [],
 | 
			
		||||
      processList: [
 | 
			
		||||
        {
 | 
			
		||||
          id: 0,
 | 
			
		||||
          name: '未审核'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 1,
 | 
			
		||||
          name: '不同意'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '同意'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        gape: 1
 | 
			
		||||
      },
 | 
			
		||||
      eventList: [
 | 
			
		||||
        {
 | 
			
		||||
        id: 0,
 | 
			
		||||
          name: '领用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        id: 1,
 | 
			
		||||
        name: '归还'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 2,
 | 
			
		||||
          name: '量具报废'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 3,
 | 
			
		||||
          name: '量具维修'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          id: 4,
 | 
			
		||||
          name: '量具购买'
 | 
			
		||||
        },
 | 
			
		||||
      ],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        expectedReturnDate:null,
 | 
			
		||||
        gageCode: null,
 | 
			
		||||
        gageId: null,
 | 
			
		||||
        measuringToolSpecification:null,
 | 
			
		||||
        measurToolEvent: null,
 | 
			
		||||
        process: null,
 | 
			
		||||
        processUserId: null,
 | 
			
		||||
        recipient: null,
 | 
			
		||||
        remark: null,
 | 
			
		||||
        transferDate: null,
 | 
			
		||||
        useLocation: null,
 | 
			
		||||
        userDepartment: null,
 | 
			
		||||
        remark:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getData() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getUserList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.userList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.dictionaryDetailList, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.departmentList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/gage/qmsGageResume/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										49
									
								
								src/views/modules/gage/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								src/views/modules/gage/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 14:12:10
 | 
			
		||||
 * @LastEditTime: 2023-01-31 16:47:32
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-radio v-model="injectData.incomingInspection" :label="1"
 | 
			
		||||
      >进货检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.processInspection" :label="1"
 | 
			
		||||
      >过程检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.finishInspection" :label="1"
 | 
			
		||||
      >成品检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({}),
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										322
									
								
								src/views/modules/gage/qmsGage.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										322
									
								
								src/views/modules/gage/qmsGage.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,322 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-10 15:54:33
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="6" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <gape-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </gape-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import gapeAdd from "./components/gage-add"
 | 
			
		||||
// import gage from '@/filters/gage'
 | 
			
		||||
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import gageSearch from "./components/gageSearch"
 | 
			
		||||
// import available from "./components/gageAvailable.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'client',
 | 
			
		||||
    label: i18n.t("gage.client"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'certificateCode',
 | 
			
		||||
    label: i18n.t("gage.certificateCode"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'certificateCodeBh',
 | 
			
		||||
    label: i18n.t("gage.certificateCodeBh"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'code',
 | 
			
		||||
    label: i18n.t("gage.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'name',
 | 
			
		||||
    label: i18n.t("gage.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageTypeName',
 | 
			
		||||
    label: i18n.t("gage.gageTypeName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'internalInspectionCycle',
 | 
			
		||||
    label: i18n.t("gage.internalInspectionCycle"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'internalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.internalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'nextInternalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.nextInternalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'externalInspectionCycle',
 | 
			
		||||
    label: i18n.t("gage.externalInspectionCycle"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'externalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.externalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'nextExternalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.nextExternalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'description',
 | 
			
		||||
    label: i18n.t("gage.description"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageStatus',
 | 
			
		||||
    label: i18n.t("gage.gageStatus"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  // {
 | 
			
		||||
  //   prop: 'gageStatus',
 | 
			
		||||
  //   label: i18n.t("available"),
 | 
			
		||||
  //   subcomponent: available,
 | 
			
		||||
  //   align: 'center'
 | 
			
		||||
  // },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'belongPersonName',
 | 
			
		||||
    label: i18n.t("gage.belongPersonName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "parameter",
 | 
			
		||||
    btnName: "台差参数",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    gageSearch,
 | 
			
		||||
    gapeAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/gage/qmsGage/page",
 | 
			
		||||
        deleteURL: "/gage/qmsGage",
 | 
			
		||||
        exportUrl: '/gage/qmsGage/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('export'),
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.name = dataForm.name
 | 
			
		||||
      this.listQuery.measuringToolAccuracy = dataForm.measuringToolAccuracy
 | 
			
		||||
      this.listQuery.gageStatus = dataForm.gageStatus
 | 
			
		||||
      this.listQuery.belongPerson = dataForm.belongPerson
 | 
			
		||||
      this.listQuery.gageTypeId = dataForm.gageTypeId
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === 'parameter') {
 | 
			
		||||
        this.$router.push({
 | 
			
		||||
          name: 'gage-qmsGageTypeDifferenceParameter',
 | 
			
		||||
          query: {
 | 
			
		||||
            gageTypeId: val.data.gageTypeId
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      } else if (val.type === 'change') {
 | 
			
		||||
        const obj = {
 | 
			
		||||
          id: val.data.id,
 | 
			
		||||
          measurementType: val.data.measurementType,
 | 
			
		||||
          name: val.data.name,
 | 
			
		||||
          code: val.data.code,
 | 
			
		||||
          gageTypeStatus: val.data.gageTypeStatus === 0 ? 1: 0,
 | 
			
		||||
          parentId: val.data.parentId
 | 
			
		||||
        }
 | 
			
		||||
        this.$http.put(this.urlOptions.submitURL, obj)
 | 
			
		||||
          .then(({ data: res }) => {
 | 
			
		||||
            if (res.code !== 0) {
 | 
			
		||||
              return this.$message.error(res.msg);
 | 
			
		||||
            }
 | 
			
		||||
            this.$message({
 | 
			
		||||
              message: this.$t("prompt.success"),
 | 
			
		||||
              type: "success",
 | 
			
		||||
              duration: 500,
 | 
			
		||||
              onClose: () => {
 | 
			
		||||
                this.getDataList()
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										322
									
								
								src/views/modules/gage/qmsGageGrr.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										322
									
								
								src/views/modules/gage/qmsGageGrr.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,322 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-11 15:30:11
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="6" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <gape-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </gape-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import gapeAdd from "./components/gage-add"
 | 
			
		||||
// import gage from '@/filters/gage'
 | 
			
		||||
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import gageSearch from "./components/gageSearch"
 | 
			
		||||
// import available from "./components/gageAvailable.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'client',
 | 
			
		||||
    label: i18n.t("gage.client"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'certificateCode',
 | 
			
		||||
    label: i18n.t("gage.certificateCode"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'certificateCodeBh',
 | 
			
		||||
    label: i18n.t("gage.certificateCodeBh"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'code',
 | 
			
		||||
    label: i18n.t("gage.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'name',
 | 
			
		||||
    label: i18n.t("gage.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageTypeName',
 | 
			
		||||
    label: i18n.t("gage.gageTypeName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'internalInspectionCycle',
 | 
			
		||||
    label: i18n.t("gage.internalInspectionCycle"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'internalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.internalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'nextInternalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.nextInternalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'externalInspectionCycle',
 | 
			
		||||
    label: i18n.t("gage.externalInspectionCycle"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'externalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.externalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'nextExternalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.nextExternalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'description',
 | 
			
		||||
    label: i18n.t("gage.description"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageStatus',
 | 
			
		||||
    label: i18n.t("gage.gageStatus"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  // {
 | 
			
		||||
  //   prop: 'gageStatus',
 | 
			
		||||
  //   label: i18n.t("available"),
 | 
			
		||||
  //   subcomponent: available,
 | 
			
		||||
  //   align: 'center'
 | 
			
		||||
  // },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'belongPersonName',
 | 
			
		||||
    label: i18n.t("gage.belongPersonName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "parameter",
 | 
			
		||||
    btnName: "台差参数",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    gageSearch,
 | 
			
		||||
    gapeAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/gage/qmsGageGrr/page",
 | 
			
		||||
        deleteURL: "/gage/qmsGageGrr",
 | 
			
		||||
        exportUrl: '/gage/qmsGageGrr/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('export'),
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.name = dataForm.name
 | 
			
		||||
      this.listQuery.measuringToolAccuracy = dataForm.measuringToolAccuracy
 | 
			
		||||
      this.listQuery.gageStatus = dataForm.gageStatus
 | 
			
		||||
      this.listQuery.belongPerson = dataForm.belongPerson
 | 
			
		||||
      this.listQuery.gageTypeId = dataForm.gageTypeId
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === 'parameter') {
 | 
			
		||||
        this.$router.push({
 | 
			
		||||
          name: 'gage-qmsGageTypeDifferenceParameter',
 | 
			
		||||
          query: {
 | 
			
		||||
            gageTypeId: val.data.gageTypeId
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      } else if (val.type === 'change') {
 | 
			
		||||
        const obj = {
 | 
			
		||||
          id: val.data.id,
 | 
			
		||||
          measurementType: val.data.measurementType,
 | 
			
		||||
          name: val.data.name,
 | 
			
		||||
          code: val.data.code,
 | 
			
		||||
          gageTypeStatus: val.data.gageTypeStatus === 0 ? 1: 0,
 | 
			
		||||
          parentId: val.data.parentId
 | 
			
		||||
        }
 | 
			
		||||
        this.$http.put(this.urlOptions.submitURL, obj)
 | 
			
		||||
          .then(({ data: res }) => {
 | 
			
		||||
            if (res.code !== 0) {
 | 
			
		||||
              return this.$message.error(res.msg);
 | 
			
		||||
            }
 | 
			
		||||
            this.$message({
 | 
			
		||||
              message: this.$t("prompt.success"),
 | 
			
		||||
              type: "success",
 | 
			
		||||
              duration: 500,
 | 
			
		||||
              onClose: () => {
 | 
			
		||||
                this.getDataList()
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										254
									
								
								src/views/modules/gage/qmsGageResume.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										254
									
								
								src/views/modules/gage/qmsGageResume.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,254 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-05-08 11:11:06
 | 
			
		||||
 * @LastEditTime: 2023-05-10 16:20:50
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <qmsGageResume-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </qmsGageResume-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <gageResume-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
 | 
			
		||||
          </gageResume-search>
 | 
			
		||||
          <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
            <el-col :span="12">
 | 
			
		||||
              <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
                {{ $t("close") }}
 | 
			
		||||
              </el-button>
 | 
			
		||||
              <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
			
		||||
                $t("reset")
 | 
			
		||||
                }}</el-button>
 | 
			
		||||
              <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
                {{ $t("search") }}
 | 
			
		||||
              </el-button>
 | 
			
		||||
            </el-col>
 | 
			
		||||
          </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import qmsGageResumeAdd from "./components/qmsGageResume-add"
 | 
			
		||||
// import gage from '@/filters/gage'
 | 
			
		||||
import { timeFormatter } from '@/filters'
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import gageResumeSearch from "./components/gageResumeSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageCode',
 | 
			
		||||
    label: i18n.t("gage.gageCode"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageName',
 | 
			
		||||
    label: i18n.t("gage.gageName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'measurToolEvent',
 | 
			
		||||
    label: i18n.t("gage.measurToolEvent"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'createDate',
 | 
			
		||||
    label: i18n.t("gage.createDate"),
 | 
			
		||||
    filter: timeFormatter,
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'recipientName',
 | 
			
		||||
    label: i18n.t("gage.recipientName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'userDepartment',
 | 
			
		||||
    label: i18n.t("gage.userDepartment"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'useLocation',
 | 
			
		||||
    label: i18n.t("gage.useLocation"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'remark',
 | 
			
		||||
    label: i18n.t("gage.remark"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  }
 | 
			
		||||
  // {
 | 
			
		||||
  //   prop: 'measurementType',
 | 
			
		||||
  //   label: i18n.t("gage.measurementType"),
 | 
			
		||||
  //   align: 'center',
 | 
			
		||||
  //   filter: gage('measurementType'),
 | 
			
		||||
  // }
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "parameter",
 | 
			
		||||
    btnName: "台差参数",
 | 
			
		||||
  }
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    gageResumeSearch,
 | 
			
		||||
    qmsGageResumeAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/gage/qmsGageResume/page",
 | 
			
		||||
        deleteURL: "/gage/qmsGageResume",
 | 
			
		||||
        // exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.gageName = dataForm.gageName
 | 
			
		||||
      this.listQuery.gageCode = dataForm.gageCode
 | 
			
		||||
      this.listQuery.measurToolEvent = dataForm.measurToolEvent
 | 
			
		||||
      this.listQuery.process = dataForm.process
 | 
			
		||||
      this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
 | 
			
		||||
      this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
 | 
			
		||||
      this.listQuery.page = 1
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										257
									
								
								src/views/modules/gage/qmsGageType.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										257
									
								
								src/views/modules/gage/qmsGageType.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,257 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-09 15:47:41
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <!-- <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge> -->
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <gageType-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </gageType-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> -->
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import gageTypeAdd from "./components/gageType-add"
 | 
			
		||||
import gage from '@/filters/gage'
 | 
			
		||||
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
// import failureTypeSearch from "./components/failureTypeSearch"
 | 
			
		||||
import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'code',
 | 
			
		||||
    label: i18n.t("gage.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'name',
 | 
			
		||||
    label: i18n.t("gage.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageTypeStatus',
 | 
			
		||||
    label: i18n.t("available"),
 | 
			
		||||
    subcomponent: available,
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'measurementType',
 | 
			
		||||
    label: i18n.t("gage.measurementType"),
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    filter: gage('measurementType'),
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "parameter",
 | 
			
		||||
    btnName: "台差参数",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "change",
 | 
			
		||||
    btnName: "改变状态",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    // failureTypeSearch,
 | 
			
		||||
    gageTypeAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/gage/qmsGageType/page",
 | 
			
		||||
        deleteURL: "/gage/qmsGageType",
 | 
			
		||||
        submitURL: '/gage/qmsGageType'
 | 
			
		||||
        // exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === 'parameter') {
 | 
			
		||||
        this.$router.push({
 | 
			
		||||
          name: 'gage-qmsGageTypeDifferenceParameter',
 | 
			
		||||
          query: {
 | 
			
		||||
            gageTypeId: val.data.id
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      } else if (val.type === 'change') {
 | 
			
		||||
        const obj = {
 | 
			
		||||
          id: val.data.id,
 | 
			
		||||
          measurementType: val.data.measurementType,
 | 
			
		||||
          name: val.data.name,
 | 
			
		||||
          code: val.data.code,
 | 
			
		||||
          gageTypeStatus: val.data.gageTypeStatus === 0 ? 1: 0,
 | 
			
		||||
          parentId: val.data.parentId
 | 
			
		||||
        }
 | 
			
		||||
        this.$http.put(this.urlOptions.submitURL, obj)
 | 
			
		||||
          .then(({ data: res }) => {
 | 
			
		||||
            if (res.code !== 0) {
 | 
			
		||||
              return this.$message.error(res.msg);
 | 
			
		||||
            }
 | 
			
		||||
            this.$message({
 | 
			
		||||
              message: this.$t("prompt.success"),
 | 
			
		||||
              type: "success",
 | 
			
		||||
              duration: 500,
 | 
			
		||||
              onClose: () => {
 | 
			
		||||
                this.getDataList()
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										234
									
								
								src/views/modules/gage/qmsGageTypeDifferenceParameter.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										234
									
								
								src/views/modules/gage/qmsGageTypeDifferenceParameter.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,234 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-05-08 10:31:11
 | 
			
		||||
 * @LastEditTime: 2023-05-09 15:47:26
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <!-- <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge> -->
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <gageType-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </gageType-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> -->
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import gageTypeAdd from "./components/gageType-add"
 | 
			
		||||
// import gage from '@/filters/gage'
 | 
			
		||||
import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
    {
 | 
			
		||||
    prop: 'serialNo',
 | 
			
		||||
    label: i18n.t("gage.serialNo"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'code',
 | 
			
		||||
    label: i18n.t("gage.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'name',
 | 
			
		||||
    label: i18n.t("gage.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'decimalDigits',
 | 
			
		||||
    label: i18n.t("gage.decimalDigits"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'lsl',
 | 
			
		||||
    label: i18n.t("gage.lsl"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'sl',
 | 
			
		||||
    label: i18n.t("gage.sl"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'usl',
 | 
			
		||||
    label: i18n.t("gage.usl"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    // failureTypeSearch,
 | 
			
		||||
    gageTypeAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/gage/qmsGageTypeDifferenceParameter/page",
 | 
			
		||||
        deleteURL: "/gage/qmsGageTypeDifferenceParameter",
 | 
			
		||||
        // exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    if (this.$route.query) {
 | 
			
		||||
      this.listQuery.gageTypeId = this.$route.query.gageTypeId
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandl();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										325
									
								
								src/views/modules/gage/qmsGageVerification.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										325
									
								
								src/views/modules/gage/qmsGageVerification.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,325 @@
 | 
			
		||||
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-11 10:20:06
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="2" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <gageVerification-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </gageVerification-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <gageVerification-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
 | 
			
		||||
          </gageVerification-search>
 | 
			
		||||
          <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
            <el-col :span="12">
 | 
			
		||||
              <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
                {{ $t("close") }}
 | 
			
		||||
              </el-button>
 | 
			
		||||
              <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
			
		||||
                $t("reset")
 | 
			
		||||
                }}</el-button>
 | 
			
		||||
              <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
                {{ $t("search") }}
 | 
			
		||||
              </el-button>
 | 
			
		||||
            </el-col>
 | 
			
		||||
          </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import gageVerificationAdd from "./components/gageVerification-add"
 | 
			
		||||
// import gageVerificationSearch from "./components/gageVerificationSearch"
 | 
			
		||||
 | 
			
		||||
// import gage from '@/filters/gage'
 | 
			
		||||
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import gageVerificationSearch from "./components/gageVerificationSearch"
 | 
			
		||||
// import available from "./components/gageAvailable.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'certificateNo',
 | 
			
		||||
    label: i18n.t("gage.certificateCode"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageName',
 | 
			
		||||
    label: i18n.t("gage.gageName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'certificateCodeBh',
 | 
			
		||||
    label: i18n.t("gage.certificateCodeBh"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'code',
 | 
			
		||||
    label: i18n.t("gage.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'name',
 | 
			
		||||
    label: i18n.t("gage.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageTypeName',
 | 
			
		||||
    label: i18n.t("gage.gageTypeName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'internalInspectionCycle',
 | 
			
		||||
    label: i18n.t("gage.internalInspectionCycle"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'internalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.internalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'nextInternalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.nextInternalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'externalInspectionCycle',
 | 
			
		||||
    label: i18n.t("gage.externalInspectionCycle"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'externalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.externalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'nextExternalInspectionTime',
 | 
			
		||||
    label: i18n.t("gage.nextExternalInspectionTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'description',
 | 
			
		||||
    label: i18n.t("gage.description"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'gageStatus',
 | 
			
		||||
    label: i18n.t("gage.gageStatus"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  // {
 | 
			
		||||
  //   prop: 'gageStatus',
 | 
			
		||||
  //   label: i18n.t("available"),
 | 
			
		||||
  //   subcomponent: available,
 | 
			
		||||
  //   align: 'center'
 | 
			
		||||
  // },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'belongPersonName',
 | 
			
		||||
    label: i18n.t("gage.belongPersonName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "parameter",
 | 
			
		||||
    btnName: "台差参数",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    gageVerificationSearch,
 | 
			
		||||
    gageVerificationAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/gage/qmsGageVerification/page",
 | 
			
		||||
        deleteURL: "/gage/qmsGageVerification",
 | 
			
		||||
        exportUrl: '/gage/qmsGageVerification/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('export'),
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.parityBit = dataForm.parityBit
 | 
			
		||||
      this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : null
 | 
			
		||||
      this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : null
 | 
			
		||||
      this.listQuery.gageId = dataForm.gageId
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === 'parameter') {
 | 
			
		||||
        this.$router.push({
 | 
			
		||||
          name: 'gage-qmsGageTypeDifferenceParameter',
 | 
			
		||||
          query: {
 | 
			
		||||
            gageTypeId: val.data.gageTypeId
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      } else if (val.type === 'change') {
 | 
			
		||||
        const obj = {
 | 
			
		||||
          id: val.data.id,
 | 
			
		||||
          measurementType: val.data.measurementType,
 | 
			
		||||
          name: val.data.name,
 | 
			
		||||
          code: val.data.code,
 | 
			
		||||
          gageTypeStatus: val.data.gageTypeStatus === 0 ? 1: 0,
 | 
			
		||||
          parentId: val.data.parentId
 | 
			
		||||
        }
 | 
			
		||||
        this.$http.put(this.urlOptions.submitURL, obj)
 | 
			
		||||
          .then(({ data: res }) => {
 | 
			
		||||
            if (res.code !== 0) {
 | 
			
		||||
              return this.$message.error(res.msg);
 | 
			
		||||
            }
 | 
			
		||||
            this.$message({
 | 
			
		||||
              message: this.$t("prompt.success"),
 | 
			
		||||
              type: "success",
 | 
			
		||||
              duration: 500,
 | 
			
		||||
              onClose: () => {
 | 
			
		||||
                this.getDataList()
 | 
			
		||||
              },
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										328
									
								
								src/views/modules/mutual/components/approvalProcess-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										328
									
								
								src/views/modules/mutual/components/approvalProcess-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,328 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-12 15:54:19
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
      <el-form-item prop="approvalProcessCode" :label="$t('disqualification.approvalProcessCode')">
 | 
			
		||||
        <el-input v-model="dataForm.approvalProcessCode" :placeholder="$t('disqualification.approvalProcessCode')">
 | 
			
		||||
        </el-input>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item prop="approvalProcessName" :label="$t('disqualification.approvalProcessName')">
 | 
			
		||||
        <el-input v-model="dataForm.approvalProcessName" :placeholder="$t('disqualification.approvalProcessName')">
 | 
			
		||||
        </el-input>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item prop="approvalProcessType" :label="$t('disqualification.approvalProcessType')">
 | 
			
		||||
        <el-select v-model="dataForm.approvalProcessType" :placeholder="$t('disqualification.approvalProcessType')">
 | 
			
		||||
          <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
          </el-option>
 | 
			
		||||
        </el-select>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
    </el-form>
 | 
			
		||||
    <base-table border :table-props="tableProps" :table-data="tableData" 
 | 
			
		||||
      :add-button-show="addButtonShow" @emitFun="inputChange" @emitButtonClick="emitButtonClick" />
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce"
 | 
			
		||||
// import basicAdd from "@/mixins/basic-add"
 | 
			
		||||
import inputArea from './inputArea'
 | 
			
		||||
import selectArea from './selectArea'
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
import { kStringMaxLength } from "buffer"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'step',
 | 
			
		||||
    label: i18n.t("disqualification.step"),
 | 
			
		||||
    subcomponent: inputArea
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'teamId',
 | 
			
		||||
    label: i18n.t("disqualification.team"),
 | 
			
		||||
    subcomponent: selectArea
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
export default {
 | 
			
		||||
  // mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/nonconform/qmsApprovalProcess",
 | 
			
		||||
        infoURL: "/nonconform/qmsApprovalProcess/{ id }",
 | 
			
		||||
        stepDetailURL: "/nonconform/qmsApprovalProcessStepDetail",
 | 
			
		||||
        stepDetailPageURL: "/nonconform/qmsApprovalProcessStepDetail/page",
 | 
			
		||||
      },
 | 
			
		||||
      supplierList:[],
 | 
			
		||||
      productList:[],
 | 
			
		||||
      typeList: [],
 | 
			
		||||
      teamList: [],
 | 
			
		||||
      tableData:[],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        page: 1,
 | 
			
		||||
        approvalProcessId:null,
 | 
			
		||||
      },
 | 
			
		||||
      options: [
 | 
			
		||||
        {
 | 
			
		||||
          value: 1,
 | 
			
		||||
          label: '不合格品审批'
 | 
			
		||||
      },
 | 
			
		||||
      ],
 | 
			
		||||
      editData: {
 | 
			
		||||
        id:null,
 | 
			
		||||
        list:[]
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      tableProps,
 | 
			
		||||
      addButtonShow:'新增',
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        approvalProcessCode: null,
 | 
			
		||||
        approvalProcessName: null,
 | 
			
		||||
        approvalProcessType: null,
 | 
			
		||||
        qmsApprovalProcessStepDetailDTOList:[]
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    inputChange(val) {
 | 
			
		||||
      console.log('=======')
 | 
			
		||||
      console.log(val)
 | 
			
		||||
      this.tableData[val._pageIndex - 1][val.prop] = val[val.prop]
 | 
			
		||||
      console.log(this.tableData)
 | 
			
		||||
    },
 | 
			
		||||
    emitButtonClick() {
 | 
			
		||||
      console.log('emitButtonClick')
 | 
			
		||||
      let obj = {}
 | 
			
		||||
      for (let i of this.tableProps) {
 | 
			
		||||
        obj[i.prop] = ''
 | 
			
		||||
      }
 | 
			
		||||
      this.tableData.push(obj)
 | 
			
		||||
      // this.dataForm.qmsApprovalProcessStepDetailDTOList.push(obj)
 | 
			
		||||
      // console.log(this.dataForm)
 | 
			
		||||
    },
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      this.listQuery.approvalProcessId = id || ""
 | 
			
		||||
      this.editData.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getData() {
 | 
			
		||||
    //   // this.$http
 | 
			
		||||
    //   //   .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
			
		||||
    //   //   .then(({ data: res }) => {
 | 
			
		||||
    //   //     if (res.code === 0) {
 | 
			
		||||
    //   //       console.log(res.data);
 | 
			
		||||
    //   //       this.typeList = res.data.list
 | 
			
		||||
    //   //     }
 | 
			
		||||
    //   //   })
 | 
			
		||||
    //   //   .catch(() => {
 | 
			
		||||
    //   //   });
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getSupplierListURL, this.listQuery)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data);
 | 
			
		||||
    //         this.supplierList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     })
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getProductURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data)
 | 
			
		||||
    //         this.productList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/nonconform/qmsApprovalProcess/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.stepDetailPageURL, {params: this.listQuery })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.tableData = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    dataFormSubmit() {
 | 
			
		||||
      this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
        if (!valid) {
 | 
			
		||||
          return false;
 | 
			
		||||
        }
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.$http.put(this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (this.tableData.length === 0) {
 | 
			
		||||
                this.editData.list = []
 | 
			
		||||
              } else {
 | 
			
		||||
                this.editData.list = this.tableData.map((item) => {
 | 
			
		||||
                  return {
 | 
			
		||||
                    step: item.step,
 | 
			
		||||
                    teamId: item.teamId,
 | 
			
		||||
                    approvalProcessId: res.data
 | 
			
		||||
                  }
 | 
			
		||||
                })
 | 
			
		||||
             }
 | 
			
		||||
              this.$http.put(this.urlOptions.stepDetailURL, this.editData)
 | 
			
		||||
                .then(({ data: res }) => {
 | 
			
		||||
                  if (res.code !== 0) {
 | 
			
		||||
                    return this.$message.error(res.msg);
 | 
			
		||||
                  }
 | 
			
		||||
                  this.$message({
 | 
			
		||||
                    message: this.$t("prompt.success"),
 | 
			
		||||
                    type: "success",
 | 
			
		||||
                    duration: 500,
 | 
			
		||||
                    onClose: () => {
 | 
			
		||||
                      this.visible = false;
 | 
			
		||||
                      this.tableData = []
 | 
			
		||||
                      this.$emit("refreshDataList");
 | 
			
		||||
                    },
 | 
			
		||||
                  });
 | 
			
		||||
                })
 | 
			
		||||
                .catch(() => { });
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => { })
 | 
			
		||||
        } else {
 | 
			
		||||
          this.$http.post(this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (!this.tableData.length === 0) {
 | 
			
		||||
                const data = this.tableData.map((item) => {
 | 
			
		||||
                  return {
 | 
			
		||||
                    step: item.step,
 | 
			
		||||
                    teamId: item.teamId,
 | 
			
		||||
                    approvalProcessId: res.data
 | 
			
		||||
                  }
 | 
			
		||||
                })
 | 
			
		||||
                this.$http.post(this.urlOptions.stepDetailURL, data)
 | 
			
		||||
                  .then(({ data: res }) => {
 | 
			
		||||
                    if (res.code !== 0) {
 | 
			
		||||
                      return this.$message.error(res.msg);
 | 
			
		||||
                    }
 | 
			
		||||
                    this.$message({
 | 
			
		||||
                      message: this.$t("prompt.success"),
 | 
			
		||||
                      type: "success",
 | 
			
		||||
                      duration: 500,
 | 
			
		||||
                      onClose: () => {
 | 
			
		||||
                        this.visible = false;
 | 
			
		||||
                        this.tableData = []
 | 
			
		||||
                        this.$emit("refreshDataList");
 | 
			
		||||
                      },
 | 
			
		||||
                    });
 | 
			
		||||
                  })
 | 
			
		||||
                  .catch(() => { });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: this.$t("prompt.success"),
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.visible = false;
 | 
			
		||||
                    this.tableData = []
 | 
			
		||||
                    this.$emit("refreshDataList");
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              }
 | 
			
		||||
            
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              // this.$message({
 | 
			
		||||
              //   message: this.$t("prompt.success"),
 | 
			
		||||
              //   type: "success",
 | 
			
		||||
              //   duration: 500,
 | 
			
		||||
              //   onClose: () => {
 | 
			
		||||
              //     this.visible = false;
 | 
			
		||||
              //     this.$emit("refreshDataList");
 | 
			
		||||
              //   },
 | 
			
		||||
              // });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => { })
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    formClear() {
 | 
			
		||||
      this.$refs.dataForm.resetFields()
 | 
			
		||||
      this.tableData = []
 | 
			
		||||
    }
 | 
			
		||||
    // 表单提交
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -0,0 +1,277 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-07 10:20:53
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
    <el-form-item prop="inspectionTypeId" :label="$t('disqualification.inspectionTypeId')">
 | 
			
		||||
      <el-select v-model="dataForm.inspectionTypeId" :placeholder="$t('disqualification.inspectionTypeId')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productId" :label="$t('disqualification.productName')">
 | 
			
		||||
      <el-select v-model="dataForm.productId" :placeholder="$t('disqualification.productName')">
 | 
			
		||||
        <el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="disposalMethod" :label="$t('disqualification.disposalMethod')">
 | 
			
		||||
      <el-select v-model="dataForm.disposalMethod" :placeholder="$t('disqualification.disposalMethod')">
 | 
			
		||||
        <el-option v-for="item in methodList" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="approvalProcessId" :label="$t('disqualification.approvalProcessName')">
 | 
			
		||||
      <el-select v-model="dataForm.approvalProcessId" :placeholder="$t('disqualification.approvalProcessName')">
 | 
			
		||||
        <el-option v-for="item in approvalProcessList" :key="item.approvalProcessId" :label="item.approvalProcessName"
 | 
			
		||||
          :value="item.approvalProcessId">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/nonconform/qmsApprovalProcessConfiguration",
 | 
			
		||||
        infoURL: "/nonconform/qmsApprovalProcessConfiguration/{ id }",
 | 
			
		||||
        getProductURL: '/basic/qmsProduct/page',
 | 
			
		||||
        getApprovalProcessURL: '/nonconform/qmsApprovalProcess/page'
 | 
			
		||||
      },
 | 
			
		||||
      approvalProcessList: [],
 | 
			
		||||
      productList: [],
 | 
			
		||||
      methodList: [
 | 
			
		||||
        {
 | 
			
		||||
          value: 0,
 | 
			
		||||
          label: '退货'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          value: 1,
 | 
			
		||||
          label: '让步接收'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          value: 2,
 | 
			
		||||
          label: '返工/返修'
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          value: 3,
 | 
			
		||||
          label: '3报废'
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        page: 1
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '监控'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '电芯来料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 2,
 | 
			
		||||
        label: 'IQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 3,
 | 
			
		||||
        label: 'IQC抽检2'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 4,
 | 
			
		||||
        label: '原料抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 5,
 | 
			
		||||
        label: '进货外观检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 6,
 | 
			
		||||
        label: '库内原料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 7,
 | 
			
		||||
        label: '来料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 8,
 | 
			
		||||
        label: '胶片'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 9,
 | 
			
		||||
        label: '抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 10,
 | 
			
		||||
        label: '巡检'
 | 
			
		||||
      }, {
 | 
			
		||||
        value: 11,
 | 
			
		||||
        label: '首检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 12,
 | 
			
		||||
        label: '末检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 13,
 | 
			
		||||
        label: '实时监测'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 14,
 | 
			
		||||
        label: 'FQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 15,
 | 
			
		||||
        label: 'OQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      ],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        approvalProcessId: null,
 | 
			
		||||
        disposalMethod: null,	
 | 
			
		||||
        productId: null,
 | 
			
		||||
        inspectionTypeId:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getData() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getApprovalProcessURL, {
 | 
			
		||||
          params: this.listQuery,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.approvalProcessList= res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getProductURL, {
 | 
			
		||||
          params: this.listQuery,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data)
 | 
			
		||||
            this.productList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/nonconform/qmsApprovalProcessConfiguration/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -0,0 +1,230 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-07 10:16:09
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="inspectionTypeId" :label="$t('disqualification.inspectionTypeId')">
 | 
			
		||||
      <el-select v-model="dataForm.inspectionTypeId" :placeholder="$t('disqualification.inspectionTypeId')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productId" :label="$t('disqualification.productName')">
 | 
			
		||||
      <el-select v-model="dataForm.productId" :placeholder="$t('disqualification.productName')">
 | 
			
		||||
        <el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page",
 | 
			
		||||
        getProductURL: '/basic/qmsProduct/page',
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        productId: null,
 | 
			
		||||
        inspectionTypeId:null
 | 
			
		||||
      },
 | 
			
		||||
      productList:[],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        page:1
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '监控'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '电芯来料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 2,
 | 
			
		||||
        label: 'IQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 3,
 | 
			
		||||
        label: 'IQC抽检2'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 4,
 | 
			
		||||
        label: '原料抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 5,
 | 
			
		||||
        label: '进货外观检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 6,
 | 
			
		||||
        label: '库内原料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 7,
 | 
			
		||||
        label: '来料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 8,
 | 
			
		||||
        label: '胶片'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 9,
 | 
			
		||||
        label: '抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 10,
 | 
			
		||||
        label: '巡检'
 | 
			
		||||
      }, {
 | 
			
		||||
        value: 11,
 | 
			
		||||
        label: '首检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 12,
 | 
			
		||||
        label: '末检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 13,
 | 
			
		||||
        label: '实时监测'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 14,
 | 
			
		||||
        label: 'FQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 15,
 | 
			
		||||
        label: 'OQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getData() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getProductURL, {
 | 
			
		||||
          params: this.listQuery,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data)
 | 
			
		||||
            this.productList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    // getDict() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       this.dataListLoading = false;
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         this.customerTypeList = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										158
									
								
								src/views/modules/mutual/components/approvalProcessSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										158
									
								
								src/views/modules/mutual/components/approvalProcessSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,158 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-13 15:03:39
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="approvalProcessCode" :label="$t('disqualification.approvalProcessCode')">
 | 
			
		||||
      <el-input v-model="dataForm.approvalProcessCode" :placeholder="$t('disqualification.approvalProcessCode')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="approvalProcessName" :label="$t('disqualification.approvalProcessName')">
 | 
			
		||||
      <el-input v-model="dataForm.approvalProcessName" :placeholder="$t('disqualification.approvalProcessName')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page",
 | 
			
		||||
        getProductURL: '/basic/qmsProduct/page',
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        approvalProcessName: null,
 | 
			
		||||
        approvalProcessCode:null
 | 
			
		||||
      },
 | 
			
		||||
      productList:[]
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    // this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // getData() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getProductURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data)
 | 
			
		||||
    //         this.productList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    // getDict() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       this.dataListLoading = false;
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         this.customerTypeList = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										41
									
								
								src/views/modules/mutual/components/available.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/views/modules/mutual/components/available.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 09:49:36
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:04:41
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-tag v-if="injectData.disposalMethodStatus === 1" type="success">可用</el-tag>
 | 
			
		||||
    <el-tag v-else type="warning">不可用</el-tag>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										189
									
								
								src/views/modules/mutual/components/dataDictionary-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										189
									
								
								src/views/modules/mutual/components/dataDictionary-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,189 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-05-09 13:56:57
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
      <el-form-item prop="dataDictionaryName" :label="$t('dictionary.name')">
 | 
			
		||||
        <el-input v-model="dataForm.dataDictionaryName" :placeholder="$t('dictionary.name')">
 | 
			
		||||
        </el-input>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item prop="dataDictionaryCode" :label="$t('dictionary.code')">
 | 
			
		||||
        <el-input v-model="dataForm.dataDictionaryCode" :placeholder="$t('dictionary.code')">
 | 
			
		||||
        </el-input>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
    </el-form>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce"
 | 
			
		||||
import basicAdd from "@/mixins/basic-add"
 | 
			
		||||
// import inputArea from './inputArea'
 | 
			
		||||
// import selectArea from './selectArea'
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
// import { kStringMaxLength } from "buffer"
 | 
			
		||||
export default {
 | 
			
		||||
  // mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/mutual/qmsDataDictionary",
 | 
			
		||||
        infoURL: "/mutual/qmsDataDictionary/{ id }",
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      addButtonShow:'新增',
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        dataDictionaryCode: null,
 | 
			
		||||
        dataDictionaryName: null,
 | 
			
		||||
        moduleDataDictionaryId:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  mixins: [
 | 
			
		||||
    basicAdd
 | 
			
		||||
  ],
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, moduleDataDictionaryId ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      this.dataForm.moduleDataDictionaryId = moduleDataDictionaryId || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getData() {
 | 
			
		||||
    //   // this.$http
 | 
			
		||||
    //   //   .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
			
		||||
    //   //   .then(({ data: res }) => {
 | 
			
		||||
    //   //     if (res.code === 0) {
 | 
			
		||||
    //   //       console.log(res.data);
 | 
			
		||||
    //   //       this.typeList = res.data.list
 | 
			
		||||
    //   //     }
 | 
			
		||||
    //   //   })
 | 
			
		||||
    //   //   .catch(() => {
 | 
			
		||||
    //   //   });
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getSupplierListURL, this.listQuery)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data);
 | 
			
		||||
    //         this.supplierList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     })
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getProductURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data)
 | 
			
		||||
    //         this.productList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/mutual/qmsDataDictionary/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => { });
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
    formClear() {
 | 
			
		||||
      this.$refs.dataForm.resetFields()
 | 
			
		||||
      this.tableData = []
 | 
			
		||||
    }
 | 
			
		||||
    // 表单提交
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										189
									
								
								src/views/modules/mutual/components/dataDictionaryDetail-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										189
									
								
								src/views/modules/mutual/components/dataDictionaryDetail-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,189 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-05-09 13:56:28
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
      <el-form-item prop="dataDictionaryDetailName" :label="$t('dictionary.name')">
 | 
			
		||||
        <el-input v-model="dataForm.dataDictionaryDetailName" :placeholder="$t('dictionary.name')">
 | 
			
		||||
        </el-input>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
      <el-form-item prop="dataDictionaryDetailCode" :label="$t('dictionary.code')">
 | 
			
		||||
        <el-input v-model="dataForm.dataDictionaryDetailCode" :placeholder="$t('dictionary.code')">
 | 
			
		||||
        </el-input>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
    </el-form>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce"
 | 
			
		||||
import basicAdd from "@/mixins/basic-add"
 | 
			
		||||
// import inputArea from './inputArea'
 | 
			
		||||
// import selectArea from './selectArea'
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
// import { kStringMaxLength } from "buffer"
 | 
			
		||||
export default {
 | 
			
		||||
  // mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/mutual/qmsDataDictionaryDetail",
 | 
			
		||||
        infoURL: "/mutual/qmsDataDictionaryDetail/{ id }",
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      addButtonShow:'新增',
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        dataDictionaryCode: null,
 | 
			
		||||
        dataDictionaryName: null,
 | 
			
		||||
        dataDictionaryId:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  mixins: [
 | 
			
		||||
    basicAdd
 | 
			
		||||
  ],
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, dataDictionaryId ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      this.dataForm.dataDictionaryId = dataDictionaryId || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getData() {
 | 
			
		||||
    //   // this.$http
 | 
			
		||||
    //   //   .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
			
		||||
    //   //   .then(({ data: res }) => {
 | 
			
		||||
    //   //     if (res.code === 0) {
 | 
			
		||||
    //   //       console.log(res.data);
 | 
			
		||||
    //   //       this.typeList = res.data.list
 | 
			
		||||
    //   //     }
 | 
			
		||||
    //   //   })
 | 
			
		||||
    //   //   .catch(() => {
 | 
			
		||||
    //   //   });
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getSupplierListURL, this.listQuery)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data);
 | 
			
		||||
    //         this.supplierList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     })
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getProductURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data)
 | 
			
		||||
    //         this.productList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/mutual/qmsDataDictionaryDetail/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => { });
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
    formClear() {
 | 
			
		||||
      this.$refs.dataForm.resetFields()
 | 
			
		||||
      this.tableData = []
 | 
			
		||||
    }
 | 
			
		||||
    // 表单提交
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										29
									
								
								src/views/modules/mutual/components/description.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								src/views/modules/mutual/components/description.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 09:49:36
 | 
			
		||||
 * @LastEditTime: 2023-04-13 14:52:42
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div id="detailList">
 | 
			
		||||
    <span v-for="(item,index) in injectData.qmsApprovalProcessStepDetailDTOList" :key="item.teamName">
 | 
			
		||||
      <el-button type="text">{{item.teamName}}} </el-button>
 | 
			
		||||
      <i v-if="index <+ injectData.qmsApprovalProcessStepDetailDTOList.length-1" class="el-icon-right"></i>
 | 
			
		||||
    </span>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										38
									
								
								src/views/modules/mutual/components/inputArea.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								src/views/modules/mutual/components/inputArea.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="tableInner">
 | 
			
		||||
    <el-input v-model="list[itemProp]" @blur="changeInput" />
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'InputArea',
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    },
 | 
			
		||||
    itemProp: {
 | 
			
		||||
      type: String
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      list: this.injectData
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    changeInput() {
 | 
			
		||||
      console.log(this.list)
 | 
			
		||||
      this.$emit('emitData', this.list)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="css">
 | 
			
		||||
.tableInner .el-input__inner {
 | 
			
		||||
  border: none;
 | 
			
		||||
  padding: 0;
 | 
			
		||||
  height: 33px;
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										181
									
								
								src/views/modules/mutual/components/moduleDataDictionary-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										181
									
								
								src/views/modules/mutual/components/moduleDataDictionary-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,181 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-05-09 13:54:01
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div>
 | 
			
		||||
    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
      <el-form-item prop="titleName" :label="$t('dictionary.name')">
 | 
			
		||||
        <el-input v-model="dataForm.titleName" :placeholder="$t('dictionary.name')">
 | 
			
		||||
        </el-input>
 | 
			
		||||
      </el-form-item>
 | 
			
		||||
    </el-form>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce"
 | 
			
		||||
import basicAdd from "@/mixins/basic-add"
 | 
			
		||||
 | 
			
		||||
// import i18n from "@/i18n"
 | 
			
		||||
// import { kStringMaxLength } from "buffer"
 | 
			
		||||
export default {
 | 
			
		||||
  // mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/mutual/qmsModuleDataDictionary",
 | 
			
		||||
        infoURL: "/mutual/qmsModuleDataDictionary/{ id }",
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      addButtonShow:'新增',
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        titleName: null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  mixins: [
 | 
			
		||||
    basicAdd
 | 
			
		||||
  ],
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getData() {
 | 
			
		||||
    //   // this.$http
 | 
			
		||||
    //   //   .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
			
		||||
    //   //   .then(({ data: res }) => {
 | 
			
		||||
    //   //     if (res.code === 0) {
 | 
			
		||||
    //   //       console.log(res.data);
 | 
			
		||||
    //   //       this.typeList = res.data.list
 | 
			
		||||
    //   //     }
 | 
			
		||||
    //   //   })
 | 
			
		||||
    //   //   .catch(() => {
 | 
			
		||||
    //   //   });
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getSupplierListURL, this.listQuery)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data);
 | 
			
		||||
    //         this.supplierList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     })
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getProductURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res.data)
 | 
			
		||||
    //         this.productList = res.data.list
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/mutual/qmsModuleDataDictionary/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => { });
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
    formClear() {
 | 
			
		||||
      this.$refs.dataForm.resetFields()
 | 
			
		||||
      this.tableData = []
 | 
			
		||||
    }
 | 
			
		||||
    // 表单提交
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										49
									
								
								src/views/modules/mutual/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								src/views/modules/mutual/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 14:12:10
 | 
			
		||||
 * @LastEditTime: 2023-01-31 16:47:32
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-radio v-model="injectData.incomingInspection" :label="1"
 | 
			
		||||
      >进货检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.processInspection" :label="1"
 | 
			
		||||
      >过程检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.finishInspection" :label="1"
 | 
			
		||||
      >成品检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({}),
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										67
									
								
								src/views/modules/mutual/components/selectArea.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								src/views/modules/mutual/components/selectArea.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,67 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-04-12 09:46:34
 | 
			
		||||
 * @LastEditTime: 2023-04-12 10:19:44
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="tableInner">
 | 
			
		||||
    <el-select v-model="list[itemProp]" @change="changeInput">
 | 
			
		||||
      <el-option v-for=" item in teamList" :key="item.id" :label="item.teamName" :value="item.id"></el-option>
 | 
			
		||||
    </el-select>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
<script>
 | 
			
		||||
export default {
 | 
			
		||||
  name: 'InputArea',
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    },
 | 
			
		||||
    itemProp: {
 | 
			
		||||
      type: String
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      list: this.injectData,
 | 
			
		||||
      teamList: [],
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getTeamURL: '/basic/qmsTeam/page'
 | 
			
		||||
      },
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  mounted() {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getData() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getTeamURL, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.teamList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    changeInput() {
 | 
			
		||||
      console.log(this.list)
 | 
			
		||||
      this.$emit('emitData', this.list)
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="css">
 | 
			
		||||
 | 
			
		||||
.tableInner .el-input__inner {
 | 
			
		||||
  border: none;
 | 
			
		||||
  padding: 0;
 | 
			
		||||
  height: 33px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
</style>
 | 
			
		||||
							
								
								
									
										225
									
								
								src/views/modules/mutual/qmsApprovalProcess.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										225
									
								
								src/views/modules/mutual/qmsApprovalProcess.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,225 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-08 15:45:08
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="2" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <approvalProcess-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </approvalProcess-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <approvalProcess-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
 | 
			
		||||
        </approvalProcess-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
			
		||||
              $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import approvalProcessAdd from "./components/approvalProcess-add"
 | 
			
		||||
// import nonconform from '@/filters/nonconform'
 | 
			
		||||
import description from './components/description'
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import approvalProcessSearch from "./components/approvalProcessSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'approvalProcessCode',
 | 
			
		||||
    label: i18n.t("disqualification.approvalProcessCode"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'approvalProcessName',
 | 
			
		||||
    label: i18n.t("disqualification.approvalProcessName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'approvalProcessType',
 | 
			
		||||
    label: i18n.t("disqualification.approvalProcessType"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'step',
 | 
			
		||||
    label: i18n.t("disqualification.step"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'description',
 | 
			
		||||
    label: i18n.t("disqualification.description"),
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    subcomponent: description,
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    approvalProcessSearch,
 | 
			
		||||
    approvalProcessAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/nonconform/qmsApprovalProcess/page",
 | 
			
		||||
        deleteURL: "/nonconform/qmsApprovalProcess",
 | 
			
		||||
        exportUrl: '/nonconform/qmsApprovalProcess/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.approvalProcessCode = dataForm.approvalProcessCode
 | 
			
		||||
      this.listQuery.approvalProcessName = dataForm.approvalProcessName
 | 
			
		||||
      this.listQuery.page = 1
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
      this.searchOrUpdateVisible = false
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.approvalProcessName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										214
									
								
								src/views/modules/mutual/qmsApprovalProcessConfiguration.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										214
									
								
								src/views/modules/mutual/qmsApprovalProcessConfiguration.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,214 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-08 10:26:26
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <approvalProcessConfiguration-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </approvalProcessConfiguration-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <approvalProcessConfiguration-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
 | 
			
		||||
        </approvalProcessConfiguration-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
			
		||||
              $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import approvalProcessConfigurationAdd from "./components/approvalProcessConfiguration-add"
 | 
			
		||||
import nonconform from '@/filters/nonconform'
 | 
			
		||||
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import approvalProcessConfigurationSearch from "./components/approvalProcessConfigurationSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'inspectionTypeId',
 | 
			
		||||
    label: i18n.t("disqualification.inspectionTypeId"),
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    filter: nonconform('inspectionType'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productName',
 | 
			
		||||
    label: i18n.t("disqualification.productName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'disposalMethod',
 | 
			
		||||
    label: i18n.t("disqualification.disposalMethod"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'approvalProcessName',
 | 
			
		||||
    label: i18n.t("disqualification.approvalProcessName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    approvalProcessConfigurationSearch,
 | 
			
		||||
    approvalProcessConfigurationAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/nonconform/qmsApprovalProcessConfiguration/page",
 | 
			
		||||
        deleteURL: "/nonconform/qmsApprovalProcessConfiguration",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.inspectionTypeId = dataForm.inspectionTypeId
 | 
			
		||||
      this.listQuery.productId = dataForm.productId
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										233
									
								
								src/views/modules/mutual/qmsDataDictionary.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										233
									
								
								src/views/modules/mutual/qmsDataDictionary.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,233 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-09 11:08:28
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <!-- <el-badge :value="2" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge> -->
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <dataDictionary-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </dataDictionary-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <approvalProcess-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
 | 
			
		||||
        </approvalProcess-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
			
		||||
              $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import dataDictionaryAdd from "./components/dataDictionary-add"
 | 
			
		||||
// import nonconform from '@/filters/nonconform'
 | 
			
		||||
import description from './components/description'
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import approvalProcessSearch from "./components/approvalProcessSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'dataDictionaryCode',
 | 
			
		||||
    label: i18n.t("dictionary.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'dataDictionaryName',
 | 
			
		||||
    label: i18n.t("dictionary.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "detail",
 | 
			
		||||
    btnName: "详情",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    approvalProcessSearch,
 | 
			
		||||
    dataDictionaryAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/mutual/qmsDataDictionary/page",
 | 
			
		||||
        deleteURL: "/mutual/qmsDataDictionary",
 | 
			
		||||
        exportUrl: '/mutual/qmsDataDictionary/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('export'),
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  created() {
 | 
			
		||||
    if (this.$route.query) {
 | 
			
		||||
      console.log(this.$route.query)
 | 
			
		||||
      this.listQuery.moduleDataDictionaryId = this.$route.query.moduleDataDictionaryId
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.approvalProcessCode = dataForm.approvalProcessCode
 | 
			
		||||
      this.listQuery.approvalProcessName = dataForm.approvalProcessName
 | 
			
		||||
      this.listQuery.page = 1
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
      this.searchOrUpdateVisible = false
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.approvalProcessName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id, this.listQuery.moduleDataDictionaryId);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === 'detail') {
 | 
			
		||||
        this.$router.push({
 | 
			
		||||
          name: 'mutual-qmsDataDictionaryDetail',
 | 
			
		||||
          query: {
 | 
			
		||||
            dataDictionaryId: val.data.id
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										222
									
								
								src/views/modules/mutual/qmsDataDictionaryDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										222
									
								
								src/views/modules/mutual/qmsDataDictionaryDetail.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,222 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-09 13:46:47
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <!-- <el-badge :value="2" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge> -->
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <dataDictionaryDetail-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
          </dataDictionaryDetail-add>
 | 
			
		||||
          <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <approvalProcess-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
 | 
			
		||||
        </approvalProcess-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
			
		||||
              $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import dataDictionaryDetailAdd from "./components/dataDictionaryDetail-add"
 | 
			
		||||
// import nonconform from '@/filters/nonconform'
 | 
			
		||||
import description from './components/description'
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import approvalProcessSearch from "./components/approvalProcessSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'dataDictionaryDetailCode',
 | 
			
		||||
    label: i18n.t("dictionary.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'dataDictionaryDetailName',
 | 
			
		||||
    label: i18n.t("dictionary.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    approvalProcessSearch,
 | 
			
		||||
    dataDictionaryDetailAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/mutual/qmsDataDictionaryDetail/page",
 | 
			
		||||
        deleteURL: "/mutual/qmsDataDictionaryDetail",
 | 
			
		||||
        exportUrl: '/mutual/qmsDataDictionaryDetail/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('export'),
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  created() {
 | 
			
		||||
    console.log(this.$route.query)
 | 
			
		||||
    if (this.$route.query) {
 | 
			
		||||
      console.log(this.$route.query)
 | 
			
		||||
      this.listQuery.dataDictionaryId = this.$route.query.dataDictionaryId
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.page = 1
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
      this.searchOrUpdateVisible = false
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.approvalProcessName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true
 | 
			
		||||
        this.addOrEditTitle = '修改'
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id, this.listQuery.dataDictionaryId);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										219
									
								
								src/views/modules/mutual/qmsModuleDataDictionary.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										219
									
								
								src/views/modules/mutual/qmsModuleDataDictionary.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,219 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-05-09 10:11:44
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <!-- <el-badge :value="2" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge> -->
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <moduleDataDictionary-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </moduleDataDictionary-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <approvalProcess-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit">
 | 
			
		||||
        </approvalProcess-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
			
		||||
              $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import moduleDataDictionaryAdd from "./components/moduleDataDictionary-add"
 | 
			
		||||
// import nonconform from '@/filters/nonconform'
 | 
			
		||||
import description from './components/description'
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import approvalProcessSearch from "./components/approvalProcessSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'titleName',
 | 
			
		||||
    label: i18n.t("dictionary.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "detail",
 | 
			
		||||
    btnName: "详情",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    approvalProcessSearch,
 | 
			
		||||
    moduleDataDictionaryAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/mutual/qmsModuleDataDictionary/page",
 | 
			
		||||
        deleteURL: "/mutual/qmsModuleDataDictionary",
 | 
			
		||||
        exportUrl: '/mutual/qmsModuleDataDictionary/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('export'),
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.page = 1
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
      this.searchOrUpdateVisible = false
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.approvalProcessName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      } else if (val.type === 'detail') {
 | 
			
		||||
        this.$router.push({
 | 
			
		||||
          name: 'mutual-qmsDataDictionary',
 | 
			
		||||
          query: {
 | 
			
		||||
            moduleDataDictionaryId: val.data.id
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandle();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -0,0 +1,157 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-06 15:05:01
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
 | 
			
		||||
    <el-form-item prop="inspectionPositionCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.inspectionPositionCode" :placeholder="$t('basic.code')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="inspectionPositionName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.inspectionPositionName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="inspectionPositionNumber" :label="$t('quality.inspectionPositionNumber')">
 | 
			
		||||
      <el-input v-model="dataForm.inspectionPositionNumber" :placeholder="$t('quality.inspectionPositionNumber')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
 | 
			
		||||
      <el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/quality/qmsInspectionPosition",
 | 
			
		||||
        infoURL: "/quality/qmsInspectionPosition"
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        inspectionPositionNumber: null,
 | 
			
		||||
        inspectionPositionName:null,	
 | 
			
		||||
        inspectionPositionCode:null,
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/quality/qmsDisposalMethod/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -0,0 +1,247 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-06 15:12:57
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
    <el-form-item prop="inspectionTypeId" :label="$t('disqualification.inspectionTypeId')">
 | 
			
		||||
      <el-select v-model="dataForm.inspectionTypeId" :placeholder="$t('disqualification.inspectionTypeId')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="teamId" :label="$t('disqualification.teamName')">
 | 
			
		||||
      <el-select v-model="dataForm.teamId" :placeholder="$t('disqualification.teamName')">
 | 
			
		||||
        <el-option v-for="item in teamList" :key="item.id" :label="item.teamName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productTypeId" :label="$t('disqualification.productTypeName')">
 | 
			
		||||
      <el-select v-model="dataForm.productTypeId" :placeholder="$t('disqualification.productTypeName')">
 | 
			
		||||
        <el-option v-for="item in typeList" :key="item.id" :label="item.productTypeName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/nonconform/qmsApprovalDispositionTeamConfiguration",
 | 
			
		||||
        infoURL: "/nonconform/qmsApprovalDispositionTeamConfiguration/{ id }",
 | 
			
		||||
        getTypeListURL: '/basic/qmsProductType/page',
 | 
			
		||||
        getTeamListURL: '/basic/qmsTeam/page'
 | 
			
		||||
      },
 | 
			
		||||
      typeList: [],
 | 
			
		||||
      teamList:[],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        page: 1
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '监控'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '电芯来料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 2,
 | 
			
		||||
        label: 'IQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 3,
 | 
			
		||||
        label: 'IQC抽检2'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 4,
 | 
			
		||||
        label: '原料抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 5,
 | 
			
		||||
        label: '进货外观检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 6,
 | 
			
		||||
        label: '库内原料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 7,
 | 
			
		||||
        label: '来料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 8,
 | 
			
		||||
        label: '胶片'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 9,
 | 
			
		||||
        label: '抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 10,
 | 
			
		||||
        label: '巡检'
 | 
			
		||||
      }, {
 | 
			
		||||
        value: 11,
 | 
			
		||||
        label: '首检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 12,
 | 
			
		||||
        label: '末检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 13,
 | 
			
		||||
        label: '实时监测'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 14,
 | 
			
		||||
        label: 'FQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 15,
 | 
			
		||||
        label: 'OQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      ],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        productTypeId: null,
 | 
			
		||||
        teamId:null,	
 | 
			
		||||
        inspectionTypeId:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getData() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.typeList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getTeamListURL, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.teamList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/nonconform/qmsApprovalDispositionTeamConfiguration/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										41
									
								
								src/views/modules/nonconform/components/available.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/views/modules/nonconform/components/available.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 09:49:36
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:04:41
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-tag v-if="injectData.disposalMethodStatus === 1" type="success">可用</el-tag>
 | 
			
		||||
    <el-tag v-else type="warning">不可用</el-tag>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										230
									
								
								src/views/modules/nonconform/components/customSampling-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										230
									
								
								src/views/modules/nonconform/components/customSampling-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,230 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-04 13:57:52
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
 | 
			
		||||
    <el-form-item prop="customSamplingCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.customSamplingCode" :placeholder="$t('basic.code')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customSamplingName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.customSamplingName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="planCategory" :label="$t('quality.planCategory')">
 | 
			
		||||
      <el-input v-model="dataForm.planCategory" :placeholder="$t('quality.planCategory')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalAcceptable" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.acceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.criticalAcceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.acceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalSampleSize" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.sampleSize')])">
 | 
			
		||||
      <el-input v-model="dataForm.criticalSampleSize"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.sampleSize')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalUnacceptable" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.unacceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.criticalUnacceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.unacceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="seriousDisadvantageAcceptable"
 | 
			
		||||
      :label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.acceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.seriousDisadvantageAcceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.acceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="seriousDisadvantageSampleSize"
 | 
			
		||||
      :label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.sampleSize')])">
 | 
			
		||||
      <el-input v-model="dataForm.seriousDisadvantageSampleSize"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.sampleSize')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="seriousDisadvantageUnacceptable"
 | 
			
		||||
      :label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.unacceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.seriousDisadvantageUnacceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.unacceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="minorAcceptable" :label="$i18nForm([$t('quality.minor'), $t('quality.acceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.minorAcceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.minor'), $t('quality.acceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="minorSampleSize" :label="$i18nForm([$t('quality.minor'), $t('quality.sampleSize')])">
 | 
			
		||||
      <el-input v-model="dataForm.minorSampleSize"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.minor'), $t('quality.sampleSize')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="minorUnacceptable" :label="$i18nForm([$t('quality.minor'), $t('quality.unacceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.minorUnacceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.minor'), $t('quality.unacceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="totalAcceptable" :label="$i18nForm([$t('quality.total'), $t('quality.acceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.totalAcceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.total'), $t('quality.acceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="totalUnacceptable" :label="$i18nForm([$t('quality.total'), $t('quality.unacceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.totalUnacceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.total'), $t('quality.unacceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="criticalSampleSize" :label="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
 | 
			
		||||
      <el-input v-model="dataForm.criticalSampleSize"
 | 
			
		||||
        :placeholder="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalUnacceptable" :label="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
 | 
			
		||||
      <el-input v-model="dataForm.criticalUnacceptable"
 | 
			
		||||
        :placeholder="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/quality/qmsCustomSampling",
 | 
			
		||||
        infoURL: "/quality/qmsCustomSampling/{id}",
 | 
			
		||||
        getCodeURL: '/quality/qmsCustomSampling/getCode'
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        planCategory:null,
 | 
			
		||||
        customSamplingCode:null,
 | 
			
		||||
        customSamplingName:null,
 | 
			
		||||
        criticalUnacceptable: null,
 | 
			
		||||
        criticalAcceptable: null,
 | 
			
		||||
        criticalSampleSize: null,
 | 
			
		||||
        minorAcceptable:null,
 | 
			
		||||
        minorSampleSize:null,
 | 
			
		||||
        minorUnacceptable:null,
 | 
			
		||||
        seriousDisadvantageAcceptable:null,
 | 
			
		||||
        seriousDisadvantageSampleSize:null,
 | 
			
		||||
        seriousDisadvantageUnacceptable:null,
 | 
			
		||||
        totalAcceptable:null,
 | 
			
		||||
        totalUnacceptable:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getCode() {
 | 
			
		||||
      this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.customSamplingCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/quality/qmsCustomSampling/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										141
									
								
								src/views/modules/nonconform/components/customSamplingSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								src/views/modules/nonconform/components/customSamplingSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,141 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-04 14:27:18
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="customSamplingCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.customSamplingCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page"
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        customSamplingCode: null
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    // getDict() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       this.dataListLoading = false;
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         this.customerTypeList = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										157
									
								
								src/views/modules/nonconform/components/disposalMethod-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								src/views/modules/nonconform/components/disposalMethod-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,157 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:18:38
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
 | 
			
		||||
    <el-form-item prop="disposalMethodName" :label="$t('quality.disposalMethodName')">
 | 
			
		||||
      <el-input v-model="dataForm.disposalMethodName" :placeholder="$t('quality.disposalMethodName')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="disposalMethodCode" :label="$t('quality.disposalMethodCode')">
 | 
			
		||||
      <el-input v-model="dataForm.disposalMethodCode" :placeholder="$t('quality.disposalMethodCode')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="judgmentMark" :label="$t('quality.judgmentMark')">
 | 
			
		||||
      <el-input v-model="dataForm.judgmentMark" :placeholder="$t('quality.judgmentMark')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
 | 
			
		||||
      <el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/quality/qmsDisposalMethod",
 | 
			
		||||
        infoURL: "/quality/qmsDisposalMethod"
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        disposalMethodName: null,
 | 
			
		||||
        disposalMethodCode:null,	
 | 
			
		||||
        judgmentMark:null,
 | 
			
		||||
        disposalMethodStatus: null,
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/quality/qmsDisposalMethod/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										145
									
								
								src/views/modules/nonconform/components/disposalMethodSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								src/views/modules/nonconform/components/disposalMethodSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,145 @@
 | 
			
		||||
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:20:32
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
 | 
			
		||||
      <el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page"
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        disposalMethodStatus: null
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    // getDict() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       this.dataListLoading = false;
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         this.customerTypeList = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -0,0 +1,293 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-13 16:01:55
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
			
		||||
    <el-form-item prop="inspectionTypeId" :label="$t('disqualification.inspectionTypeId')">
 | 
			
		||||
      <el-select v-model="dataForm.inspectionTypeId" :placeholder="$t('disqualification.inspectionTypeId')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="title" :label="$t('disqualification.title')">
 | 
			
		||||
      <el-input v-model="dataForm.title" :placeholder="$t('disqualification.title')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productCode" :label="$t('disqualification.productCode')">
 | 
			
		||||
      <el-input v-model="dataForm.productCode" :placeholder="$t('disqualification.productCode')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="orderNumber" :label="$t('disqualification.orderNumber')">
 | 
			
		||||
      <el-input v-model="dataForm.orderNumber" :placeholder="$t('disqualification.orderNumber')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="batchNo" :label="$t('disqualification.batchNo')">
 | 
			
		||||
      <el-input v-model="dataForm.batchNo" :placeholder="$t('disqualification.batchNo')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="remark" :label="$t('disqualification.remark')">
 | 
			
		||||
      <el-input v-model="dataForm.remark" :placeholder="$t('disqualification.remark')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="supplierId" :label="$t('disqualification.supplierName')">
 | 
			
		||||
      <el-select v-model="dataForm.supplierId" :placeholder="$t('disqualification.supplierName')">
 | 
			
		||||
        <el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="productId" :label="$t('disqualification.productName')">
 | 
			
		||||
      <el-select v-model="dataForm.productId" :placeholder="$t('disqualification.productName')">
 | 
			
		||||
        <el-option v-for="item in productList" :key="item.id" :label="item.productName" :value="item.id">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/nonconform/qmsApprovalDispositionTeamConfiguration",
 | 
			
		||||
        infoURL: "/nonconform/qmsApprovalDispositionTeamConfiguration/{ id }",
 | 
			
		||||
        // getTypeListURL: '/basic/qmsProductType/page',
 | 
			
		||||
        // getTeamListURL: '/basic/qmsTeam/page',
 | 
			
		||||
        getProductURL: '/basic/qmsProduct/page',
 | 
			
		||||
        getSupplierListURL: '/supplier/qmsSupplier/page'
 | 
			
		||||
      },
 | 
			
		||||
      supplierList:[],
 | 
			
		||||
      productList:[],
 | 
			
		||||
      typeList: [],
 | 
			
		||||
      teamList:[],
 | 
			
		||||
      listQuery: {
 | 
			
		||||
        limit: 999,
 | 
			
		||||
        page: 1
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '监控'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '电芯来料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 2,
 | 
			
		||||
        label: 'IQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 3,
 | 
			
		||||
        label: 'IQC抽检2'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 4,
 | 
			
		||||
        label: '原料抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 5,
 | 
			
		||||
        label: '进货外观检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 6,
 | 
			
		||||
        label: '库内原料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 7,
 | 
			
		||||
        label: '来料检验'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 8,
 | 
			
		||||
        label: '胶片'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 9,
 | 
			
		||||
        label: '抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 10,
 | 
			
		||||
        label: '巡检'
 | 
			
		||||
      }, {
 | 
			
		||||
        value: 11,
 | 
			
		||||
        label: '首检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 12,
 | 
			
		||||
        label: '末检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 13,
 | 
			
		||||
        label: '实时监测'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 14,
 | 
			
		||||
        label: 'FQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 15,
 | 
			
		||||
        label: 'OQC抽检'
 | 
			
		||||
      },
 | 
			
		||||
      ],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        productId: null,
 | 
			
		||||
        productCode: null,
 | 
			
		||||
        orderNumber: null,
 | 
			
		||||
        batchNo: null,
 | 
			
		||||
        supplierId: null,
 | 
			
		||||
        title:null,
 | 
			
		||||
        reportTime: null,
 | 
			
		||||
        userName:null,
 | 
			
		||||
        disposalStatus: null,
 | 
			
		||||
        disposalMethod: null,
 | 
			
		||||
        disposalTime: null,
 | 
			
		||||
        remark: null,
 | 
			
		||||
        inspectionTypeId:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  mounted () {
 | 
			
		||||
    this.getData();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getData() {
 | 
			
		||||
      // this.$http
 | 
			
		||||
      //   .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
			
		||||
      //   .then(({ data: res }) => {
 | 
			
		||||
      //     if (res.code === 0) {
 | 
			
		||||
      //       console.log(res.data);
 | 
			
		||||
      //       this.typeList = res.data.list
 | 
			
		||||
      //     }
 | 
			
		||||
      //   })
 | 
			
		||||
      //   .catch(() => {
 | 
			
		||||
      //   });
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getSupplierListURL, this.listQuery)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data);
 | 
			
		||||
            this.supplierList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(this.urlOptions.getProductURL, {
 | 
			
		||||
          params: this.listQuery,
 | 
			
		||||
        })
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res.data)
 | 
			
		||||
            this.productList = res.data.list
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/nonconform/qmsApprovalDispositionTeamConfiguration/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => { })
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										49
									
								
								src/views/modules/nonconform/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								src/views/modules/nonconform/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 14:12:10
 | 
			
		||||
 * @LastEditTime: 2023-01-31 16:47:32
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-radio v-model="injectData.incomingInspection" :label="1"
 | 
			
		||||
      >进货检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.processInspection" :label="1"
 | 
			
		||||
      >过程检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.finishInspection" :label="1"
 | 
			
		||||
      >成品检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({}),
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
@@ -0,0 +1,206 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-04-18 16:10:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <!-- <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge> -->
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <approvalDispositionTeamConfiguration-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </approvalDispositionTeamConfiguration-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> -->
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import approvalDispositionTeamConfigurationAdd from "./components/approvalDispositionTeamConfiguration-add"
 | 
			
		||||
import nonconform from '@/filters/nonconform'
 | 
			
		||||
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
// import failureTypeSearch from "./components/failureTypeSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'inspectionTypeId',
 | 
			
		||||
    label: i18n.t("disqualification.inspectionTypeId"),
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    filter: nonconform('inspectionType'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productTypeName',
 | 
			
		||||
    label: i18n.t("disqualification.productTypeName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'teamName',
 | 
			
		||||
    label: i18n.t("disqualification.teamName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    // failureTypeSearch,
 | 
			
		||||
    approvalDispositionTeamConfigurationAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/nonconform/qmsApprovalDispositionTeamConfiguration/page",
 | 
			
		||||
        deleteURL: "/nonconform/qmsApprovalDispositionTeamConfiguration",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										272
									
								
								src/views/modules/nonconform/qmsNonconformityReviewSheet.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										272
									
								
								src/views/modules/nonconform/qmsNonconformityReviewSheet.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,272 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-04-07 15:31:53
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <!-- <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge> -->
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <nonconformityReviewSheet-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </nonconformityReviewSheet-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> -->
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import nonconformityReviewSheetAdd from "./components/nonconformityReviewSheet-add"
 | 
			
		||||
import nonconform from '@/filters/nonconform'
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
// import failureTypeSearch from "./components/failureTypeSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'title',
 | 
			
		||||
    label: i18n.t("disqualification.title"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productCode',
 | 
			
		||||
    label: i18n.t("disqualification.productCode"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productName',
 | 
			
		||||
    label: i18n.t("disqualification.productName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'orderNumber',
 | 
			
		||||
    label: i18n.t("disqualification.orderNumber"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'batchNo',
 | 
			
		||||
    label: i18n.t("disqualification.batchNo"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'inspectionTypeId',
 | 
			
		||||
    label: i18n.t("disqualification.inspectionTypeId"),
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    filter: nonconform('inspectionType'),
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'supplierName',
 | 
			
		||||
    label: i18n.t("disqualification.supplierName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'reportTime',
 | 
			
		||||
    label: i18n.t("disqualification.reportTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'userName',
 | 
			
		||||
    label: i18n.t("disqualification.userName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'disposalStatus',
 | 
			
		||||
    label: i18n.t("disqualification.disposalStatus"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'productTypeName',
 | 
			
		||||
    label: i18n.t("disqualification.productTypeName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'disposalMethod',
 | 
			
		||||
    label: i18n.t("disqualification.disposalMethod"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'disposalTime',
 | 
			
		||||
    label: i18n.t("disqualification.disposalTime"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'remark',
 | 
			
		||||
    label: i18n.t("disqualification.remark"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    // failureTypeSearch,
 | 
			
		||||
    nonconformityReviewSheetAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/nonconform/qmsNonconformityReviewSheet/approvePage",
 | 
			
		||||
        deleteURL: "/nonconform/qmsNonconformityReviewSheet",
 | 
			
		||||
        exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('add'),
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('export'),
 | 
			
		||||
          name: "export",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: i18n.t('search'),
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "export":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1
 | 
			
		||||
          this.exportHandl();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										157
									
								
								src/views/modules/quality/components/InspectionPosition-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								src/views/modules/quality/components/InspectionPosition-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,157 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:17:23
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
 | 
			
		||||
    <el-form-item prop="inspectionPositionCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.inspectionPositionCode" :placeholder="$t('basic.code')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="inspectionPositionName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.inspectionPositionName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="inspectionPositionNumber" :label="$t('quality.inspectionPositionNumber')">
 | 
			
		||||
      <el-input v-model="dataForm.inspectionPositionNumber" :placeholder="$t('quality.inspectionPositionNumber')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
 | 
			
		||||
      <el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/quality/qmsInspectionPosition",
 | 
			
		||||
        infoURL: "/quality/qmsInspectionPosition"
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        inspectionPositionNumber: null,
 | 
			
		||||
        inspectionPositionName:null,	
 | 
			
		||||
        inspectionPositionCode:null,
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/quality/qmsDisposalMethod/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										41
									
								
								src/views/modules/quality/components/available.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								src/views/modules/quality/components/available.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 09:49:36
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:04:41
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-tag v-if="injectData.disposalMethodStatus === 1" type="success">可用</el-tag>
 | 
			
		||||
    <el-tag v-else type="warning">不可用</el-tag>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({})
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										230
									
								
								src/views/modules/quality/components/customSampling-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										230
									
								
								src/views/modules/quality/components/customSampling-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,230 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-04 13:57:52
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
 | 
			
		||||
    <el-form-item prop="customSamplingCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.customSamplingCode" :placeholder="$t('basic.code')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="customSamplingName" :label="$t('basic.name')">
 | 
			
		||||
      <el-input v-model="dataForm.customSamplingName" :placeholder="$t('basic.name')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="planCategory" :label="$t('quality.planCategory')">
 | 
			
		||||
      <el-input v-model="dataForm.planCategory" :placeholder="$t('quality.planCategory')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalAcceptable" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.acceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.criticalAcceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.acceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalSampleSize" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.sampleSize')])">
 | 
			
		||||
      <el-input v-model="dataForm.criticalSampleSize"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.sampleSize')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalUnacceptable" :label="$i18nForm([$t('quality.fatalFlaw'), $t('quality.unacceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.criticalUnacceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.fatalFlaw'), $t('quality.unacceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="seriousDisadvantageAcceptable"
 | 
			
		||||
      :label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.acceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.seriousDisadvantageAcceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.acceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="seriousDisadvantageSampleSize"
 | 
			
		||||
      :label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.sampleSize')])">
 | 
			
		||||
      <el-input v-model="dataForm.seriousDisadvantageSampleSize"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.sampleSize')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="seriousDisadvantageUnacceptable"
 | 
			
		||||
      :label="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.unacceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.seriousDisadvantageUnacceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.seriousDisadvantage'), $t('quality.unacceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="minorAcceptable" :label="$i18nForm([$t('quality.minor'), $t('quality.acceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.minorAcceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.minor'), $t('quality.acceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="minorSampleSize" :label="$i18nForm([$t('quality.minor'), $t('quality.sampleSize')])">
 | 
			
		||||
      <el-input v-model="dataForm.minorSampleSize"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.minor'), $t('quality.sampleSize')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="minorUnacceptable" :label="$i18nForm([$t('quality.minor'), $t('quality.unacceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.minorUnacceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.minor'), $t('quality.unacceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="totalAcceptable" :label="$i18nForm([$t('quality.total'), $t('quality.acceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.totalAcceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.total'), $t('quality.acceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="totalUnacceptable" :label="$i18nForm([$t('quality.total'), $t('quality.unacceptable')])">
 | 
			
		||||
      <el-input v-model="dataForm.totalUnacceptable"
 | 
			
		||||
        :placeholder="$i18nForm([$t('quality.total'), $t('quality.unacceptable')])">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="criticalSampleSize" :label="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
 | 
			
		||||
      <el-input v-model="dataForm.criticalSampleSize"
 | 
			
		||||
        :placeholder="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalUnacceptable" :label="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
 | 
			
		||||
      <el-input v-model="dataForm.criticalUnacceptable"
 | 
			
		||||
        :placeholder="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/quality/qmsCustomSampling",
 | 
			
		||||
        infoURL: "/quality/qmsCustomSampling/{id}",
 | 
			
		||||
        getCodeURL: '/quality/qmsCustomSampling/getCode'
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        planCategory:null,
 | 
			
		||||
        customSamplingCode:null,
 | 
			
		||||
        customSamplingName:null,
 | 
			
		||||
        criticalUnacceptable: null,
 | 
			
		||||
        criticalAcceptable: null,
 | 
			
		||||
        criticalSampleSize: null,
 | 
			
		||||
        minorAcceptable:null,
 | 
			
		||||
        minorSampleSize:null,
 | 
			
		||||
        minorUnacceptable:null,
 | 
			
		||||
        seriousDisadvantageAcceptable:null,
 | 
			
		||||
        seriousDisadvantageSampleSize:null,
 | 
			
		||||
        seriousDisadvantageUnacceptable:null,
 | 
			
		||||
        totalAcceptable:null,
 | 
			
		||||
        totalUnacceptable:null
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    getCode() {
 | 
			
		||||
      this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            console.log(res);
 | 
			
		||||
            this.dataForm.customSamplingCode = res.data
 | 
			
		||||
          }
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {
 | 
			
		||||
        });
 | 
			
		||||
    },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/quality/qmsCustomSampling/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										141
									
								
								src/views/modules/quality/components/customSamplingSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								src/views/modules/quality/components/customSamplingSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,141 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-04 14:27:18
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="customSamplingCode" :label="$t('basic.code')">
 | 
			
		||||
      <el-input v-model="dataForm.customSamplingCode" :placeholder="$t('basic.code')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page"
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        customSamplingCode: null
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    // getDict() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       this.dataListLoading = false;
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         this.customerTypeList = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										157
									
								
								src/views/modules/quality/components/disposalMethod-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								src/views/modules/quality/components/disposalMethod-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,157 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:18:38
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
 | 
			
		||||
    <el-form-item prop="disposalMethodName" :label="$t('quality.disposalMethodName')">
 | 
			
		||||
      <el-input v-model="dataForm.disposalMethodName" :placeholder="$t('quality.disposalMethodName')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="disposalMethodCode" :label="$t('quality.disposalMethodCode')">
 | 
			
		||||
      <el-input v-model="dataForm.disposalMethodCode" :placeholder="$t('quality.disposalMethodCode')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="judgmentMark" :label="$t('quality.judgmentMark')">
 | 
			
		||||
      <el-input v-model="dataForm.judgmentMark" :placeholder="$t('quality.judgmentMark')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
 | 
			
		||||
      <el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/quality/qmsDisposalMethod",
 | 
			
		||||
        infoURL: "/quality/qmsDisposalMethod"
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        disposalMethodName: null,
 | 
			
		||||
        disposalMethodCode:null,	
 | 
			
		||||
        judgmentMark:null,
 | 
			
		||||
        disposalMethodStatus: null,
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/quality/qmsDisposalMethod/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										145
									
								
								src/views/modules/quality/components/disposalMethodSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										145
									
								
								src/views/modules/quality/components/disposalMethodSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,145 @@
 | 
			
		||||
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zwq
 | 
			
		||||
 * @Date: 2023-01-04 10:29:40
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:20:32
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
			
		||||
    <el-form-item prop="disposalMethodStatus" :label="$t('quality.disposalMethodStatus')">
 | 
			
		||||
      <el-select v-model="dataForm.disposalMethodStatus" :placeholder="$t('basic.status')">
 | 
			
		||||
        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
 | 
			
		||||
        </el-option>
 | 
			
		||||
      </el-select>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      // urlOptions: {
 | 
			
		||||
      //   submitURL: "/sys/params/",
 | 
			
		||||
      //   infoURL: "/sys/params",
 | 
			
		||||
      // },
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getCustomerPageListURL: "/quality/qmsTransferScheme/page"
 | 
			
		||||
      },
 | 
			
		||||
      visible: false,
 | 
			
		||||
      customerTypeList:{},
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        disposalMethodStatus: null
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    // dataRule() {
 | 
			
		||||
    //   return {
 | 
			
		||||
    //     paramCode: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //     paramValue: [
 | 
			
		||||
    //       {
 | 
			
		||||
    //         required: true,
 | 
			
		||||
    //         message: this.$t("validate.required"),
 | 
			
		||||
    //         trigger: "blur",
 | 
			
		||||
    //       },
 | 
			
		||||
    //     ],
 | 
			
		||||
    //   };
 | 
			
		||||
    // },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // init(id) {
 | 
			
		||||
    //   this.dataForm.id = id || "";
 | 
			
		||||
    //   this.visible = true;
 | 
			
		||||
    //   this.$nextTick(() => {
 | 
			
		||||
    //     this.$refs["dataForm"].resetFields();
 | 
			
		||||
    //     if (this.dataForm.id) {
 | 
			
		||||
    //       this.getInfo();
 | 
			
		||||
    //     }
 | 
			
		||||
    //   });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    // getInfo() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         return this.$message.error(res.msg);
 | 
			
		||||
    //       }
 | 
			
		||||
    //       this.dataForm = {
 | 
			
		||||
    //         ...this.dataForm,
 | 
			
		||||
    //         ...res.data,
 | 
			
		||||
    //       };
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {});
 | 
			
		||||
    // },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    // getDict() {
 | 
			
		||||
    //   this.$http
 | 
			
		||||
    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
			
		||||
    //       params: this.listQuery,
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       this.dataListLoading = false;
 | 
			
		||||
    //       if (res.code !== 0) {
 | 
			
		||||
    //         this.customerTypeList = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    // },
 | 
			
		||||
    handleConditionSearch() {
 | 
			
		||||
      this.$emit("successSubmit", this.dataForm);
 | 
			
		||||
    },
 | 
			
		||||
    // dataFormSubmitHandle: debounce(
 | 
			
		||||
    //   function () {
 | 
			
		||||
    //     // console.log(1111);
 | 
			
		||||
    //     // this.visible = false;
 | 
			
		||||
    //     this.$emit("successSubmit", this.dataForm.key);
 | 
			
		||||
    //     // this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
    //     //   if (!valid) {
 | 
			
		||||
    //     //     return false;
 | 
			
		||||
    //     //   }
 | 
			
		||||
    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
			
		||||
    //     //     "/sys/params",
 | 
			
		||||
    //     //     this.dataForm
 | 
			
		||||
    //     //   )
 | 
			
		||||
    //     //     .then(({ data: res }) => {
 | 
			
		||||
    //     //       if (res.code !== 0) {
 | 
			
		||||
    //     //         return this.$message.error(res.msg);
 | 
			
		||||
    //     //       }
 | 
			
		||||
    //     //       this.$message({
 | 
			
		||||
    //     //         message: this.$t("prompt.success"),
 | 
			
		||||
    //     //         type: "success",
 | 
			
		||||
    //     //         duration: 500,
 | 
			
		||||
    //     //         onClose: () => {
 | 
			
		||||
 | 
			
		||||
    //     //         },
 | 
			
		||||
    //     //       });
 | 
			
		||||
    //     //     })
 | 
			
		||||
    //     //     .catch(() => {});
 | 
			
		||||
    //     // });
 | 
			
		||||
    //   },
 | 
			
		||||
    //   1000,
 | 
			
		||||
    //   { leading: true, trailing: false }
 | 
			
		||||
    // ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										49
									
								
								src/views/modules/quality/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								src/views/modules/quality/components/radio.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-31 14:12:10
 | 
			
		||||
 * @LastEditTime: 2023-01-31 16:47:32
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <span>
 | 
			
		||||
    <el-radio v-model="injectData.incomingInspection" :label="1"
 | 
			
		||||
      >进货检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.processInspection" :label="1"
 | 
			
		||||
      >过程检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.finishInspection" :label="1"
 | 
			
		||||
      >成品检验</el-radio
 | 
			
		||||
    >
 | 
			
		||||
    <el-radio v-model="injectData.outInspection" :label="1">出货检验</el-radio>
 | 
			
		||||
  </span>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
// import { addDynamicRoute } from '@/router'
 | 
			
		||||
export default {
 | 
			
		||||
  props: {
 | 
			
		||||
    injectData: {
 | 
			
		||||
      type: Object,
 | 
			
		||||
      default: () => ({}),
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    // 子级
 | 
			
		||||
    // emitClick () {
 | 
			
		||||
    //   // 路由参数
 | 
			
		||||
    //   const routeParams = {
 | 
			
		||||
    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
			
		||||
    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
			
		||||
    //     path: 'sys/dict-data',
 | 
			
		||||
    //     params: {
 | 
			
		||||
    //       dictTypeId: this.injectData.id
 | 
			
		||||
    //     }
 | 
			
		||||
    //   }
 | 
			
		||||
    //   // 动态路由
 | 
			
		||||
    //   addDynamicRoute(routeParams, this.$router)
 | 
			
		||||
    // }
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										216
									
								
								src/views/modules/quality/components/samplingPlan-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										216
									
								
								src/views/modules/quality/components/samplingPlan-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,216 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-02-14 15:02:26
 | 
			
		||||
 * @LastEditTime: 2023-04-04 15:44:45
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
 | 
			
		||||
    <el-form-item prop="sampleRange" :label="$t('quality.sampleRange')">
 | 
			
		||||
      <el-input v-model="dataForm.sampleRange" :placeholder="$t('quality.sampleRange')">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="fourPointZero" :label="$t('quality.fourPointZero')">
 | 
			
		||||
      <el-input v-model="dataForm.fourPointZero" :placeholder="$t('quality.fourPointZero')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="onePointFive" :label="$t('quality.onePointFive')">
 | 
			
		||||
      <el-input v-model="dataForm.onePointFive" :placeholder="$t('quality.onePointFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="onePointZero" :label="$t('quality.onePointZero')">
 | 
			
		||||
      <el-input v-model="dataForm.onePointZero" :placeholder="$t('quality.onePointZero')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="sixPointFive" :label="$t('quality.sixPointFive')">
 | 
			
		||||
      <el-input v-model="dataForm.sixPointFive" :placeholder="$t('quality.sixPointFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="ten" :label="$t('quality.ten')">
 | 
			
		||||
      <el-input v-model="dataForm.ten" :placeholder="$t('quality.ten')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="twoPointFive" :label="$t('quality.twoPointFive')">
 | 
			
		||||
      <el-input v-model="dataForm.twoPointFive" :placeholder="$t('quality.twoPointFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointFour" :label="$t('quality.zeroPointFour')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointFour" :placeholder="$t('quality.zeroPointFour')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointOne" :label="$t('quality.zeroPointOne')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointOne" :placeholder="$t('quality.zeroPointOne')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointOneFive" :label="$t('quality.zeroPointOneFive')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointOneFive" :placeholder="$t('quality.zeroPointOneFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointSixFive" :label="$t('quality.zeroPointSixFive')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointSixFive" :placeholder="$t('quality.zeroPointSixFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointTwoFive" :label="$t('quality.zeroPointTwoFive')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointTwoFive" :placeholder="$t('quality.zeroPointTwoFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointZeroFour" :label="$t('quality.zeroPointZeroFour')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointZeroFour" :placeholder="$t('quality.zeroPointZeroFour')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointZeroOne" :label="$t('quality.zeroPointZeroOne')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointZeroOne" :placeholder="$t('quality.zeroPointZeroOne')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointZeroOneFive" :label="$t('quality.zeroPointZeroOneFive')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointZeroOneFive" :placeholder="$t('quality.zeroPointZeroOneFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointZeroSixFive" :label="$t('quality.zeroPointZeroSixFive')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointZeroSixFive" :placeholder="$t('quality.zeroPointZeroSixFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="zeroPointZeroTwoFive" :label="$t('quality.zeroPointZeroTwoFive')">
 | 
			
		||||
      <el-input v-model="dataForm.zeroPointZeroTwoFive" :placeholder="$t('quality.zeroPointZeroTwoFive')"></el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <!-- <el-form-item prop="criticalSampleSize" :label="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
 | 
			
		||||
      <el-input v-model="dataForm.criticalSampleSize"
 | 
			
		||||
        :placeholder="[$t('quality.fatalFlaw') + $t('quality.sampleSize')]">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item>
 | 
			
		||||
    <el-form-item prop="criticalUnacceptable" :label="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
 | 
			
		||||
      <el-input v-model="dataForm.criticalUnacceptable"
 | 
			
		||||
        :placeholder="[$t('quality.fatalFlaw') + $t('quality.unacceptable')]">
 | 
			
		||||
      </el-input>
 | 
			
		||||
    </el-form-item> -->
 | 
			
		||||
  </el-form>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import debounce from "lodash/debounce";
 | 
			
		||||
import basicAdd from "@/mixins/basic-add";
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicAdd],
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        submitURL: "/quality/qmsSamplingPlan",
 | 
			
		||||
        infoURL: "/quality/qmsSamplingPlan/{id}"
 | 
			
		||||
      },
 | 
			
		||||
      options: [{
 | 
			
		||||
        value: 0,
 | 
			
		||||
        label: '不可用'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        value: 1,
 | 
			
		||||
        label: '可用'
 | 
			
		||||
      }],
 | 
			
		||||
      visible: false,
 | 
			
		||||
      dataForm: {
 | 
			
		||||
        id: null,
 | 
			
		||||
        fourPointZero: null,
 | 
			
		||||
        onePointFive:null,	
 | 
			
		||||
        onePointZero:null,
 | 
			
		||||
        sampleRange: null,	
 | 
			
		||||
        sixPointFive: null,
 | 
			
		||||
        ten: null,
 | 
			
		||||
        twoPointFive: null,
 | 
			
		||||
        zeroPointFour: null,
 | 
			
		||||
        zeroPointOne: null,
 | 
			
		||||
        zeroPointOneFive: null,
 | 
			
		||||
        zeroPointSixFive: null,	
 | 
			
		||||
        zeroPointTwoFive: null,
 | 
			
		||||
        zeroPointZeroFour: null,
 | 
			
		||||
        zeroPointZeroOne: null,
 | 
			
		||||
        zeroPointZeroOneFive: null,
 | 
			
		||||
        zeroPointZeroSixFive: null,
 | 
			
		||||
        zeroPointZeroTwoFive: null,
 | 
			
		||||
      },
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
    dataRule() {
 | 
			
		||||
      return {
 | 
			
		||||
        // dictLabel: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // dictValue: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
        // sort: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: this.$t("validate.required"),
 | 
			
		||||
        //     trigger: "blur",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
      };
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    init(id, ) {
 | 
			
		||||
      this.dataForm.id = id || ""
 | 
			
		||||
      // console.log(11111)
 | 
			
		||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
			
		||||
      this.visible = true
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs["dataForm"].resetFields();
 | 
			
		||||
        if (this.dataForm.id) {
 | 
			
		||||
          this.getInfo()
 | 
			
		||||
        } else {
 | 
			
		||||
          // this.getCode()
 | 
			
		||||
        }
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    // getCode() {
 | 
			
		||||
    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
			
		||||
    //     .then(({ data: res }) => {
 | 
			
		||||
    //       if (res.code === 0) {
 | 
			
		||||
    //         console.log(res);
 | 
			
		||||
    //         this.dataForm.customSamplingCode = res.data
 | 
			
		||||
    //       }
 | 
			
		||||
    //     })
 | 
			
		||||
    //     .catch(() => {
 | 
			
		||||
    //     });
 | 
			
		||||
    // },
 | 
			
		||||
    // 获取信息
 | 
			
		||||
    getInfo() {
 | 
			
		||||
      this.$http
 | 
			
		||||
        .get(`/quality/qmsCustomSampling/${this.dataForm.id}`)
 | 
			
		||||
        .then(({ data: res }) => {
 | 
			
		||||
          if (res.code !== 0) {
 | 
			
		||||
            return this.$message.error(res.msg);
 | 
			
		||||
          }
 | 
			
		||||
          this.dataForm = {
 | 
			
		||||
            ...this.dataForm,
 | 
			
		||||
            ...res.data,
 | 
			
		||||
          };
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    // 表单提交
 | 
			
		||||
    dataFormSubmitHandle: debounce(
 | 
			
		||||
      function () {
 | 
			
		||||
        this.$refs["dataForm"].validate((valid) => {
 | 
			
		||||
          if (!valid) {
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
			
		||||
            .then(({ data: res }) => {
 | 
			
		||||
              if (res.code !== 0) {
 | 
			
		||||
                return this.$message.error(res.msg);
 | 
			
		||||
              }
 | 
			
		||||
              this.$message({
 | 
			
		||||
                message: this.$t("prompt.success"),
 | 
			
		||||
                type: "success",
 | 
			
		||||
                duration: 500,
 | 
			
		||||
                onClose: () => {
 | 
			
		||||
                  console.log(1111);
 | 
			
		||||
                  this.visible = false;
 | 
			
		||||
                  this.$emit("successSubmit");
 | 
			
		||||
                },
 | 
			
		||||
              });
 | 
			
		||||
            })
 | 
			
		||||
            .catch(() => {});
 | 
			
		||||
        });
 | 
			
		||||
      },
 | 
			
		||||
      1000,
 | 
			
		||||
      { leading: true, trailing: false }
 | 
			
		||||
    ),
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										285
									
								
								src/views/modules/quality/qmsCustomSampling.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										285
									
								
								src/views/modules/quality/qmsCustomSampling.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,285 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-04-04 14:29:43
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <customSampling-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
        </customSampling-add>
 | 
			
		||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <customSampling-search ref="searchOrUpdate" @successSubmit="conditionSearchSubmit"></customSampling-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import customSamplingAdd from "./components/customSampling-add"
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import customSamplingSearch from "./components/customSamplingSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'customSamplingCode',
 | 
			
		||||
    label: i18n.t("basic.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'planCategory',
 | 
			
		||||
    label: i18n.t("quality.planCategory"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'fatalFlaw',
 | 
			
		||||
    label: i18n.t("quality.fatalFlaw"),
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    children: [
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'criticalAcceptable',
 | 
			
		||||
        label: i18n.t("quality.acceptable"),
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'criticalSampleSize',
 | 
			
		||||
        label: i18n.t("quality.sampleSize"),
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'criticalUnacceptable',
 | 
			
		||||
        label: i18n.t("quality.unacceptable"),
 | 
			
		||||
      },
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'seriousDisadvantage',
 | 
			
		||||
    label: i18n.t("quality.seriousDisadvantage"),
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    children: [
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'seriousDisadvantageAcceptable',
 | 
			
		||||
        label: i18n.t("quality.acceptable"),
 | 
			
		||||
        align: 'center'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'seriousDisadvantageSampleSize',
 | 
			
		||||
        label: i18n.t("quality.sampleSize"), 
 | 
			
		||||
        align: 'center',
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'seriousDisadvantageUnacceptable',
 | 
			
		||||
        label: i18n.t("quality.unacceptable"),
 | 
			
		||||
        align: 'center'
 | 
			
		||||
      },
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'minor',
 | 
			
		||||
    label: i18n.t("quality.minor"),
 | 
			
		||||
    align: 'center',
 | 
			
		||||
    children: [
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'minorAcceptable',
 | 
			
		||||
        label: i18n.t("quality.acceptable"),
 | 
			
		||||
        align: 'center'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'minorSampleSize',
 | 
			
		||||
        label: i18n.t("quality.sampleSize"),
 | 
			
		||||
        align: 'center'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'minorUnacceptable',
 | 
			
		||||
        label: i18n.t("quality.unacceptable"),
 | 
			
		||||
        align: 'center'
 | 
			
		||||
      },
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'total',
 | 
			
		||||
    label: i18n.t("quality.total"),
 | 
			
		||||
    children: [
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'totalAcceptable',
 | 
			
		||||
        label: i18n.t("quality.acceptable"),
 | 
			
		||||
        align: 'center'
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        prop: 'totalUnacceptable',
 | 
			
		||||
        label: i18n.t("quality.unacceptable"),
 | 
			
		||||
        align: 'center'
 | 
			
		||||
      },
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    customSamplingSearch,
 | 
			
		||||
    customSamplingAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/quality/qmsCustomSampling/page",
 | 
			
		||||
        deleteURL: "/quality/qmsCustomSampling",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init()
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // console.log(key);
 | 
			
		||||
      // this.listQuery.key = key;
 | 
			
		||||
      this.listQuery.customSamplingCode = dataForm.customSamplingCode
 | 
			
		||||
      // this.listQuery.name = dataForm.name
 | 
			
		||||
      // this.listQuery.failureTypeStatus = dataForm.failureTypeStatus
 | 
			
		||||
      this.listQuery.page = 1
 | 
			
		||||
      this.getDataList()
 | 
			
		||||
      this.searchOrUpdateVisible = false
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.listQuery.code = null
 | 
			
		||||
          this.listQuery.name = null
 | 
			
		||||
          this.listQuery.failureTypeStatus = null
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										212
									
								
								src/views/modules/quality/qmsDisposalMethod.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										212
									
								
								src/views/modules/quality/qmsDisposalMethod.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,212 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:21:38
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge>
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <disposalMethod-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
          </disposalMethod-add>
 | 
			
		||||
          <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <disposalMethod-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></disposalMethod-search>
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import disposalMethodAdd from "./components/disposalMethod-add"
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
import disposalMethodSearch from "./components/disposalMethodSearch"
 | 
			
		||||
import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'disposalMethodName',
 | 
			
		||||
    label: i18n.t("quality.disposalMethodName"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'disposalMethodCode',
 | 
			
		||||
    label: i18n.t("quality.disposalMethodCode"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'judgmentMark',
 | 
			
		||||
    label: i18n.t("quality.judgmentMark"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
   {
 | 
			
		||||
     prop: 'disposalMethodStatus',
 | 
			
		||||
     label: i18n.t("quality.disposalMethodStatus"),
 | 
			
		||||
     align: 'center',
 | 
			
		||||
     subcomponent: available,
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    disposalMethodSearch,
 | 
			
		||||
    disposalMethodAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/quality/qmsDisposalMethod/page",
 | 
			
		||||
        deleteURL: "/quality/qmsDisposalMethod",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.disposalMethodStatus = dataForm.disposalMethodStatus
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.listQuery.code = null
 | 
			
		||||
          this.listQuery.name = null
 | 
			
		||||
          this.listQuery.failureTypeStatus = null
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
							
								
								
									
										206
									
								
								src/views/modules/quality/qmsInspectionPosition.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										206
									
								
								src/views/modules/quality/qmsInspectionPosition.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,206 @@
 | 
			
		||||
<!--
 | 
			
		||||
 * @Author: zhp
 | 
			
		||||
 * @Date: 2023-01-11 09:24:58
 | 
			
		||||
 * @LastEditTime: 2023-04-04 16:15:42
 | 
			
		||||
 * @LastEditors: zhp
 | 
			
		||||
 * @Description: 
 | 
			
		||||
-->
 | 
			
		||||
<template>
 | 
			
		||||
  <el-card shadow="never" class="aui-card--fill">
 | 
			
		||||
    <div class="mod-sys__user">
 | 
			
		||||
      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
			
		||||
        <!-- <el-badge :value="1" class="item">
 | 
			
		||||
          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
			
		||||
        </el-badge> -->
 | 
			
		||||
      </SearchBar>
 | 
			
		||||
      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
			
		||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
			
		||||
          @clickBtn="handleClick" />
 | 
			
		||||
      </base-table>
 | 
			
		||||
      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
			
		||||
        @pagination="getDataList" />
 | 
			
		||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
			
		||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
			
		||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
			
		||||
        <InspectionPosition-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
			
		||||
          </InspectionPosition-add>
 | 
			
		||||
          <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
			
		||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
			
		||||
        <!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> -->
 | 
			
		||||
        <el-row slot="footer" type="flex" justify="end">
 | 
			
		||||
          <el-col :span="12">
 | 
			
		||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
			
		||||
              {{ $t("close") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
			
		||||
              }}</el-button>
 | 
			
		||||
            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
			
		||||
              {{ $t("search") }}
 | 
			
		||||
            </el-button>
 | 
			
		||||
          </el-col>
 | 
			
		||||
        </el-row>
 | 
			
		||||
      </base-dialog>
 | 
			
		||||
    </div>
 | 
			
		||||
  </el-card>
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import basicPage from "@/mixins/basic-page"
 | 
			
		||||
import InspectionPositionAdd from "./components/InspectionPosition-add"
 | 
			
		||||
// import AddOrUpdate from './params-add-or-update'
 | 
			
		||||
// import failureTypeSearch from "./components/failureTypeSearch"
 | 
			
		||||
// import available from "./components/available.vue"
 | 
			
		||||
import basicSearch from "@/mixins/basic-search"
 | 
			
		||||
import i18n from "@/i18n"
 | 
			
		||||
const tableProps = [
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'inspectionPositionName',
 | 
			
		||||
    label: i18n.t("basic.name"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'inspectionPositionCode',
 | 
			
		||||
    label: i18n.t("basic.code"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    prop: 'inspectionPositionNumber',
 | 
			
		||||
    label: i18n.t("quality.inspectionPositionNumber"),
 | 
			
		||||
    align: 'center'
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
const tableBtn = [
 | 
			
		||||
  {
 | 
			
		||||
    type: "edit",
 | 
			
		||||
    btnName: "编辑",
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    type: "delete",
 | 
			
		||||
    btnName: "删除",
 | 
			
		||||
  },
 | 
			
		||||
];
 | 
			
		||||
export default {
 | 
			
		||||
  mixins: [basicPage, basicSearch],
 | 
			
		||||
  components: {
 | 
			
		||||
    // failureTypeSearch,
 | 
			
		||||
    InspectionPositionAdd
 | 
			
		||||
  },
 | 
			
		||||
  data() {
 | 
			
		||||
    return {
 | 
			
		||||
      urlOptions: {
 | 
			
		||||
        getDataListURL: "/quality/qmsInspectionPosition/page",
 | 
			
		||||
        deleteURL: "/quality/qmsInspectionPosition",
 | 
			
		||||
      },
 | 
			
		||||
      tableProps,
 | 
			
		||||
      tableBtn,
 | 
			
		||||
      searchOrEditTitle: '',
 | 
			
		||||
      searchOrUpdateVisible: false,
 | 
			
		||||
      formConfig: [
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "",
 | 
			
		||||
        //   label: i18n.t("params.paramCode"),
 | 
			
		||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
			
		||||
        //   param: "paramCode",
 | 
			
		||||
        // },
 | 
			
		||||
        // {
 | 
			
		||||
        //   type: "separate",
 | 
			
		||||
        // },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "新增",
 | 
			
		||||
          name: "add",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          type: "button",
 | 
			
		||||
          btnName: "搜索",
 | 
			
		||||
          name: "search",
 | 
			
		||||
          color: "primary",
 | 
			
		||||
        }
 | 
			
		||||
      ],
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
  // components: {
 | 
			
		||||
  //   AddOrUpdate,
 | 
			
		||||
  // },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //search-bar点击
 | 
			
		||||
    handleProductCancel() {
 | 
			
		||||
      this.productOrUpdateVisible = false;
 | 
			
		||||
      this.productOrEditTitle = "";
 | 
			
		||||
    },
 | 
			
		||||
    // handleSearchCancel() {
 | 
			
		||||
    //   this.searchOrEditTitle = "";
 | 
			
		||||
    //   this.searchOrUpdateVisible = false;
 | 
			
		||||
    // },
 | 
			
		||||
    conditionSearch() {
 | 
			
		||||
      this.searchOrEditTitle = "搜索";
 | 
			
		||||
      this.searchOrUpdateVisible = true;
 | 
			
		||||
      this.$nextTick(() => {
 | 
			
		||||
        this.$refs.searchOrUpdate.init();
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    conditionSearchSubmit(dataForm) {
 | 
			
		||||
      this.listQuery.code = dataForm.code
 | 
			
		||||
      this.listQuery.page = 1;
 | 
			
		||||
      this.getDataList();
 | 
			
		||||
      this.searchOrUpdateVisible = false;
 | 
			
		||||
      // console.log(11111);
 | 
			
		||||
      // this.conditionSearchSubmit();
 | 
			
		||||
    },
 | 
			
		||||
    handleClick(val) {
 | 
			
		||||
      console.log(val);
 | 
			
		||||
      if (val.type === "delete") {
 | 
			
		||||
        this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
 | 
			
		||||
          confirmButtonText: "确定",
 | 
			
		||||
          cancelButtonText: "取消",
 | 
			
		||||
          type: "warning",
 | 
			
		||||
        })
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
			
		||||
              if (data && data.code === 0) {
 | 
			
		||||
                this.$message({
 | 
			
		||||
                  message: "操作成功",
 | 
			
		||||
                  type: "success",
 | 
			
		||||
                  duration: 1500,
 | 
			
		||||
                  onClose: () => {
 | 
			
		||||
                    this.getDataList();
 | 
			
		||||
                  },
 | 
			
		||||
                });
 | 
			
		||||
              } else {
 | 
			
		||||
                this.$message.error(data.msg);
 | 
			
		||||
              }
 | 
			
		||||
            });
 | 
			
		||||
          })
 | 
			
		||||
          .catch(() => { });
 | 
			
		||||
      } else if (val.type === 'edit') {
 | 
			
		||||
        this.addOrUpdateVisible = true;
 | 
			
		||||
        this.$nextTick(() => {
 | 
			
		||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    buttonClick(val) {
 | 
			
		||||
      switch (val.btnName) {
 | 
			
		||||
        case "search":
 | 
			
		||||
          // this.listQuery.paramCode = val.paramCode;
 | 
			
		||||
          this.listQuery.page = 1;
 | 
			
		||||
          this.listQuery.code = null
 | 
			
		||||
          this.listQuery.name = null
 | 
			
		||||
          this.listQuery.failureTypeStatus = null
 | 
			
		||||
          this.getDataList();
 | 
			
		||||
          break;
 | 
			
		||||
        case "add":
 | 
			
		||||
          this.addOrEditTitle = '新增'
 | 
			
		||||
          this.addOrUpdateVisible = true;
 | 
			
		||||
          this.addOrUpdateHandle()
 | 
			
		||||
          break;
 | 
			
		||||
        default:
 | 
			
		||||
          console.log(val)
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user