소스 검색

发布失败

quwangxin 2 년 전
부모
커밋
7c0e55d899

+ 1 - 2
src/views/materialPlan/components/materialPlan-search.vue

@@ -35,8 +35,7 @@
             range-separator="至"
             start-placeholder="开始日期"
             end-placeholder="结束日期"
-            value-format="yyyy-MM-dd HH:mm:ss"
-            :default-time="['00:00:00', '23:59:59']"
+            value-format="yyyy-MM-dd"
           >
           </el-date-picker>
         </el-form-item>

+ 1 - 1
src/views/materialPlan/components/plan-edit-dialog.vue

@@ -50,7 +50,7 @@
               v-model="formData.deliveryTime"
               type="date"
               placeholder="选择日期"
-              value-format="yyyy-MM-dd HH:mm:ss"
+              value-format="yyyy-MM-dd"
             >
             </el-date-picker>
           </el-form-item>

+ 14 - 7
src/views/materialPlan/index.vue

@@ -32,6 +32,11 @@
             {{ row.code }}
           </el-link>
         </template>
+        <template v-slot:status="{ row }">
+          <span :class="{ 'ele-text-danger': row.status == 3 }">
+            {{ statusFormatter(row.status) }}
+          </span>
+        </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
@@ -190,15 +195,10 @@
               ]
             : []),
           {
-            prop: 'status',
             label: '状态',
             align: 'center',
-            formatter: (row) => {
-              const obj = this.statusOpt[this.activeName].find(
-                (i) => i.value == row.status
-              );
-              return obj && obj.label;
-            }
+            slot: 'status',
+            action: 'status'
           },
           {
             prop: 'createUserName',
@@ -236,6 +236,13 @@
       }
     },
     methods: {
+      statusFormatter (status) {
+        const obj = this.statusOpt[this.activeName].find(
+          (i) => i.value == status
+        );
+
+        return obj && obj.label;
+      },
       /* 表格数据源 */
       datasource ({ page, limit, where, order }) {
         return getList({

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

@@ -27,6 +27,12 @@
             {{ row.code }}
           </el-link>
         </template>
+
+        <template v-slot:status="{ row }">
+          <span :class="{ 'ele-text-danger': row.status == 3 }">
+            {{ statusFormatter(row.status) }}
+          </span>
+        </template>
         <!-- 操作列 -->
         <template v-slot:action="{ row }">
           <el-link
@@ -249,10 +255,9 @@
             minWidth: 110
           },
           {
-            prop: 'status',
+            slot: 'status',
             label: '状态',
             align: 'center',
-            minWidth: 110,
             formatter: (row) => {
               const obj = this.statusOpt[this.activeName].find(
                 (i) => i.value == row.status
@@ -289,6 +294,13 @@
       }
     },
     methods: {
+      statusFormatter (status) {
+        const obj = this.statusOpt[this.activeName].find(
+          (i) => i.value == status
+        );
+
+        return obj && obj.label;
+      },
       /* 表格数据源 */
       datasource ({ page, limit, where }) {
         return getList({