ソースを参照

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend-aps into dev

quwangxin 2 年 前
コミット
3955c1bd08

+ 1 - 1
src/api/productionPlan/order.js

@@ -15,7 +15,7 @@ export async function release (data) {
  * 工单发布
  */
 export async function getDeviceList ({ productionId }) {
-  const res = await request.get(`/aps/workorder/getDeviceList/${productionId}`);
+  const res = await request.get(`/aps/batchingworkorder/getDeviceList/${productionId}`);
   if (res.data.code == 0) {
     return res.data.data;
   }

+ 12 - 1
src/api/saleOrder/index.js

@@ -112,7 +112,7 @@ export async function createOrUpdate (data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-// 获取生产版本
+// 销售订单获取生产版本
 export async function getProductVersion (code) {
   const res = await request.get(
     `/aps/productionplan/getProductVersion/${code}`
@@ -123,6 +123,17 @@ export async function getProductVersion (code) {
   return Promise.reject(new Error(res.data.message));
 }
 
+// 配料计划获取生产版本
+export async function getPlanProductVersion (code) {
+  const res = await request.get(
+    `/aps/batchingplan/getProductVersion/${code}`
+  );
+  if (res.data.code == 0) {
+    return res.data.data || [];
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
 // 获取订单详情
 export async function getOrderDetail (code) {
   const res = await request.get(`/aps/salesorder/getByCode/${code}`);

+ 6 - 5
src/components/CreatePlan/ProductionVersion.vue

@@ -60,7 +60,7 @@
 </template>
 
 <script>
-  import { getProductVersion } from '@/api/saleOrder';
+  import { getProductVersion , getPlanProductVersion } from '@/api/saleOrder';
   export default {
     props: {
       productCode: String
@@ -77,12 +77,13 @@
     computed: {},
     created () {},
     methods: {
-      open () {
+      open (from) {
         this.visible = true;
-        this.getPageList();
+        this.getPageList(from);
       },
-      getPageList () {
-        getProductVersion(this.productCode).then((res) => {
+      getPageList (from) {
+		const getFn = from?getPlanProductVersion:getProductVersion
+        getFn(this.productCode).then((res) => {
           this.tableData = res;
         });
       },

+ 32 - 12
src/views/materialPlan/components/detail/plan.vue

@@ -45,21 +45,31 @@
     <div class="progress-wrapper">
       <div class="progress-item">
         <div class="label"> 已生产重量 </div>
-        <el-progress
-          :percentage="(infoData.completeWeightRatio || 0) * 100"
-          color="rgba(0, 191, 191, 1)"
-          :text-inside="true"
-          :stroke-width="16"
-        ></el-progress>
+        <div class="item-percent">
+			<el-progress
+			  :percentage="(infoData.completeWeightRatio || 0) * 100"
+			  color="rgba(0, 191, 191, 1)"
+			  :text-inside="true"
+			  :stroke-width="16"
+			></el-progress>
+			<div class="percent-num">
+				{{productionPlan.completeNum?productionPlan.completeNum:0}}/{{productionPlan.num}}
+			</div>
+		</div>	
       </div>
       <div class="progress-item">
         <div class="label"> 已完成工单 </div>
-        <el-progress
-          :percentage="(infoData.completeOrderRatio || 0) * 100"
-          color="rgba(2, 125, 180, 1)"
-          :text-inside="true"
-          :stroke-width="16"
-        ></el-progress>
+		<div class="item-percent">
+			<el-progress
+			  :percentage="(infoData.completeOrderRatio || 0) * 100"
+			  color="rgba(2, 125, 180, 1)"
+			  :text-inside="true"
+			  :stroke-width="16"
+			></el-progress>
+			<div class="percent-num">
+				{{infoData.completeOrder}}/{{infoData.orderNum?infoData.orderNum:0}}
+			</div>
+		</div>
       </div>
     </div>
 
@@ -151,6 +161,16 @@
       .el-progress {
         flex: 1;
       }
+	  .item-percent{
+		  flex: 1;
+		  display: flex;
+		  justify-content: space-between;
+		  .percent-num{
+			  margin-left: 20px;
+			  width: 120px;
+			  text-align: left;
+		  }
+	  }
     }
   }
 </style>

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

@@ -226,7 +226,7 @@
         if (!this.formData.materialName) {
           return this.$message.error('请选择物料');
         }
-        this.$refs.versionRef.open();
+        this.$refs.versionRef.open(1);
       }
     }
   };

+ 23 - 10
src/views/materialPlan/index.vue

@@ -132,17 +132,21 @@
             prop: 'code',
             action: 'code',
             label: '计划编号',
-            align: 'center'
+            align: 'center',
+			width: 200
           },
           {
             prop: 'materialCode',
             label: '编号',
-            align: 'center'
+            align: 'center',
+			width: 150
           },
           {
             prop: 'materialName',
             label: '物料名称',
-            align: 'center'
+            align: 'center',
+			showOverflowTooltip: true,
+			minWidth: 110
           },
           {
             prop: 'brandNo',
@@ -155,14 +159,18 @@
               this.activeName === 'second'
                 ? '计划生产重量(KG)'
                 : '生产重量(KG)',
-            align: 'center'
+            align: 'center',
+			showOverflowTooltip: true,
+			minWidth: 150
           },
           ...(this.activeName === 'second'
             ? [
                 {
-                  prop: 'releaseTime',
+                  prop: 'producedWeight',
                   label: '已生产重量(KG)',
-                  align: 'center'
+                  align: 'center',
+				  showOverflowTooltip: true,
+				  minWidth: 150
                 }
               ]
             : []),
@@ -183,14 +191,18 @@
           {
             prop: 'deliveryTime',
             label: '要求交付日期',
-            align: 'center'
+            align: 'center',
+			showOverflowTooltip: true,
+			minWidth: 110
           },
           ...(this.activeName === 'second'
             ? [
                 {
                   prop: 'completeTime',
                   label: '实际完成时间',
-                  align: 'center'
+                  align: 'center',
+				  showOverflowTooltip: true,
+				  minWidth: 110
                 }
               ]
             : []),
@@ -208,7 +220,8 @@
           {
             prop: 'createTime',
             label: '创建时间',
-            align: 'center'
+            align: 'center',
+			width: 160
           },
           ...(this.activeName === 'second'
             ? [
@@ -224,7 +237,7 @@
                 {
                   columnKey: 'action',
                   label: '操作',
-                  width: 350,
+                  width: 250,
                   align: 'center',
                   resizable: false,
                   fixed: 'right',