|
|
@@ -331,17 +331,20 @@ export default {
|
|
|
value: '三级'
|
|
|
}
|
|
|
],
|
|
|
+
|
|
|
+ isUpdate: 0,
|
|
|
form: {
|
|
|
categoryLevelGroupName: '',
|
|
|
componentAttribute: [],
|
|
|
categoryLevelName: '',
|
|
|
isConsumable: 0,
|
|
|
+ isEnabled: 1,
|
|
|
measuringUnit: '',
|
|
|
netWeight: '',
|
|
|
attributeType: 1,
|
|
|
weightUnit: '',
|
|
|
packingUnit: '',
|
|
|
- isEnabled: 1,
|
|
|
+
|
|
|
extField: {},
|
|
|
// isConsumables:2,
|
|
|
extTagField: {
|
|
|
@@ -500,7 +503,8 @@ export default {
|
|
|
|
|
|
};
|
|
|
|
|
|
- console.log(this.form);
|
|
|
+
|
|
|
+ this.isUpdate = 0;
|
|
|
|
|
|
this.categorySales = {};
|
|
|
this.purchaseInfo = {};
|
|
|
@@ -553,12 +557,24 @@ export default {
|
|
|
},
|
|
|
async created() {
|
|
|
//新增
|
|
|
+ console.log('88888888');
|
|
|
|
|
|
this.$set(
|
|
|
this.form,
|
|
|
'categoryLevelId',
|
|
|
this.$route.query.categoryLevelId
|
|
|
);
|
|
|
+
|
|
|
+
|
|
|
+ this.$set(
|
|
|
+ this.form,
|
|
|
+ 'isUpdate',
|
|
|
+ this.$route.query.isUpdate
|
|
|
+ );
|
|
|
+
|
|
|
+ this.isUpdate = this.$route.query.isUpdate;
|
|
|
+
|
|
|
+
|
|
|
this.$set(
|
|
|
this.form,
|
|
|
'categoryLevelName',
|
|
|
@@ -861,6 +877,9 @@ export default {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
checkExist(obj).then((res) => {
|
|
|
if (res) {
|
|
|
+
|
|
|
+ console.log(res, 'res----');
|
|
|
+
|
|
|
this.$confirm('系统已有相同的数据', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
@@ -889,13 +908,16 @@ export default {
|
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
|
+
|
|
|
let req = {
|
|
|
name: this.form.name,
|
|
|
modelType: this.form.modelType,
|
|
|
- specification: this.form.specification
|
|
|
+ specification: this.form.specification,
|
|
|
+ isUpdate: this.isUpdate * 1 || 0
|
|
|
}
|
|
|
- if(! await this.verifyDuplicate(req)) return;
|
|
|
-
|
|
|
+
|
|
|
+ if (! await this.verifyDuplicate(req)) return;
|
|
|
+
|
|
|
|
|
|
|
|
|
|