批量生产派工

dev
qiuhongwu 3 months ago
parent 407dd8e67c
commit 78daf9afbc

@ -71,11 +71,11 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column label="负责人" align="center" prop="owner" min-width="240">
<el-table-column label="负责人" align="center" prop="owners" min-width="240">
<template #header> <span class="hl-table_header">*</span>负责人</template>
<template #default="{ row, $index }">
<el-form-item
:prop="`${$index}.owner`"
:prop="`${$index}.owners`"
:rules="subFormRules.owners"
class="mb-0px!"
>
@ -212,8 +212,16 @@
</el-form-item>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" align="center" min-width="100">
<el-table-column fixed="right" label="操作" align="center" min-width="160">
<template #default="scope">
<el-button
link
type="primary"
size="small"
@click.prevent="openratioDetail(scope.row, scope.$index)"
>
编辑
</el-button>
<el-button
v-if="'detail' != active && scope.row.procedureStatus == 0"
link
@ -240,6 +248,7 @@
</template>
</Dialog>
<UserDialog ref="userDialogref" @success="handleuserClick" />
<Ratiodialog ref="ratiodialogref" @success="handlratioClick" />
</template>
<script lang="ts" setup>
import { getIntDictOptions, getStrDictOptions, DICT_TYPE, getDictLabel } from '@/utils/dict'
@ -252,6 +261,7 @@ import EquipSelect from '@/views/biz/hlvuestyle/equipSelect.vue'
import EquipmentSelect from '@/views/biz/hlvuestyle/equipmentSelect.vue'
import UserDialog from './userselect.vue'
import { Search } from '@element-plus/icons-vue'
import Ratiodialog from './ratiodialog.vue'
defineOptions({ name: 'SystemDeptForm' })
@ -365,6 +375,36 @@ const onDeleteItem = async (index) => {
formData.value.taskDispatchDetails.splice(index, 1)
}
//
const ratiodialogref = ref()
const openratioDetail = (val, index) => {
if (val.owners == undefined) {
message.error('请先选择责任人')
} else {
const datalist: any = []
// console.log(val.ratioSettings)
for (var i = 0; i < val.owners.length; i++) {
let ratios = val.ratioSettings[i] ? Reflect.get(val.ratioSettings[i], 'ratio') : undefined
datalist.push({
id: undefined,
detailOwnerId: val.id,
owner: val.owners[i],
ownerNames: val.ownerNames[i],
ratio: ratios
})
}
ratiodialogref.value.open(datalist, val.id, index)
}
}
//
const handlratioClick = (vals) => {
// console.log(vals)
formData.value.taskDispatchDetails[vals.index].ratioSettings = [...vals.ratioSettingss]
// console.log(formData.value.taskDispatchDetails[vals.index].ratioResults,'--------------');
}
//
const handleClick = (index) => {
openuserDialog(index)

Loading…
Cancel
Save