Commit 0a54a9d6 authored by wangdanlei's avatar wangdanlei

Merge branch 'dev' into rubberPaint-dev

parents a85cee58 b59a723f
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="dee-table dee-table-dis-border"> <div class="dee-table dee-table-dis-border">
<el-table <el-table
ref="outerTable" ref="outerTable"
:data="tableData" :data="filterTableData"
align="center" align="center"
height="calc(100vh - 100px)" height="calc(100vh - 100px)"
:row-class-name="outerRowClassName" :row-class-name="outerRowClassName"
...@@ -161,16 +161,40 @@ export default { ...@@ -161,16 +161,40 @@ export default {
{ 'title': '版次', 'key': 'inventory.softConfPieceNo' } { 'title': '版次', 'key': 'inventory.softConfPieceNo' }
], ],
tableData: [], tableData: [],
tools: [{ dialogTitle: '',
dialogVisible: false,
cmpOptions: {
typeName: 'Inventory',
layKey: 'matchApplyOccupy'
},
selectionRows: [],
currentRow: {},
reqStatusOptions: [],
hideMaterial: true
}
},
computed: {
filterTableData() {
let resData = []
if (this.hideMaterial) {
this.tableData.forEach(row => {
debugger
if (!row.extMaterial.resType2.typeCode.includes('金属材料') && !row.extMaterial.resType2.typeCode.includes('工装') && !row.extMaterial.resType2.typeCode.includes('工具') && !row.extMaterial.resType2.typeCode.includes('设备')) {
resData.push(row)
}
})
} else {
resData = this.tableData
}
return resData
},
tools() {
const data = [{
name: '占用', name: '占用',
icon: '/icons/c-creatBook.png', icon: '/icons/c-creatBook.png',
handler: { handler: {
click: () => { click: () => {
if (this.selectionRows.length !== 1) return this.$utils.showMessageWarning('必须且只能选择一条数据进行操作!') this.HandleBeforeOccupy()
if (this.selectionRows[0].reqStatus === 'Close' || this.selectionRows[0].reqStatus === '已关闭' || this.selectionRows[0].reqStatus === 'All' || this.selectionRows[0].reqStatus === '已出库') return this.$utils.showMessageWarning('当前物料不允许手动占用!')
this.dialogTitle = '占用'
this.dialogVisible = true
this.cmpOptions = { typeName: 'Inventory', layKey: 'matchApplyOccupy' }
} }
} }
}, },
...@@ -182,19 +206,19 @@ export default { ...@@ -182,19 +206,19 @@ export default {
this.handleSubmit() this.handleSubmit()
} }
} }
}],
dialogTitle: '',
dialogVisible: false,
cmpOptions: {
typeName: 'Inventory',
layKey: 'matchApplyOccupy'
}, },
selectionRows: [], {
currentRow: {}, name: this.hideMaterial ? '显示材料' : '隐藏材料',
reqStatusOptions: [] icon: '/icons/c-scan.png',
handler: {
click: () => {
this.hideMaterialFun()
}
}
}]
return data
} }
}, },
computed: {},
watch: {}, watch: {},
created() { created() {
this.getDicListByCode() this.getDicListByCode()
...@@ -226,6 +250,13 @@ export default { ...@@ -226,6 +250,13 @@ export default {
// this.loading = false // this.loading = false
}) })
}, },
HandleBeforeOccupy() {
if (this.selectionRows.length !== 1) return this.$utils.showMessageWarning('必须且只能选择一条数据进行操作!')
if (this.selectionRows[0].reqStatus === 'Close' || this.selectionRows[0].reqStatus === '已关闭' || this.selectionRows[0].reqStatus === 'All' || this.selectionRows[0].reqStatus === '已出库') return this.$utils.showMessageWarning('当前物料不允许手动占用!')
this.dialogTitle = '占用'
this.dialogVisible = true
this.cmpOptions = { typeName: 'Inventory', layKey: 'matchApplyOccupy' }
},
handleExpandChange(row, rows) { handleExpandChange(row, rows) {
const isExpend = rows.some(r => r.id === row.id) // 判断当前行展开状态 const isExpend = rows.some(r => r.id === row.id) // 判断当前行展开状态
if (isExpend) { if (isExpend) {
...@@ -312,6 +343,9 @@ export default { ...@@ -312,6 +343,9 @@ export default {
}, },
handleClose() { handleClose() {
this.dialogVisible = false this.dialogVisible = false
},
hideMaterialFun() {
this.hideMaterial = !this.hideMaterial
} }
} }
} }
......
...@@ -283,6 +283,9 @@ export default { ...@@ -283,6 +283,9 @@ export default {
} else { } else {
isVirtualFlag = false isVirtualFlag = false
} }
if (this.header.hasTaxExemption === '是') {
isVirtualFlag = true
}
const targetArr = this.formFileds[0].data.filter(item => item.title === '税率' || item.title === '含税单价') const targetArr = this.formFileds[0].data.filter(item => item.title === '税率' || item.title === '含税单价')
targetArr.forEach(item => (item.component.disabled = isVirtualFlag)) targetArr.forEach(item => (item.component.disabled = isVirtualFlag))
} }
......
...@@ -857,8 +857,9 @@ export default { ...@@ -857,8 +857,9 @@ export default {
}) })
} }
}) })
// 默认取第一个明细的是否免税状态 // 默认取第一个明细的是否免税状态,用this.$set才能触发computed方法
this.form.hasTaxExemption = data[0].hasTaxExemption this.$set(this.form, 'hasTaxExemption', data[0].hasTaxExemption)
// this.form.hasTaxExemption = data[0].hasTaxExemption
if (data.length > 0) { if (data.length > 0) {
this.formData[0].data.forEach(item => { this.formData[0].data.forEach(item => {
item.component.disabled = true item.component.disabled = true
......
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