| | |
| | | <script> |
| | | import winMd from '@/components/win/win-md' |
| | | import myButton from '@/components/myButton/myButton' |
| | | import * as finsystenant from '@/api/baseSetting/finsystenant' |
| | | import {addGoods,editGoods,goodsDetail} from "@/api/foudation/material"; |
| | | import {getTree} from '@/api/foudation/classification'; |
| | | import {mapGetters} from 'vuex' |
| | | |
| | |
| | | }, |
| | | async created() { |
| | | if (this.setting.id) { |
| | | await finsystenant.editmaterial(this.setting.id).then(res => { |
| | | await goodsDetail(this.setting.id).then(res => { |
| | | this.formData = res |
| | | if (!this.formData.agencyId) { |
| | | this.formData.agencyId = this.userInfo.tenantId |
| | |
| | | this.loading = true |
| | | if (this.setting.id) { |
| | | // 编辑接口 |
| | | finsystenant.editcode(params).then(res => { |
| | | editGoods(params).then(res => { |
| | | this.loading = false |
| | | if (res) { |
| | | this.$message.success('保存成功!') |
| | |
| | | }); |
| | | } else { |
| | | params.orgId = this.setting.orgId |
| | | finsystenant.addcode(params).then(res => { |
| | | addGoods(params).then(res => { |
| | | this.loading = false |
| | | if (res) { |
| | | this.$message.success('保存成功!') |