quwangxin hace 2 años
padre
commit
3c9803673e

+ 7 - 2
src/views/materialPlan/workOrderPublish.vue

@@ -100,6 +100,7 @@
 <script>
   import planView from './components/plan-view';
   import { getById, getReleaseInfoById } from '@/api/materialPlan/index';
+  import { getRouteTabKey, removePageTab } from '@/utils/page-tab-util';
   export default {
     components: { planView },
     data () {
@@ -148,12 +149,16 @@
     },
     methods: {
       back () {
+        const key = getRouteTabKey();
         if (this.type == 2) {
-          this.$router.go(-1);
+          this.$router.push('/materialPlan');
+          removePageTab({ key });
           return;
         }
         this.$confirm('返回后将清空所有方案,是否要继续?', '提示').then(() => {
-          this.$router.go(-1);
+          this.$router.push('/materialPlan');
+
+          removePageTab({ key });
         });
       },
       async getInfo () {

+ 1 - 1
src/views/productionPlan/components/detail/plan.vue

@@ -175,7 +175,7 @@
             prop: 'orderType',
             label: '订单类型',
             formatter: (row) =>
-              ['内销订单', '外销订单', '预制订单'][row.orderLibraryType]
+              ['', '内销订单', '外销订单', '预制订单'][row.orderLibraryType]
           },
           {
             prop: 'releaseTime',

+ 6 - 6
src/views/productionPlan/workOrderPublish.vue

@@ -41,11 +41,7 @@
           >{{ infoData.requiredFormingNum }}PCS</el-descriptions-item
         >
         <el-descriptions-item label="要求成型重量"
-          >{{
-            (
-              infoData.requiredFormingWeight * infoData.productUnitWeight
-            ).toFixed(4)
-          }}kg</el-descriptions-item
+          >{{ infoData.requiredFormingWeight }}kg</el-descriptions-item
         >
       </el-descriptions>
 
@@ -109,7 +105,7 @@
   import planView from './components/plan-view';
   import { getById, getReleaseInfoById } from '@/api/productionPlan/index';
 
-  import { removeLeftPageTab } from '@/utils/page-tab-util';
+  import { getRouteTabKey, removePageTab } from '@/utils/page-tab-util';
   export default {
     components: { planView },
     data () {
@@ -158,12 +154,16 @@
     },
     methods: {
       back () {
+        const key = getRouteTabKey();
         if (this.type == 2) {
           this.$router.push('/productionPlan');
+          removePageTab({ key });
           return;
         }
         this.$confirm('返回后将清空所有方案,是否要继续?', '提示').then(() => {
           this.$router.push('/productionPlan');
+
+          removePageTab({ key });
         });
       },
       async getInfo () {

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

@@ -40,11 +40,22 @@
           </el-col>
           <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
             <el-form-item label="产线:">
-              <el-input
+              <!-- <el-input
                 v-model="form.productline"
                 placeholder="选择生产版本带入"
                 readonly
-              ></el-input>
+              ></el-input> -->
+              <el-select
+                placeholder="选择生产版本带入"
+                v-model="form.productline"
+              >
+                <el-option
+                  v-for="(item, index) in lineNamesList"
+                  :key="index"
+                  :label="item"
+                  :value="item"
+                ></el-option>
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col v-bind="styleResponsive ? { lg: 6, md: 12 } : { span: 6 }">
@@ -324,9 +335,11 @@
         form: {
           planType: 1,
           produceVersionId: '',
+          productline: '',
           salesOrders: [],
           produceVersionName: ''
         },
+        lineNamesList: [],
         // 表单验证规则
         rules: {
           produceVersionName: [
@@ -470,7 +483,12 @@
       confirmVersion (data) {
         this.$set(this.form, 'produceVersionName', data.produceVersionName);
         this.$set(this.form, 'produceVersionId', data.produceVersionId);
-        this.form.productline = data.lineNames.length ? data.lineNames[0] : '';
+        this.$set(
+          this.form,
+          'productline',
+          data.lineNames.length ? data.lineNames[0] : ''
+        );
+        this.lineNamesList = Array.from(new Set(data.lineNames || []));
       },
 
       confirmChoose (list) {
@@ -547,7 +565,7 @@
           }
           setTimeout(() => {
             removePageTab({ key });
-          }, 100);
+          }, 0);
         });
       }
     }