Commit 0a54a9d6 authored by wangdanlei's avatar wangdanlei

Merge branch 'dev' into rubberPaint-dev

parents a85cee58 b59a723f
......@@ -9,7 +9,7 @@
<div class="dee-table dee-table-dis-border">
<el-table
ref="outerTable"
:data="tableData"
:data="filterTableData"
align="center"
height="calc(100vh - 100px)"
:row-class-name="outerRowClassName"
......@@ -161,16 +161,40 @@ export default {
{ 'title': '版次', 'key': 'inventory.softConfPieceNo' }
],
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: '占用',
icon: '/icons/c-creatBook.png',
handler: {
click: () => {
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' }
this.HandleBeforeOccupy()
}
}
},
......@@ -182,19 +206,19 @@ export default {
this.handleSubmit()
}
}
}],
dialogTitle: '',
dialogVisible: false,
cmpOptions: {
typeName: 'Inventory',
layKey: 'matchApplyOccupy'
},
selectionRows: [],
currentRow: {},
reqStatusOptions: []
{
name: this.hideMaterial ? '显示材料' : '隐藏材料',
icon: '/icons/c-scan.png',
handler: {
click: () => {
this.hideMaterialFun()
}
}
}]
return data
}
},
computed: {},
watch: {},
created() {
this.getDicListByCode()
......@@ -226,6 +250,13 @@ export default {
// 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) {
const isExpend = rows.some(r => r.id === row.id) // 判断当前行展开状态
if (isExpend) {
......@@ -312,6 +343,9 @@ export default {
},
handleClose() {
this.dialogVisible = false
},
hideMaterialFun() {
this.hideMaterial = !this.hideMaterial
}
}
}
......
......@@ -283,6 +283,9 @@ export default {
} else {
isVirtualFlag = false
}
if (this.header.hasTaxExemption === '是') {
isVirtualFlag = true
}
const targetArr = this.formFileds[0].data.filter(item => item.title === '税率' || item.title === '含税单价')
targetArr.forEach(item => (item.component.disabled = isVirtualFlag))
}
......
......@@ -857,8 +857,9 @@ export default {
})
}
})
// 默认取第一个明细的是否免税状态
this.form.hasTaxExemption = data[0].hasTaxExemption
// 默认取第一个明细的是否免税状态,用this.$set才能触发computed方法
this.$set(this.form, 'hasTaxExemption', data[0].hasTaxExemption)
// this.form.hasTaxExemption = data[0].hasTaxExemption
if (data.length > 0) {
this.formData[0].data.forEach(item => {
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