Browse Source

Merge branch 'deploy_0804' of jianguan-web/qpls-md-html into master

李磊 3 years ago
parent
commit
032755b355

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

@@ -50,8 +50,8 @@ export const asyncRouterMap = [
       },
       },
       // 新品列表
       // 新品列表
       {
       {
-        path: '/newProduct/:onlineFalg',
-        name: 'newProduct',
+        path: '/newProduct/list/:onlineFalg',
+        name: 'newProductList',
         component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/list'),
         component: () => import(/* webpackChunkName: "home" */ '@/views/productManagement/newProduct/list'),
         meta: {
         meta: {
           title: '新品信息',
           title: '新品信息',

+ 1 - 1
src/views/Home.vue

@@ -70,7 +70,7 @@ export default {
     // 查看更多产品
     // 查看更多产品
     seeMore () {
     seeMore () {
       this.openNewProduct = false
       this.openNewProduct = false
-      this.$router.push({ name: 'newProduct', params: { onlineFalg: this.onlineFalg } })
+      this.$router.push({ name: 'newProductList', params: { onlineFalg: this.onlineFalg } })
     },
     },
     // 关闭弹框
     // 关闭弹框
     cancelProductTips () {
     cancelProductTips () {

+ 10 - 3
src/views/productManagement/newProduct/detail.vue

@@ -3,7 +3,7 @@
     <a-page-header :ghost="false" :backIcon="false" class="newProductDetail-back">
     <a-page-header :ghost="false" :backIcon="false" class="newProductDetail-back">
       <!-- 自定义的二级文字标题 -->
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
       <template slot="subTitle">
-        <a id="newProductDetail-back-btn" href="javascript:;" @click="$router.go(-1)">
+        <a id="newProductDetail-back-btn" href="javascript:;" @click="goBack">
           <a-icon type="left" />
           <a-icon type="left" />
           返回
           返回
         </a>
         </a>
@@ -57,7 +57,8 @@ export default {
   data () {
   data () {
     return {
     return {
       itemId: null,
       itemId: null,
-      detailsData: null //  详情数据
+      detailsData: null, //  详情数据
+      pageInfo: null
     }
     }
   },
   },
   methods: {
   methods: {
@@ -71,6 +72,10 @@ export default {
           this.detailsData = null
           this.detailsData = null
         }
         }
       })
       })
+    },
+    // 返回
+    goBack () {
+      this.$router.push({ path: this.pageInfo && this.pageInfo.path, query: { closeLastOldTab: true } })
     }
     }
   },
   },
   mounted () {
   mounted () {
@@ -87,7 +92,9 @@ export default {
     }
     }
   },
   },
   beforeRouteEnter (to, from, next) {
   beforeRouteEnter (to, from, next) {
-    next(vm => {})
+    next(vm => {
+      vm.pageInfo = from
+    })
   }
   }
 }
 }
 </script>
 </script>

+ 12 - 8
src/views/purchasingManagement/purchaseOrder/basicInfoModal.vue

@@ -21,9 +21,11 @@
             name="radioGroup"
             name="radioGroup"
             v-model="form.purchaseTargetSn"
             v-model="form.purchaseTargetSn"
             @change="tragetTypeChange"
             @change="tragetTypeChange"
+            v-if="purchaseTragetType.length"
             id="purchaseOrder-basicInfo-purchaseTargetSn" >
             id="purchaseOrder-basicInfo-purchaseTargetSn" >
             <a-radio v-for="item in purchaseTragetType" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn" class="radio-s">{{ item.purchaseTargetName }}</a-radio>
             <a-radio v-for="item in purchaseTragetType" :key="item.purchaseTargetSn" :value="item.purchaseTargetSn" class="radio-s">{{ item.purchaseTargetName }}</a-radio>
           </a-radio-group>
           </a-radio-group>
+          <span v-else>没有可选择的供应商</span>
         </a-form-model-item>
         </a-form-model-item>
         <a-form-model-item label="支付方式" prop="settleStyleSn">
         <a-form-model-item label="支付方式" prop="settleStyleSn">
           <a-select placeholder="请选择支付方式" v-model="form.settleStyleSn">
           <a-select placeholder="请选择支付方式" v-model="form.settleStyleSn">
