Commit 852804de authored by xioln's avatar xioln

废品单问题修改

parent 6b030a21
......@@ -285,7 +285,6 @@ export default {
})
},
update(data, deleteRows = []) {
console.log(11111, data)
// data
const tableData = this.value || []
tableData.forEach(row => {
......@@ -299,7 +298,6 @@ export default {
}
}
})
console.log(222, data)
this.$emit('input', data)
}
}
......
......@@ -399,7 +399,7 @@
<label>合计:</label><el-input
v-model="form.accounts"
clearable
:disabled="costKeeper || (disabled && !costKeeper)"
:disabled="true"
placeholder="请输入"
/>
<!-- <label :class="{ costKeeper: !costKeeper }">合计:</label><el-input
......@@ -429,6 +429,12 @@
</template>
<script>
export default {
props: {
basicData: {
type: Object,
default: () => null
}
},
data() {
return {
item: {},
......@@ -477,7 +483,9 @@ export default {
// 成本核算员
costEstimator: true,
// 成本管理员
costKeeper: true
costKeeper: true,
// 废品通知单编制禁用
Activity_1dnbmb6: false
}
},
watch: {
......@@ -539,6 +547,7 @@ export default {
that.workHourMLossCost = 0
}
if (that.curTotalLossCost) {
console.log(this)
that.accounts = parseFloat(that.curTotalLossCost)
} else if (!that.curTotalLossCost) {
that.accounts = 0
......@@ -576,36 +585,52 @@ export default {
},
deep: true
}
// 'form.accounts': {
// handler(v) {
// this.$emit('accounts', v)
// },
// deep: true
// }
},
created() {
this.open(this.$attrs['basic-data'])
this.open(this.basicData)
},
methods: {
// 打开弹出框
open(val) {
this.$nextTick(() => {
// 成本核算员节点Activity_1lgytbi和财务部会计Activity_07owud7
// if (['Activity_1lgytbi', 'Activity_07owud7'].includes(val.taskkey)) {
// this.disabled = false
// if (val.taskkey === 'Activity_1lgytbi') {
// this.costEstimator = false
// } else if (val.taskkey === 'Activity_07owud7') {
// this.costKeeper = false
// }
// } else {
// this.disabled = true
// }
this.disabled = false
this.costEstimator = false
this.costKeeper = false
this.item = val
if (val && val.taskkey) {
// 废品通知单编制
if (val.taskkey === 'Activity_1dnbmb6') {
this.Activity_1dnbmb6 = true
}
// 成本核算员节点Activity_1lgytbi和财务部会计Activity_07owud7
// if (['Activity_1lgytbi', 'Activity_07owud7'].includes(val.taskkey)) {
// this.disabled = false
// if (val.taskkey === 'Activity_1lgytbi') {
// this.costEstimator = false
// } else if (val.taskkey === 'Activity_07owud7') {
// this.costKeeper = false
// }
// } else {
// this.disabled = true
// }
this.disabled = false
this.costEstimator = false
this.costKeeper = false
this.searchItem()
}
})
},
searchItem() {
const params = {
searchItems: {
items: [{ 'fieldName': 'id', operator: 'EQ', value: this.basicData.id }],
operator: 'AND'
}
}
this.$api.searchApi('ScrapNoticeDoc', params).then(res => {
if (res.items.content) {
this.$nextTick(() => {
res.items.content[0].taskkey = this.basicData.taskkey
this.item = res.items.content[0]
})
}
})
},
save() {
......
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