|
@@ -157,7 +157,11 @@
|
|
|
<!-- 备注信息 -->
|
|
<!-- 备注信息 -->
|
|
|
<RemarkInfo ref="remarkRefs" :form="remarkform" />
|
|
<RemarkInfo ref="remarkRefs" :form="remarkform" />
|
|
|
<!-- 关联信息 -->
|
|
<!-- 关联信息 -->
|
|
|
- <linkMsg ref="linkMsgRef" :id="id" />
|
|
|
|
|
|
|
+ <linkMsg
|
|
|
|
|
+ ref="linkMsgRef"
|
|
|
|
|
+ :id="$route.query.id"
|
|
|
|
|
+ :categoryLevelId="form.categoryLevelId"
|
|
|
|
|
+ />
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -180,7 +184,7 @@
|
|
|
import { getDetails } from '@/api/classifyManage/itemInformation';
|
|
import { getDetails } from '@/api/classifyManage/itemInformation';
|
|
|
import { addMaterial } from '@/api/material/manage.js';
|
|
import { addMaterial } from '@/api/material/manage.js';
|
|
|
import { deepClone } from '@/utils/index';
|
|
import { deepClone } from '@/utils/index';
|
|
|
- import { finishPageTab , reloadPageTab } from '@/utils/page-tab-util';
|
|
|
|
|
|
|
+ import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'ManageMaterial',
|
|
name: 'ManageMaterial',
|
|
|
components: {
|
|
components: {
|
|
@@ -208,15 +212,15 @@
|
|
|
categoryLevelName: ''
|
|
categoryLevelName: ''
|
|
|
},
|
|
},
|
|
|
remarkform: {
|
|
remarkform: {
|
|
|
- remarkAttach:[]
|
|
|
|
|
|
|
+ remarkAttach: []
|
|
|
},
|
|
},
|
|
|
- categoryAps:{},
|
|
|
|
|
- categoryMes:{},
|
|
|
|
|
- categoryMold:{},
|
|
|
|
|
- categoryPallet:{},
|
|
|
|
|
- categoryQms:{},
|
|
|
|
|
- categoryVehicle:{},
|
|
|
|
|
- categoryWms:{},
|
|
|
|
|
|
|
+ categoryAps: {},
|
|
|
|
|
+ categoryMes: {},
|
|
|
|
|
+ categoryMold: {},
|
|
|
|
|
+ categoryPallet: {},
|
|
|
|
|
+ categoryQms: {},
|
|
|
|
|
+ categoryVehicle: {},
|
|
|
|
|
+ categoryWms: {},
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
|
rules: {
|
|
rules: {
|
|
|
categoryLevelGroupName: [
|
|
categoryLevelGroupName: [
|
|
@@ -231,8 +235,8 @@
|
|
|
{ required: true, message: '请选择计量单位', trigger: 'change' }
|
|
{ required: true, message: '请选择计量单位', trigger: 'change' }
|
|
|
]
|
|
]
|
|
|
},
|
|
},
|
|
|
- PathInfo:{},
|
|
|
|
|
- id:null
|
|
|
|
|
|
|
+ PathInfo: {},
|
|
|
|
|
+ id: null
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
@@ -240,52 +244,51 @@
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
async _getDetails () {
|
|
async _getDetails () {
|
|
|
- this.id = this.$route.query.id
|
|
|
|
|
const data = await getDetails(this.$route.query.id);
|
|
const data = await getDetails(this.$route.query.id);
|
|
|
- const info = deepClone(data)
|
|
|
|
|
|
|
+ const info = deepClone(data);
|
|
|
this.form = {
|
|
this.form = {
|
|
|
...info.category
|
|
...info.category
|
|
|
- }
|
|
|
|
|
- this.judgeSet(info)
|
|
|
|
|
|
|
+ };
|
|
|
|
|
+ this.judgeSet(info);
|
|
|
this.searchDeptNodeClick(this.form.deptLeaderId);
|
|
this.searchDeptNodeClick(this.form.deptLeaderId);
|
|
|
},
|
|
},
|
|
|
// 判断字段类型并赋值
|
|
// 判断字段类型并赋值
|
|
|
- judgeSet(info){
|
|
|
|
|
- if(typeof info.categoryAps == 'string'){
|
|
|
|
|
- this.categoryAps = {}
|
|
|
|
|
- }else{
|
|
|
|
|
- this.categoryAps = info.categoryAps
|
|
|
|
|
- }
|
|
|
|
|
- if(typeof info.categoryMes == 'string'){
|
|
|
|
|
- this.categoryMes = {}
|
|
|
|
|
- }else{
|
|
|
|
|
- this.categoryMes = info.categoryMes
|
|
|
|
|
- }
|
|
|
|
|
- if(typeof info.categoryMold == 'string'){
|
|
|
|
|
- this.categoryMold = {}
|
|
|
|
|
- }else{
|
|
|
|
|
- this.categoryMold = info.categoryMold
|
|
|
|
|
- }
|
|
|
|
|
- if(typeof info.categoryPallet == 'string'){
|
|
|
|
|
- this.categoryPallet = {}
|
|
|
|
|
- }else{
|
|
|
|
|
- this.categoryPallet = info.categoryPallet
|
|
|
|
|
- }
|
|
|
|
|
- if(typeof info.categoryQms == 'string'){
|
|
|
|
|
- this.categoryQms = {}
|
|
|
|
|
- }else{
|
|
|
|
|
- this.categoryQms = info.categoryQms
|
|
|
|
|
- }
|
|
|
|
|
- if(typeof info.categoryVehicle == 'string'){
|
|
|
|
|
- this.categoryVehicle = {}
|
|
|
|
|
- }else{
|
|
|
|
|
- this.categoryVehicle = info.categoryVehicle
|
|
|
|
|
- }
|
|
|
|
|
- if(typeof info.categoryWms == 'string'){
|
|
|
|
|
- this.categoryWms = {}
|
|
|
|
|
- }else{
|
|
|
|
|
- this.categoryWms = info.categoryWms
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ judgeSet (info) {
|
|
|
|
|
+ if (typeof info.categoryAps == 'string') {
|
|
|
|
|
+ this.categoryAps = {};
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.categoryAps = info.categoryAps;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (typeof info.categoryMes == 'string') {
|
|
|
|
|
+ this.categoryMes = {};
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.categoryMes = info.categoryMes;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (typeof info.categoryMold == 'string') {
|
|
|
|
|
+ this.categoryMold = {};
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.categoryMold = info.categoryMold;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (typeof info.categoryPallet == 'string') {
|
|
|
|
|
+ this.categoryPallet = {};
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.categoryPallet = info.categoryPallet;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (typeof info.categoryQms == 'string') {
|
|
|
|
|
+ this.categoryQms = {};
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.categoryQms = info.categoryQms;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (typeof info.categoryVehicle == 'string') {
|
|
|
|
|
+ this.categoryVehicle = {};
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.categoryVehicle = info.categoryVehicle;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (typeof info.categoryWms == 'string') {
|
|
|
|
|
+ this.categoryWms = {};
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.categoryWms = info.categoryWms;
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
// 选择所属部门
|
|
// 选择所属部门
|
|
|
searchDeptNodeClick (id, info) {
|
|
searchDeptNodeClick (id, info) {
|
|
@@ -298,7 +301,7 @@
|
|
|
//选择负责人
|
|
//选择负责人
|
|
|
handleDirectorChange (id, info) {},
|
|
handleDirectorChange (id, info) {},
|
|
|
// 确定分类
|
|
// 确定分类
|
|
|
- confirmCategory (node, title,PathInfo) {
|
|
|
|
|
|
|
+ confirmCategory (node, title, PathInfo) {
|
|
|
if (title == '选择产品分类') {
|
|
if (title == '选择产品分类') {
|
|
|
this.$set(this.form, 'productCategoryLevelName', node.name);
|
|
this.$set(this.form, 'productCategoryLevelName', node.name);
|
|
|
this.$set(this.form, 'productCategoryLevelId', node.id);
|
|
this.$set(this.form, 'productCategoryLevelId', node.id);
|
|
@@ -307,14 +310,14 @@
|
|
|
this.$set(this.form, 'categoryLevelId', node.id);
|
|
this.$set(this.form, 'categoryLevelId', node.id);
|
|
|
this.$set(this.form, 'categoryLevelPath', node.name);
|
|
this.$set(this.form, 'categoryLevelPath', node.name);
|
|
|
this.$set(this.form, 'categoryLevelPathId', node.id);
|
|
this.$set(this.form, 'categoryLevelPathId', node.id);
|
|
|
- this.PathInfo = PathInfo
|
|
|
|
|
|
|
+ this.PathInfo = PathInfo;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
openCategory () {
|
|
openCategory () {
|
|
|
this.$refs.categoryRefs.open(this.form.categoryLevelGroupId);
|
|
this.$refs.categoryRefs.open(this.form.categoryLevelGroupId);
|
|
|
},
|
|
},
|
|
|
cancel () {
|
|
cancel () {
|
|
|
- finishPageTab()
|
|
|
|
|
|
|
+ finishPageTab();
|
|
|
this.$router.go(-1);
|
|
this.$router.go(-1);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -337,14 +340,14 @@
|
|
|
// ? this.remarkform.remark
|
|
// ? this.remarkform.remark
|
|
|
// : '';
|
|
// : '';
|
|
|
const data = {
|
|
const data = {
|
|
|
- categoryWms:this.categoryWms,
|
|
|
|
|
- categoryAps:this.categoryAps,
|
|
|
|
|
- categoryMes:this.categoryMes,
|
|
|
|
|
- categoryMold:this.categoryMold,
|
|
|
|
|
- categoryPallet:this.categoryPallet,
|
|
|
|
|
- categoryQms:this.categoryQms,
|
|
|
|
|
- categoryVehicle:this.categoryVehicle,
|
|
|
|
|
- category:{
|
|
|
|
|
|
|
+ categoryWms: this.categoryWms,
|
|
|
|
|
+ categoryAps: this.categoryAps,
|
|
|
|
|
+ categoryMes: this.categoryMes,
|
|
|
|
|
+ categoryMold: this.categoryMold,
|
|
|
|
|
+ categoryPallet: this.categoryPallet,
|
|
|
|
|
+ categoryQms: this.categoryQms,
|
|
|
|
|
+ categoryVehicle: this.categoryVehicle,
|
|
|
|
|
+ category: {
|
|
|
...this.form,
|
|
...this.form,
|
|
|
...this.remarkform,
|
|
...this.remarkform,
|
|
|
...this.PathInfo
|
|
...this.PathInfo
|
|
@@ -354,9 +357,9 @@
|
|
|
.then((msg) => {
|
|
.then((msg) => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
this.$message.success(msg);
|
|
this.$message.success(msg);
|
|
|
- finishPageTab()
|
|
|
|
|
|
|
+ finishPageTab();
|
|
|
reloadPageTab({ fullPath: '/material/product' });
|
|
reloadPageTab({ fullPath: '/material/product' });
|
|
|
- this.$router.go(-1)
|
|
|
|
|
|
|
+ this.$router.go(-1);
|
|
|
})
|
|
})
|
|
|
.catch((e) => {
|
|
.catch((e) => {
|
|
|
this.loading = false;
|
|
this.loading = false;
|