| | |
| | | </div> |
| | | <!-- 创建任务 --> |
| | | <el-dialog v-model="dialogFormVisiblea" top="5vh" width="85%"> |
| | | <el-table ref="table" style="margin-top: 20px;height: 500px;" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flowCardId" fixed align="center" :label="$t('hellow.cardnumber')" min-width="80"/> |
| | | <el-table-column prop="layer" fixed align="center" :label="$t('hellow.layernumber')" min-width="80"/> |
| | | <el-table |
| | | ref="table" |
| | | style="margin-top: 20px; height: 500px;" |
| | | :data="tableDatab" |
| | | :header-cell-style="{ background: '#F2F3F5', color: '#1D2129' }" |
| | | row-key="projectNumber" |
| | | > |
| | | <el-table-column type="expand"> |
| | | <template #default="props"> |
| | | <el-table :data="props.row.records" style="width: 100%"> |
| | | <el-table-column prop="layer" fixed align="center" :label="$t('hellow.layernumber')" min-width="80"/> |
| | | <el-table-column prop="thickness" align="center" :label="$t('hellow.thickness')" min-width="80"/> |
| | | <el-table-column prop="filmsId" align="center" :label="$t('hellow.coatingtypes')" min-width="80"/> |
| | | <el-table-column prop="sumCount" align="center" :label="$t('hellow.totalnumber')" min-width="80"/> |
| | | <el-table-column prop="realCount" align="center" :label="$t('hellow.realpieces')" min-width="80"/> |
| | | <el-table-column prop="patternHeight" align="center" :label="$t('hellow.pairsnumber')" min-width="80"/> |
| | | <!-- <el-table-column prop="damageCount" align="center" :label="$t('hellow.brokenpieces')" min-width="80"/> --> |
| | | <!-- <el-table-column prop="lackCount" align="center" :label="$t('hellow.missingnumber')" min-width="80"/> --> |
| | | <el-table-column fixed="right" :label="$t('hellow.operate')" align="center" width="270"> |
| | | </el-table> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="projectNumber" fixed align="center" :label="$t('hellow.cardnumber')" min-width="80"/> |
| | | <el-table-column min-width="80"/> |
| | | <el-table-column min-width="80"/> |
| | | <el-table-column min-width="80"/> |
| | | <el-table-column min-width="80"/> |
| | | <el-table-column fixed="right" :label="$t('hellow.operate')" align="center" width="270"> |
| | | <template #default="scope"> |
| | | <el-button size="mini" type="text" plain @click="handletake(scope.row)">{{ $t('hellow.claimquest') }}</el-button> |
| | | <el-button size="mini" type="text" plain @click="handleBindRack(scope.row)">{{ |
| | |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | </el-table> |
| | | </el-dialog> |
| | | <!-- 领取任务 --> |
| | | <el-dialog v-model="dialogFormVisiblec" top="21vh" width="40%" :title="$t('hellow.claimquest')"> |
| | | <div style="margin-left: 20px;margin-top: 10px;margin-bottom: 10px;"> |
| | |
| | | <el-dialog v-model="dialogFormVisibleb" top="7vh" width="70%" height="500"> |
| | | <div style="margin-top: -20px;text-align: center;margin-left: 400px;"> |
| | | <el-form-item :label="$t('hellow.cardnumbera')" style="width: 14vw"> |
| | | {{ currentRow.flowCardId }} |
| | | {{ currentRow.projectNumber }} |
| | | </el-form-item> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 400px;" |
| | |
| | | fetchFlowCardId(); |
| | | }; |
| | | const handleBindRack = (row) => { |
| | | const { flowCardId, layer } = row; |
| | | currentRow.flowCardId = row.flowCardId; |
| | | const { projectNumber, layer } = row; |
| | | currentRow.projectNumber = row.projectNumber; |
| | | dialogFormVisibleb.value = true; |
| | | fetchFlowBind(flowCardId, layer); |
| | | fetchFlowBind(projectNumber, layer); |
| | | }; |
| | | // 领取任务 |
| | | const handletake = (row) => { |
| | | window.localStorage.setItem('flowCardId', row.flowCardId) |
| | | window.localStorage.setItem('flowCardId', row.projectNumber) |
| | | dialogFormVisiblec.value = true; |
| | | }; |
| | | // 强制出片 |
| | | const handleout = (row) => { |
| | | window.localStorage.setItem('flowCardId', row.flowCardId) |
| | | window.localStorage.setItem('flowCardId', row.projectNumber) |
| | | dialogFormVisibled.value = true; |
| | | }; |
| | | // 创建任务 |
| | | const fetchFlowCardId = async () => { |
| | | try { |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryHollowAllFlowCard') |
| | | const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryHollowAllFlowCard'); |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | console.log(response.data.NG24111426A001); |
| | | const newData = parseData(response.data); |
| | | console.log(newData); |
| | | |
| | | tableDatab.value = response.data.NG24111426A001; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | tableDatab.value = newData; |
| | | } else { |
| | | ElMessage.error('Failed to fetch data'); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | ElMessage.error('Error fetching data'); |
| | | } |
| | | } |
| | | }; |
| | | |
| | | const parseData = (rawData) => { |
| | | return Object.keys(rawData).map(projectNumber => ({ |
| | | projectNumber, |
| | | records: rawData[projectNumber] |
| | | })); |
| | | }; |
| | | // const fetchFlowCardId = async () => { |
| | | // try { |
| | | // const response = await request.post('/hollowGlass/hollowGlassRelationInfo/queryHollowAllFlowCard') |
| | | // if (response.code == 200) { |
| | | // ElMessage.success(response.message); |
| | | // console.log(response.data); |
| | | // tableDatab.value = response.data; |
| | | // } else { |
| | | // ElMessage.error(response.message); |
| | | // } |
| | | // } catch (error) { |
| | | // console.error(error); |
| | | // } |
| | | // } |
| | | // 缺片详情 |
| | | const fetchFlowBind = async (flowCardId, layer) => { |
| | | try { |