|
@@ -93,7 +93,7 @@
|
|
|
<script>
|
|
|
import SpecBox from "./compoent/SpecBox.vue";
|
|
|
import ConfigTable from "./compoent/configTable.vue";
|
|
|
-import {changeSpec } from "@/api/resource/good";
|
|
|
+import { getSpecDetail, changeSpec } from "@/api/resource/good";
|
|
|
export default {
|
|
|
data() {
|
|
|
var checkList = (rule, value, callback) => {
|
|
@@ -160,7 +160,8 @@ export default {
|
|
|
this.checkSpecBox() &&
|
|
|
changeSpec(this.ruleForm).then((res) => {
|
|
|
this.isNext = true;
|
|
|
- this.ruleForm.specTemplateId = res.data[0].specTemplateId;
|
|
|
+ // this.ruleForm.specTemplateId = res.data[0].specTemplateId;
|
|
|
+ this.getSpecDetail(res.data[0].specTemplateId)
|
|
|
res.data.map((ele) => {
|
|
|
ele.attrListVos.map((e, i) => {
|
|
|
ele["value" + i] = e.value;
|
|
@@ -179,6 +180,13 @@ export default {
|
|
|
}
|
|
|
return result;
|
|
|
},
|
|
|
+ getSpecDetail(id) {
|
|
|
+ getSpecDetail(id).then((res) => {
|
|
|
+ Object.keys(this.ruleForm).map((e) => {
|
|
|
+ this.ruleForm[e] = res.data[e];
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
back() {
|
|
|
this.$router.go(-1);
|
|
|
},
|