Bladeren bron

报工修改

cz 10 maanden geleden
bovenliggende
commit
df83841ec8
2 gewijzigde bestanden met toevoegingen van 105 en 47 verwijderingen
  1. 69 23
      src/views/MES/productionTask/index.vue
  2. 36 24
      src/views/MES/reportDetail/index.vue

+ 69 - 23
src/views/MES/productionTask/index.vue

@@ -224,7 +224,7 @@
                   {{showCotent(slotItem,item,'finishQuantity')}}
                   {{showCotent(slotItem,item,'finishQuantity')}}
                 </span>
                 </span>
               </el-tooltip>
               </el-tooltip>
-              <div v-else class="no-bk" @contextmenu="(e)=>handleContextmenu(slotItem,item,e)">
+              <div v-else class="no-bk">
                 -
                 -
               </div>
               </div>
             </div>
             </div>
@@ -233,7 +233,7 @@
               <div v-if="isShowCotent(slotItem,item)">
               <div v-if="isShowCotent(slotItem,item)">
                 {{showCotentOne(slotItem,item,'balanceQuantity') || `&nbsp`}}
                 {{showCotentOne(slotItem,item,'balanceQuantity') || `&nbsp`}}
               </div>
               </div>
-              <div v-else class="no-bk" @contextmenu="(e)=>handleContextmenu(slotItem,item,e)">
+              <div v-else class="no-bk">
                 -
                 -
               </div>
               </div>
             </div>
             </div>
@@ -361,7 +361,7 @@
                   {{showCotent(slotItem,item,'finishQuantity')}}
                   {{showCotent(slotItem,item,'finishQuantity')}}
                 </span>
                 </span>
               </el-tooltip>
               </el-tooltip>
-              <div v-else class="no-bk" @contextmenu="(e)=>handleContextmenu(slotItem,item,e)">
+              <div v-else class="no-bk">
                 -
                 -
               </div>
               </div>
             </div>
             </div>
@@ -370,7 +370,7 @@
               <div v-if="isShowCotent(slotItem,item)">
               <div v-if="isShowCotent(slotItem,item)">
                 {{showCotentOne(slotItem,item,'balanceQuantity') || `&nbsp`}}
                 {{showCotentOne(slotItem,item,'balanceQuantity') || `&nbsp`}}
               </div>
               </div>
-              <div v-else class="no-bk" @contextmenu="(e)=>handleContextmenu(slotItem,item,e)">
+              <div v-else class="no-bk">
                 -
                 -
               </div>
               </div>
             </div>
             </div>
@@ -386,17 +386,25 @@
           <el-table-column label="序号" type="index" width="50" align="center" fixed="left" />
           <el-table-column label="序号" type="index" width="50" align="center" fixed="left" />
           <el-table-column label="订单编号" prop="orderCode" width="120" fixed="left" />
           <el-table-column label="订单编号" prop="orderCode" width="120" fixed="left" />
           <el-table-column label="生产订单号" prop="code" width="120" fixed="left" />
           <el-table-column label="生产订单号" prop="code" width="120" fixed="left" />
-          <el-table-column label="是否逾期" width="70" align="center">
+          <!-- <el-table-column label="是否逾期" width="70" align="center">
             <template #default="{ row, $index }">
             <template #default="{ row, $index }">
               <span v-if="row.isOverdue=='1'" class="red"> 逾期 </span>
               <span v-if="row.isOverdue=='1'" class="red"> 逾期 </span>
               <span v-else> 未逾期 </span>
               <span v-else> 未逾期 </span>
             </template>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column label="客户" prop="customerName" min-width="160" />
           <el-table-column label="客户" prop="customerName" min-width="160" />
-          <el-table-column label="产品类别" prop="productClassifyNames" width="100" />
+          <!-- <el-table-column label="产品类别" prop="productClassifyNames" width="100" /> -->
           <el-table-column label="产品名称" prop="productName" width="150" />
           <el-table-column label="产品名称" prop="productName" width="150" />
