Przeglądaj źródła

生产版本bug修复提交

LAPTOP-16IUEB3P\Lenovo 2 lat temu
rodzic
commit
49a021347f

+ 3 - 1
src/components/CreatePlan/ProductionVersion.vue

@@ -63,7 +63,8 @@
   import { getProductVersion , getPlanProductVersion } from '@/api/saleOrder';
   export default {
     props: {
-      productCode: String
+      productCode: String,
+	  produceVersionId: String
     },
     data () {
       return {
@@ -79,6 +80,7 @@
     methods: {
       open (from) {
         this.visible = true;
+		this.radio = this.produceVersionId
         this.getPageList(from);
       },
       getPageList (from) {

+ 16 - 4
src/views/saleOrder/salesToProduction.vue

@@ -299,6 +299,7 @@
         ref="versionRefs"
         @confirm="confirmVersion"
         :productCode="form.productCode"
+		:produceVersionId="form.produceVersionId"
       ></ProductionVersion>
       <PlanSubmit
         ref="submitRefs"
@@ -317,7 +318,8 @@
     productionToPlan,
     saveSaleToPlan,
     updateSaleToPlan,
-    getUpdateInfoById
+    getUpdateInfoById,
+	getProductVersion
   } from '@/api/saleOrder';
   import dictMixins from '@/mixins/dictMixins';
   import { deepClone } from '@/utils/index';
@@ -371,21 +373,21 @@
       async getPlanInfo (id) {
         const data = await getUpdateInfoById(id);
         this.form = data;
-        console.log(data);
+        if(data.productCode){
+        	this.getVersionData()
+        }
       },
       getSaleInfo (params) {
         productionToPlan(params).then((res) => {
           this.form = deepClone(res);
           this.form.salesOrders.map((item, index) => {
             item.priority = index + 1;
-
             item.planProductNum = item.lackNum;
             item.requiredFormingNum = item.lackNum;
             item.reqMoldTime = dayjs(
               new Date(item.deliveryTime).getTime() + 3600 * 1000 * 24 * 10
             ).format('YYYY-MM-DD');
           });
-
           if (this.form.salesOrders.every((itm) => itm.orderType == 2)) {
             this.form.planType = 2;
           } else {
@@ -393,6 +395,16 @@
           }
         });
       },
+	  
+	  getVersionData () {
+	    getProductVersion(this.form.productCode).then((res) => {
+	       res.map(item=>{
+			    if(item.produceVersionId==this.form.produceVersionId){
+					this.lineNamesList = Array.from(new Set(item.lineNames || []));
+				}
+		   })
+	    });
+	  },
       cancel () {
         this.$router.go(-1);
       },