Browse Source

bu过滤

master
han\hanst 2 weeks ago
parent
commit
f9eaa6e1e1
  1. 29
      src/views/modules/erf/components/expTriConfirm.vue
  2. 1
      src/views/modules/erf/expApplyList.vue

29
src/views/modules/erf/components/expTriConfirm.vue

@ -512,6 +512,10 @@ export default {
type: String, type: String,
required: true required: true
}, },
buNo: {
type: String,
required: true
},
height: { height: {
type: String, type: String,
default: '35vh' default: '35vh'
@ -762,12 +766,12 @@ export default {
} }
let text = this.batchProcessInput.trim() let text = this.batchProcessInput.trim()
// //
const hasExplicitSeparator = /[\+、,,;;\|]/.test(text) ||
/\d+[\.\)]/.test(text) ||
const hasExplicitSeparator = /[\+、,,;;\|]/.test(text) ||
/\d+[\.\)]/.test(text) ||
/然后|接着|再做|再进行|之后/.test(text) /然后|接着|再做|再进行|之后/.test(text)
// //
text = text text = text
// 1. 2. 1) 2) 1 2 // 1. 2. 1) 2) 1 2
@ -779,7 +783,7 @@ export default {
.replace(/[\+、,,;;\|]/g, '\n') .replace(/[\+、,,;;\|]/g, '\n')
// //
.replace(/然后|接着|再做|再进行|之后/g, '\n') .replace(/然后|接着|再做|再进行|之后/g, '\n')
// //
if (!hasExplicitSeparator) { if (!hasExplicitSeparator) {
text = text.replace(/\s+/g, '\n') text = text.replace(/\s+/g, '\n')
@ -787,7 +791,7 @@ export default {
// //
text = text.replace(/\s{2,}/g, '\n') text = text.replace(/\s{2,}/g, '\n')
} }
// //
let names = text.split('\n') let names = text.split('\n')
.map(n => n.trim()) .map(n => n.trim())
@ -1060,12 +1064,13 @@ export default {
}, },
/** /**
* 加载工序模版列表
* 加载工序模版列表根据BU过滤
*/ */
loadTemplateList() { loadTemplateList() {
this.templateLoading = true this.templateLoading = true
getProcessTemplateList({ getProcessTemplateList({
site: this.$store.state.user.site
site: this.$store.state.user.site,
buNo: this.buNo
}).then(({data}) => { }).then(({data}) => {
this.templateLoading = false this.templateLoading = false
if (data && data.code === 0) { if (data && data.code === 0) {
@ -1141,6 +1146,7 @@ export default {
}).then(() => { }).then(() => {
saveProcessTemplate({ saveProcessTemplate({
site: this.$store.state.user.site, site: this.$store.state.user.site,
buNo: this.buNo,
templateName: this.processForm.processStep.trim(), templateName: this.processForm.processStep.trim(),
prodApproverName: this.processForm.prodApproverName, prodApproverName: this.processForm.prodApproverName,
prodApproverUserId: this.processForm.prodApproverUserId, prodApproverUserId: this.processForm.prodApproverUserId,
@ -1152,6 +1158,8 @@ export default {
}).then(({data}) => { }).then(({data}) => {
if (data && data.code === 0) { if (data && data.code === 0) {
this.$message.success('保存模版成功') this.$message.success('保存模版成功')
//
this.loadTemplateList()
} else { } else {
this.$message.error(data.msg || '保存模版失败') this.$message.error(data.msg || '保存模版失败')
} }
@ -1179,13 +1187,14 @@ export default {
}, },
/** /**
* 加载人员列表
* 加载人员列表根据BU过滤
*/ */
loadUserList(roleType) { loadUserList(roleType) {
this.userLoading = true this.userLoading = true
getUserListByRole({ getUserListByRole({
roleType: roleType, roleType: roleType,
site: this.$store.state.user.site
site: this.$store.state.user.site,
buNo: this.buNo
}).then(({data}) => { }).then(({data}) => {
this.userLoading = false this.userLoading = false
if (data && data.code === 0) { if (data && data.code === 0) {

1
src/views/modules/erf/expApplyList.vue

@ -290,6 +290,7 @@
v-if="currentRow.applyNo&&currentRow.experimentType==='High Risk'" v-if="currentRow.applyNo&&currentRow.experimentType==='High Risk'"
ref="triConfirm" ref="triConfirm"
:apply-no="currentRow.applyNo" :apply-no="currentRow.applyNo"
:bu-no="currentRow.buNo"
:experiment-type="currentRow.experimentType" :experiment-type="currentRow.experimentType"
:height="detailHeight"> :height="detailHeight">
</exp-tri-confirm> </exp-tri-confirm>

Loading…
Cancel
Save