소스 검색

bug修改

黄梓星 2 년 전
부모
커밋
c01f6246c0

+ 11 - 1
src/views/purchase/DemandSummary/add.vue

@@ -103,7 +103,7 @@
         <el-table-column show-overflow-tooltip label="处理确认时间" align="center" prop="affirmerTime" width="150"/>
         <!-- <el-table-column show-overflow-tooltip label="转请购时间" align="center" prop="code"/>
         <el-table-column show-overflow-tooltip label="转请购人员" align="center" prop="code"/> -->
-        <el-table-column show-overflow-tooltip label="价格类型" align="center" prop="priceType" width="150"/>
+        <el-table-column show-overflow-tooltip label="价格类型" align="center" prop="priceType" width="150" :formatter="priceClass"/>
       </el-table>
     </el-card>
 
@@ -126,6 +126,16 @@ export default {
   },
   data() {
     return{
+      priceClass(row) {
+        switch (row.priceType) {
+          case 'order':
+            return '订货价'
+          case 'consignment':
+            return '寄售价'
+          case 'adjusted':
+            return '调货价'
+        }
+      },
       // 不能直接改变props传来的值
       sonPageStu: this.pageStu,
       sonDisable: this.disable,

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

@@ -285,6 +285,7 @@
           :key="isUpdate"
         >
           <el-table-column type="selection" width="60" />
+          <!-- <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo"/> -->
           <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="120px" :formatter="hangStatus"/>
           <el-table-column show-overflow-tooltip label="一级品类" align="center" prop="materialClassifyOneName" width="120px"/>
           <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="180px"/>
@@ -346,8 +347,7 @@
           <el-table-column show-overflow-tooltip label="有效期单位" align="center" prop="validityPeriodUnit" width="100px"/>
           <el-table-column show-overflow-tooltip label="业务类型" align="center" prop="businessType" :formatter="formatterBusinessType"/>
           <el-table-column show-overflow-tooltip label="安全库存量" align="center" prop="safetyStock" width="100px"/>
-          <el-table-column show-overflow-tooltip label="单据来源" align="center" prop="billSource"/>
-          <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo"/>
+          <el-table-column show-overflow-tooltip label="单据来源" align="center" prop="billSource" :formatter="formatterSource"/>
           <el-table-column show-overflow-tooltip label="注册人" align="center" prop="registrant"/>
           <!-- <el-table-column label="可用量" align="center" prop="qty"/> -->
           <el-table-column show-overflow-tooltip label="总需与终采差异" align="center" prop="buyDiscrepancy" width="120px"/>
@@ -445,6 +445,18 @@ export default {
             return '合作部门需求'
         }
       },
+      formatterSource(row) {
+        switch (row.billSource) {
+          case '1':
+            return '手工导入'
+          case '2':
+            return '按客户计算'
+          case '3':
+            return '按仓库计算'
+          case '4':
+            return '手工新增'
+        }
+      },
       isUpdate: false,
       expanded: false,
       // 页面配置

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

@@ -42,7 +42,7 @@
 
          <el-col :span="1.5">
             <el-form-item label="需求客户" prop="customer" :rules="{ required: true, message: '请选择需求客户', trigger: 'blur' }">
-              <el-select clearable size="small" v-model="basicForm.customer" :disabled="sonDisable" @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')" style="width: 200px">
+              <el-select clearable size="small" v-model="basicForm.customer" :disabled="sonDisable" @clear="cleanCustomer" @focus="chooseOrg('CUSTOMER_PARAM', true, '选择客户')" style="width: 200px">
                 <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id" />
               </el-select>
             </el-form-item>
@@ -1018,6 +1018,17 @@ export default {
         this.basicForm.puDemandItemList[index].additionalSupplier = null
       }
     },
+    // 清除需求客户将明细行内也清空
+    cleanCustomer() {
+      this.basicForm.customer = ''
+      this.basicForm.customerName = ''
+      if (this.basicForm.puDemandItemList.length !== 0) {
+        this.basicForm.puDemandItemList.forEach(item => {
+          item.demandCustomerName = ''
+          item.demandCustomer = ''
+        })
+      }
+    },
   }
 }
 </script>

+ 7 - 23
src/views/purchase/PurchaseDemandList/index.vue

@@ -94,30 +94,15 @@
             </el-form-item>
           </el-col>
           <el-col :span="1.5">
-            <el-form-item label="审批结束日期">
-              <el-date-picker
-                v-model="queryParams.approverFinishTime"
-                type="date"
-                clearable
-                value-format="yyyy-MM-dd"
+            <el-form-item label="备注">
+              <el-input
+                v-model.trim="queryParams.remark"
                 size="small"
+                clearable
                 style="width: 200px"
-              >
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row :gutter="10">
-          <el-col :span="1.5">
-            <el-form-item label="备注">
-            <el-input
-              v-model.trim="queryParams.remark"
-              size="small"
-              clearable
-              style="width: 200px"
-            />
-            </el-form-item>
-          </el-col>
+              />
+              </el-form-item>
+            </el-col>
         </el-row>
         </div>
       </CollapseTransition>
@@ -283,7 +268,6 @@ export default {
         billType: '',
         demandDept: '',
         demandDate: '',
-        approverFinishTime: '',
         remark: '',
         pageNum: 1,
         pageSize: 5

+ 13 - 3
src/views/purchase/transferOrder/add.vue

@@ -621,6 +621,7 @@ export default {
       sonDisable: this.disable,
       basicForm: {
         deliveryInventoryOrg: '',
+        deliveryInventoryOrgCode: '',
         deliveryInventoryOrgName: '',
         billType: '',
         code: '',
@@ -644,6 +645,7 @@ export default {
         customer: '',
         customerName: '',
         deliveryWarehouse: '',
+        deliveryWarehouseCode: '',
         deliveryWarehouseName: '',
         storageWarehouse: '',
         storageWarehouseName: '',
@@ -808,6 +810,9 @@ export default {
         if (type == 'WAREHOUSE_PARAM' && title == '调出仓库') {
           this.chuHouseOptions = res.rows
         }
+        if (type == 'UNIT_PARAM') {
+          this.materialInfo[this.tableIndex].unitCode = res.rows[0].code
+        }
       })
     },
     addLine() {
@@ -823,6 +828,7 @@ export default {
         originPlaceName: null,
         model: null,
         unit: null,
+        unitCode: null,
         unitName: null,
         deliveryWarehouseName: null,
         qty: null,
@@ -875,6 +881,7 @@ export default {
       if (this.referCondition.title == '调出库存组织') {
         this.chuOrgOptions = selection
         this.basicForm.deliveryInventoryOrg = selection[0].id
+        this.basicForm.deliveryInventoryOrgCode = selection[0].code
         this.basicForm.deliveryInventoryOrgName = selection[0].name
       }
       if (this.referCondition.title == '调入库存组织') {
@@ -913,6 +920,7 @@ export default {
       if (this.referCondition.title == '调出仓库') {
         this.chuHouseOptions = selection
         this.basicForm.deliveryWarehouse = selection[0].id
+        this.basicForm.deliveryWarehouseCode = selection[0].code
         this.basicForm.deliveryWarehouseName = selection[0].name
       }
       if (this.referCondition.title == '调出货位') {
@@ -960,14 +968,16 @@ export default {
       this.materialInfo[this.tableIndex].manufacturer = selection[0].manufacturerIdName
       this.materialInfo[this.tableIndex].marketingApprovalPersonal = selection[0].registrant
       this.materialInfo[this.tableIndex].production = selection[0].productionPermit
+      // 根据物料单位id查询单位code
+      this.reBackRefer('UNIT_PARAM', selection[0].unitId)
     },
     // 明细行选择批次号
     chooseBatch(index) {
       this.tableIndex = index
-      this.referConditionMx.orgCode = this.basicForm.deliveryInventoryOrg
+      this.referConditionMx.orgCode = this.basicForm.deliveryInventoryOrgCode
       this.referConditionMx.materialCode = this.materialInfo[this.tableIndex].material
-      this.referConditionMx.unitCode = this.materialInfo[this.tableIndex].unit
-      this.referConditionMx.warehouseCode = this.basicForm.deliveryWarehouse
+      this.referConditionMx.unitCode = this.materialInfo[this.tableIndex].unitCode
+      this.referConditionMx.warehouseCode = this.basicForm.deliveryWarehouseCode
       this.$refs.batchRefer.init(this.referConditionMx)
     },
     selectBatch(selection) {