mushencc 3 vuotta sitten
vanhempi
commit
5417ae7b72

+ 14 - 0
src/store/actions.js

@@ -44,6 +44,20 @@ const actions = {
   updata_permission(store, payload) {
     store.commit('updataPermissionData', payload);
   },
+  undata_Data(store) {
+    //全局侧边栏更新
+    axios('/api/menu').then((res) => {
+      let deepObjToArray = function(obj) {
+        let result = Object.values(obj);
+        result.map((v) =>
+          fn.isType(v.sub) == 'Object' ? (v.sub = deepObjToArray(v.sub)) : ''
+        );
+        return result;
+      };
+      let result = deepObjToArray(res.data[2].sub);
+      store.commit('updataNavgation', result);
+    });
+  },
 };
 
 export default actions;

+ 3 - 3
src/views/BasicSettings/Partfield.vue

@@ -36,7 +36,7 @@
           >批量导出</Button
         >
         <Button type="primary" ghost icon="md-add" @click="addItems"
-          >新增部件</Button
+          >新增部件分类</Button
         >
       </div>
       <div slot="navButton"></div>
@@ -68,7 +68,7 @@
       <div>
         <Modal
           class-name="vertical-center-modal"
-          :title="showType == 1 ? '新增部件' : '编辑部件'"
+          :title="showType == 1 ? '新增部件分类' : '编辑部件分类'"
           v-model="showModal"
           :width="480"
           @on-visible-change="vivibleModal"
@@ -161,7 +161,7 @@ export default {
           key: "id",
           width: "100",
         },
-        { title: "部件名称", align: "center", key: "title" },
+        { title: "部件分类名称", align: "center", key: "title" },
         { title: "操作", align: "center", slot: "set", width: "150" },
       ],
       headers: { Authorization: localStorage.getItem("token") },

+ 4 - 3
src/views/BasicSettings/Productfield.vue

@@ -160,7 +160,7 @@ export default {
     this.getParent()
   },
   methods: {
-    ...mapActions(['undata_navData']),
+    ...mapActions(['undata_Data']),
     init (row) {
       this.pageIndex = 1
       row.page_index = this.pageIndex;
@@ -219,7 +219,8 @@ export default {
         if (res.code == 200) {
           this.$Message.success(res.msg)
           this.getData(this.searchObj)
-          this.undata_navData()
+          this.undata_Data();
+          this.$forceUpdate();
         }
       })
     },
@@ -243,7 +244,7 @@ export default {
             if (res.code == 200) {
               this.$Message.success(res.msg)
               this.getData(this.proxyObj)
-              this.undata_navData()
+              this.undata_Data()
             }
           })
         }

+ 10 - 10
src/views/MaterialMannage/edit.vue

@@ -143,14 +143,14 @@
           placeholder="请输入库存"
         />
       </FormItem>
-      <FormItem label="单价(元)" v-show="isShowInfoPrice" prop="price">
+      <!-- <FormItem label="单价(元)" v-show="isShowInfoPrice" prop="price">
         <Input
           type="number"
           :disabled="type == 3 ? true : false"
           v-model="info.price"
           placeholder="请输入金额"
         />
-      </FormItem>
+      </FormItem> -->
     </Form>
     <div class="page-edit" v-show="isShowDetail" style="padding-bottom:100px;">
       <div class="items" v-for="(rows, key) in info.detail" :key="key">
@@ -210,14 +210,14 @@
               placeholder="请输入库存"
             />
           </FormItem>
-          <FormItem label="单价(元)" prop="price">
+          <!-- <FormItem label="单价(元)" prop="price">
             <Input
               type="number"
               :disabled="type == 3 ? true : false"
               v-model="rows.price"
               placeholder="请输入金额"
             />
-          </FormItem>  
+          </FormItem>   -->
          
           <FormItem label="操作" v-if="isShowDetailBtn">
             <div
@@ -272,7 +272,7 @@ export default {
           {
             long: "",
             width: "",
-            price: "",
+            // price: "",
             stock: "",
             warning_number: "",
             scale: "",
@@ -287,7 +287,7 @@ export default {
       ],
       showKey: false,
       itemRules: {
-        price: [{ required: true, message: " " }],
+        // price: [{ required: true, message: " " }],
         long: [{ required: true, message: " ", trigger: "blur" }],
         width: [{ required: true, message: " ", trigger: "blur" }],
         stock: [{ required: true, message: " " }],
@@ -426,7 +426,7 @@ export default {
             {
               long: "",
               width: "",
-              price: "",
+              // price: "",
               stock: "",
               warning_number: "",
               scale: "",
@@ -440,8 +440,8 @@ export default {
       this.info.op = type == 1 || type == 4 ? "add" : "edit";
       [2, 4, 5, 6].includes(this.basic_type_id) &&
         ((this.info.detail[0].top_number = this.info.top_number),
-        (this.info.detail[0].warning_number = this.info.warning_number),
-        (this.info.detail[0].price = this.info.price));
+        (this.info.detail[0].warning_number = this.info.warning_number));
+        // (this.info.detail[0].price = this.info.price));
       type == 4 ? (this.info.id = "") : "";
       this.axios.post("/api/material", this.info).then((res) => {
         console.log(this.info)
@@ -478,7 +478,7 @@ export default {
       row.push({
         long: "",
         width: "",
-        price: "",
+        // price: "",
         stock: "",
         warning_number: "",
         scale: "",

+ 2 - 2
src/views/ProcessLine/index.vue

@@ -686,7 +686,7 @@ export default {
   overflow-y: auto;
 }
 .total_price{
-  position: absolute;
-  top:90%
+  // position: absolute;
+  // top:90%
 }
 </style>

+ 1 - 1
vue.config.js

@@ -1,6 +1,6 @@
 const axios_default_ip =
   process.env.NODE_ENV == "dev"
-    ? "http://121.37.173.82:82"
+    ? "http://121.41.102.225:82"
     : process.env.NODE_ENV == "test-prd"
     ? "http://121.41.102.225:82" //测试服
     : process.env.NODE_ENV == "prd_other"