Commit d509d9c1 authored by xioln's avatar xioln

供外出库修改

parent fff6b53a
......@@ -9,10 +9,16 @@
<dee-as-com
ref="OfferTable"
class="list-table"
:lay-config="{ typeName: 'ExtDxProcessMaterial', layKey: 'table'}"
:lay-config="{ typeName: 'ExtDxProcessMaterial', layKey: 'table' }"
@selectionChange="selectionChange"
/>
<el-form :model="form" :rules="formRules" style="margin-top: 50px;">
<el-form-item label="申领数量">
<el-input-number v-model="reqAmount" :min="0" />
</el-form-item>
</el-form>
<div slot="footer" class="foot-btn-box">
<el-button type="primary" @click="addEvent">添加</el-button>
<el-button type="primary" @click="submitEvent">确认</el-button>
<el-button @click="cancelEvent">取消</el-button>
</div>
......@@ -20,55 +26,68 @@
</template>
<script>
export default {
// componentName: '供外出库添加明细弹窗',
// name: 'AddOutStorageOfferDetailDialog',
// componentName: '供外出库添加明细弹窗',
// name: 'AddOutStorageOfferDetailDialog',
components: {},
props: {
basicData: {
type: Object,
default: () => {}
default: () => { }
}
},
data() {
return {
selection: [],
defaultData: {}
defaultData: {},
form: {
},
reqAmount: 0,
formRules: {
reqAmount: [{ required: true, message: '申领数量' }]
},
submitData: []
}
},
computed: {},
computed: {
// maxNum: {
// get() {
// // this.selection
// return 0
// }
// }
},
created() {
// 初始化数据
console.log('basicData', this.basicData)
},
methods: {
sss(OKAffirmRequestParams) {
// OKAffirmRequestParams = {
// ...this.form,
// inStorageRequestItems: selectedData
// }
},
selectionChange(val) {
this.selection = val
},
addEvent() {
this.submit()
},
submitEvent() {
console.log('this.basicData', this.basicData)
this.$emit('submitEvent', { formData: this.submitData })
},
submit() {
const selection = this.selection.filter(r => {
if (!this.basicData.inStorageRequestItems) {
return true
}
return !this.basicData.inStorageRequestItems.find(item => r.id === item.extMaterialId)
})
console.log('selection', selection)
if (selection.length) {
const data = selection.map(r => {
return {
'subTypeName': 'OutStorageOutItem',
'extMaterial': r,
'extMaterialId': r.id,
'operator': 'add'
'operator': 'ADD',
'reqAmount': this.reqAmount
}
})
this.$emit('submitEvent', { formData: data })
this.submitData = this.submitData.concat(data)
}
},
cancelEvent() {
......@@ -78,15 +97,16 @@ export default {
}
</script>
<style lang='scss'>
.addOutStorageOfferDetail-dialog{
.list-table{
height: 510px!important;
.addOutStorageOfferDetail-dialog {
.list-table {
height: 310px !important;
}
.foot-btn-box {
display: flex;
margin-top: 10px;
justify-content: center;
align-content: center;
}
.foot-btn-box{
display: flex;
margin-top: 10px;
justify-content: center;
align-content: center;
}
}
</style>
......@@ -51,23 +51,24 @@ export default {
{ title: '牌号/型号/件号', key: 'extMaterial.modelNo', align: 'center', minWidth: '120' },
{ title: '规格', key: 'extMaterial.spec', align: 'center' },
{ title: '单位名称', key: 'extMaterial.extUnit.unitName', align: 'center' },
{
title: '申领数量', key: 'reqAmount', align: 'center', minWidth: '160', fixed: 'right',
component: {
show: true,
render: (h, data, column, index) => {
return (<el-input-number size='small' v-model={data.reqAmount}
on-change={(e) => {
this.tableData = this.tableData.map(item => {
if (item.extMaterialId === data.extMaterialId) {
item.reqAmount = e
}
return item
})
}} />)
}
}
},
{ title: '申领数量', key: 'reqAmount', align: 'center' },
// {
// title: '申领数量', key: 'reqAmount', align: 'center', minWidth: '160', fixed: 'right',
// component: {
// show: true,
// render: (h, data, column, index) => {
// return (<el-input-number size='small' v-model={data.reqAmount}
// on-change={(e) => {
// this.tableData = this.tableData.map(item => {
// if (item.extMaterialId === data.extMaterialId) {
// item.reqAmount = e
// }
// return item
// })
// }} />)
// }
// }
// },
{ title: '技术条件', key: 'extMaterial.techSpec', align: 'center' },
{ title: '供应状态', key: 'extMaterial.supplyStatus', align: 'center' },
{ title: '物料类型', key: 'extMaterial.resType2.typeName', align: 'center' },
......@@ -75,7 +76,7 @@ export default {
],
tableData: [],
tools: [{
name: '添加入库明细',
name: '添加出库物料',
icon: '/icons/c-add.png',
handler: {
click: () => {
......
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