lilei 3 anos atrás
pai
commit
63d99487b5

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1653896091754
+  "version": 1653901671682
 }

+ 2 - 2
src/config/router.config.js

@@ -622,7 +622,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'add/:sn',
+                path: 'add/:sn/:dealerSn',
                 name: 'purchaseOrderAdd',
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
                 meta: {
@@ -633,7 +633,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:sn',
+                path: 'edit/:sn/:dealerSn',
                 name: 'purchaseOrderEdit',
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseOrder/edit.vue'),
                 meta: {

+ 12 - 1
src/views/common/productBrand.js

@@ -26,6 +26,10 @@ const ProductBrand = {
     sysFlag: {
       type: [String,Number],
       default: ''
+    },
+    tenantId: {
+      type: String,
+      default: ''
     }
   },
   data() {
@@ -40,6 +44,9 @@ const ProductBrand = {
   watch: {
     value(newValue, oldValue) {
       this.defaultVal = newValue
+    },
+    tenantId(newValue, oldValue){
+      console.log(newValue)
     }
   },
   methods: {
@@ -57,7 +64,11 @@ const ProductBrand = {
     },
     //  产品品牌列表, sysFlag: 1 箭冠 0 自建
     getProductBrand () {
-      dealerProductBrandQuery({ 'sysFlag': this.sysFlag }).then(res => {
+      const params = {'sysFlag': this.sysFlag}
+      if(this.tenantId!="NONE"){
+        params.tenantId = this.tenantId
+      }
+      dealerProductBrandQuery(params).then(res => {
         if (res.status == 200) {
           this.productBrandList = res.data
         } else {

+ 14 - 3
src/views/common/productType.js

@@ -26,7 +26,11 @@ const ProductType = {
     },
     isDealer: {
       type: Boolean,
-      default: false
+      default: true
+    },
+    tenantId: {
+      type: String,
+      default: ''
     }
   },
   data () {
@@ -38,6 +42,9 @@ const ProductType = {
   watch: {
     value (newValue, oldValue) {
       this.defaultVal = newValue
+    },
+    tenantId(newValue, oldValue){
+      console.log(newValue)
     }
   },
   mounted () {
@@ -50,8 +57,12 @@ const ProductType = {
     },
     //  产品分类列表
     getProductType () {
+      const params = {}
+      if(this.tenantId!="NONE"){
+        params.tenantId = this.tenantId
+      }
       if(this.isDealer){
-        dealerProductTypeList({}).then(res => {
+        dealerProductTypeList(params).then(res => {
           if (res.status == 200) {
             this.productTypeList = res.data
           } else {
@@ -59,7 +70,7 @@ const ProductType = {
           }
         })
       }else{
-        productTypeQuery({}).then(res => {
+        productTypeQuery(params).then(res => {
           if (res.status == 200) {
             this.productTypeList = res.data
           } else {

+ 5 - 2
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -70,13 +70,13 @@
                     </a-col>
                     <a-col :md="4" :sm="24">
                       <a-form-item label="产品分类">
-                        <ProductType id="purchaseOrderEdit-productType" @change="changeProductType" v-model="productType"></ProductType>
+                        <ProductType id="purchaseOrderEdit-productType" :isDealer="true" :tenantId="$route.params.dealerSn" @change="changeProductType" v-model="productType"></ProductType>
                       </a-form-item>
                     </a-col>
                     <template v-if="advanced">
                       <a-col :md="4" :sm="24">
                         <a-form-item label="产品品牌">
-                          <ProductBrand id="purchaseOrderEdit-productBrand" v-model="queryParam.productBrandSn"></ProductBrand>
+                          <ProductBrand id="purchaseOrderEdit-productBrand" :tenantId="$route.params.dealerSn" v-model="queryParam.productBrandSn"></ProductBrand>
                         </a-form-item>
                       </a-col>
                     </template>
@@ -350,6 +350,9 @@ export default {
     }
   },
   computed: {
+    isDealerUp () {
+      return this.detail && this.detail.purchaseTargetType == 'DEALER_UP'
+    },
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },

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

@@ -263,11 +263,11 @@ export default {
     },
     //  基本信息  保存
     handleOk (row) {
-      this.$router.push({ name: `purchaseOrderAdd`, params: { sn: row.purchaseBillSn } })
+      this.$router.push({ name: `purchaseOrderAdd`, params: { sn: row.purchaseBillSn, dealerSn: (row.purchaseTargetType == 'DEALER_UP' ? row.purchaseTargetSn : 'NONE') } })
     },
     //  编辑
     handleEdit (row) {
-      this.$router.push({ name: `purchaseOrderEdit`, params: { sn: row.purchaseBillSn } })
+      this.$router.push({ name: `purchaseOrderEdit`, params: { sn: row.purchaseBillSn, dealerSn: (row.purchaseTargetType == 'DEALER_UP' ? row.purchaseTargetSn : 'NONE') } })
     },
     //  详情
     handleDetail (row) {