diff --git a/anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue b/anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue
index d79364dcff..0779d74c86 100644
--- a/anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue
+++ b/anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue
@@ -24,7 +24,7 @@
-
+
@@ -125,7 +125,6 @@ export default {
warehouseGroup_list: [],
libTube_list: [],
formobj: {
- id: '',
sid: '',
useOrg: '', // 使用组织
useOrgSid: '', // 使用组织sid
@@ -137,8 +136,7 @@ export default {
warehouseGroupValue: '',
warehouseGroupKey: '',
libTubeName: '',
- libTubeSid: '',
- orgPath: ''
+ libTubeSid: ''
},
rules: {
useOrg: [{ required: true, message: '使用组织不能为空', trigger: 'change' }], // 使用组织
@@ -163,12 +161,12 @@ export default {
getUseOrg() {
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
if (res.success) {
+ this.formobj.useOrgSid = res.data // 使用组织sid
fetchBySid(res.data).then((resp) => {
if (resp.success) {
- this.formobj.useOrg = res.data.name // 使用组织
+ this.formobj.useOrg = resp.data.name // 使用组织
}
})
- this.formobj.useOrgSid = res.data // 使用组织sid
}
})
},
@@ -186,7 +184,6 @@ export default {
console.log('触发下拉框按钮', value)
let bb = null
this.useOrg_list.forEach((e) => {
- // eslint-disable-next-line eqeqeq
if (e.name === value) {
bb = {
name: e.name,
@@ -316,20 +313,20 @@ export default {
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
- this.formobj.id = ''
- this.formobj.sid = '' // SID
- this.formobj.useOrg = '' // 使用组织
- this.useOrgSid = '' // 使用组织sid
- this.gressionCode = '' // 编码
- this.formobj.warehouseName = '' // 名称
- this.formobj.warehouseAttribute = '' // 存放地点属性
- this.formobj.warehouseContract = '' // 存放地点负责人
- this.formobj.warehouseContractSid = '' // 存放地点负责人sid
- this.formobj.warehouseGroup = '' // 分组
- this.formobj.libTubeSid = ''
- this.formobj.libTubeName = ''
- this.formobj.orgPath = ''
- // this.useOrg_list = []
+ this.formobj = {
+ sid: '',
+ useOrg: '', // 使用组织
+ useOrgSid: '', // 使用组织sid
+ gressionCode: '', // 编码
+ warehouseName: '', // 名称
+ warehouseAttribute: '', // 存放地点属性
+ warehouseContract: '', // 存放地点负责人
+ warehouseContractSid: '', // 存放地点负责人sid
+ warehouseGroupValue: '',
+ warehouseGroupKey: '',
+ libTubeName: '',
+ libTubeSid: ''
+ }
this.$refs['form_obj'].resetFields()
this.$emit('doback')
},
@@ -339,7 +336,6 @@ export default {
})
this.dialogStatus = 'add'
this.viewTitle = '【新增】存放地点'
- this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.getUseOrg()
this.getType()
},
@@ -349,24 +345,13 @@ export default {
})
this.dialogStatus = 'edit'
this.viewTitle = '【修改】存放地点'
- req.fetchBySid(row.sid).then(resp => {
- const vdata = resp.data
- this.formobj.id = vdata.id
- this.formobj.sid = vdata.sid // SID
- this.formobj.useOrg = vdata.useOrg // 使用组织
- this.formobj.gressionCode = vdata.gressionCode // 编码
- this.formobj.warehouseName = vdata.warehouseName // 名称
- this.formobj.warehouseAttribute = vdata.warehouseAttribute // 存放地点属性
- this.formobj.warehouseContract = vdata.warehouseContract // 存放地点负责人
- this.formobj.warehouseContractSid = vdata.warehouseContractSid // 存放地点负责人sid
- this.formobj.warehouseGroupKey = vdata.warehouseGroupKey // 分组
- this.formobj.warehouseGroupValue = vdata.warehouseGroupValue // 分组
- this.formobj.libTubeName = vdata.libTubeName
- this.formobj.libTubeSid = vdata.libTubeSid
+ req.fetchBySid(row.sid).then((resp) => {
+ if (resp.success) {
+ this.formobj = resp.data
+ }
}).catch(e => {
this.formobj = row
})
- this.getUseOrg()
this.getType()
},
saveAdd() {