瀏覽代碼

Merge branch 'purchaseDev' into 'dev'

Purchase dev

See merge request new-business/drp-web!273
黄梓星 1 年之前
父節點
當前提交
6f1d2e6236

+ 5 - 5
src/assets/styles/sidebar.scss

@@ -4,7 +4,7 @@
     min-height: 100%;
     transition: margin-left .28s;
     margin-left: $base-sidebar-width;
-    margin-left: 0;
+    // margin-left: 0;
     position: relative;
   }
 
@@ -110,13 +110,13 @@
 
   .hideSidebar {
     .sidebar-container {
-      display: none;
-      // width: 54px !important;
+      // display: none;
+      width: 54px !important;
     }
 
     .main-container {
-      // margin-left: 54px;
-      margin-left: 0;
+      margin-left: 54px;
+      // margin-left: 0;
     }
 
     .submenu-title-noDropdown {

+ 2 - 1
src/layout/index.vue

@@ -10,10 +10,11 @@
         class="drawer-bg"
         @click="handleClickOutside"
       />
-      <sidebar v-if="!sidebar.hide" class="sidebar-container" />
+      <sidebar v-if="dev" class="sidebar-container" />
       <div
         :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
         class="main-container"
+        :style="`margin-left:${dev ? '54':'0'}px`"
       >
         <div :class="{ 'fixed-header': fixedHeader }">
           <!-- <navbar /> -->

+ 4 - 3
src/views/purchase/DemandSummary/add.vue

@@ -309,9 +309,10 @@ export default {
         reloadBatch(param).then(res => {
           if (res.code === 200) {
             this.$modal.notifySuccess("操作成功");
-            let param = JSON.parse(JSON.stringify(this.query))
-            param.sumFlag = this.row.sumFlag
-            this.getDetails(param)
+            let params = JSON.parse(JSON.stringify(this.query))
+            params.sumFlag = this.row.sumFlag
+            params.demandItemId = this.row.demandItemId
+            this.getDetails(params)
           }
         })
       }).catch(() =>{})

+ 1 - 1
src/views/purchase/DemandSummary/index.vue

@@ -345,7 +345,7 @@
 </template>
 
 <script>
-import Add from './add.vue'
+import Add from './add'
 import Refers from '@/components/Refers/refers.vue'
 import TreeRefers from '@/components/Refers/treeRefer.vue'
 import popDialog from '@/components/PopDialog/index.vue'

+ 2 - 1
src/views/purchase/MaterialClassDivision/index.vue

@@ -220,7 +220,8 @@
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
         >
-          <el-table-column show-overflow-tooltip type="selection" width="55" />
+          <el-table-column show-overflow-tooltip type="selection" width="55" fixed="left"/>
+          <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
           <el-table-column show-overflow-tooltip label="物料分类编码" align="center" width="120" prop="materialClassify"/>
           <!-- <el-table-column show-overflow-tooltip label="物料分类名称" align="center" width="200" prop="materialClassifyName" /> -->
           <el-table-column show-overflow-tooltip label="一级分类名称" align="center" width="120" prop="materialClassifyOneName" />

+ 5 - 1
src/views/purchase/PurchaseDemandList/add.vue

@@ -2,7 +2,7 @@
   <div id="addDemandList">
   <el-card style="position: relative;">
     <span>基本信息</span>
-    <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
+    <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto" :show-message="false">
       <el-row :gutter="10">
         <el-col :span="1.5">
           <el-form-item label="业务类型" prop="billType" :rules="{ required: true, message: '请选择业务类型', trigger: 'blur' }">
@@ -709,6 +709,10 @@ export default {
       this.basicForm.createBy = ''
       this.basicForm.source = '4'
       this.basicForm.isSpeical = 'N'
+      this.basicForm.demandPersonal = this.$store.state.user.name
+      this.basicForm.demandDept = this.$store.state.user.deptId
+      if (this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal, '需求人员') }
+      if (this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
       this.basicForm.puDemandItemList.forEach(item => {
         item.status = ''
         item.buyerName = ''

+ 2 - 1
src/views/purchase/deliveryAddress/index.vue

@@ -181,7 +181,8 @@
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
         >
-          <el-table-column show-overflow-tooltip type="selection" width="55" />
+          <el-table-column show-overflow-tooltip type="selection" width="55" fixed="left"/>
+          <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px" fixed="left"/>
           <el-table-column show-overflow-tooltip label="仓库属性" align="center" width="120" prop="warehouseProperty" :formatter="formatterWarehouseProperty"/>
           <el-table-column show-overflow-tooltip label="仓库档案名称" align="center" width="180" prop="warehouseName"/>
           <el-table-column show-overflow-tooltip label="收货仓库编码" align="center" prop="code" width="150"/>

+ 26 - 16
src/views/purchase/purchase-order/index.vue

@@ -61,8 +61,8 @@ export default {
     },
   },
   created() {
-    // this.fetchList(this.params, this.page);
-    this.handleRefreshList();
+    this.fetchList(this.params, this.page);
+    // this.handleRefreshList();
   },
   methods: {
     async fetchList(data, params) {
@@ -115,10 +115,19 @@ export default {
       this.page.pageNum = 1;
 
       this.page.pageSize = 10;
+      console.log(this,'this-------------------');
 
-      this.checkedList = [];
+      this.$refs.purchaseTable.$refs.superTable.clearSelection();
+
+      for (const key in this.tabTableDatas) {
+        this.tabTableDatas[key] = []
+      }
+
+      this.$refs.puOrderItemList[0].$refs.superTable.clearSelection();
+
+      // this.checkedList = [];
               
-      this.checkedTabList = [];
+      // this.checkedTabList = [];
 
       this.primaryResource = {};
 
@@ -188,9 +197,11 @@ export default {
       await fetchItem(id);
       
     },
+    
     // 获取子表信息
      handleDetailsData(row) {
 
+      
       window.clearTimeout(this.timeOut);
 
       this.timeOut = setTimeout(async () =>{
@@ -465,6 +476,9 @@ export default {
       console.log(this.checkedList, 'this.checkedList');
 
     },
+    handleSelectionChange(selection){
+      this.checkedList = selection;
+    },
     // 子表Select框
     handleTabSelect(selection, row){
 
@@ -472,6 +486,9 @@ export default {
 
       console.log(this.checkedTabList, 'this.checkedTabList');
     },
+    handleTabSelectionChange(selection){
+      this.checkedTabList = selection;
+    },
     // 保留两位小数,补位
     keepTwoDecimalStr(num) {
 
@@ -582,6 +599,7 @@ export default {
 
     <el-super-table
       v-model="tableData"
+      ref="purchaseTable"
       max-height="480"
       :dict="dict"
       :columns="tableColumns"
@@ -593,11 +611,9 @@ export default {
       @pagination="fetchList(params, page)"
       @row-dblclick="handleOpenSeeDrawer" 
       @row-click="handleDetailsData" 
+      @selection-change="handleSelectionChange"
       @select="handleSelect"
     >
-
-      <!-- <el-table-column type="selection" width="45" fixed></el-table-column>
-      <el-table-column type="index" width="50" label="序号"></el-table-column> -->
       
       <el-table-column fixed="right" label="操作" width="120">
           <template slot-scope="scope">
@@ -637,15 +653,6 @@ export default {
     
     </el-super-table>
 
-    <!-- <pagination
-      v-show="page.total>0"
-      :total="page.total"
-      :page.sync="page.pageNum"
-      :limit.sync="page.pageSize"
-      :page-sizes="[10,20,50,100,500,1000]"
-      @pagination="fetchList(params, page)"
-    />
-    -->
     <div style="position: relative; padding-top: 10px;" v-loading="tabLoading">
       <el-row style="position: absolute; top: 30px; right: 20px;z-index: 10;">
         <el-button 
@@ -664,6 +671,7 @@ export default {
         >
           <el-super-table
             v-model="tabTableDatas[column.key]"
+            :ref="column.key"
             max-height="200"
             :dict="dict"
             :columns="column.tableColumns"
@@ -671,6 +679,8 @@ export default {
             :checkbox="setTabSelectable()"
             :iconOperation="false"
             @select="handleTabSelect"
+            @selection-change="handleTabSelectionChange"
+
           >
             <!-- <el-table-column
               v-if=" tabName === 'puOrderItemList'" 

+ 4 - 7
src/views/purchase/transferOrder/add.vue

@@ -17,7 +17,7 @@
                 v-model="basicForm.deliveryInventoryOrg"
                 :disabled="sonDisable"
                 @clear="clean('调出库存组织')"
-                @change="controlCk"
+                @change="controlCk('调出库存组织')"
                 @focus="chooseRefer('ORG_PARAM', true, '调出库存组织')"
                 style="width: 200px"
               >
@@ -124,7 +124,7 @@
                 v-model="basicForm.storageInventoryOrg"
                 :disabled="sonDisable"
                 @clear="clean('调入库存组织')"
-                @change="controlCk"
+                @change="controlCk('调入库存组织')"
                 @focus="chooseRefer('ORG_PARAM', true, '调入库存组织')"
                 style="width: 200px"
               >
@@ -1704,12 +1704,9 @@ export default {
       });
     },
     // 控制先选调出库存组织和调入库存组织再选调出部门和调入调出仓库
-    controlCk() {
+    controlCk(val) {
       console.log("进了吗");
-      if (
-        this.basicForm.deliveryInventoryOrg &&
-        this.basicForm.storageInventoryOrg
-      ) {
+      if (this.basicForm.deliveryInventoryOrg && this.basicForm.storageInventoryOrg){
         this.isOrg = false;
       } else {
         this.basicForm.deliveryDept = "";