Commit 9c9e8ce0 authored by jingnan's avatar jingnan 👀

领用出库申请增加串件领用

parent 1fd93230
......@@ -18,7 +18,17 @@
</el-select>
</div>
<dee-as-com
v-if="typeName"
v-if="typeName==='replaceUse'"
ref="basicInfoTable"
:form="bindForm"
style="border:none;"
model-name="OutStorageUse"
:lay-config="cmpOptions"
:basic-data="{...basicData,useRequestType:basicData.typeName||typeName}"
/>
<dee-as-com
v-else-if="typeName"
ref="basicInfoTable"
style="border:none;"
model-name="OutStorageUse"
:lay-config="cmpOptions"
......@@ -29,7 +39,7 @@
</template>
<script>
// import { post } from '@/utils/http'
import { post } from '@/utils/http'
export default {
componentName: '领用出库申请新建',
name: 'AddOutStorageUseCom',
......@@ -59,6 +69,7 @@ export default {
typeName: 'OutStorageUse',
layKey: 'outStorageUseApplyAdd_useAO'
},
bindForm: {},
outStorageUseId: ''//
}
},
......@@ -67,12 +78,19 @@ export default {
typeName: {
immediate: true,
handler(val) {
this.bindForm = {}
if (!this.basicData.id) {
this.$set(this.cmpOptions, 'layKey', `outStorageUseApplyAdd_${val}`)
} else {
this.$set(this.cmpOptions, 'layKey', `outStorageUseApplyEdit_${val}`)
}
}
},
'bindForm.replaceDocNo': {
immediate: true,
handler(val) {
val && typeof (val) === 'number' && this.getReplaceOutInfo(val)
}
}
},
created() {
......@@ -103,6 +121,15 @@ export default {
this.formData = Object.assign({}, val)
this.formData.typeName = this.typeName
}
},
getReplaceOutInfo(id) {
this.bindForm = { replaceDocNo: this.bindForm.replaceDocNo }
post(`OutStorageRequest/createReplaceOutInfo?replaceDocId=${id}`).then(res => {
if (!res.items) return
this.bindForm = res.items
}).catch(err => {
console.log(err)
}).finally(() => {})
}
// cancelHandler(val) {
// this.$confirm('此操作将解除已占用的操作, 是否继续?', '提示', {
......
......@@ -126,6 +126,14 @@ export default {
}
}
}
},
'form.replaceDocNo': {
immediate: true,
handler(val) {
if (val && this.form.inStorageRequestItems) {
this.tableData = this.form.inStorageRequestItems
}
}
}
},
mounted() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment