Przeglądaj źródła

Merge branch 'prod_v7' into 'prod_v5'

Prod v7

See merge request new-business/drp-web!513
吴杰 1 rok temu
rodzic
commit
d4c68c1f08

+ 6 - 2
src/components/popover-select/components/DEPT_PARAM.js

@@ -1,10 +1,14 @@
 export default [
+  // {
+  //   item: { key: "code", title: "编码" , width: "auto"},
+  //   attr: {},
+  // },
   {
-    item: { key: "code", title: "编码" , width: "auto"},
+    item: { key: "orgName", title: "组织" , width: "auto"},
     attr: {},
   },
   {
-    item: { key: "name", title: "名称" , width: "auto"},
+    item: { key: "name", title: "部门名称" , width: "auto"},
     attr: {},
   },
 ];

Plik diff jest za duży
+ 271 - 267
src/views/purchase/purchase-order/add/column.js


+ 33 - 33
src/views/purchase/purchase-order/column.js

@@ -150,17 +150,17 @@ export const TableColumns = [
       isSummary:true,
     },
   },
-  {
-    item: { 
-      key: "isUrgency", 
-      title: "紧急程度",
-      width:100,
-    },
-    attr: { 
-      is: "el-dict-tag", 
-      dictName: "urgency_degree"
-    },
-  },
+  // {
+  //   item: { 
+  //     key: "isUrgency", 
+  //     title: "紧急程度",
+  //     width:100,
+  //   },
+  //   attr: { 
+  //     is: "el-dict-tag", 
+  //     dictName: "urgency_degree"
+  //   },
+  // },
   // {
   //   key: "isMarketing",
   //   title: "已协同生成销售订单",
@@ -1320,28 +1320,28 @@ export const SearchColumns = [
       dictName: "order_delivery_status",
     },
   },
-  {
-    item: { 
-      key: "isUrgency", 
-      title: "紧急标识",
-    },
-    attr: { 
-      clearable: true,
-      is: "el-select", 
-      dictName: "sys_yes_no" 
-    },
-  },
-  {
-    item: { 
-      key: "isReplenishment", 
-      title: "补单标识",
-    },
-    attr: { 
-      clearable: true,
-      is: "el-select", 
-      dictName: "sys_yes_no" 
-    },
-  },
+  // {
+  //   item: { 
+  //     key: "isUrgency", 
+  //     title: "紧急标识",
+  //   },
+  //   attr: { 
+  //     clearable: true,
+  //     is: "el-select", 
+  //     dictName: "sys_yes_no" 
+  //   },
+  // },
+  // {
+  //   item: { 
+  //     key: "isReplenishment", 
+  //     title: "补单标识",
+  //   },
+  //   attr: { 
+  //     clearable: true,
+  //     is: "el-select", 
+  //     dictName: "sys_yes_no" 
+  //   },
+  // },
   
   // {
   //   item:{

+ 2 - 3
src/views/purchase/purchase-order/index.vue

@@ -720,15 +720,14 @@ export default {
           >批量导出</el-button>
           
         </el-button-group>
-        <el-button-group>
+        <!-- <el-button-group>
           <zp-button
             :size="size"
             :select-data="checkedList"
             @success="handleQueryList"
           >
           </zp-button>
-        </el-button-group>
-
+        </el-button-group> -->
 
       </el-col>
     </el-row>

+ 22 - 22
src/views/purchase/task/columns.js

@@ -253,28 +253,28 @@ export default function useColumns() {
         valueKey: "name",
       },
     },
-    {
-      item: { 
-        key: "isUrgency", 
-        title: "紧急标识",
-      },
-      attr: { 
-        clearable: true,
-        is: "el-select", 
-        dictName: "sys_yes_no" 
-      },
-    },
-    {
-      item: { 
-        key: "isReplenishment", 
-        title: "补单标识",
-      },
-      attr: { 
-        clearable: true,
-        is: "el-select", 
-        dictName: "sys_yes_no" 
-      },
-    },
+    // {
+    //   item: { 
+    //     key: "isUrgency", 
+    //     title: "紧急标识",
+    //   },
+    //   attr: { 
+    //     clearable: true,
+    //     is: "el-select", 
+    //     dictName: "sys_yes_no" 
+    //   },
+    // },
+    // {
+    //   item: { 
+    //     key: "isReplenishment", 
+    //     title: "补单标识",
+    //   },
+    //   attr: { 
+    //     clearable: true,
+    //     is: "el-select", 
+    //     dictName: "sys_yes_no" 
+    //   },
+    // },
     {
       item: {
         key: "documentsCodes",

+ 2 - 2
src/views/purchase/task/index.vue

@@ -155,12 +155,12 @@ export default {
           @success="useQuery(params, page)"
         >
         </zp-button>
-        <lc-button
+        <!-- <lc-button
           :size="size"
           :select-data="selectData"
           @success="useQuery(params, page)"
         >
-        </lc-button>
+        </lc-button> -->
       </el-button-group>
       <!-- <el-button-group>
         <dc-button

+ 1 - 1
src/views/purchase/task/see/columns.js

@@ -10,7 +10,7 @@ export default function useColumns() {
     },
     { item: { key: "existPrice", title: "是否有价格",width :150 ,}, attr: {
       is: "el-dict-tag",
-      dictName: "is_effective",
+      dictName: "sys_true_false",
 
     } },
     { item: { key: "demandCode", title: "需求单号" }, attr: {} },

+ 122 - 49
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -26,6 +26,9 @@ export default {
       tableColumns: TableColumns,
       basicColumns:BasicColumns,
       data: [],
+      showData:[],
+      supplier:'',
+      size:'mini',
     };
   },
   computed: {
@@ -35,14 +38,23 @@ export default {
       },
       set() {},
     },
-    supplierNameSelect:{
+    restaurants:{
       get(){
-        return 
-      },
-      set(value){
+        let allSupplier = [];
+        this.data.forEach(item =>{
 
+          let orderPriceVos = item.orderPriceVos.map(order => ({
+            value:order.supplierName,
+            id:order.supplier
+          }))
+          allSupplier.push(...orderPriceVos);
 
-      }
+        })
+        allSupplier = this.uniqueFunc(allSupplier,'id');
+        console.log(allSupplier,'allSupplier');
+        return allSupplier;
+      },
+      set(){},
     }
   },
   watch: {},
@@ -73,6 +85,8 @@ export default {
             })),
           }));
 
