瀏覽代碼

Merge branch 'purchaseDev' of http://172.16.100.139/new-business/drp-web into purchaseDev

002201 1 年之前
父節點
當前提交
dd3701cf29

+ 13 - 5
src/components/PopDialog/index.vue

@@ -21,7 +21,7 @@
           </el-header>
           <el-main>
             <el-table :data="dataList" v-loading="loading" size="small" border ref="contractTable" @row-click="rowSelect"
-              @select="handleSelectionChange" height="calc(100% - 40px)" style="width: 100%">
+              @select="handleSelectionChange" :selection="selectedRows" @selection-change="watchSel"  height="calc(100% - 40px)" style="width: 100%">
               <el-table-column type="selection" header-align="center" align="center" width="50">
               </el-table-column>
               <el-table-column prop="code" header-align="center" align="center" sortable="custom" min-width="90"
@@ -67,6 +67,7 @@ export default {
       orders: [],
       loading: false,
       visible: false,
+      selectedRows:[]
     };
   },
   props: {
@@ -79,7 +80,7 @@ export default {
     // 是否启用单选
     single: {
       type: Boolean,
-      default: false
+      default: true
     }
   },
   methods: {
@@ -136,14 +137,21 @@ export default {
       this.searchForm.pageNo = 1;
       this.refreshList();
     },
+    watchSel(rows) {
+      console.log('监听得到选中吗', rows)
+      this.dataListAllSelections = rows
+    },
     // 表格选中数据
-    rowSelect(row, column, event) {
-      this.$refs.contractTable.clearSelection();
+    rowSelect(row) {
+      // this.$refs.contractTable.clearSelection();
+      // this.$refs.contractTable.toggleRowSelection(row);
+      // this.dataListAllSelections = this.single ? [row] : selection
       this.$refs.contractTable.toggleRowSelection(row);
-      this.dataListAllSelections = this.single ? [row] : selection
     },
     // 选中数据
     handleSelectionChange(selection, row) {
+      console.log('selection',selection)
+      console.log('row',[row])
       if (this.single && selection.length > 1) {
         this.$refs.contractTable.clearSelection();
         this.$refs.contractTable.toggleRowSelection(row);

+ 7 - 7
src/views/material/basicFile/details.vue

@@ -2,8 +2,10 @@
 <template>
   <div class="material-details" v-loading="loading">
     <!-- 操作栏 -->
-    <!-- 基本信息栏 -->
-    <div style="display: flex;justify-content: end;">
+  
+    <el-card>
+      <!-- 基本信息栏 -->
+      <div style="display: flex;justify-content: end;">
       <div v-if="activeMainTab == 'material'">
   
         <!-- 基本信息修改状态下—— 保存、保存新增、更新导入、取消 -->
@@ -111,8 +113,6 @@
       </el-row>
 
     </div>
-
-    <el-card>
     
       <div class="md-content">
         <el-form :inline="true" label-position="right" :model="basicData.value">
@@ -148,7 +148,7 @@
                 >
 
                   <el-row :gutter="10">
-                    <el-col :span="8" v-for="f in basicData.form" style="text-align: right;">
+                    <el-col :span="6" v-for="f in basicData.form" style="text-align: right;">
                       <template v-if="f.show">
 
                         <!-- 多选框 -->
@@ -296,7 +296,7 @@
                     >
 
                       <el-row :gutter="10">
-                        <el-col :span="8" v-for="m in medcineData.form" style="text-align: right;">
+                        <el-col :span="6" v-for="m in medcineData.form" style="text-align: right;">
 
                           <!-- 需要根据基本信息中的是否医药物料字段判断是否可以填写 -->
                           <template v-if="m.show">
@@ -2590,7 +2590,7 @@
     box-sizing: border-box;
 
     .el-card__body {
-      height: calc(100vh - 80px);
+      height: calc(100vh - 40px);
       // height: 100%;
       box-sizing: border-box;
       padding: 12px;

+ 6 - 13
src/views/material/basicFile/index.vue

@@ -3,9 +3,11 @@
 <template>
   <div class="material-basic" v-loading="failLoad">
 
-    <!-- 操作栏 -->
-    <div>
-    
+    <!-- 主体列表 -->
+    <el-card class="material-list" v-loading="loading">
+
+      <!-- 操作栏 -->
+    <div style="margin: 0 0 10px 0;">
       <!-- 查询条件 -->
       <el-row :gutter="10">
         <el-col :span="1.5">
@@ -39,12 +41,7 @@
         </el-col>
 
       </el-row>
-
-     
     </div>
-
-    <!-- 主体列表 -->
-    <el-card class="material-list" v-loading="loading">
       <el-row 
         :gutter="10" 
         class="mb10"
@@ -568,8 +565,7 @@
 
 <style lang="scss">
   .material-list {
-    // height: calc(100% - 100px);
-    // height: calc(100% - 70px);
+    height: calc(100vh - 70px);
 
 
     .el-card__body {
@@ -577,12 +573,9 @@
       box-sizing: border-box;
 
       .el-table {
-        // height: calc(100% - 35px);
         overflow: auto;
 
         .el-table__body-wrapper {
-          // height: calc(100% - 150px);
-          // height: calc(100% - 70px);
           overflow-y: auto !important;
           overflow-x: auto !important;
         }

+ 2 - 2
src/views/purchase/DemandSummary/add.vue

@@ -21,8 +21,8 @@
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
         >
-        <el-table-column show-overflow-tooltip type="selection"/>
-        <el-table-column show-overflow-tooltip label="序号" align="center" type="index" width="55"/>
+        <el-table-column show-overflow-tooltip type="selection" fixed="left"/>
+        <el-table-column show-overflow-tooltip label="序号" align="center" type="index" width="55" fixed="left"/>
         <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
           <template slot-scope="scope">
             {{ scope.$index + 1 + '0' }}

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

@@ -233,7 +233,8 @@
           @selection-change="handleSelectionChange"
           :key="isUpdate"
         >
-          <el-table-column type="selection" width="60" />
+          <el-table-column type="selection" width="60" 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" prop="rowNo"/> -->
           <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="100px" :formatter="hangStatus"/>
           <el-table-column show-overflow-tooltip label="一级品类" align="center" prop="materialClassifyOneName" width="100px"/>

+ 158 - 4
src/views/purchase/PurchaseDemandList/add.vue

@@ -170,8 +170,8 @@
           @selection-change="handleSelectionChange"
           :cell-class-name="cellClassName"
         >
-          <el-table-column show-overflow-tooltip type="selection"/>
-          <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px"/>
+          <el-table-column show-overflow-tooltip type="selection" 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" prop="rowNo">
             <template slot-scope="scope">
               {{ scope.$index + 1 + '0' }}
@@ -427,7 +427,7 @@
 
       <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
 
-      <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
+      <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="false" />
 
 
     <!-- 批量调整参数 -->
@@ -1318,6 +1318,7 @@ export default {
     },
     selectMaterial(selection) {
       console.log('选中的物料', selection)
+      if (selection.length <= 1) {
       // 选择新物料时先清空行内其他信息
       this.basicForm.puDemandItemList[this.tableIndex].reservedProportion = null
       this.basicForm.puDemandItemList[this.tableIndex].reservedPeriod = null
@@ -1388,7 +1389,160 @@ export default {
       this.basicForm.puDemandItemList[this.tableIndex].transportationCondition = selection[0].transportationCondition
       this.basicForm.puDemandItemList[this.tableIndex].storageCondition = selection[0].storageCondition
       // 选中骨科耗材时候的物料,需求客户不必填
-
+      } else {
+        console.log('xxxxx', selection)
+        for (let i = 0;i<selection.length;i++) {
+          let line = {
+            contacts: null,
+            id: null,
+            demandId: null,
+            status: null,
+            businessDept: null,
+            businessDeptName: null,
+            materialCategory: null,
+            buyer: null,
+            buyerName: null,
+            mateiralClassifyOne: null,
+            materialClassifyOneName: null,
+            materialClassifyTwo: null,
+            materialClassifyTwoName: null,
+            materialClassifyThree: null,
+            materialClassifyThreeName: null,
+            materialClassifyFour: null,
+            materialClassifyFourName: null,
+            materialCode: null,
+            material: null,
+            materialName: null,
+            classifyId: null,
+            specification: null,
+            unit: null,
+            unitName: null,
+            manufacturerName: null,
+            registrant: null,
+            puPeriod: null,
+            expiryUnit: null,
+            expiry: null,
+            minPackage: null,
+            minOrderQty: null,
+            minBatch: null,
+            safeStock: null,
+            averageQtyMonth: null,
+            qty: null,
+            adjustmentPersonal: null,
+            adjustmentTime: null,
+            manualRegulation: null,
+            updateCause: null,
+            reservedProportion: null,
+            reservedPeriod: null,
+            reservedQty: null,
+            demandPeriod: null,
+            forecastClassify: null,
+            onemonthAvgVolume: null,
+            threemonthAvgVolume: null,
+            puFreight: null,
+            deliveryDate: null,
+            isUrgency: this.basicForm.billType == 'JJXQ' ? 'Y' : 'N',
+            isReplenishment: this.basicForm.billType == 'BDXQ' ? 'Y' : 'N',
+            isBatchLock: 'N',
+            isCustomerSpecified: '',
+            remark: null,
+            puRemark: null,
+            lastWarehouseQty: null,
+            resDemandQty: null,
+            lastWarehouse: null,
+            lastWarehouseName: null,
+            deliveryWarehouse: null,
+            deliveryWarehouseName: null,
+            lastAllocation: null,
+            lastAllocationName: null,
+            deliveryAllocation: null,
+            deliveryAllocationName: null,
+            passageOn: null,
+            puOrg: null,
+            purOrgName: null,
+            lastStockQty: null,
+            superiorCenterQty: null,
+            superiorAllotQty: null,
+            availableQty: null,
+            statusAllot: 'N',
+            additionalSupplier: null,
+            additionalSupplierName: null,
+            periodUnit: null,
+            demandCustomer: this.basicForm.customer,
+            demandCustomerName: this.basicForm.customerName,
+            businessDept: this.basicForm.demandDept,
+            businessDeptName: null,
+            lastStockOrg: null,
+            lastStockOrgName: null,
+            superiorStockOrg: null,
+            superiorStockOrgName: null,
+            allotCode: null,
+            deliveryAddress: null,
+            deliveryAddressName: null,
+            contacts: null,
+            contactsPhone: null,
+            address: null,
+            source: null,
+            priceType: 'order',
+            puManagerApprover: null,
+            puManagerApproverName: null,
+            processTime: null,
+            affirmer: null,
+            tenantId: null,
+            revision: null,
+            createBy: null,
+            createByName: null,
+            createTime: null,
+            updateBy: null,
+            updateByName: null,
+            updateTime: null,
+            delFlag: 0,
+            // 新增字段
+            model: null,
+            storageCondition: null,
+            transportationCondition: null,
+          }
+                // 通过选择物料查询采购员
+          queryMan(selection[i].id).then(res => {
+            if (res.code === 200 && res.rows.length !== 0) {
+              line.buyer = res.rows[0].buyer
+              line.buyerName = res.rows[0].buyerName
+            }
+          })
+          line.businessDept = selection[i].businessDepartment
+          line.businessDeptName = selection[i].businessDepartmentName
+          line.materialCode = selection[i].code
+          line.material = selection[i].id
+          line.materialName = selection[i].name
+          line.classifyId = selection[i].classifyId
+          line.materialClassifyOneName = selection[i].oneClass
+          line.materialClassifyTwoName = selection[i].twoClass
+          line.materialClassifyThreeName = selection[i].threeClass
+          line.materialClassifyFourName = selection[i].fourClass
+          line.specification = selection[i].specification
+          line.model = selection[i].model
+          line.unit = selection[i].unitId
+          line.unitName = selection[i].unitIdName
+          line.registrant = selection[i].registrant
+          line.manufacturerName = selection[i].manufacturerIdName
+          line.puPeriod = selection[i].deliveryPeriod
+          line.expiry = selection[i].usefulLife
+          line.expiryUnit = selection[i].expiryUnitIdName
+          // line.minPackage = selection[i].usefulLife
+          line.minPackage = selection[i].minPackQty
+          line.minOrderQty = selection[i].minOrderQty
+          line.minBatch = selection[i].minBatchQty
+          line.safeStock = selection[i].safeStock
+          line.purOrgName = selection[i].purchasingOrganizationName
+          line.puOrg = selection[i].purchasingOrganization
+          // 物料存储条件和运输条件
+          line.transportationCondition = selection[i].transportationCondition
+          line.storageCondition = selection[i].storageCondition
+          this.basicForm.puDemandItemList.push(line)
+        }
+        // 删除指定下标
+        this.basicForm.puDemandItemList.splice(this.tableIndex,1)
+      }
     },
     // 明细行选择业务部门参照带出业务部门数据
     chooseDept(index, type, isPage, title) {

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

@@ -171,7 +171,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="170" prop="code"/>
           <el-table-column show-overflow-tooltip label="需求日期" align="center" width="120" prop="demandDate"/>
           <el-table-column show-overflow-tooltip label="审批结束日期" align="center" width="120" prop="approverFinishTime"/>

+ 6 - 0
src/views/purchase/purchase-order/add/index.vue

@@ -703,6 +703,12 @@ export default {
                 :label="cColumn.title"
                 :width="cColumn.width || 80"
               >
+              <template slot="header" slot-scope="scope">
+                <span v-if="cColumn.require" style="color: #ff4949">*</span>
+                <span>
+                  {{ cColumn.title }}
+                </span>
+              </template>
                 <template slot-scope="scope">
                   <el-form-item 
                     label-width="0" 

+ 6 - 0
src/views/purchase/purchase-order/edit/index.vue

@@ -641,6 +641,12 @@ export default {
                 :label="cColumn.title" 
                 :width="cColumn.width"
                 >
+                <template slot="header" slot-scope="scope">
+                  <span v-if="cColumn.require" style="color: #ff4949">*</span>
+                  <span>
+                    {{ cColumn.title }}
+                  </span>
+                </template>
                 <template slot-scope="scope">
 
                   <el-form-item 

+ 6 - 0
src/views/purchase/purchase-order/see/index.vue

@@ -304,6 +304,12 @@ export default {
                 :label="cColumn.title" 
                 :width="cColumn.width || 80"
               >
+                <template slot="header" slot-scope="scope">
+                  <span v-if="cColumn.require" style="color: #ff4949">*</span>
+                  <span>
+                    {{ cColumn.title }}
+                  </span>
+                </template>
                 <template slot-scope="scope">
                   <el-tag v-if="cColumn.key === 'index'">
                     {{ scope.$index + 1 }}