@@ -183,21 +185,23 @@ export default {
       })
       })
     },
     },
     getParentDealer () {
     getParentDealer () {
-      let params = null
-      // 向上级和总部采购
-      if (this.$hasPermissions('B_SJANDZB')) {
-        params = {}
-      }
+      const zb = this.$hasPermissions('B_SUPPLIER_ZB')
+      const sj = this.$hasPermissions('B_SUPPLIER_SJ')
+      let params = {}
       // 只能向上级采购
       // 只能向上级采购
-      if (this.$hasPermissions('B_SUPPLIER_SJ')) {
+      if (sj) {
         params.purchaseTargetType = 'DEALER_UP'
         params.purchaseTargetType = 'DEALER_UP'
       }
       }
       // 只能向总部采购
       // 只能向总部采购
-      if (this.$hasPermissions('B_SUPPLIER_ZB')) {
+      if (zb) {
         params.purchaseTargetType = 'SUPPLIER_SYS'
         params.purchaseTargetType = 'SUPPLIER_SYS'
       }
       }
+      // 总部和上级都可以
+      if (sj && zb) {
+        params = {}
+      }
       purchaseTargetList(params).then(res => {
       purchaseTargetList(params).then(res => {
-        if (res.status == 200) {
+        if (res.status == 200 && res.data[0]) {
           this.purchaseTragetType = res.data
           this.purchaseTragetType = res.data
         } else {
         } else {
           this.purchaseTragetType = []
           this.purchaseTragetType = []

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

@@ -78,7 +78,7 @@
       </div>
       </div>
       <!-- 操作按钮 -->
       <!-- 操作按钮 -->
       <div class="table-operator">
       <div class="table-operator">
-        <a-button id="purchaseOrderList-add" type="primary" v-if="$hasPermissions('B_purchaseNew')" class="button-error" @click="handleAdd">新增</a-button>
+        <a-button id="purchaseOrderList-add" type="primary" v-if="$hasPermissions('B_purchaseNew')&&($hasPermissions('B_SUPPLIER_SJ')||$hasPermissions('B_SUPPLIER_ZB'))" class="button-error" @click="handleAdd">新增</a-button>
       </div>
       </div>
       <!-- alert -->
       <!-- alert -->
       <a-alert type="info" style="margin-bottom:10px">
       <a-alert type="info" style="margin-bottom:10px">

+ 6 - 7
src/views/salesManagement/salesQuery/edit.vue

@@ -285,7 +285,6 @@ export default {
       }).then(res => {
       }).then(res => {
         this.resetSearchForm(true)
         this.resetSearchForm(true)
         if (res.status == 200) {
         if (res.status == 200) {
-          this.$refs.partQuery.pageInit()
           this.$message.info(res.message)
           this.$message.info(res.message)
         }
         }
         this.spinning = false
         this.spinning = false
@@ -304,7 +303,6 @@ export default {
         }).then(res => {
         }).then(res => {
           this.resetSearchForm(true)
           this.resetSearchForm(true)
           if (res.status == 200) {
           if (res.status == 200) {
-            this.$refs.partQuery.pageInit()
             this.$message.info(res.message)
             this.$message.info(res.message)
             this.spinning = false
             this.spinning = false
           } else {
           } else {
@@ -401,7 +399,6 @@ export default {
       }).then(res => {
       }).then(res => {
         if (res.status == 200) {
         if (res.status == 200) {
           this.resetSearchForm(true)
           this.resetSearchForm(true)
-          this.$refs.partQuery.pageInit()
           this.spinning = false
           this.spinning = false
         } else {
         } else {
           this.spinning = false
           this.spinning = false
@@ -422,7 +419,6 @@ export default {
           salesDetailDelAll({ salesBillSn: _this.detailData.salesBillSn }).then(res => {
           salesDetailDelAll({ salesBillSn: _this.detailData.salesBillSn }).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.resetSearchForm(true)
               _this.resetSearchForm(true)
-              _this.$refs.partQuery.pageInit()
             }
             }
             _this.$message.info(res.message)
             _this.$message.info(res.message)
             _this.delLoading = false
             _this.delLoading = false
@@ -445,7 +441,6 @@ export default {
           salesDetailDel({ id: row.id }).then(res => {
           salesDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
             if (res.status == 200) {
               _this.resetSearchForm(true)
               _this.resetSearchForm(true)
-              _this.$refs.partQuery.pageInit()
             }
             }
             _this.$message.info(res.message)
             _this.$message.info(res.message)
             _this.delLoading = false
             _this.delLoading = false
@@ -463,7 +458,12 @@ export default {
       if (this.dataSource && this.dataSource.length > 0) {
       if (this.dataSource && this.dataSource.length > 0) {
         const hasRow = this.dataSource.find(item => item.productSn == row.productSn && item.warehouseSn == row.warehouseSn && item.warehouseLocationSn == row.warehouseLocationSn)
         const hasRow = this.dataSource.find(item => item.productSn == row.productSn && item.warehouseSn == row.warehouseSn && item.warehouseLocationSn == row.warehouseLocationSn)
         if (hasRow) {
         if (hasRow) {
-          this.$message.info('该产品已在当前销售单中存在!')
+          // this.$message.info('该产品已在当前销售单中存在!')
+          this.productForm = {
+            productName: '',
+            productCode: hasRow.dealerProductEntity && hasRow.dealerProductEntity.code || ''
+          }
+          this.$refs.table.refresh(true)
           return
           return
         }
         }
       }
       }
@@ -515,7 +515,6 @@ export default {
         if (res.status == 200) {
         if (res.status == 200) {
           this.resetSearchForm(true)
           this.resetSearchForm(true)
           this.$message.success('产品添加成功', 2.5)
           this.$message.success('产品添加成功', 2.5)
-          this.$refs.partQuery.pageInit()
         }
         }
         this.isInster = false
         this.isInster = false
         this.spinning = false
         this.spinning = false

+ 2 - 2
vue.config.js

@@ -109,8 +109,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
     proxy: {
       '/api': {
       '/api': {
-        target: 'http://192.168.16.151:80/qpls-md',
-        // target: 'http://qpls-md.360arrow.com.cn/qpls-md', //  Ô¤·¢²¼
+        // target: 'http://192.168.16.103:8503/qpls-md',
+        target: 'http://qpls-md.360arrow.com.cn/qpls-md', //  Ô¤·¢²¼
         // target: 'http://qpls-md.360arrow.com/qpls-md', //  Éú²ú
         // target: 'http://qpls-md.360arrow.com/qpls-md', //  Éú²ú
         // ws: false,
         // ws: false,
         ws: true,
         ws: true,