Browse Source

完善存放地点--使用组织

zhanglei
yunuo970428 2 years ago
parent
commit
ddcf365872
  1. 59
      anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue

59
anrui-scm/anrui-scm-ui/src/views/anruiscm/scmwarehouse/scmwarehouseAdd.vue

@ -24,7 +24,7 @@
</el-col> </el-col>
<el-col :span="9"> <el-col :span="9">
<el-form-item prop=""> <el-form-item prop="">
<el-input v-model="formobj.useOrg" placeholder="使用组织" class="addinputw" :disabled="true"/> <el-input v-model="formobj.useOrg" placeholder="" class="addinputw" :disabled="true"/>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3" class="tleftb"> <el-col :span="3" class="tleftb">
@ -125,7 +125,6 @@ export default {
warehouseGroup_list: [], warehouseGroup_list: [],
libTube_list: [], libTube_list: [],
formobj: { formobj: {
id: '',
sid: '', sid: '',
useOrg: '', // 使 useOrg: '', // 使
useOrgSid: '', // 使sid useOrgSid: '', // 使sid
@ -137,8 +136,7 @@ export default {
warehouseGroupValue: '', warehouseGroupValue: '',
warehouseGroupKey: '', warehouseGroupKey: '',
libTubeName: '', libTubeName: '',
libTubeSid: '', libTubeSid: ''
orgPath: ''
}, },
rules: { rules: {
useOrg: [{ required: true, message: '使用组织不能为空', trigger: 'change' }], // 使 useOrg: [{ required: true, message: '使用组织不能为空', trigger: 'change' }], // 使
@ -163,12 +161,12 @@ export default {
getUseOrg() { getUseOrg() {
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
if (res.success) { if (res.success) {
this.formobj.useOrgSid = res.data // 使sid
fetchBySid(res.data).then((resp) => { fetchBySid(res.data).then((resp) => {
if (resp.success) { 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) console.log('触发下拉框按钮', value)
let bb = null let bb = null
this.useOrg_list.forEach((e) => { this.useOrg_list.forEach((e) => {
// eslint-disable-next-line eqeqeq
if (e.name === value) { if (e.name === value) {
bb = { bb = {
name: e.name, name: e.name,
@ -316,20 +313,20 @@ export default {
handleReturn(isreload) { handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist') if (isreload === 'true') this.$emit('reloadlist')
this.formobj.id = '' this.formobj = {
this.formobj.sid = '' // SID sid: '',
this.formobj.useOrg = '' // 使 useOrg: '', // 使
this.useOrgSid = '' // 使sid useOrgSid: '', // 使sid
this.gressionCode = '' // gressionCode: '', //
this.formobj.warehouseName = '' // warehouseName: '', //
this.formobj.warehouseAttribute = '' // warehouseAttribute: '', //
this.formobj.warehouseContract = '' // warehouseContract: '', //
this.formobj.warehouseContractSid = '' // sid warehouseContractSid: '', // sid
this.formobj.warehouseGroup = '' // warehouseGroupValue: '',
this.formobj.libTubeSid = '' warehouseGroupKey: '',
this.formobj.libTubeName = '' libTubeName: '',
this.formobj.orgPath = '' libTubeSid: ''
// this.useOrg_list = [] }
this.$refs['form_obj'].resetFields() this.$refs['form_obj'].resetFields()
this.$emit('doback') this.$emit('doback')
}, },
@ -339,7 +336,6 @@ export default {
}) })
this.dialogStatus = 'add' this.dialogStatus = 'add'
this.viewTitle = '【新增】存放地点' this.viewTitle = '【新增】存放地点'
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.getUseOrg() this.getUseOrg()
this.getType() this.getType()
}, },
@ -349,24 +345,13 @@ export default {
}) })
this.dialogStatus = 'edit' this.dialogStatus = 'edit'
this.viewTitle = '【修改】存放地点' this.viewTitle = '【修改】存放地点'
req.fetchBySid(row.sid).then(resp => { req.fetchBySid(row.sid).then((resp) => {
const vdata = resp.data if (resp.success) {
this.formobj.id = vdata.id this.formobj = resp.data
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
}).catch(e => { }).catch(e => {
this.formobj = row this.formobj = row
}) })
this.getUseOrg()
this.getType() this.getType()
}, },
saveAdd() { saveAdd() {

Loading…
Cancel
Save