Pārlūkot izejas kodu

refactor(inventoryTable): 移除columnsVersion和getColumns调用,优化代码结构

yusheng 8 mēneši atpakaļ
vecāks
revīzija
d0c0a01b2a

+ 6 - 6
src/views/saleManage/saleOrder/invoice/components/inventoryTable.vue

@@ -469,7 +469,6 @@
         defaultForm,
         warehouseList: [],
         dynamicsColumns: [],
-        columnsVersion: 1,
         isWarehouseId: 0,
         blockCountColumn: {},
         form: {
@@ -479,7 +478,6 @@
       };
     },
     created() {
-      this.getColumns();
       this.requestDict('产地');
       this.requestDict('生产类型');
       parameterGetByCode({
@@ -498,6 +496,8 @@
         return this.$store.state.user.info.clientEnvironmentId;
       },
       columns() {
+        let columnsVersion = this.columnsVersion;
+
         return [
           {
             width: 60,
@@ -1147,7 +1147,7 @@
 
       //选择产品回调
       async changeParent(obj) {
-        console.log(obj,'obj')
+        console.log(obj, 'obj');
         obj.forEach((item) => {
           item.orderTotalCount = item.totalCount;
           item.id = '';
@@ -1277,9 +1277,9 @@
       },
 
       //修改回显
-      putTableValue(data,isInit) {
-        if(isInit){
-             this.form.datasource= []
+      putTableValue(data, isInit) {
+        if (isInit) {
+          this.form.datasource = [];
         }
         if (data) {
           this.setValue(data);