Commit 852804de authored by xioln's avatar xioln

废品单问题修改

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