Browse Source

检验工序加复制

hella_online_20240829
zhang_li 5 months ago
parent
commit
5d7ffc0a99
  1. 2
      src/views/qms/inspectionScheme/addForm.vue
  2. 25
      src/views/qms/inspectionTemplate/addForm.vue

2
src/views/qms/inspectionScheme/addForm.vue

@ -233,7 +233,7 @@
</el-form>
<el-tabs
v-model="editableTabsValue"
editable
closable
class="demo-tabs"
@edit="handleTabsEdit"
type="border-card"

25
src/views/qms/inspectionTemplate/addForm.vue

@ -81,6 +81,18 @@
:label="item.description"
:name="item.name"
>
<template #label>
<span class="custom-tabs-label" style="display: flex; align-items: center">
<span>{{ item.description }}</span>
<Icon
icon="ep:document-copy"
color="#67C23A"
style="margin-left: 10px"
@click.stop="copy(item)"
/>
</span>
</template>
<div class="small-title">检验工序</div>
<!-- <Form
:ref="`formRefProcess`+index"
@ -1016,6 +1028,19 @@ const changeIsTarget = (e,item) => {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false
}
}
//
const copy = (item)=>{
const newItem = JSON.parse(JSON.stringify(item))
newItem.name = data.value.process[data.value.process.length-1].name + 1
newItem.code = ''
newItem.id = ''
newItem.sequenceCode =data.value?.process[data.value?.process?.length-1]?.sequenceCode? parseInt(data.value.process[data.value.process.length-1].sequenceCode) + 1 : ''
newItem.inspectionCharacteristicsBaseVO.code = ''
newItem.inspectionCharacteristicsBaseVO. id = ''
newItem.inspectionCharacteristicsBaseVO.concurrencyStamp = 1
data.value.process.push(newItem)
editableTabsValue.value = newItem.name
}
</script>
<style scoped>
.small-title {

Loading…
Cancel
Save