Преглед на файлове

调整多个页面表格高度和分页设置,优化销售订单日期校验

yusheng преди 8 месеца
родител
ревизия
3094173dc2

+ 3 - 1
src/views/cuttingPlan/index.vue

@@ -17,8 +17,10 @@
         :datasource="datasource"
         @columns-change="handleColumnChange"
         :cacheKey="cacheKeyUrl"
-        :pageSize="20"
         :pageSizes="[20, 30, 40, 50, 100]"
+           height="calc(100vh - 350px)"
+        full-height="calc(100vh - 116px)"
+        :page-size="20"
       >
         <template v-slot:toolbar>
           <el-dropdown trigger="click" @command="handleClick">

+ 3 - 0
src/views/materialPlan/index.vue

@@ -20,6 +20,9 @@
         :pageSizes="[20, 30, 40, 50, 100]"
         @columns-change="handleColumnChange"
         :cacheKey="cacheKeyUrl"
+        height="calc(100vh - 350px)"
+        full-height="calc(100vh - 116px)"
+        :page-size="20"
       >
         <template v-slot:toolbar>
           <el-dropdown trigger="click" @command="handleClick">

+ 3 - 0
src/views/materialPlan/pickPlan.vue

@@ -17,6 +17,9 @@
         :datasource="datasource"
         @columns-change="handleColumnChange"
         :cacheKey="cacheKeyUrl"
+           height="calc(100vh - 350px)"
+        full-height="calc(100vh - 116px)"
+        :page-size="20"
       >
         <template v-slot:toolbar>
           <el-button type="primary" @click="handleEdit('add')"

+ 3 - 0
src/views/materialPlan/usePlan.vue

@@ -17,6 +17,9 @@
         :datasource="datasource"
         @columns-change="handleColumnChange"
         :cacheKey="cacheKeyUrl"
+           height="calc(100vh - 350px)"
+        full-height="calc(100vh - 116px)"
+        :page-size="20"
       >
         <template v-slot:toolbar>
           <el-button type="primary" @click="handleEdit('add')">新增</el-button>

+ 8 - 2
src/views/productionPlan/index.vue

@@ -146,6 +146,9 @@
         :parse-data="parseData"
         @update:selection="handleSelectionChange"
         @columns-change="handleColumnChange"
+        height="calc(100vh - 390px)"
+        full-height="calc(100vh - 116px)"
+        :page-size="20"
       >
         <template v-slot:batchNo="{ row }">
           <el-link type="primary" :underline="false">
@@ -213,7 +216,9 @@
         </template>
 
         <template v-slot:productNum="{ row }">
-          {{ row.productNum }} {{ row.unit }}
+          <span v-if="row.productNum">
+            {{ row.productNum }} {{ row.measuringUnit }}
+          </span>
         </template>
 
         <template v-slot:productWeight="{ row }">
@@ -221,7 +226,7 @@
         </template>
 
         <template v-slot:requiredFormingNum="{ row }">
-          {{ row.requiredFormingNum }} {{ row.unit }}
+          {{ row.requiredFormingNum }} {{ row.measuringUnit }}
         </template>
 
         <template v-slot:newSumOrderWeight="{ row }">
