Browse Source

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

002201 1 năm trước cách đây
mục cha
commit
7b2245a2ab

+ 15 - 6
src/components/PopDialog/fourClass.vue

@@ -24,13 +24,16 @@
                 </el-input>
 
                 <el-tree
+                  v-loading="loading"
                   class="filter-tree"
                   :data="threedata"
                   :props="defaultProps"
                   accordion
                   node-key="id"
-                  highlight-current
+                  :highlight-current="true"
+                  :current-node-key="checkId"
                   @node-click="clickTree"
+                  default-expand-all
                   :filter-node-method="filterNode"
                   ref="tree"
                 >
@@ -79,6 +82,7 @@ export default {
       isLast: false,
       // 选中的节点
       choosePoint: {},
+      checkId: null,
     };
   },
   props: {},
@@ -88,21 +92,28 @@ export default {
     },
   },
   methods: {
-    init() {
+    init(id) {
       this.visible = true;
+      if(id) {
+        this.checkId = id
+      }
       this.$nextTick(() => {
         this.refreshList();
       });
     },
     // 获取数据列表
     refreshList(data) {
-      this.loading = true;
+      this.loading = true
       getTree({ isEnable: "0" }).then((res) => {
         console.log("res", res);
         if (res.code === 200) {
           this.threedata = res.rows.sort((a, b) => a.code - b.code);
+          this.loading = false
         }
-        this.loading = false;
+      }).then(() => {
+        this.$refs['tree'].setCurrentKey(this.checkId)
+      }).catch(err => {
+        this.loading = false
       });
     },
     clickTree(data) {
@@ -115,8 +126,6 @@ export default {
       this.choosePoint = data;
     },
     filterNode(value, data) {
-      console.log("value", value);
-      console.log("data", data);
       if (!value) return true;
       return data.materialType.indexOf(value) !== -1;
     },

+ 1 - 1
src/views/material/changeApply/add.vue

@@ -757,7 +757,7 @@
       },
       // 四级分类显示列表
       chooseFourClass() {
-        this.$refs.fourClass.init()
+        this.$refs.fourClass.init(basicForm.materialClassifyId)
       },
       // 选择四级分类后需要根据id再次查询一下123级分类
       getTreeDetails(id) {

+ 1 - 1
src/views/material/requisition/add.vue

@@ -1454,7 +1454,7 @@ export default {
     // 四级分类显示列表
     chooseFourClass() {
       this.$refs.fourTag.blur()
-      this.$refs.fourClass.init()
+      this.$refs.fourClass.init(this.basicForm.classifyId)
     },
     // 选择计量单位
     acceptUnit(selections) {

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

@@ -6,8 +6,8 @@
         <el-button type="primary" size="mini" @click="editLine">编辑</el-button>
         <el-button type="danger" size="mini" v-if="!lineDisable" @click="cancelEdit">取消编辑</el-button>
         <el-button type="success" size="mini" v-if="!lineDisable" @click="saveLine">保存</el-button>
-        <el-button type="primary" size="mini" @click="closeLine">行关闭</el-button>
-        <el-button type="primary" size="mini" @click="reloadBatch">重取批量</el-button>
+        <el-button type="primary" size="mini" v-if="lineDisable" @click="closeLine">行关闭</el-button>
+        <el-button type="primary" size="mini" v-if="lineDisable" @click="reloadBatch">重取批量</el-button>
       </div>
 
       <el-table 

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

@@ -141,14 +141,14 @@
                 </el-form-item>
               </el-col>
               <el-col :span="1.5">
-                <el-form-item label="末级供应仓库">
+                <el-form-item label="供应仓库">
                   <el-select clearable size="mini" v-model="queryParams.lastWarehouse" @focus="chooseRefer('WAREHOUSE_PARAM', true, '末级供应仓库')" style="width: 200px">
                     <el-option v-for="item in lastWarehouseOptions" :key="item.id" :label="item.name" :value="item.id" />
                   </el-select>
                 </el-form-item>
               </el-col>
               <el-col :span="1.5">
-                <el-form-item label="末级供应库位">
+                <el-form-item label="供应库位">
                   <el-select clearable size="mini" v-model="queryParams.lastAllocation" @focus="chooseRefer('ALLOCATION_PARAM', true, '末级供应库位', queryParams.lastWarehouse)" style="width: 200px">
                     <el-option v-for="item in lastAllocationOptions" :key="item.id" :label="item.name" :value="item.id" />
                   </el-select>
@@ -233,12 +233,12 @@
           <el-button type="primary" size="mini" @click="editList">编辑</el-button>
           <el-button type="danger" size="mini" v-if="!lineDisable" @click="cancelEdit">取消编辑</el-button>
           <el-button type="success" size="mini" v-if="!lineDisable" @click="saveList">保存</el-button>
-          <el-button type="primary" size="mini" @click="confirms">确认</el-button>
-          <el-button type="primary" size="mini" @click="cancels">取消</el-button>
-          <el-button type="primary" size="mini" @click="audits">审核</el-button>
-          <el-button type="primary" size="mini" @click="closeLine">行关闭</el-button>
+          <el-button type="primary" size="mini" v-if="lineDisable" @click="confirms">确认</el-button>
+          <el-button type="primary" size="mini" v-if="lineDisable" @click="cancels">取消</el-button>
+          <el-button type="primary" size="mini" v-if="lineDisable" @click="audits">审核</el-button>
+          <el-button type="primary" size="mini" v-if="lineDisable" @click="closeLine">行关闭</el-button>
 
-          <el-dropdown size="mini" @command="handleCommand">
+          <el-dropdown size="mini" v-if="lineDisable" @command="handleCommand">
             <el-button size="mini" type="primary" style="margin: 0 10px;">
               导出<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>

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

@@ -1088,6 +1088,35 @@ export default {
           this.basicForm.puDemandItemList.forEach(item => {
             item.demandCustomerName = this.basicForm.customerName
             item.demandCustomer = this.basicForm.customer
+            item.status = ''
+            item.buyerName = ''
+            item.buyer = ''
+            item.reservedProportion = ''
+            item.reservedPeriod = ''
+            item.reservedQty = ''
+            item.averageQtyMonth = ''
+            item.demandPeriod = ''
+            item.forecastClassify = ''
+            item.onemonthAvgVolume = ''
+            item.threemonthAvgVolume = ''
+            item.superiorAllotQty = ''
+            item.resDemandQty = ''
+            item.executeQty = ''
+            item.deliveryWarehouseName = ''
+            item.deliveryWarehouse = ''
+            item.deliveryAllocationName = ''
+            item.deliveryAllocation = ''
+            item.lastWarehouseName = ''
+            item.lastAllocationName = ''
+            item.availableQty = ''
+            item.lastStockOrgName = ''
+            item.centralWarehouseQty = ''
+            item.allotCode = ''
+            item.deliveryAddress = ''
+            item.deliveryAddressName = ''
+            item.contacts = ''
+            item.contactsPhone = ''
+            item.address = ''
           })
         }
       }
@@ -1155,7 +1184,7 @@ export default {
       console.log('eee:', source)
       // 首先对源头进行解析
       let rows = source.split("\r\n"); // 拆成一个数组
-      rows.pop()
+      // rows.pop()
       console.log('复制的数组',rows);
       console.log('列表的数组',this.basicForm.puDemandItemList)
       rows.forEach(item => {
@@ -1303,6 +1332,35 @@ export default {
         this.basicForm.puDemandItemList.forEach(item => {
           item.demandCustomerName = ''
           item.demandCustomer = ''
+          item.status = ''
+          item.buyerName = ''
+          item.buyer = ''
+          item.reservedProportion = ''
+          item.reservedPeriod = ''
+          item.reservedQty = ''
+          item.averageQtyMonth = ''
+          item.demandPeriod = ''
+          item.forecastClassify = ''
+          item.onemonthAvgVolume = ''
+          item.threemonthAvgVolume = ''
+          item.superiorAllotQty = ''
+          item.resDemandQty = ''
+          item.executeQty = ''
+          item.deliveryWarehouseName = ''
+          item.deliveryWarehouse = ''
+          item.deliveryAllocationName = ''
+          item.deliveryAllocation = ''
+          item.lastWarehouseName = ''
+          item.lastAllocationName = ''
+          item.availableQty = ''
+          item.lastStockOrgName = ''
+          item.centralWarehouseQty = ''
+          item.allotCode = ''
+          item.deliveryAddress = ''
+          item.deliveryAddressName = ''
+          item.contacts = ''
+          item.contactsPhone = ''
+          item.address = ''
         })
       }
     },

+ 30 - 15
src/views/purchase/deliveryAddress/index.vue

@@ -175,26 +175,26 @@
           @selection-change="handleSelectionChange"
         >
           <el-table-column show-overflow-tooltip type="selection" width="55" />
-          <el-table-column show-overflow-tooltip label="仓库属性" align="center" prop="warehouseProperty"/>
+          <el-table-column show-overflow-tooltip label="仓库属性" align="center" width="200" prop="warehouseProperty" :formatter="formatterWarehouseProperty"/>
           <el-table-column show-overflow-tooltip label="仓库档案名称" align="center" width="200" prop="warehouseName"/>
-          <el-table-column show-overflow-tooltip label="收货仓库编码" align="center" prop="code" width="150"/>
-          <el-table-column show-overflow-tooltip label="收货仓库名称" align="center" width="150" prop="name"/>
-          <el-table-column show-overflow-tooltip label="详细地址" align="center" width="150" prop="address"/>
-          <el-table-column show-overflow-tooltip label="物料分类" align="center" width="150" prop="materialClassifyName" />
-          <el-table-column show-overflow-tooltip label="联系人" align="center" width="150" prop="contactsName" />
-          <el-table-column show-overflow-tooltip label="联系人电话" align="center" prop="contactsPhone" width="150" />
-          <el-table-column show-overflow-tooltip label="NC档案ID" align="center" width="150" prop="createTime" />
+          <el-table-column show-overflow-tooltip label="收货仓库编码" align="center" prop="code" width="200"/>
+          <el-table-column show-overflow-tooltip label="收货仓库名称" align="center" width="200" prop="name"/>
+          <el-table-column show-overflow-tooltip label="详细地址" align="center" width="200" prop="address"/>
+          <el-table-column show-overflow-tooltip label="物料分类" align="center" width="200" prop="materialClassifyName" />
+          <el-table-column show-overflow-tooltip label="联系人" align="center" width="200" prop="contactsName" />
+          <el-table-column show-overflow-tooltip label="联系人电话" align="center" prop="contactsPhone" width="200" />
+          <el-table-column show-overflow-tooltip label="NC档案ID" align="center" width="200" prop="createTime" />
           <el-table-column show-overflow-tooltip label="备注" align="center" width="120" prop="remark" />
-          <el-table-column show-overflow-tooltip label="创建人" align="center" width="150" prop="createByName" />
-          <el-table-column show-overflow-tooltip label="创建时间" align="center" width="150" prop="createTime" />
-          <el-table-column show-overflow-tooltip label="修改人" align="center" width="150" prop="updateByName" />
-          <el-table-column show-overflow-tooltip label="修改时间" align="center" width="150" prop="updateTime" />
-          <el-table-column show-overflow-tooltip label="同步状态" align="center" width="150" prop="sendStatus">
+          <el-table-column show-overflow-tooltip label="创建人" align="center" width="200" prop="createByName" />
+          <el-table-column show-overflow-tooltip label="创建时间" align="center" width="200" prop="createTime" />
+          <el-table-column show-overflow-tooltip label="修改人" align="center" width="200" prop="updateByName" />
+          <el-table-column show-overflow-tooltip label="修改时间" align="center" width="200" prop="updateTime" />
+          <el-table-column show-overflow-tooltip label="同步状态" align="center" width="200" prop="sendStatus">
             <template slot-scope="scope">
               {{ scope.row.sendStatus == 'Y' ? '已同步' : '未同步'}}
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="启用" align="center" width="150" prop="status">
+          <el-table-column show-overflow-tooltip label="启用" align="center" width="200" prop="status">
             <template slot-scope="scope">
               {{ scope.row.status == 'Y' ? '启用' : '停用' }}
             </template>
@@ -203,7 +203,7 @@
           fixed="right"
           label="操作"
           align="center"
-          width="150"
+          width="200"
           >
           <template slot-scope="scope">
             <el-button type="text" size="mini" @click="check(scope.row)">查看</el-button>
@@ -304,6 +304,21 @@ export default {
     this.getList(this.queryParams)
   },
   methods: {
+    // 格式化表格内容
+    formatterWarehouseProperty(row) {
+      switch (row.warehouseProperty) {
+        case '1':
+          return '电商库存'
+        case '2':
+          return '区域分仓公共库存'
+        case '3':
+          return '各项目仓库存'
+        case '4':
+          return '中心仓公共库存'
+        case '5':
+          return '事业发展部仓库'
+      }
+    },
     getList(params){
       getAddressList(params).then(res => {
         if (res.code === 200) {