| | |
| | | <script setup> |
| | | import {reactive, ref} from "vue"; |
| | | import {computed, nextTick, onMounted, reactive, ref, toRefs} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {indexOf} from "xe-utils"; |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import userInfo from "@/stores/userInfo" |
| | | let brokenVisible = ref(false) |
| | | const xGrid = ref() |
| | | const brokenGrid =ref() |
| | | let router = useRouter() |
| | | |
| | | const user=userInfo() |
| | | |
| | | //定义表头数据 |
| | | const titleUploadData = ref({ |
| | | //流程卡号 |
| | | processId: 'NG24030501A01/1', |
| | | //销售单号 |
| | | orderId: '', |
| | | //生产单号 |
| | | productionId: '', |
| | | //设备类型 |
| | | deviceType: '', |
| | | //班组类型 |
| | | teamsType: '', |
| | | deviceName: '', |
| | | //班组名称 |
| | | teamsgroupsName: '', |
| | | //生产日期 |
| | | reportingWorkDate: '', |
| | | reportingWorkTime: '', |
| | | //报工工序 |
| | | thisProcess: '', |
| | | //上工序 |
| | |
| | | |
| | | |
| | | }) |
| | | let detail = ref([]) |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | |
| | | processType: [], |
| | | thisProcessType: [], |
| | | mateProcessType: [], |
| | | historyDevice:[], |
| | | historyTeams:[], |
| | | historyProcess:[], |
| | | breakageType:[], |
| | | breakageReason:[] |
| | | |
| | | }) |
| | | |
| | | //表尾求和 |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | const form = reactive({ |
| | | processId: 'NG24022302A01/1' |
| | | }) |
| | | |
| | | |
| | | const optionVal = ref('') |
| | | const options = [ |
| | |
| | | ] |
| | | |
| | | |
| | | //子组件接收参数 |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | |
| | | }, |
| | | { |
| | | field: 'breakageNumber', title: '次破数量', |
| | | field: 'breakageQuantity', title: '次破数量', |
| | | |
| | | }, |
| | | // {field: 'available', width: 80, title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | |
| | | // {code: 'sameDamage', name: '次破相同'}, |
| | | // {code: 'sameOneCompletion', name: '完工一列相同'}, |
| | | // {code: 'sameOneDamage', name: '次破一列相同'}, |
| | | {code: 'print_lck', name: '保存', status: 'primary', icon: 'vxe-icon-save'}, |
| | | {code: 'saveReportingWork', name: '保存', status: 'primary', icon: 'vxe-icon-save'}, |
| | | {code: 'print_lck', name: '保存并审核', status: 'primary', icon: 'vxe-icon-save'}, |
| | | ], |
| | | // import: false, |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | // footerMethod({columns, data}) {//页脚函数 |
| | | // let footList = ['', '', '', '', ''] |
| | |
| | | |
| | | let brokenRow = ref() |
| | | const gridEvents = { |
| | | toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'saveReportingWork': { |
| | | saveReportingWork() |
| | | break |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | cellDblclick (params) {//表格内容双击打开产品界面 |
| | | const { row } = params |
| | | brokenRow = row |
| | | console.log(row) |
| | | //brokenGrid.value.reload() |
| | | //brokenVisible.value = true |
| | | brokenRow.value = row |
| | | if(brokenRow.value.damageDetails=== undefined){ |
| | | brokenRow.value.damageDetails=[] |
| | | } |
| | | //brokenGrid.value.reloadData(brokenRow.damageDetail) |
| | | //改变brokenVisible的值触发openedBrokenTable()方法 |
| | | brokenVisible.value = true |
| | | //console.log(brokenGrid.value) |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | const brokenGrid =ref() |
| | | |
| | | |
| | | const brokenGridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | //showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY: {enabled: true},//开启虚拟滚动 |
| | | //scrollY: {enabled: true},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | // {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { |
| | | field: 'order_number', |
| | | title: '序号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | // { |
| | | // field: 'order_number', |
| | | // title: '序号' |
| | | // }, |
| | | |
| | | { |
| | | field: 'breakageNumber', title: '次破数量', |
| | | |
| | | field: 'breakageQuantity', |
| | | title: '次破数量', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | }, |
| | | {field: 'available', title: '可利用', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | {field: 'returnProcess', title: '退回工序', editRender: {name: 'input', attrs: {placeholder: ''}}}, |
| | | {field: 'available', |
| | | title: '可利用', |
| | | slots: {default: 'available'} |
| | | }, |
| | | {field: 'returnProcess', title: '退回工序', |
| | | editRender: {}, |
| | | slots: {default: 'returnProcess_default', edit: 'returnProcess'} |
| | | }, |
| | | { |
| | | field: 'reasonType', title: '次破类型', |
| | | editRender: {name: 'input', attrs: {placeholder: '', type: 'selected'}} |
| | | editRender: {}, |
| | | slots: {default: 'reasonType_default', edit: 'reasonType'} |
| | | }, |
| | | { |
| | | field: 'reasonDamage', title: '次破原因', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | editRender: {}, |
| | | slots: {default: 'reasonDamage_default', edit: 'reasonDamage'} |
| | | }, |
| | | { |
| | | field: 'responsibleProcess', title: '责任工序', |
| | | editRender: {}, |
| | | slots: {default: 'reportingWordSort_default', edit: 'reportingWordSort'} |
| | | //editRender: {name: 'input', attrs: {placeholder: '',type: 'selected'}}, |
| | | |
| | | slots: {default: 'responsibleProcess_default', edit: 'responsibleProcess'} |
| | | }, |
| | | { |
| | | field: 'responsibleEquipment', |
| | |
| | | |
| | | { |
| | | field: 'responsibleTeam', title: '责任班组', |
| | | editRender: {name: 'input', attrs: {placeholder: ''}} |
| | | editRender: {}, |
| | | slots: {default: 'responsibleTeam_default', edit: 'responsibleTeam'} |
| | | }, |
| | | { |
| | | field: 'responsibilityPersonnel', |
| | |
| | | |
| | | ], |
| | | //表单验证 |
| | | editRules: {}, |
| | | editRules: { |
| | | breakageQuantity: [ |
| | | { |
| | | validator ({ cellValue }) { |
| | | const regex = /^[1-9]\d*$/ |
| | | if (!regex.test(cellValue)) { |
| | | return new Error('输入大于0的整数') |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | returnProcess:[ |
| | | { |
| | | validator ({ row }) { |
| | | const regex = /^\s*$/i |
| | | if(row.available===true && (regex.test(row.returnProcess)==='' || row.returnProcess===null)){ |
| | | return new Error('可利用已选择,请选择返回工序') |
| | | } |
| | | } |
| | | } |
| | | ], |
| | | reasonType: [ |
| | | { required: true, message: '请选择次破类型' } |
| | | ], |
| | | reasonDamage: [ |
| | | { required: true, message: '请选择次破原因' } |
| | | ], |
| | | responsibleProcess: [ |
| | | { required: true, message: '请选择责任工序' } |
| | | ], |
| | | responsibleEquipment: [ |
| | | { required: true, message: '请选择责任设备' } |
| | | ], |
| | | responsibleTeam: [ |
| | | { required: true, message: '责任班组' } |
| | | ], |
| | | }, |
| | | toolbarConfig: {//表头按钮 |
| | | buttons: [ |
| | | {code: 'print_lck', name: '添加', status: 'primary', icon: 'vxe-icon-save'}, |
| | | {code: 'addRow', name: '添加', status: 'primary', icon: 'vxe-icon-square-plus'}, |
| | | {code: 'removeRow', name: '删除', status: 'primary', icon: 'vxe-icon-delete'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | |
| | | custom: true |
| | | }, |
| | | }) |
| | | const brokenGridEvents = { |
| | | toolbarButtonClick({code}) { |
| | | const $grid = brokenGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'addRow': { |
| | | $grid.insertAt({}) |
| | | break |
| | | } |
| | | case 'removeRow': { |
| | | let result = toolbarButtonClickEvent() |
| | | if(result){ |
| | | $grid.remove(result.row) |
| | | } |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | const openedBrokenTable = () => { |
| | | addListener(brokenGrid.value,brokenGridOptions) |
| | | let damage =ref(brokenRow.value.damageDetails) |
| | | brokenGrid.value.reloadData(damage.value) |
| | | //console.log(brokenRow.value) |
| | | } |
| | | |
| | | |
| | | const checkClose = async (done) => { |
| | | const errMap = await brokenGrid.value.validate(true) |
| | | if (errMap) { |
| | | ElMessage.error(`校验不通过!`) |
| | | return false |
| | | } |
| | | let breakageQuantityCount = 0 |
| | | brokenRow.value.breakageQuantity=0 |
| | | brokenGrid.value.getTableData().fullData.forEach((row) =>{ |
| | | breakageQuantityCount+=row.breakageQuantity*1 |
| | | }) |
| | | |
| | | let reportingWorkNum = isNaN(brokenRow.value.completedQuantity*1)?0:brokenRow.value.completedQuantity*1 |
| | | if(breakageQuantityCount+reportingWorkNum>brokenRow.value.quantity*1){ |
| | | ElMessage.warning(`损耗数:'${breakageQuantityCount}' |
| | | 完工数:'${reportingWorkNum}'之和${breakageQuantityCount+reportingWorkNum} |
| | | 不能大于${brokenRow.value.quantity*1}`) |
| | | return false |
| | | } |
| | | |
| | | breakageQuantityCount = breakageQuantityCount === 0 ? null : breakageQuantityCount |
| | | brokenRow.value.breakageQuantity = breakageQuantityCount |
| | | brokenRow.value.damageDetails=brokenGrid.value.getTableData().fullData |
| | | done() |
| | | } |
| | | |
| | | |
| | | |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/reportingWork/selectProcess`).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | titleSelectJson.value.processType = res.data.process; |
| | | //console.log(titleSelectJson.value.processType) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | const saveReportingWork = () => { |
| | | titleUploadData.value.creator = user.user.userName |
| | | titleUploadData.value.creatorId = user.user.id |
| | | const requestData = { |
| | | title:titleUploadData.value, |
| | | detail:xGrid.value.getTableData().fullData |
| | | } |
| | | console.log(xGrid.value.getTableData().fullData) |
| | | request.post(`/reportingWork/saveReportingWork`,requestData).then(res =>{ |
| | | if (res.code == 200){ |
| | | ElMessage.success("报工成功") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //查询责任设备 |
| | | const computedDevice = computed((responsibleProcess) => { |
| | | return function (responsibleProcess){ |
| | | return titleSelectJson.value.historyDevice.filter((item) => { |
| | | return item.basic_category === responsibleProcess |
| | | }) |
| | | } |
| | | }) |
| | | // 查询责任班组 |
| | | const computedResponsibleTeam = computed((responsibleProcess) => { |
| | | return function (responsibleProcess){ |
| | | return titleSelectJson.value.historyTeams.filter((item) => { |
| | | return item.process === responsibleProcess |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | //判断是否点击可利用 显示返回工序 |
| | | const computedReturnProcess = computed((available) => { |
| | | return function (available){ |
| | | if(available){ |
| | | return titleSelectJson.value.historyProcess |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | //下拉款选择工序时查询 |
| | | const getWork = () => { |
| | | |
| | | let processId = form.processId |
| | | let processId = titleUploadData.value.processId |
| | | if (processId.indexOf("/") < 0) { |
| | | |
| | | ElMessage.success("请输入正确格式流程卡") |
| | | ElMessage.warning("请输入正确格式流程卡") |
| | | return |
| | | } |
| | | let indexOfChar = processId.indexOf("/") |
| | | let leftString = processId.slice(0, indexOfChar) |
| | | if (leftString.length != 13) { |
| | | ElMessage.success("请输入正确位数的流程卡") |
| | | ElMessage.warning("请输入正确位数的流程卡") |
| | | return |
| | | } |
| | | //工序 |
| | | let process = titleUploadData.value.thisProcess |
| | | if (process == "" || process == null) { |
| | | |
| | | ElMessage.success("请选择工序") |
| | | ElMessage.warning("请选择工序") |
| | | return |
| | | } |
| | | |
| | | if (titleSelectJson.value.thisProcessType.indexOf(process) == -1 && process != "切割" && titleSelectJson.value.thisProcessType != "") { |
| | | ElMessage.success("此工序不属于该流程卡") |
| | | ElMessage.warning("此工序不属于该流程卡") |
| | | return |
| | | } |
| | | //流程卡号 |
| | |
| | | if (res.code == 200) { |
| | | //表头赋值 |
| | | titleUploadData.value = res.data.data |
| | | titleUploadData.value.processId = processId |
| | | //设备下拉框 |
| | | titleSelectJson.value.deviceType = res.data.device |
| | | //班组下拉框 |
| | | titleSelectJson.value.teamsType = res.data.teams |
| | | //当前流程卡工序 |
| | | titleSelectJson.value.thisProcessType = res.data.thisProcess |
| | | //报工时间默认当天 |
| | | const today = new Date |
| | | today.setTime(today.getTime()) |
| | | titleUploadData.value.reportingWorkDate = today.getFullYear() + |
| | | '-' + ("0" + (today.getMonth() + 1)).slice(-2) |
| | | + '-' + ("0" + today.getDate()).slice(-2) |
| | | //历史班组 |
| | | titleSelectJson.value.historyTeams= res.data.historyTeams |
| | | //历史设备 |
| | | titleSelectJson.value.historyDevice = res.data.historyDevice |
| | | //历史工序 |
| | | titleSelectJson.value.historyProcess = res.data.historyProcess |
| | | //次破类型 |
| | | titleSelectJson.value.breakageType = res.data.breakageType |
| | | //次破原因 |
| | | titleSelectJson.value.breakageReason = res.data.breakageReason |
| | | console.log(res.data) |
| | | |
| | | |
| | | |
| | | titleUploadData.value.reportingWorkTime = formatCurrentTime() |
| | | //绑定下方表格 |
| | | xGrid.value.reloadData(res.data.Detail) |
| | | detail.value = res.data.Detail |
| | | xGrid.value.reloadData(detail.value) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | const verifyNum = () => { |
| | | const $grid = xGrid.value |
| | | const table = $grid.getTableData().fullData |
| | | //console.log(table) |
| | | let sum = 0; |
| | | let sumBreak = 0; |
| | | table.forEach((item) => { |
| | | if (item.completedQuantity == null || item.completedQuantity == "") { |
| | | item.completedQuantity = 0; |
| | | } |
| | | if (item.breakageNumber == null || item.breakageNumber == "") { |
| | | item.breakageNumber = 0; |
| | | if (item.breakageQuantity == null || item.breakageQuantity == "") { |
| | | item.breakageQuantity = 0; |
| | | } |
| | | |
| | | if (item.quantity < item.completedQuantity) { |
| | | ElMessage.success("序号" + item.order_number + "的数量不能大于上工序数量") |
| | | |
| | | |
| | | } else if (item.breakageNumber * 1 + item.completedQuantity * 1 > item.quantity * 1) { |
| | | } else if (item.breakageQuantity * 1 + item.completedQuantity * 1 > item.quantity * 1) { |
| | | ElMessage.success("请输入序号" + item.order_number + "正确的完工或次破数量") |
| | | } |
| | | |
| | | sum = item.completedQuantity * 1 + sum * 1 |
| | | |
| | | sumBreak = item.breakageNumber * 1 + sumBreak * 1 |
| | | sumBreak = item.breakageQuantity * 1 + sumBreak * 1 |
| | | |
| | | }) |
| | | titleUploadData.value.thisCompletedQuantity = sum |
| | | titleUploadData.value.thisWornQuantity = sumBreak |
| | | } |
| | | |
| | | //获取当前时间 |
| | | function formatCurrentTime() { |
| | | let dateObj = new Date(); // 创建一个表示当前时间的Date对象 |
| | | let year = dateObj.getFullYear(); // 年份 |
| | | let month = (dateObj.getMonth() + 1).toString().padStart(2, '0'); // 月份(注意需要加上1) |
| | | let day = dateObj.getDate().toString().padStart(2, '0'); // 天数 |
| | | let hours = dateObj.getHours().toString().padStart(2, '0'); // 小时 |
| | | let minutes = dateObj.getMinutes().toString().padStart(2, '0'); // 分钟 |
| | | let seconds = dateObj.getSeconds().toString().padStart(2, '0'); // 秒数 |
| | | |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; // 返回格式化后的时间字符串 |
| | | } |
| | | |
| | | const ptypeChangeEvent = (row) => { |
| | | // for (let i = 0; i < row.length; i++){ |
| | |
| | | <template> |
| | | <div style="height: 100%;width: 100%"> |
| | | <div id="head" style="height: 5%;width: 100%;margin-bottom: 5px"> |
| | | <el-input v-model="form.processId" placeholder="流程卡号" style="width: 200px" @keyup.enter.native="getWork"/> |
| | | <el-input v-model="titleUploadData.processId" placeholder="流程卡号" style="width: 200px" @keyup.enter.native="getWork"/> |
| | | |
| | | <el-select v-model="titleUploadData.thisProcess" clearable placeholder="请选择工序" style="width: 120px" |
| | | @change="getWork"> |
| | |
| | | <el-text>客户名称:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-text class="customClass">{{ titleUploadData.order.customerName }}</el-text> |
| | | |
| | | <el-text class="customClass"></el-text> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>项目名称:</el-text> |
| | |
| | | <el-text>报工设备:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.deviceType" clearable placeholder="请选择设备"> |
| | | <el-select v-model="titleUploadData.deviceName" clearable placeholder="请选择设备"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['deviceType']" |
| | | :key="item.id" |
| | |
| | | <el-text>报工班组:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.teamsType" clearable placeholder="请选择班组"> |
| | | <el-select v-model="titleUploadData.teamsgroupsName" clearable placeholder="请选择班组"> |
| | | <el-option |
| | | v-for="item in titleSelectJson['teamsType']" |
| | | :key="item.id" |
| | |
| | | <el-text>班次:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="classesVal" class="processesSt" placeholder=""> |
| | | <el-select v-model="titleUploadData.classes" class="processesSt" placeholder=""> |
| | | <el-option |
| | | v-for="item in classesOption" |
| | | :key="item.value" |
| | |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <el-date-picker |
| | | v-model="titleUploadData.reportingWorkDate" |
| | | v-model="titleUploadData.reportingWorkTime" |
| | | format="YYYY-MM-DD HH:mm:ss" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | placeholder="" |
| | | style="width: 100%" |
| | | type="date" |
| | | type="datetime" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-text>备注:</el-text> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | |
| | | <el-input v-model="titleUploadData.notes" placeholder="" /> |
| | | </el-col> |
| | | |
| | | </el-row> |
| | |
| | | @edit-closed="verifyNum" |
| | | |
| | | > |
| | | <!-- 责任工序--> |
| | | <template #reportingWordSort="{ row }"> |
| | | <vxe-select v-model="row.responsibleProcess" transfer @change="ptypeChangeEvent(row)"> |
| | | <vxe-option v-for="item in titleSelectJson.thisProcessType" :key="item" :label="item" :value="item"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #reportingWordSort_default="{ row }"> |
| | | <span>{{ row.responsibleProcess }}</span> |
| | | </template> |
| | | <!-- 责任设备 --> |
| | | <template #reportingDeviceSort="{ row }"> |
| | | <vxe-select v-model="row.responsibleEquipment" transfer> |
| | | <vxe-option v-for="item in titleSelectJson.mateProcessType" :key="item" :label="item" :value="item"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #reportingDeviceSort_default="{ row }"> |
| | | <span>{{ row.responsibleEquipment }}</span> |
| | | </template> |
| | | |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | |
| | | |
| | | |
| | | </vxe-grid> |
| | | <el-dialog v-model="brokenVisible" title="破损列表" style="width: 80%;height:75% "> |
| | | <vxe-grid ref="brokenGrid" v-bind="brokenGridOptions"> |
| | | <el-dialog |
| | | @opened="openedBrokenTable" |
| | | :before-close="checkClose" |
| | | v-model="brokenVisible" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | title="破损列表" |
| | | style="width: 80%;height:75% "> |
| | | <vxe-grid |
| | | |
| | | height="400px" |
| | | ref="brokenGrid" |
| | | class="mytable-scrollbar" |
| | | v-bind="brokenGridOptions" |
| | | v-on="brokenGridEvents"> |
| | | <!-- 返回工序--> |
| | | <template #returnProcess="{ row }"> |
| | | <vxe-select v-model="row.returnProcess" |
| | | filterable |
| | | clearable |
| | | placeholder="" > |
| | | <vxe-option v-for="item in computedReturnProcess(row.available)" |
| | | :key="item.basic_category" |
| | | :label="item.basic_category" |
| | | :value="item.basic_category"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #returnProcess_default="{ row }"> |
| | | <span>{{ row.returnProcess }}</span> |
| | | </template> |
| | | |
| | | <!-- 责任工序--> |
| | | <template #responsibleProcess="{ row }"> |
| | | <vxe-select v-model="row.responsibleProcess" |
| | | filterable |
| | | clearable |
| | | placeholder="" > |
| | | <vxe-option v-for="item in titleSelectJson.historyProcess" |
| | | :key="item.basic_category" |
| | | :label="item.basic_category" |
| | | :value="item.basic_category"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #responsibleProcess_default="{ row }"> |
| | | <span>{{ row.responsibleProcess }}</span> |
| | | </template> |
| | | <!-- 刺破类型reasonType --> |
| | | <template #reasonType="{ row }"> |
| | | <vxe-select v-model="row.reasonType " |
| | | filterable |
| | | clearable |
| | | placeholder=""> |
| | | <vxe-option v-for="item in titleSelectJson.breakageType" :key="item.id" :label="item.basic_name" :value="item.basic_name"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #reasonType_default="{ row }"> |
| | | <span>{{ row.reasonType }}</span> |
| | | </template> |
| | | |
| | | <!--次破原因--> |
| | | <template #reasonDamage="{ row }"> |
| | | <vxe-select v-model="row.reasonDamage " |
| | | filterable |
| | | clearable |
| | | placeholder=""> |
| | | <vxe-option v-for="item in titleSelectJson.breakageReason" :key="item.id" :label="item.basic_name" :value="item.basic_name"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #reasonDamage_default="{ row }"> |
| | | <span>{{ row.reasonDamage }}</span> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <!-- 责任设备 --> |
| | | <template #reportingDeviceSort="{ row }"> |
| | | <vxe-select v-model="row.responsibleEquipment" |
| | | filterable |
| | | clearable |
| | | placeholder=""> |
| | | <vxe-option v-for="item in computedDevice(row.responsibleProcess)" :key="item.id" :label="item.basic_name" :value="item.basic_name"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #reportingDeviceSort_default="{ row }"> |
| | | <span>{{ row.responsibleEquipment }}</span> |
| | | </template> |
| | | |
| | | <!-- 责任设备 --> |
| | | <template #responsibleTeam="{ row }"> |
| | | <vxe-select v-model="row.responsibleTeam" |
| | | filterable |
| | | clearable |
| | | placeholder=""> |
| | | <vxe-option v-for="item in computedResponsibleTeam(row.responsibleProcess)" :key="item.id" :label="item.basic_name" :value="item.basic_name"/> |
| | | </vxe-select> |
| | | </template> |
| | | <template #responsibleTeam_default="{ row }"> |
| | | <span>{{ row.responsibleTeam }}</span> |
| | | </template> |
| | | <!-- 可利用 --> |
| | | <template #available="{ row }"> |
| | | <el-checkbox v-model="row.available" /> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </el-dialog> |
| | |
| | | text-align: center; |
| | | border: #181818 1px solid; |
| | | } |
| | | .vxe-grid { |
| | | /* 禁用浏览器默认选中 */ |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | } |
| | | |
| | | </style> |