| | |
| | | const dialogFormVisiblec = ref(false) |
| | | const timeRange = ref(["2022-01-01 00:00:00", "2025-01-01 00:00:00"]) |
| | | const selectValuesa = reactive([]); |
| | | let webSocket: WebSocket | null = null; |
| | | const patternWidth = ref(''); |
| | | const patternHeight = ref(''); |
| | | const patternThickness = ref(''); |
| | | const filmsId = ref(''); |
| | | const remainQuantity = ref(''); |
| | | const slot = ref(''); |
| | | let webSocket: WebSocket | null = null; |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: t('film.warehousing1'), |
| | | value: 1, |
| | | label: t('film.warehousing1'), |
| | | }, |
| | | { |
| | | value: t('film.warehousing2'), |
| | | value: 2, |
| | | label: t('film.warehousing2'), |
| | | } |
| | | ] |
| | | const report = ref({ |
| | | enableType: '', |
| | | enableState: '', |
| | | taskType: '', |
| | | taskState: '', |
| | | }); |
| | | // const response = await request.post("/glassStorage/rawGlassStorageTask/setRawGlassTaskRequest", { |
| | | // beginDate: timeRange.value[0], |
| | | // endDate: timeRange.value[1], |
| | | // taskState: stateList, |
| | | // taskType: celllist |
| | | // }) |
| | | // if (response.code === 200) { |
| | | // // tableDataa.value = response.data; |
| | | request.post("/glassStorage/rawGlassStorageTask/setRawGlassTaskRequest",{ |
| | | beginDate: "2022-01-01 00:00:00", |
| | | endDate: "2025-01-01 00:00:00", |
| | | }).then((response) => { |
| | | if (response.code == 200) { |
| | | tableDataa.value = response.data |
| | | console.log(tableDataa.value); |
| | | } else { |
| | | ElMessage.warning(response.msg) |
| | | |
| | | } |
| | | }); |
| | | onMounted(() => { |
| | | socket = initializeWebSocket(socketUrl, handleMessage); |
| | | }); |
| | |
| | | const handleMessage = (data) => { |
| | | if(data.tasks !=null){ |
| | | tableDataa.value = data.tasks[0] |
| | | console.log(data.tasks[0]); |
| | | |
| | | } |
| | | if(data.rawStationDetailsList !=null){ |
| | | tableDatab.value = data.rawStationDetailsList[0] |
| | |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | const response = await request.post("/glassStorage/raw_glass_storage_task/selectRawglasstask", { |
| | | createTime: timeRange.value[0], |
| | | patternQuantity: timeRange.value[1], |
| | | enableType: stateList, |
| | | enableState: celllist |
| | | const response = await request.post("/glassStorage/rawGlassStorageTask/setRawGlassTaskRequest", { |
| | | beginDate: timeRange.value[0], |
| | | endDate: timeRange.value[1], |
| | | taskState: stateList, |
| | | taskType: celllist |
| | | }) |
| | | if (response.code === 200) { |
| | | tableDataa.value = response.data; |
| | | // tableDataa.value = response.data; |
| | | ElMessage.success(response.message); |
| | | } |
| | | else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | }; |
| | | // 入库 |
| | | const handleConfirma = async () => { |
| | | try { |
| | | const response = await request.post('/glassStorage/rawGlassStorageDetails/patternWarehousing', { |
| | | patternWidth: patternWidth.value, |
| | | patternHeight: patternHeight.value, |
| | | patternThickness: patternThickness.value, |
| | | filmsId: filmsId.value, |
| | | remainQuantity: remainQuantity.value, |
| | | slot: slot.value, |
| | | }); |
| | | if (response.code === 200) { |
| | | ElMessage.success(response.message); |
| | | dialogFormVisibleb.value = false; |
| | | patternWidth.value = ''; |
| | | patternHeight.value = ''; |
| | | patternThickness.value = ''; |
| | | filmsId.value = ''; |
| | | remainQuantity.value = ''; |
| | | slot.value = ''; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | }; |
| | | // 是否禁用 |
| | |
| | | const handleEdit = (row) => { |
| | | dialogFormVisiblec.value = true; |
| | | }; |
| | | function getStatusType1(enableType) { |
| | | switch (enableType) { |
| | | function getStatusType1(taskType) { |
| | | switch (taskType) { |
| | | case 1: |
| | | return 'info'; |
| | | case 2: |
| | |
| | | return 'success'; |
| | | } |
| | | } |
| | | function getStatusText1(enableType) { |
| | | switch (enableType) { |
| | | function getStatusText1(taskType) { |
| | | switch (taskType) { |
| | | case 1: |
| | | return t('film.stocke');//入库 |
| | | case 2: |
| | |
| | | return t('film.dispatch');//调度 |
| | | } |
| | | } |
| | | function getStatusType2(enableState) { |
| | | switch (enableState) { |
| | | function getStatusType2(taskState) { |
| | | switch (taskState) { |
| | | case 1: |
| | | return 'info'; |
| | | case 2: |
| | |
| | | return 'success'; |
| | | } |
| | | } |
| | | function getStatusText2(enableState) { |
| | | switch (enableState) { |
| | | function getStatusText2(taskState) { |
| | | switch (taskState) { |
| | | case 1: |
| | | return t('film.built');//新建 |
| | | case 2: |
| | |
| | | <div style="width: 98%; height: calc(100% - 35px); overflow-y: auto;"> |
| | | <el-table height="300" ref="table" |
| | | :data="tableDataa" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="enableId" align="center" :label="$t('film.enableid')"/> |
| | | <el-table-column prop="id" align="center" :label="$t('film.enableid')"/> |
| | | <el-table-column prop="originateSlot" align="center" :label="$t('film.originateslot')"/> |
| | | <el-table-column prop="endSlot" align="center" :label="$t('film.endslot')"/> |
| | | <el-table-column prop="patternQuantity" align="center" :label="$t('film.patternquantity')"/> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('film.enabletype')" |
| | | prop="enableType" |
| | | prop="taskType" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType1(scope.row.enableType)"> |
| | | {{ getStatusText1(scope.row.enableType) }} |
| | | <el-tag :type="getStatusType1(scope.row.taskType)"> |
| | | {{ getStatusText1(scope.row.taskType) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('film.enablestate')" |
| | | prop="enableState" |
| | | :label="$t('film.taskstatus')" |
| | | prop="taskState" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusType2(scope.row.enableState)"> |
| | | {{ getStatusText2(scope.row.enableState) }} |
| | | <el-tag :type="getStatusType2(scope.row.taskState)"> |
| | | {{ getStatusText2(scope.row.taskState) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-table ref="table" style="margin-top: 20px;height: 700px;" |
| | | :data="tableDatab" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="deviceId" fixed align="center" :label="$t('film.station')" min-width="80"/> |
| | | <el-table-column prop="slotId" fixed align="center" :label="$t('film.slot')" min-width="80"/> |
| | | <el-table-column prop="patternWidth" align="center" :label="$t('film.width')" min-width="80" /> |
| | | <el-table-column prop="patternHeight" align="center" :label="$t('film.height')" min-width="80" /> |
| | | <el-table-column prop="patternThickness" align="center" :label="$t('film.thickness')" min-width="80" /> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisibleb" top="15vh" width="60%"> |
| | | <div style="margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="70vm" label-position="right"> |
| | | <el-row > |
| | | <el-dialog v-model="dialogFormVisibleb" top="23vh" width="55%" :title="$t('basicData.addglass')" > |
| | | <div style="margin-left: -50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="150px"> |
| | | <el-form label-width="100px" label-position="right"> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('film.widtha')" :required="true" style="width: 17vw;"> |
| | | <el-input :placeholder="$t('film.inwidth')" v-model="number" autocomplete="off" /> |
| | | <el-input :placeholder="$t('film.inwidth')" v-model="patternWidth" autocomplete="off" /> |
| | | </el-form-item> |
| | | </div></div> |
| | | </el-col> |
| | |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('film.heighta')" :required="true" style="width: 17vw;"> |
| | | <el-input :placeholder="$t('film.inheight')" v-model="number" autocomplete="off" /> |
| | | <el-input :placeholder="$t('film.inheight')" v-model="patternHeight" autocomplete="off" /> |
| | | </el-form-item></div> |
| | | </div> |
| | | </el-col> |
| | |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('film.thicknessa')" :required="true" style="width: 17vw;"> |
| | | <el-input :placeholder="$t('film.inthickness')" v-model="number" autocomplete="off" /> |
| | | <el-input :placeholder="$t('film.inthickness')" v-model="patternThickness" autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('film.filmsa')" :required="true" style="width: 17vw;"> |
| | | <el-input :placeholder="$t('film.infilms')" v-model="number" autocomplete="off" /> |
| | | <el-input :placeholder="$t('film.infilms')" v-model="filmsId" autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-col :span="6"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('film.quantitya')" :required="true" style="width: 17vw;"> |
| | | <el-input :placeholder="$t('film.inquantity')" v-model="number" autocomplete="off" /> |
| | | <el-form-item :label="$t('film.quantitya')" :required="true" style="width: 17vw;"> |
| | | <el-input :placeholder="$t('film.inquantity')" v-model="remainQuantity" autocomplete="off" /> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | <el-col :span="9"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <div> |
| | | <el-form-item :label="$t('film.inwarehousing')" :required="true" style="width: 17vw"> |
| | | <el-select :placeholder="$t('film.selectwarehousing')"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | <el-select |
| | | :placeholder="$t('film.selectwarehousing')" |
| | | style="width: 270px" |
| | | v-model="slot"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item></div> |
| | | </div> |
| | | </el-form-item></div></div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | <el-button type="primary" @click="handleConfirma"> |
| | | {{ $t('basicData.confirm') }} |
| | | </el-button> |
| | | <el-button @click="dialogFormVisibleb = false">{{ $t('basicData.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogFormVisiblec" top="21vh" width="40%"> |
| | | <div style="margin-left: 50px;margin-top: 10px;margin-bottom: 10px;"> |
| | | <el-form size="mini" label-width="100px"> |
| | |
| | | </div> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleConfirm"> |
| | | <el-button type="primary" @click="handleConfirmb"> |
| | | {{ $t('reportWork.sure') }} |
| | | </el-button> |
| | | <el-button @click="dialogFormVisiblec = false">{{ $t('reportWork.cancel') }}</el-button> |