@@ -1221,6 +1226,7 @@
 
       //  计划分解
       disassemblePlan() {
+        console.log(this.selection, 'this.selection');
         if (this.selection.length != 1) {
           return this.$message.warning('计划分解只能选择一个计划!');
         }

+ 18 - 8
src/views/saleOrder/components/orderHomogeneityInspectDialog.vue

@@ -64,7 +64,7 @@
               </el-form-item>
             </el-col>
           </el-row>
-          <el-row :gutter="20" type="flex" style="flex-wrap: wrap">
+          <el-row :gutter="20">
             <el-col :span="6">
               <el-form-item label="编码:">
                 <el-input readonly v-model="orderInfo.productCode"></el-input>
@@ -80,7 +80,7 @@
                 <el-input readonly v-model="orderInfo.contractNum"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="6" v-if="produceType == 1">
               <el-form-item label="未发总数:">
                 <el-input
                   readonly
@@ -88,8 +88,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row :gutter="20" type="flex" style="flex-wrap: wrap">
+
             <el-col :span="6">
               <el-form-item label="库存数量:">
                 <el-input
@@ -98,7 +97,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="6" v-if="produceType == 1">
               <el-form-item label="在制总数:">
                 <el-input
                   readonly
@@ -106,7 +105,7 @@
                 ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :span="6">
+            <el-col :span="6" v-if="produceType == 1">
               <el-form-item label="最终缺料数量:">
                 <el-input
                   readonly
@@ -117,6 +116,11 @@
             <el-col :span="6">
               <el-form-item label="最终状态:">
                 <el-input
+                  :class="
+                    kitComInfo.finalFilledShortState == '缺料'
+                      ? 'statusRed'
+                      : 'statusGreen'
+                  "
                   readonly
                   v-model="kitComInfo.finalFilledShortState"
                 ></el-input>
@@ -969,11 +973,11 @@
       },
       // 结果数据处理
       resultProcess(result) {
-        this.datasourceList=[]
+        this.datasourceList = [];
         if (!result || result.length == 0) {
           this.baseCount = '';
           this.baseUnit = '';
-          this.datasourceAllList = []
+          this.datasourceAllList = [];
           return;
         }
         let first = result[0];
@@ -1123,10 +1127,16 @@
 
   .statusRed {
     color: red;
+    :deep(.el-input__inner) {
+      color: red;
+    }
   }
 
   .statusGreen {
     color: green;
+    :deep(.el-input__inner) {
+      color: green;
+    }
   }
 
   .left_tree {

+ 5 - 2
src/views/saleOrder/index.vue

@@ -24,12 +24,15 @@
         :initLoad="false"
         :datasource="datasource"
         :selection.sync="selection"
-        cache-key="systemRoleTable1"
         height="calc(100vh - 390px)"
+        full-height="calc(100vh - 116px)"
+
+        autoAmendPage
         row-key="id"
         @sort-change="onSortChange"
         @columns-change="handleColumnChange"
         :cacheKey="cacheKeyUrl"
+        :page-size="20"
       >
         <!--   :cache-key="cacheKeyUrl" -->
         <template v-slot:code="{ row }">
@@ -664,7 +667,7 @@
       /* 刷新表格 */
       reload(where) {
         this.$nextTick(() =>
-          this.$refs.table.reload({ page: 1, limit: 10, where })
+          this.$refs.table.reload({ page: 1, where })
         );
       },
 

+ 7 - 3
src/views/saleOrder/salesToProductionNewTwo.vue

@@ -635,7 +635,7 @@
                 label-width="0px"
                 :prop="'salesOrders.' + scope.$index + '.deliveryTime'"
                 :rules="{
-                  required: true,
+                  required: false,
                   message: '请选择客户期望交期',
                   trigger: 'blur'
                 }"
@@ -714,7 +714,6 @@
                       new Date(new Date().setHours(0, 0, 0, 0)).getTime()
                   }"
                   type="date"
-                  disabled
                   placeholder="选择日期"
                   value-format="yyyy-MM-dd"
                 >
@@ -1088,7 +1087,7 @@
       // 验证时间是否超期
       changeDate(item, i) {
         if (this.isTimeAGreaterThanB(item.deliveryTime, item.reqMoldTime)) {
-          this.$message.error('交付时间大于了要求完成日期');
+          this.$message.error('客户期望交期大于了要求完成日期');
         }
       },
       isTimeAGreaterThanB(timeA, timeB) {
@@ -1476,6 +1475,11 @@
           this.$message.warning('请选择工艺路线');
           return;
         }
+        if (!this.form.salesOrders[0]?.reqMoldTime) {
+          flag = false;
+          this.$message.warning('请选择要求完成日期');
+          return;
+        }
         return flag;
       },
       // 对比日期,计算要求生产重量

+ 3 - 0
src/views/workOrder/index.vue

@@ -41,6 +41,9 @@
         @columns-change="handleColumnChange"
         @select-all="selectAll"
         default-expand-all
+        height="calc(100vh - 390px)"
+        full-height="calc(100vh - 116px)"
+        :page-size="20"
       >
         <!-- :key="activeName" -->
         <!-- :selection.sync="selection" -->

+ 1 - 1
vue.config.js

@@ -38,7 +38,7 @@ module.exports = {
         // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.144:18086',
         // target: 'http://192.168.1.211:18086',
-        target: 'http://192.168.1.251:18186',
+        target: 'http://192.168.1.102:18086',
 
         // target: 'http://192.168.1.125:18086',