Browse Source

检验工序加复制

hella_online_20240829
zhang_li 4 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-form>
<el-tabs <el-tabs
v-model="editableTabsValue" v-model="editableTabsValue"
editable closable
class="demo-tabs" class="demo-tabs"
@edit="handleTabsEdit" @edit="handleTabsEdit"
type="border-card" type="border-card"

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

@ -81,6 +81,18 @@
:label="item.description" :label="item.description"
:name="item.name" :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> <div class="small-title">检验工序</div>
<!-- <Form <!-- <Form
:ref="`formRefProcess`+index" :ref="`formRefProcess`+index"
@ -1016,6 +1028,19 @@ const changeIsTarget = (e,item) => {
rules.value['inspectionCharacteristicsBaseVO.quantifyTarget'][0].required = false 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> </script>
<style scoped> <style scoped>
.small-title { .small-title {

Loading…
Cancel
Save