Explorar o código

部分bug解决

cz hai 1 ano
pai
achega
78ab158436

+ 12 - 13
src/views/EHSD/saleContract/contractEHSD/index.vue

@@ -94,10 +94,10 @@
         </template>
         <template #prodDeliveryPeriod="{ item }">
           <div style="width: 100%;display:flex;align-items:center">
-            <el-icon v-if="item.orderDistributeStatus==1 && item.prodDeliveryPeriod" :size="16" style="cursor:pointer;margin-right: 8px;"
+            <!-- <el-icon v-if="item.orderDistributeStatus==1 && item.prodDeliveryPeriod" :size="16" style="cursor:pointer;margin-right: 8px;"
                      color="#409EFF" @click="clickDistributeProduction(item)">
               <Edit />
-            </el-icon>
+            </el-icon> -->
             <div v-if="item.prodDeliveryPeriod">
               {{item.prodDeliveryPeriod.slice(0,10)}}
             </div>
@@ -644,10 +644,9 @@ const config = computed(() => {
       attrs: {
         label: "生产交期",
         slot: "prodDeliveryPeriod",
-        width: 130,
+        width: 100,
       },
     },
-
     {
       attrs: {
         label: "下发生产时间",
@@ -655,14 +654,7 @@ const config = computed(() => {
         width: 160,
       },
     },
-    {
-      attrs: {
-        label: "合同金额",
-        slot: "amount",
-        width: 140,
-        align: "right",
-      },
-    },
+
     {
       attrs: {
         label: "生产指示",
@@ -749,7 +741,14 @@ const config = computed(() => {
         }
       },
     },
-
+    {
+      attrs: {
+        label: "合同金额",
+        slot: "amount",
+        width: 140,
+        align: "right",
+      },
+    },
     {
       attrs: {
         label: "累计收款金额",

+ 1 - 1
src/views/MES/productionBoard/workshop/index.vue

@@ -53,7 +53,7 @@
               <tr style="background:#243B6D">
                 <th style="width:60px">NO.</th>
                 <th style="width:60px">工序</th>
-                <th style="width:120px">订单号</th>
+                <th style="width:140px">订单号</th>
                 <th>产品编码</th>
                 <th>产品名称</th>
                 <th style="width:100px">尺寸(cm)</th>

+ 9 - 5
src/views/MES/productionOrder/index.vue

@@ -283,10 +283,10 @@
               </el-table-column>
               <el-table-column prop="materialCode" label="物料编码" width="200" />
               <el-table-column prop="materialName" label="物料名称" min-width="150" />
-              <el-table-column prop="quantity" label="应发数量" width="100" />
-              <el-table-column prop="unclaimedQuantity" label="未领数量" width="100" />
-              <el-table-column prop="receivedQuantity" label="已领数量" width="100" />
-              <el-table-column prop="workshopInventoryQuantity" label="车间结存" width="100">
+              <el-table-column prop="quantity" label="应发数量" width="150" />
+              <el-table-column prop="unclaimedQuantity" label="未领数量" width="150" />
+              <el-table-column prop="receivedQuantity" label="已领数量" width="150" />
+              <el-table-column prop="workshopInventoryQuantity" label="车间结存" width="150">
                 <template #default="{ row, $index }">
                   <div style="color:red">
                     {{row.workshopInventoryQuantity}}
@@ -318,6 +318,9 @@ const { proxy } = getCurrentInstance();
 const contractTag = computed(
   () => proxy.useUserStore().allDict["contract_prod_tag"]
 );
+const frontLinesData = computed(
+  () => proxy.useUserStore().allDict["front_lines"]
+);
 const companyData = ref([]);
 const loading = ref(false);
 const submitLoading = ref(false);
@@ -1001,11 +1004,12 @@ const getFileData = () => {
 };
 
 const lookDetails = (item) => {
+  activeName.value = "1";
   proxy.post("/contract/detail", { id: item.contractId }).then(async (res) => {
     formData.orderData = res;
     dialogVisible.value = true;
     proxy
-      .post("/produceOrder/materialBalanceList", { id: item.contractId })
+      .post("/produceOrder/materialBalanceList", { id: item.id })
       .then((sonRes) => {
         formData.orderData.materialList = sonRes;
         if (sonRes && sonRes.length > 0) {

+ 76 - 43
src/views/MES/productionTask/index.vue

@@ -1,11 +1,15 @@
 <template>
-  <div class="pageIndexClass  a">
+  <div class="pageIndexClass">
     <byTable :hideTable="true" :hidePagination="true" :config="[]" highlight-current-row :selectConfig="selectConfig"
              :pagination="sourceList.pagination" :action-list="[ {
-                text: '打印任务单',
+                text: '排程',
+                action: () => addScheduling('add'),
+                disabled: ['1','2','3','4'].includes(pageActiveName),
+              } ,{
+                text: '打印',
                 action: () => openModal('add'),
                 disabled: selectIds.length==0,
-              }]" @get-list="getList">
+              }]" @get-list="handleSearch">
     </byTable>
 
     <div style="background:#fff">
@@ -14,7 +18,7 @@
           <template #label>
             <div style="display:flex;align-items:center">
               <div>在手任务</div>
-              <div class="badge">{{taskCountObj['onHandCount'] || 0}}</div>
+              <div class="badge" v-if="taskCountObj['onHandCount']">{{taskCountObj['onHandCount'] || 0}}</div>
             </div>
           </template>
         </el-tab-pane>
@@ -22,7 +26,7 @@
           <template #label>
             <div style="display:flex;align-items:center">
               <div>已完成</div>
-              <div class="badge">{{taskCountObj['completedCount'] || 0}}</div>
+              <div class="badge" v-if="taskCountObj['completedCount']">{{taskCountObj['completedCount'] || 0}}</div>
             </div>
           </template>
 
@@ -31,7 +35,7 @@
           <template #label>
             <div style="display:flex;align-items:center">
               <div>所有任务</div>
-              <div class="badge">{{taskCountObj['allCount'] || 0}}</div>
+              <div class="badge" v-if="taskCountObj['allCount']">{{taskCountObj['allCount'] || 0}}</div>
             </div>
           </template>
         </el-tab-pane>
@@ -39,7 +43,7 @@
           <template #label>
             <div style="display:flex;align-items:center">
               <div>车间工序结存</div>
-              <div class="badge">{{taskCountObj['balanceCount'] || 0}}</div>
+              <div class="badge" v-if="taskCountObj['balanceCount']">{{taskCountObj['balanceCount'] || 0}}</div>
             </div>
           </template>
 
@@ -52,7 +56,7 @@
               </el-badge> -->
               <div>
                 {{item.name}} </div>
-              <div class="badge">{{Number(taskCountObj[item.id])||0}}</div>
+              <div class="badge" v-if="Number(taskCountObj[item.id])>0">{{Number(taskCountObj[item.id])||0}}</div>
             </div>
           </template>
         </el-tab-pane>
@@ -176,8 +180,8 @@
     </div>
 
     <div v-else>
-      <byTable :source="sourceListOne.data" :otherHeight="65" :pagination="sourceListOne.pagination" :config="configOne" :loading="loading"
-               highlight-current-row :selectConfig="selectConfigOne" :action-list="[{
+      <byTable :hideSearch="true" :source="sourceListOne.data" :otherHeight="80" :pagination="sourceListOne.pagination" :config="configOne"
+               :loading="loading" highlight-current-row :selectConfig="selectConfigOne" :action-list="[{
                 text: '排程',
                 action: () => addScheduling('add'),
                 disabled: false,
@@ -207,6 +211,7 @@
             <span>{{ item.productWidth }}</span>*
             <span>{{ item.productHeight }}</span>
           </div>
+          <div v-else></div>
         </template>
 
         <template #isOverdue="{item}">
@@ -577,11 +582,6 @@ const handlePageTabChange = (val) => {
   } else {
     sourceList.value.pagination.isScheduling = "";
   }
-  if (val == "2") {
-    sourceList.value.pagination.produceStatus = "2,5,10";
-  } else {
-    sourceList.value.pagination.produceStatus = "";
-  }
   switch (val) {
     case "1":
       break;
@@ -593,6 +593,7 @@ const handlePageTabChange = (val) => {
       break;
     default:
       getTableList();
+      getTaskCount();
       break;
   }
   if (["1", "2", "3", "4"].includes(val)) {
@@ -616,6 +617,7 @@ const sourceList = ref({
     endTime: "",
     isOverdue: "",
     isScheduling: "0",
+    schedulingDate: "",
   },
 });
 const treeData = ref([]);
@@ -714,13 +716,24 @@ const selectConfig = computed(() => [
     placeholderOne: "结束日期",
     propOne: "endDeliveryPeriod",
   },
+  // {
+  //   type: "time",
+  //   label: "下单日期",
+  //   placeholder: "开始日期",
+  //   prop: "beginTime",
+  //   placeholderOne: "结束日期",
+  //   propOne: "endTime",
+  // },
   {
     type: "time",
-    label: "下单日期",
-    placeholder: "开始日期",
-    prop: "beginTime",
-    placeholderOne: "结束日期",
-    propOne: "endTime",
+    label: "排程日期",
+    placeholder: "排程日期",
+    prop: "schedulingDate",
+    placeholderOne: "",
+    propOne: "",
+    fn: () => {
+      getTableList();
+    },
   },
 ]);
 const config = ref([
@@ -969,6 +982,8 @@ const sourceListOne = ref({
 sourceListOne.value.pagination.schedulingDate = moment().format(
   "yyyy-MM-DD HH:mm:ss"
 );
+sourceList.value.pagination.schedulingDate =
+  sourceListOne.value.pagination.schedulingDate;
 
 const selectConfigOne = computed(() => [
   {
@@ -1134,14 +1149,17 @@ const rules = ref({
 });
 
 const getTableList = (req) => {
-  sourceListOne.value.pagination = {
-    ...sourceListOne.value.pagination,
-    ...req,
-  };
-  sourceListOne.value.pagination.processesId = pageActiveName.value;
+  // sourceListOne.value.pagination = {
+  //   ...sourceListOne.value.pagination,
+  //   ...req,
+  // };
+  if (pageActiveName.value == "2") {
+    sourceList.value.pagination.produceStatus = "2,5,10";
+  }
+  sourceList.value.pagination.processesId = pageActiveName.value;
   loading.value = true;
   proxy
-    .post("/productionScheduling/page", sourceListOne.value.pagination)
+    .post("/productionScheduling/page", sourceList.value.pagination)
     .then((res) => {
       sourceListOne.value.data = res.rows;
       sourceListOne.value.pagination.total = res.total;
@@ -1152,15 +1170,23 @@ const getTableList = (req) => {
 };
 
 const taskCountObj = ref({});
-const getTaskCount = () => {
-  proxy.post("/produceOrderDetail/taskCount").then((res) => {
-    taskCountObj.value = res;
-  });
+const getTaskCount = (req) => {
+  if (pageActiveName.value == "2") {
+    sourceList.value.pagination.produceStatus = "2,5,10";
+  }
+  proxy
+    .post("/produceOrderDetail/taskCount", sourceList.value.pagination)
+    .then((res) => {
+      taskCountObj.value = res;
+    });
 };
 getTaskCount();
 
-const getList = async (req) => {
-  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+const getList = async () => {
+  // sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  if (pageActiveName.value == "2") {
+    sourceList.value.pagination.produceStatus = "2,5,10";
+  }
   loading.value = true;
   proxy
     .post("/produceOrderDetail/page", sourceList.value.pagination)
@@ -1239,6 +1265,13 @@ const getList = async (req) => {
     });
 };
 
+const handleSearch = (req) => {
+  sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
+  getList();
+  getTableList();
+  getTaskCount();
+};
+
 const printList = ref([]);
 
 const selectIds = ref([]);
@@ -1646,7 +1679,7 @@ const selectTask = (row) => {
       ),
       quantity: null,
     });
-    openSelectTask.value = false;
+    // openSelectTask.value = false;
     return proxy.msgTip("选择成功");
   }
   return proxy.msgTip("该任务已选择", 2);
@@ -1764,16 +1797,16 @@ const submitFormOne = () => {
     padding: 0px !important;
   }
 }
-.el-tabs__nav-wrap,
-.el-tabs__nav-scroll {
-  overflow: visible !important;
-}
-::v-deep(.el-tabs__nav-wrap) {
-  overflow: visible !important;
-}
-::v-deep(.el-tabs__nav-scroll) {
-  overflow: visible !important;
-}
+// .el-tabs__nav-wrap,
+// .el-tabs__nav-scroll {
+//   overflow: visible !important;
+// }
+// ::v-deep(.el-tabs__nav-wrap) {
+//   overflow: visible !important;
+// }
+// ::v-deep(.el-tabs__nav-scroll) {
+//   overflow: visible !important;
+// }
 .badge {
   padding: 6px;
   font-size: 12px;