浏览代码

Merge branch 'develop_yh13' of http://git.chelingzhu.com/jianguan-web/qpls-md-html into develop_yh13

chenrui 2 年之前
父节点
当前提交
7e5ab75329

+ 1 - 1
public/version.json

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

+ 1 - 1
src/components/tools/UserMenu.vue

@@ -5,7 +5,7 @@
         <img style="width: 22px;height: 22px;vertical-align: middle;margin: 0 5px;" src="../../assets/icon_movie.png"/>
         <span style="vertical-align: middle;">帮助</span>
       </p>
-      <p class="help-cont" @click="showShopCar">
+      <p class="help-cont" @click="showShopCar" v-if="$hasPermissions('M_shoppingCart')">
         <a-badge :count="cartCount">
           <a-icon type="shopping-cart" style="font-size:16px;margin: 0 5px;"/>
           <span>购物车</span>

+ 3 - 0
src/layouts/BasicLayout.vue

@@ -292,6 +292,8 @@ export default {
 
     // 消息通知
     this.getNotes()
+    // 购物车
+    this.getCartList()
   },
   mounted () {
     const userAgent = navigator.userAgent
@@ -308,6 +310,7 @@ export default {
     ...mapActions([
       'setSidebar',
       'getMessageList', // 查询列表
+      'getCartList', // 购物车列表
       'hasRead' // 设置已读
     ]),
     reloadView () {},

+ 4 - 4
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -113,7 +113,7 @@
             可用库存总成本:<strong>{{ currentStock&&(currentStock.totalCurrentStockCost || currentStock.totalCurrentStockCost==0) ? toThousands(currentStock.totalCurrentStockCost) : '--' }}</strong>。
           </div>
           <div style="display: inline-block;color:#f30f30;margin-left: 60px;" >
-            注意:购物车仅限添加箭冠产品。
+            注意:购物车仅限添加箭冠已上线产品。
           </div>
         </div>
       </a-alert>
@@ -121,7 +121,7 @@
       <s-table
         class="sTable fixPagination"
         ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
+        :style="{ height: tableHeight+68.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :columns="columns"
@@ -156,7 +156,7 @@
             class="button-primary"
             @click="goWarehouseDetail(record)"
             id="inventoryQueryList-warehouseDetail-btn">出入库明细</a-button>
-          <a-button type="link" @click="addShopCar(record)">加入购物车</a-button>
+          <a-button v-if="record.dealerProduct.sysFlag==1&&record.dealerProduct.onlineFalg==1&&$hasPermissions('M_shoppingCart')" type="link" @click="addShopCar(record)">加入购物车</a-button>
           <span v-if="!$hasPermissions('B_inventoryInventoryQueryDetail') && !$hasPermissions('B_inventoryInventoryQueryStock')">--</span>
         </template>
       </s-table>
@@ -477,7 +477,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 230
+      this.tableHeight = window.innerHeight - tableSearchH - 216
     }
   },
   watch: {

+ 23 - 23
src/views/inventoryManagement/inventoryWarning/list.vue

@@ -62,32 +62,32 @@
             </a-col>
           </a-row>
         </a-form>
-      </div>
-      <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-button type="primary" v-if="$hasPermissions('B_inventoryWarningBatchSave')" id="inventoryWarningList-update" @click="handleupdate">批量更新</a-button>
-        <a-button
-          type="primary"
-          style="margin-left: 5px"
-          class="button-warning"
-          @click="openGuideModal=true"
-          v-if="$hasPermissions('B_inventoryWarningProductImport')"
-          id="inventoryWarningList-import-btn">导入产品</a-button>
-        <span style="margin-left: 5px" v-if="$hasPermissions('B_inventoryWarningBatchSave')">
-          <template v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
-        </span>
-      </div>
-      <!-- 合计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div class="ftext" slot="message" style="color:#f30f30;">
-          注意:购物车仅限添加箭冠产品。
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <a-button type="primary" v-if="$hasPermissions('B_inventoryWarningBatchSave')" id="inventoryWarningList-update" @click="handleupdate">批量更新</a-button>
+          <a-button
+            type="primary"
+            style="margin-left: 5px"
+            class="button-warning"
+            @click="openGuideModal=true"
+            v-if="$hasPermissions('B_inventoryWarningProductImport')"
+            id="inventoryWarningList-import-btn">导入产品</a-button>
+          <span style="margin-left: 5px" v-if="$hasPermissions('B_inventoryWarningBatchSave')">
+            <template v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
+          </span>
         </div>
-      </a-alert>
+        <!-- 合计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div class="ftext" slot="message" style="color:#f30f30;">
+            注意:购物车仅限添加箭冠已上线产品。
+          </div>
+        </a-alert>
+      </div>
       <!-- 列表 -->
       <s-table
         class="sTable fixPagination"
         ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
+        :style="{ height: tableHeight+68.5+'px' }"
         size="small"
         :rowKey="(record) => record.id"
         :row-selection="$hasPermissions('B_inventoryWarningBatchSave') ? { columnWidth: 40 } : null"
@@ -166,7 +166,7 @@
             class="button-primary"
             @click="handleSave(record)"
             id="inventoryWarningList-add-btn">保存</a-button>
-          <a-button type="link" @click="addShopCar(record)">加入购物车</a-button>
+          <a-button type="link" v-if="record.dealerProduct.sysFlag==1&&record.dealerProduct.onlineFalg==1&&$hasPermissions('M_shoppingCart')" @click="addShopCar(record)">加入购物车</a-button>
           <span v-if="!$hasPermissions('B_inventoryWarningSave')">--</span>
         </template>
       </s-table>
@@ -401,7 +401,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 190
     }
   },
   watch: {

+ 19 - 18
src/views/shoppingCarManagement/shoppingCar/list.vue

@@ -63,7 +63,7 @@
       ref="table"
       :style="{ height: tableHeight+84.5+'px' }"
       size="small"
-      :row-selection="modes=='pages'?{ columnWidth: 40 }:{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: !record.productEntity.purchasePrice } }) }"
+      :row-selection="modes=='pages'?{ columnWidth: 40 }:{ columnWidth: 40, getCheckboxProps: record => ({ props: { disabled: !record.productEntity.purchasePrice || !(record.productEntity.onlineFalg == 1&& record.dealerScopeFlag == 1) } }) }"
       @rowSelection="rowSelectionFun"
       rowKeyName="productSn"
       :rowKey="(record) => record.productSn"
@@ -83,12 +83,13 @@
       <!-- 产品编码 -->
       <template slot="productCode" slot-scope="text, record">
         <div v-if="modes=='pages'">
-          <span style="padding-right: 15px;">{{ text }}</span> 
+          <span style="padding-right: 15px;">{{ text }}</span>
           <a-tag v-if="record.productEntity.onlineFalg == 0">下架</a-tag>
         </div>
         <div v-else>
           <span style="padding-right: 15px;">{{ text }}</span>
           <a-tag v-if="record.productEntity.onlineFalg == 0">下架</a-tag>
+          <a-tag color="red" v-else-if="record.productEntity.onlineFalg == 1&& record.dealerScopeFlag == 0">无权限</a-tag>
         </div>
       </template>
     </s-table>
@@ -106,8 +107,8 @@ export default {
   name: 'ShoppingCarList',
   components: { STable, VSelect, ProductType, ProductBrand },
   mixins: [commonMixin],
-  props:{
-    modes:{
+  props: {
+    modes: {
       type: String,
       default: 'pages'
     }
@@ -123,7 +124,7 @@ export default {
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
-        productTypeSn3: '' ,//  产品三级分类
+        productTypeSn3: '', //  产品三级分类
         onlineFalg: undefined
       },
       paramsData: null,
@@ -134,7 +135,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return purchaseCartList(Object.assign(parameter, {productEntity:this.queryParam}, this.paramsData)).then(res => {
+        return purchaseCartList(Object.assign(parameter, { productEntity: this.queryParam }, this.paramsData)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -149,7 +150,7 @@ export default {
           return data
         })
       },
-      rowSelectionInfo: null,
+      rowSelectionInfo: null
     }
   },
   methods: {
@@ -177,13 +178,13 @@ export default {
     getColumns () {
       const _this = this
       this.columns = [
-        { title: '产品编码', dataIndex: 'productEntity.code',scopedSlots: { customRender: 'productCode' }, width: '15%', align: 'center' },
-        { title: '产品名称', dataIndex: 'productEntity.name', width: '33%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品编码', dataIndex: 'productEntity.code', scopedSlots: { customRender: 'productCode' }, width: '20%', align: 'center' },
+        { title: '产品名称', dataIndex: 'productEntity.name', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '可用库存数量', dataIndex: 'currentStockQty', width: '13%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '成本价', dataIndex: 'productEntity.purchasePrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '8%', align: 'center', customRender: function (text) { return (!text || text == ' ') ? '--' : text } },
-        { title: '包装数',scopedSlots: { customRender: 'baozh' }, dataIndex: 'productEntity.packQty', width: '8%', align: 'center' },
-        { title: '采购数量', scopedSlots: { customRender: 'purchaseQty' }, width: '15%', align: 'center' }
+        { title: '包装数', scopedSlots: { customRender: 'baozh' }, dataIndex: 'productEntity.packQty', width: '8%', align: 'center' },
+        { title: '采购数量', scopedSlots: { customRender: 'purchaseQty' }, width: '12%', align: 'center' }
       ]
     },
     //  产品分类  change
@@ -197,12 +198,12 @@ export default {
       this.rowSelectionInfo = obj || null
     },
     // 修改数量
-    updateQty(row){
-      purchaseUpdateQty({qty: row.qty, purchaseCartSn: row.purchaseCartSn}).then(res => {
-        if(res.status == 200){
+    updateQty (row) {
+      purchaseUpdateQty({ qty: row.qty, purchaseCartSn: row.purchaseCartSn }).then(res => {
+        if (res.status == 200) {
           this.$message.info(res.message)
           row.qtyBack = row.qty
-        }else{
+        } else {
           row.qty = row.qtyBack
         }
       })
@@ -216,14 +217,14 @@ export default {
       }
       this.$confirm({
         title: '提示',
-        content: '您已经选择'+rows.length+'个产品,确认要将已选产品从购物车中移除吗?',
+        content: '您已经选择' + rows.length + '个产品,确认要将已选产品从购物车中移除吗?',
         centered: true,
         onOk: () => {
           this.loading = true
           purchaseDeleteBatch({
             productSnList: rows
           }).then(res => {
-            if(res.status == 200){
+            if (res.status == 200) {
               this.$message.info(res.message)
               this.getCartList()
               this.searchForm()
@@ -260,7 +261,7 @@ export default {
         const tableSearchH = this.$refs.tableSearch.offsetHeight
         this.tableHeight = window.innerHeight - tableSearchH - (this.modes == 'pages' ? 200 : 320)
       })
-    },
+    }
   },
   watch: {
     '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度

+ 2 - 2
vue.config.js

@@ -211,8 +211,8 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        target: 'http://192.168.0.216:8503/qpls-md',
-        // target: 'http://p.iscm.360arrow.com/qpls-md',
+        // target: 'http://192.168.0.216:8503/qpls-md',
+        target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,