chencc před 1 rokem
rodič
revize
41f77e6435

+ 0 - 1
src/views/materialPlan/components/produceOrder.vue

@@ -4,7 +4,6 @@
     <el-card shadow="never">
       <productionPlanSearch @search="reload" ref="searchRef" :statusOpt="statusOpt" :planType="planType"
         :activeName="activeName" />
-
       <!-- 数据表格 -->
       <ele-pro-table ref="table" :columns="columns" :datasource="datasource" :selection.sync="selection" row-key="id">
       </ele-pro-table>

+ 19 - 8
src/views/productionPlan/components/factoryAdd/index.vue

@@ -1,5 +1,6 @@
 <template>
-  <ele-modal width="80vw" :visible.sync="visible" :close-on-click-modal="false" custom-class="ele-dialog-form"
+  <!-- :close-on-click-modal="false" -->
+  <ele-modal width="80vw" :visible.sync="visible"   custom-class="ele-dialog-form"
     :title="title" :maxable="true">
     <div class="form-wrapper">
       <el-form ref="form" :model="form" :rules="rules" label-width="90px" class="formbox">
@@ -192,7 +193,7 @@ export default {
   },
   data() {
     return {
-      visible: true,
+      visible: false,
       title: '',
       type: 3,
 
@@ -215,13 +216,14 @@ export default {
         productName: [
           { required: true, message: '请选择名称', trigger: 'change' }
         ],
-        // bomCategoryId: [
-        //   { required: true, message: '请选择BOM版本', trigger: 'blur' }
-        // ],
+        
+        bomCategoryId: [
+          { required: true, message: '请选择BOM版本', trigger: 'blur' }
+        ],
 
-        // produceRoutingId: [
-        //   { required: true, message: '请选择工艺路线', trigger: 'blur' }
-        // ],
+        produceRoutingId: [
+          { required: true, message: '请选择工艺路线', trigger: 'blur' }
+        ],
 
         reqMoldTime: [
           { required: true, message: '请选择要求完成日期', trigger: 'blur' }
@@ -245,6 +247,11 @@ export default {
     }
   },
   methods: {
+    open(){
+
+      this.visible = true;
+    },
+
     handleAdd() {
       this.$refs.equipmentRefs.open();
     },
@@ -289,6 +296,7 @@ export default {
           saveSaleToPlan(this.form)
             .then((res) => {
               this.$message.success('新增成功!');
+              this.visible = false;
               this.$emit('close', true);
             })
             .finally(() => {
@@ -299,6 +307,7 @@ export default {
           temporarilyUpdate(this.form)
             .then((res) => {
               this.$message.success('修改成功!');
+              this.visible = false;
               this.$emit('close', true);
             })
             .finally(() => {
@@ -369,6 +378,8 @@ export default {
     },
 
     cancel() {
+      console.log('取消');
+      this.visible = false;
       this.$emit('close');
     }
   }

+ 11 - 6
src/views/productionPlan/index.vue

@@ -286,9 +286,9 @@
       ref="disassemblePlanRef"
       @close="reload"
     ></disassemblePlanPop>
-
+    <!-- v-if="factoryShow" -->
     <factoryAdd
-      v-if="factoryShow"
+      ref="factoryAddRef"
       :factoryType="factoryType"
       :factoryObj="factoryObj"
       @close="factoryClose"
@@ -372,7 +372,7 @@
 
         selection: [],
 
-        factoryShow: false,
+        // factoryShow: false,
         factoryType: 3,
         factoryObj: {},
         cardSpan: 3
@@ -805,7 +805,8 @@
         if (row.timeDimensionPlanType == 3) {
           this.factoryObj = row;
           // this.factoryType = ;
-          this.factoryShow = true;
+          // this.factoryShow = true;
+          this.$refs.factoryAddRef.open();
         } else {
           this.$router.push({
             path: '/saleOrder/salesToProduction',
@@ -966,11 +967,15 @@
 
       factAdd(type) {
         this.factoryType = type;
-        this.factoryShow = true;
+  
+        this.$refs.factoryAddRef.open();
+        // this.factoryShow = true;
+        
       },
 
       factoryClose(val) {
-        this.factoryShow = false;
+        // this.factoryShow = false;
+        this.$refs.factoryAddRef.close();
         this.factoryType= 3;
         this.factoryObj= {};
         if (val) {

+ 19 - 7
src/views/workOrder/index.vue

@@ -10,7 +10,7 @@
 
       <plan-statistics></plan-statistics>
 
-      <ele-pro-table
+      <!-- <ele-pro-table
         ref="table"
         :columns="newColumns"
         :datasource="datasource"
@@ -20,9 +20,21 @@
         height="calc(100vh - 380px)"
         autoAmendPage
         :parse-data="parseData"
+      > -->
+      <ele-pro-table
+        ref="table"
+        :columns="newColumns"
+        :datasource="datasource"
+        cache-key="workOrderTable"
+        row-key="code"
+        @sort-change="onSortChange"
+        autoAmendPage
+        :parse-data="parseData"
+       
       >
-
-
+      <!-- :key="activeName" -->
+      <!-- :selection.sync="selection" -->
+      <!-- @update:selection="handleSelectionChange" -->
 
         <template v-slot:code="{ row }">
           {{ row.code }}
@@ -312,7 +324,7 @@
             prop: 'productName',
             label: '名称',
             align: 'center',
-            minWidth: 110
+            minWidth: 170
           },
           {
             prop: 'brandNo',
@@ -595,7 +607,7 @@
 </script>
 
 <style lang="scss" scoped>
-::v-deep .el-table__row {
-  height: 51px !important;
-}
+// ::v-deep .el-table__row {
+//   height: 51px !important;
+// }
 </style>

+ 1 - 1
vue.config.js

@@ -35,7 +35,7 @@ module.exports = {
         // target: 'http://192.168.1.116:18086',
         // target: 'http://192.168.1.158:18086',
         // target: 'http://192.168.158:18086',
-        // target: 'http://192.168.1.125:18086',
+        target: 'http://192.168.1.125:18086',
         // target: 'http://192.168.1.251:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域