+          <el-table-column label="产品尺寸(cm)" width="120">
+            <template #default="{ row, $index }">
+              {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
+            </template>
+          </el-table-column>
+          <el-table-column label="产品颜色" prop="productColor" width="140" />
           <el-table-column label="交期" prop="deliveryPeriod" width="80" :formatter="(row)=>row.deliveryPeriod.slice(0,10)" />
           <el-table-column label="交期" prop="deliveryPeriod" width="80" :formatter="(row)=>row.deliveryPeriod.slice(0,10)" />
           <el-table-column label="订单数" prop="quantity" width="70" align="right" />
           <el-table-column label="订单数" prop="quantity" width="70" align="right" />
+          <el-table-column label="已完成" prop="finishQuantity" width="70" align="right" />
+          <el-table-column label="欠量" prop="incomplete" width="70" align="right" />
           <el-table-column label="料况提醒" prop="shortageMaterials" width="70" align="center">
           <el-table-column label="料况提醒" prop="shortageMaterials" width="70" align="center">
             <template #default="{ row, $index }">
             <template #default="{ row, $index }">
               <span v-if="row.lackStatus=='1'" class="red" style="cursor:pointer" @click="lookDetail(row)">
               <span v-if="row.lackStatus=='1'" class="red" style="cursor:pointer" @click="lookDetail(row)">
@@ -896,10 +904,28 @@
     <el-dialog :title="'欠料明细'" v-model="shortageMaterialDialog" width="80%" destroy-on-close>
     <el-dialog :title="'欠料明细'" v-model="shortageMaterialDialog" width="80%" destroy-on-close>
       <el-tabs v-model="shortageMaterialTab" type="card" class="demo-tabs">
       <el-tabs v-model="shortageMaterialTab" type="card" class="demo-tabs">
         <el-tab-pane label="待采购" name="1">
         <el-tab-pane label="待采购" name="1">
+          <template #label>
+            <div style="display:flex;align-items:center">
+              <div>待采购</div>
+              <div class="badge" v-if="shortageMaterialData.data.waitPurchaseTotal">{{shortageMaterialData.data.waitPurchaseTotal}}</div>
+            </div>
+          </template>
         </el-tab-pane>
         </el-tab-pane>
         <el-tab-pane label="未到货" name="2">
         <el-tab-pane label="未到货" name="2">
+          <template #label>
+            <div style="display:flex;align-items:center">
+              <div>未到货</div>
+              <div class="badge" v-if="shortageMaterialData.data.undeliveredGoodsTotal">{{shortageMaterialData.data.undeliveredGoodsTotal}}</div>
+            </div>
+          </template>
         </el-tab-pane>
         </el-tab-pane>
         <el-tab-pane label="待入库" name="3">
         <el-tab-pane label="待入库" name="3">
+          <template #label>
+            <div style="display:flex;align-items:center">
+              <div>待入库</div>
+              <div class="badge" v-if="shortageMaterialData.data.waitInboundTotal">{{shortageMaterialData.data.waitInboundTotal}}</div>
+            </div>
+          </template>
         </el-tab-pane>
         </el-tab-pane>
       </el-tabs>
       </el-tabs>
       <div style="width: 100%" v-show="shortageMaterialTab=='1'">
       <div style="width: 100%" v-show="shortageMaterialTab=='1'">
@@ -935,10 +961,10 @@
           <el-table-column prop="code" label="采购单号" />
           <el-table-column prop="code" label="采购单号" />
           <el-table-column prop="sellCorporationName" label="供应商" />
           <el-table-column prop="sellCorporationName" label="供应商" />
           <el-table-column prop="deliveryTime" label="交付日期" />
           <el-table-column prop="deliveryTime" label="交付日期" />
-          <el-table-column prop="status" label="采购状态" :formatter="(row)=>dictValueLabel(row.status,purchaseStatus)" />
-          <el-table-column prop="userName" label="采购人" />
-          <el-table-column prop="createTime" label="采购时间" />
-          <el-table-column prop="arrivalStatus" label="到货状态" :formatter="(row)=>dictValueLabel(row.arrivalStatus,arrivalStatusData)" />
+          <el-table-column prop="status" label="采购状态" :formatter="(row)=>dictValueLabel(row.status,purchaseStatus)" width="100" />
+          <el-table-column prop="userName" label="采购人" width="100" />
+          <el-table-column prop="createTime" label="采购时间" width="160" />
+          <el-table-column prop="arrivalStatus" label="到货状态" :formatter="(row)=>dictValueLabel(row.arrivalStatus,arrivalStatusData)" width="100" />
         </el-table>
         </el-table>
       </div>
       </div>
 
 
@@ -956,15 +982,15 @@
           <!-- <el-table-column prop="productCategory" label="分类名称" /> -->
           <!-- <el-table-column prop="productCategory" label="分类名称" /> -->
           <el-table-column prop="productCustomCode" label="编码" width="200" />
           <el-table-column prop="productCustomCode" label="编码" width="200" />
           <el-table-column prop="productName" label="名称" min-width="150" />
           <el-table-column prop="productName" label="名称" min-width="150" />
-          <el-table-column label="规格尺寸 (cm)" width="150">
+          <el-table-column label="规格尺寸 (cm)" width="130">
             <template #default="{ row, $index }">
             <template #default="{ row, $index }">
               <div style="width: 100%">
               <div style="width: 100%">
                 {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
                 {{row.productLength}} * {{row.productWidth}} * {{row.productHeight}}
               </div>
               </div>
             </template>
             </template>
           </el-table-column>
           </el-table-column>
-          <el-table-column prop="productColor" label="颜色" width="170" />
-          <el-table-column prop="productUnit" label="单位" width="100" />
+          <el-table-column prop="productColor" label="颜色" width="150" />
+          <el-table-column prop="productUnit" label="单位" width="80" />
           <el-table-column prop="quantity" label="需入库数量" width="100" />
           <el-table-column prop="quantity" label="需入库数量" width="100" />
           <el-table-column prop="receiptQuantity" label="已入库数量" width="100" />
           <el-table-column prop="receiptQuantity" label="已入库数量" width="100" />
           <el-table-column prop="waitQuantity" label="待入库数量" width="100" />
           <el-table-column prop="waitQuantity" label="待入库数量" width="100" />
@@ -1480,7 +1506,13 @@ const config = ref([
       width: 100,
       width: 100,
     },
     },
   },
   },
