wukai пре 4 месеци
родитељ
комит
93545744b7
2 измењених фајлова са 52 додато и 70 уклоњено
  1. 46 64
      src/views/ws/calc/index.vue
  2. 6 6
      src/views/ws/workshop/index.vue

+ 46 - 64
src/views/ws/calc/index.vue

@@ -1,21 +1,15 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="日期" prop="dataDate">
-        <el-date-picker clearable
-                        v-model="queryParams.dataDate"
-                        type="date"
-                        value-format="YYYY-MM-DD"
-                        placeholder="请选择日期">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="车间ID" prop="wsId">
-        <el-input
-            v-model="queryParams.wsId"
-            placeholder="请输入车间ID"
-            clearable
-            @keyup.enter="handleQuery"
-        />
+      <el-form-item label="日期" style="width: 308px">
+        <el-date-picker
+            v-model="daterangeDataDate"
+            value-format="YYYY-MM-DD"
+            type="daterange"
+            range-separator="-"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+        ></el-date-picker>
       </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@@ -24,68 +18,49 @@
     </el-form>
 
     <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-            type="primary"
-            plain
-            icon="Plus"
-            @click="handleAdd"
-            v-hasPermi="['ws:calc:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-            type="success"
-            plain
-            icon="Edit"
-            :disabled="single"
-            @click="handleUpdate"
-            v-hasPermi="['ws:calc:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-            type="danger"
-            plain
-            icon="Delete"
-            :disabled="multiple"
-            @click="handleDelete"
-            v-hasPermi="['ws:calc:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-            type="warning"
-            plain
-            icon="Download"
-            @click="handleExport"
-            v-hasPermi="['ws:calc:export']"
-        >导出</el-button>
-      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--            type="danger"-->
+<!--            plain-->
+<!--            icon="Delete"-->
+<!--            :disabled="multiple"-->
+<!--            @click="handleDelete"-->
+<!--            v-hasPermi="['ws:calc:remove']"-->
+<!--        >删除</el-button>-->
+<!--      </el-col>-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--            type="warning"-->
+<!--            plain-->
+<!--            icon="Download"-->
+<!--            @click="handleExport"-->
+<!--            v-hasPermi="['ws:calc:export']"-->
+<!--        >导出</el-button>-->
+<!--      </el-col>-->
       <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="calcList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="统计ID" align="center" prop="calcId" />
+<!--      <el-table-column label="统计ID" align="center" prop="calcId" />-->
       <el-table-column label="日期" align="center" prop="dataDate" width="180">
         <template #default="scope">
           <span>{{ parseTime(scope.row.dataDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="车间ID" align="center" prop="wsId" />
+      <el-table-column label="用能" align="center" prop="wsName" />
       <el-table-column label="总价格" align="center" prop="totalPrice" />
       <el-table-column label="A班价格" align="center" prop="aPrice" />
       <el-table-column label="B班价格" align="center" prop="bPrice" />
-      <el-table-column label="总" align="center" prop="totalValue" />
-      <el-table-column label="A班统计" align="center" prop="aValue" />
-      <el-table-column label="B班统计" align="center" prop="bValue" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
-        <template #default="scope">
-          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['ws:calc:edit']">修改</el-button>
-          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['ws:calc:remove']">删除</el-button>
-        </template>
-      </el-table-column>
+      <el-table-column label="总用能" align="center" prop="totalValue" />
+      <el-table-column label="A班用能" align="center" prop="aValue" />
+      <el-table-column label="B班用能" align="center" prop="bValue" />
+<!--      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
+<!--        <template #default="scope">-->
+<!--          <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['ws:calc:edit']">修改</el-button>-->
+<!--          <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['ws:calc:remove']">删除</el-button>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
     </el-table>
 
     <pagination
@@ -153,6 +128,7 @@ const single = ref(true);
 const multiple = ref(true);
 const total = ref(0);
 const title = ref("");
+const daterangeDataDate = ref([]);
 
 const data = reactive({
   form: {},
@@ -177,6 +153,11 @@ const { queryParams, form, rules } = toRefs(data);
 /** 查询能源统计列表 */
 function getList() {
   loading.value = true;
+  queryParams.value.params = {};
+  if (null != daterangeDataDate && '' != daterangeDataDate) {
+    queryParams.value.params["beginDataDate"] = daterangeDataDate.value[0];
+    queryParams.value.params["endDataDate"] = daterangeDataDate.value[1];
+  }
   listCalc(queryParams.value).then(response => {
     calcList.value = response.rows;
     total.value = response.total;
@@ -214,6 +195,7 @@ function handleQuery() {
 
 /** 重置按钮操作 */
 function resetQuery() {
+  daterangeDataDate.value = [];
   proxy.resetForm("queryRef");
   handleQuery();
 }

+ 6 - 6
src/views/ws/workshop/index.vue

@@ -1,18 +1,18 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="车间编码" prop="wsCode">
+      <el-form-item label="编码" prop="wsCode">
         <el-input
             v-model="queryParams.wsCode"
-            placeholder="请输入车间编码"
+            placeholder="请输入编码"
             clearable
             @keyup.enter="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="车间名称" prop="wsName">
+      <el-form-item label="用能名称" prop="wsName">
         <el-input
             v-model="queryParams.wsName"
-            placeholder="请输入车间名称"
+            placeholder="请输入用能名称"
             clearable
             @keyup.enter="handleQuery"
         />
@@ -64,8 +64,8 @@
     <el-table v-loading="loading" :data="workshopList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
 <!--      <el-table-column label="车间ID" align="center" prop="wsId" />-->
-      <el-table-column label="车间编码" align="center" prop="wsCode" />
-      <el-table-column label="车间名称" align="center" prop="wsName" />
+      <el-table-column label="编码" align="center" prop="wsCode" />
+      <el-table-column label="用能名称" align="center" prop="wsName" />
       <el-table-column label="备注" align="center" prop="remark" />
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template #default="scope">