1004749546@qq.com 4 سال پیش
والد
کامیت
a8b40f1ded
1فایلهای تغییر یافته به همراه17 افزوده شده و 10 حذف شده
  1. 17 10
      src/views/allocationManagement/warehouseAllocation/edit.vue

+ 17 - 10
src/views/allocationManagement/warehouseAllocation/edit.vue

@@ -89,14 +89,14 @@
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
-                    <a-form-item label="产品类别" prop="brandSn">
+                    <a-form-item label="产品类别" prop="typeName">
                       <a-cascader
                         :field-names="{ label: 'productTypeName', value: 'productTypeSn', children: 'children'}"
                         :options="typeData"
-                        id="warehouseAllocationEdit-state"
+                        id="warehouseAllocationEdit-typeName"
                         placeholder="请选择产品类别"
                         allowClear
-                        v-model="queryParam.brand" />
+                        v-model="typeName" />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24">
@@ -245,7 +245,7 @@
               <a-button
                 size="small"
                 :loading="delLoading"
-                @click="handleDel(record,0)"
+                @click="handleDel({},0)"
                 type="danger"
                 id="warehouseAllocationEdit-del-all-btn"
                 style="margin: 0 0 8px 8px;">整单删除</a-button>
@@ -354,13 +354,13 @@ export default {
   data () {
     return {
       id: this.$route.params.id, // 单据id
+	  typeName: [], // 类别
       queryParam: {
         outWarehouseSn: '', // 调出仓库sn
         productCode: '', // 产品编码
         productName: '', // 产品名称
         productOrigCode: '', // 原厂编码
         brandSn: undefined, // 品牌
-        typeName: '', // 类别
         outWarehouseLocationName: undefined // 调出仓位
       },
       chooseParam: {
@@ -614,7 +614,7 @@ export default {
 		 this.queryParam.productName = '' // 产品名称
 		 this.queryParam.productOrigCode = '' // 原厂编码
 		 this.queryParam.brandName = undefined // 品牌
-		 this.queryParam.typeName = '' // 类别
+		 this.typeName = [] // 类别
 		 this.queryParam.outWarehouseLocationName = undefined // 调出仓位
 		 this.chooseParam.productCode = ''
 		 this.chooseParam.productName = ''
@@ -627,7 +627,7 @@ export default {
       this.queryParam.productName = '' // 产品名称
       this.queryParam.productOrigCode = '' // 原厂编码
       this.queryParam.brandName = undefined // 品牌
-      this.queryParam.typeName = '' // 类别
+      this.typeName = [] // 类别
       this.queryParam.outWarehouseLocationName = undefined // 调出仓位
       this.getProductList()
     },
@@ -688,10 +688,17 @@ export default {
       this.pageNo = pagination && pagination.current ? pagination.current : this.pageNo
       this.pageSize = pagination && pagination.pageSize ? pagination.pageSize : this.pageSize
       this.pagination.current = this.pageNo
-      productQuery(Object.assign({
+	  const params = Object.assign({
         pageNo: this.pageNo,
         pageSize: this.pageSize
-      }, this.queryParam)).then(res => {
+      }, this.queryParam)
+	  if (this.typeName.length) {
+	  		  params.productTypeSn1 = this.typeName[0]
+	  		  params.productTypeSn2 = this.typeName[1] || ''
+	  		  params.productTypeSn3 = this.typeName[2] || ''
+	  }
+	  console.log(this.typeName, 'queryParam')
+      productQuery(params).then(res => {
 		  if (res.status == 200) {
 			 const data = res.data
 			 const no = (data.pageNo - 1) * data.pageSize
@@ -758,7 +765,7 @@ export default {
           let params = {}
           if (type == 0) {
             params = {
-              allocationWarehouseSn: this.chooseParam.allocationWarehouseSn
+              allocationWarehouseSn: _this.chooseParam.allocationWarehouseSn
             }
             _this.delLoading = true
           } else {