Pārlūkot izejas kodu

工位任务更改及计量更改

qinhb 1 gadu atpakaļ
vecāks
revīzija
1cca0e69fd

+ 7 - 0
src/api/station/index.ts

@@ -29,3 +29,10 @@ export function addStationDevice(data: StationDevice) {
     data: data,
   });
 }
+
+export function queryStationByLineId(lineId: any) {
+  return request({
+    url: "/api/v1/base/station/queryStationByLineId/"+lineId,
+    method: "get",
+  });
+}

+ 22 - 0
src/views/device/metering/index.vue

@@ -33,6 +33,14 @@
                    type="primary"
                    :size="size">计量</el-button>
       </template>
+      <template #menu-right="{}">
+        <el-button
+            class="ml-3"
+            @click="exportData('/api/v1/device/export')"
+        >
+          <template #icon> <i-ep-download /> </template>导出
+        </el-button>
+      </template>
     </avue-crud>
     <el-dialog
         v-model="dialog.visible"
@@ -232,6 +240,20 @@ option.value = Object.assign(option.value, {
       overHidden: true,
     },
     {
+      label: "计量日期",
+      prop: "meteringSearch",
+      width: 160,
+      type: 'daterange',
+      searchRange: true,
+      hide: true,
+      startPlaceholder: '开始范围',
+      endPlaceholder: '结束范围',
+      format: 'YYYY-MM-DD',
+      valueFormat: 'YYYY-MM-DD',
+      overHidden: true,
+      search: true
+    },
+    {
       label: "设备类型",
       prop: "deviceType",
       type: "select",

+ 20 - 4
src/views/plan/schedule/index.vue

@@ -36,7 +36,7 @@
 import { ref } from "vue";
 import { useCrud } from "@/hooks/userCrud";
 import dictDataUtil from "@/common/configs/dictDataUtil";
-
+import {queryStationByLineId} from "@/api/station"
 import { useDictionaryStoreHook } from "@/store";
 import { getStatistics } from "@/api/order/index";
 import * as echarts from "echarts";
@@ -55,9 +55,12 @@ const { selectionChange, multipleDelete } = Methords; //选中和批量删除事
 const { checkBtnPerm, downloadTemplate, exportData } = Utils; //按钮权限等工具
 
 const crudRef = ref(null); //crudRef.value 获取avue-crud对象
-
+const stationList = ref([])
 const charts = ref(null);
 const handleEdit =(row,index) =>{
+  queryStationByLineId(row.productLineId).then((data)=>{
+    stationList.value = data.data
+  })
   crudRef.value && crudRef.value.rowEdit(row, index);
 }
 onMounted(() => {
@@ -119,7 +122,21 @@ option.value = Object.assign(option.value, {
       label: "工位名称",
       prop: "stationName",
       search: true,
-      editDisabled: true,
+      display: false,
+    },
+    {
+      label: "工位名称",
+      hide: true,
+      editDisabled: false,
+      type: 'select',
+      dicData: stationList,
+      prop: "stationId",
+      props: { label: "name", value: "id" },
+      rules: [{
+        required: true,
+        message: "请选择工位名称",
+        trigger: "blur"
+      }],
     },
     {
       label: "工单编码",
@@ -128,7 +145,6 @@ option.value = Object.assign(option.value, {
       width: 125,
       editDisabled: true,
     },
-
     {
       label: "产线名称",
       prop: "productLineName",