+          this.showData = _.cloneDeep(this.data);
+
           console.log(this.data,'this.data');
           return true;
         } else {
@@ -110,9 +124,50 @@ export default {
         // finally
       }
     },
+    hide(){
+      this.visible = false;
+    },
     supplierChange(value){
       console.log(value,'value');
     },
+    // 建议值
+    querySearch(queryString, cb){
+
+      let results = this.restaurants;
+
+      results = queryString
+        ? results.filter(this.createFilter(queryString))
+        : results;
+
+    //cb是回调函数,返回筛选出的结果数据到输入框下面的输入列表
+      cb(results);
+
+    },
+    createFilter(queryString) {
+
+      return (item) => {
+        return item.value.toUpperCase().match(queryString.toUpperCase());
+      };
+
+    },
+    
+    handleSelect(prop){
+      console.log(prop,'prop');
+      this.showData = this.data.map(item => {
+        return {
+          ...item,
+          orderPriceVos:item.orderPriceVos.filter(order => order.supplier === prop.id),
+        }
+      })
+    },
+    handleClear(){
+      this.showData = _.cloneDeep(this.data);
+    },
+    // 对象数组去重
+    uniqueFunc(arr, uniId){
+      const res = new Map();
+      return arr.filter((item) => !res.has(item[uniId]) && res.set(item[uniId], 1));
+    },
   },
   created() {},
   mounted() {},
@@ -148,57 +203,75 @@ export default {
         <el-button
           :size="$attrs.size"
           :loading="loading"
-          @click="visible = false"
+          @click="hide"
           >取 消</el-button
         >
         
       </template>
 
-      
-      <div v-for="(item, index) in data" :key="index" class="m-4">
-        
-        <el-descriptions>
-          <template slot="title" >
-            <template>
-              <span style="margin-right: 10px">{{ item.materialName }}</span>
-              <span style="color: tomato">{{ item.puQty }}</span>
-              (<span style="color: tomato">{{
-                item.puQty - (item.executeQty || 0)
-              }}</span
-              >) <span> {{ item.puUnitName }}</span>
+      <el-row style="padding: 0 16px;">
+        <el-col>
+          <el-autocomplete
+            class="inline-input"
+            :size="size"
+            v-model="supplier"
+            clearable
+            :fetch-suggestions="querySearch"
+            placeholder="请输入供应商"
+            @select="handleSelect"
+            @clear="handleClear"
+          ></el-autocomplete>
+        </el-col>
+      </el-row>
+
+
+      <div v-for="(item, index) in showData" :key="index" class="m-4">
+
+        <template v-if="item.orderPriceVos.length">
+          <el-descriptions>
+            <template slot="title" >
+              <template>
+                <span style="margin-right: 10px">{{ item.materialName }}</span>
+                <span style="color: tomato">{{ item.puQty }}</span>
+                (<span style="color: tomato">{{
+                  item.puQty - (item.executeQty || 0)
+                }}</span
+                >) <span> {{ item.puUnitName }}</span>
+              </template>
             </template>
-          </template>
-
-          <el-descriptions-item 
-            v-for="(basic,bIndex) in basicColumns"
-            :key="bIndex"
-            :label="basic.item.title"
-          >{{ item[basic.item.key] }}
-          </el-descriptions-item>
-          <el-descriptions-item 
-            label="需求数量"
-          >{{ item.puQty - (item.executeQty || 0) }}
-          </el-descriptions-item>
-          
-        </el-descriptions>
-
-        <el-super-table
-          v-model="item.orderPriceVos"
-          :columns="tableColumns"
-          :size="$attrs.size"
-          :dict="dict"
+  
+            <el-descriptions-item 
+              v-for="(basic,bIndex) in basicColumns"
+              :key="bIndex"
+              :label="basic.item.title"
+            >{{ item[basic.item.key] }}
+            </el-descriptions-item>
+            <el-descriptions-item 
+              label="需求数量"
+            >{{ item.puQty - (item.executeQty || 0) }}
+            </el-descriptions-item>
+            
+          </el-descriptions>
+  
+          <el-super-table
+            v-model="item.orderPriceVos"
+            :columns="tableColumns"
+            :size="$attrs.size"
+            :dict="dict"
           >
-          <!-- showSummary -->
-          <template slot="purchaseQuantity" slot-scope="scope">
-            <component
-              v-bind="scope.attr"
-              v-model="scope.row[scope.item.key]"
-              :size="$attrs.size"
-              :max="scope.attr.max(scope.row)"
-            >
-            </component>
-          </template>
-        </el-super-table>
+            <!-- showSummary -->
+            <template slot="purchaseQuantity" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :max="scope.attr.max(scope.row)"
+              >
+              </component>
+            </template>
+          </el-super-table>
+        </template>
+        
       </div>
     </el-drawer>
   </el-button>

Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików