lilei 4 лет назад
Родитель
Сommit
87215b05e7

+ 18 - 0
src/api/purchase.js

@@ -11,6 +11,24 @@ export const purchaseList = (params) => {
     method: 'post'
   })
 }
+
+// 采购入库子单列表
+export const receivingQuery = (params) => {
+  return axios({
+    url: `/receiving/query`,
+    data: params,
+    method: 'post'
+  })
+}
+// 采购入库详细列表
+export const receivingDetail = (params) => {
+  return axios({
+    url: `/receivingDetail/queryPage/${params.pageNo}/${params.pageSize}`,
+    data: params,
+    method: 'post'
+  })
+}
+
 //  采购 详情
 export const purchaseDetail = (params) => {
   return axios({

+ 9 - 4
src/views/common/productType.js

@@ -4,7 +4,7 @@ const ProductType = {
       <a-cascader
         @change="handleChange"
         change-on-select
-        :value="value"
+        :value="defaultVal"
 		expand-trigger="hover"
         :options="productTypeList"
         :fieldNames="{ label: 'productTypeName', value: 'productTypeSn', children: 'children' }"
@@ -13,7 +13,7 @@ const ProductType = {
         allowClear />
     `,
   props: {
-    defaultVal: {
+    value: {
       type: Array,
       defatut: function(){
         return []
@@ -26,16 +26,21 @@ const ProductType = {
   },
   data() {
     return {
-      value: this.defaultVal,
+      defaultVal: this.value,
       productTypeList: []
     };
   },
+  watch: {
+    value(newValue, oldValue) {
+      this.defaultVal = newValue
+    }
+  },
   mounted() {
     this.getProductType()
   },
   methods: {
     handleChange(value) {
-      this.value = value;
+      this.defaultVal = value;
       this.$emit('change', this.value);
     },
     //  产品分类列表

+ 2 - 2
src/views/purchasingManagement/purchaseOrder/warehousing.vue

@@ -74,7 +74,7 @@
 
 <script>
 import { STable, VSelect } from '@/components'
-import { purchaseDetailBySn, purchaseWriteStockIn } from '@/api/purchase'
+import { purchaseDetailBySn, purchaseWriteStockIn, receivingQuery, receivingDetail } from '@/api/purchase'
 import { purchaseDetailList, purchaseUpdateWarehouse } from '@/api/purchaseDetail'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '../../common/productBrand.js'
@@ -176,7 +176,7 @@ export default {
     },
     //  详情
     getDetail () {
-      purchaseDetailBySn({ sn: this.$route.params.sn }).then(res => {
+      receivingQuery({ purchaseBillSn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.detail = res.data
         } else {