-
+  {
+    attrs: {
+      label: "进度说明",
+      prop: "remark",
+      "min-width": 200,
+    },
+  },
   {
   {
     attrs: {
     attrs: {
       label: "出货交期",
       label: "出货交期",
@@ -1779,7 +1811,13 @@ const configCopy = ref([
       width: 100,
       width: 100,
     },
     },
   },
   },
-
+  {
+    attrs: {
+      label: "进度说明",
+      prop: "remark",
+      "min-width": 200,
+    },
+  },
   {
   {
     attrs: {
     attrs: {
       label: "出货交期",
       label: "出货交期",
@@ -2423,10 +2461,15 @@ const isShowCotent = (slot, item) => {
     let current = item.productionTaskProgressList.find(
     let current = item.productionTaskProgressList.find(
       (x) => x.processesId == slot.id
       (x) => x.processesId == slot.id
     );
     );
-    if (
-      current &&
-      (current.finishQuantity > 0 || current.balanceQuantity > 0)
-    ) {
+    // if (
+    //   current &&
+    //   (current.finishQuantity > 0 || current.balanceQuantity > 0)
+    // ) {
+    //   return true;
+    // } else {
+    //   return false;
+    // }
+    if (current) {
       return true;
       return true;
     } else {
     } else {
       return false;
       return false;
@@ -2455,9 +2498,9 @@ const showCotentTwo = (slot, item, att) => {
     );
     );
     if (current) {
     if (current) {
       return (
       return (
-        "已完成" +
+        "排程" +
         current["schedulingCount"] +
         current["schedulingCount"] +
-        " / 结存" +
+        " / 完成" +
         current["finishQuantity"]
         current["finishQuantity"]
       );
       );
     }
     }
@@ -2892,6 +2935,7 @@ const lookDetail = (row) => {
     .post("/subscribeDetail/page", { contractId, status: "15,30" })
     .post("/subscribeDetail/page", { contractId, status: "15,30" })
     .then((res) => {
     .then((res) => {
       shortageMaterialData.data.waitPurchase = res.rows;
       shortageMaterialData.data.waitPurchase = res.rows;
+      shortageMaterialData.data.waitPurchaseTotal = res.total;
       let productIds = res.rows.map((x) => x.productId);
       let productIds = res.rows.map((x) => x.productId);
       proxy.getFileData({
       proxy.getFileData({
         businessIdList: productIds,
         businessIdList: productIds,
@@ -2910,6 +2954,7 @@ const lookDetail = (row) => {
     })
     })
     .then((res) => {
     .then((res) => {
       shortageMaterialData.data.undeliveredGoods = res.rows;
       shortageMaterialData.data.undeliveredGoods = res.rows;
+      shortageMaterialData.data.undeliveredGoodsTotal = res.total;
     });
     });
 
 
   proxy.post("/stockWait/page", { contractId }).then((res) => {
   proxy.post("/stockWait/page", { contractId }).then((res) => {
@@ -2924,6 +2969,7 @@ const lookDetail = (row) => {
         arr.push(jele);
         arr.push(jele);
       }
       }
     }
     }
+    shortageMaterialData.data.waitInboundTotal = arr.length;
     shortageMaterialData.data.waitInbound = arr;
     shortageMaterialData.data.waitInbound = arr;
     let productIds = arr.map((x) => x.productId);
     let productIds = arr.map((x) => x.productId);
     proxy.getFileData({
     proxy.getFileData({
@@ -3101,7 +3147,7 @@ const getHistroyData = (req) => {
   // if (pageActiveName.value == "2") {
   // if (pageActiveName.value == "2") {
   //   sourceList.value.pagination.produceStatus = "2,5,10";
   //   sourceList.value.pagination.produceStatus = "2,5,10";
   // }
   // }
-  sourceList.value.pagination.processesId = processesActiveName.value;
+  sourceListOne.value.pagination.processesId = processesActiveName.value;
   loading.value = true;
   loading.value = true;
   proxy
   proxy
     .post("/productionScheduling/page", sourceListOne.value.pagination)
     .post("/productionScheduling/page", sourceListOne.value.pagination)

+ 36 - 24
src/views/MES/reportDetail/index.vue

@@ -176,29 +176,41 @@ const config = computed(() => {
       },
       },
     },
     },
 
 
-    // {
-    //   attrs: {
-    //     label: "操作",
-    //     width: "100",
-    //     align: "center",
-    //     fixed: "right",
-    //   },
-    //   renderHTML(row) {
-    //     return [
-    //       {
-    //         attrs: {
-    //           label: "完成订单",
-    //           type: "primary",
-    //           text: true,
-    //         },
-    //         el: "button",
-    //         click() {
-    //           getDtl(row);
-    //         },
-    //       },
-    //     ];
-    //   },
-    // },
+    {
+      attrs: {
+        label: "操作",
+        width: "100",
+        align: "center",
+        fixed: "right",
+      },
+      renderHTML(row) {
+        return [
+          {
+            attrs: {
+              label: "删除",
+              type: "danger",
+              text: true,
+            },
+            el: "button",
+            click() {
+              proxy
+                .msgConfirm()
+                .then((res) => {
+                  proxy
+                    .post("/productionReporting/delete", {
+                      id: row.id,
+                    })
+                    .then((res) => {
+                      proxy.msgTip("操作成功", 1);
+                      getList();
+                    });
+                })
+                .catch((err) => {});
+            },
+          },
+        ];
+      },
+    },
   ];
   ];
 });
 });
 const formData = reactive({
 const formData = reactive({
@@ -248,7 +260,7 @@ const getList = async (req) => {
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
   loading.value = true;
   loading.value = true;
   proxy
   proxy
-    .post("/productionReportingDetail/page", sourceList.value.pagination)
+    .post("/productionReporting/page", sourceList.value.pagination)
     .then((res) => {
     .then((res) => {
       sourceList.value.data = res.rows;
       sourceList.value.data = res.rows;
       sourceList.value.pagination.total = res.total;
       sourceList.value.pagination.total = res.total;