Compare commits

..

No commits in common. "a2adcc0fd3eb9594ad3a6332e68abfe98d3ea1b2" and "4743fdc191c37d7951ff80f7aa1016cc990a8a19" have entirely different histories.

View File

@ -32,7 +32,7 @@
/>
</el-select>
</el-form-item> -->
<!-- <el-form-item v-if="false" :label="$t('module.art.artBOM')" prop="bomId">
<el-form-item v-if="false" :label="$t('module.art.artBOM')" prop="bomId">
<el-select
v-model="obj.bomId"
:class="$style.select"
@ -47,7 +47,7 @@
:value="item.id"
/>
</el-select>
</el-form-item> -->
</el-form-item>
<el-form-item :label="$t('module.art.description')" prop="description">
<el-input v-model="obj.description" />
</el-form-item>
@ -63,7 +63,7 @@
</template>
<script>
import { add, update, getInfo, getCode } from '@/api/art-manage/art.js'
import { add, update, getInfo, listBom, getCode } from '@/api/art-manage/art.js'
import SubmitBar from '@/views/art/components/submit-bar'
export default {
@ -91,6 +91,7 @@ export default {
substrateId: '',
bomId: ''
},
bomList: [],
rules: {
name: [
{ required: true, message: this.$t('module.art.artName') + this.$t('module.art.notNull'), trigger: 'blur' },
@ -127,6 +128,10 @@ export default {
},
methods: {
init: async function() {
if (this.bomList.length === 0) {
const bomRes = await listBom()
this.bomList = bomRes.data
}
if (this.id) {
const res = await getInfo({ id: this.id })
this.obj = res.data