Bladeren bron

价格显示

lilei 2 jaren geleden
bovenliggende
commit
6406164afd

+ 1 - 1
public/version.json

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

+ 16 - 0
src/api/shelf.js

@@ -51,6 +51,22 @@ export const shelfProductSave = (params) => {
     method: 'post'
   })
 }
+// 获取价格显示
+export const getShelfPriceShow = (params) => {
+  return axios({
+    url: `/bizparam/getShelfPriceShow`,
+    data: params,
+    method: 'post'
+  })
+}
+// 更新价格显示
+export const updateShelfPriceShow = (params) => {
+  return axios({
+    url: `/bizparam/updateShelfPriceShow`,
+    data: params,
+    method: 'post'
+  })
+}
 // 货架  货位产品 下载模板
 export const shelfProductDownload = params => {
   return axios.request({

+ 17 - 7
src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue

@@ -64,7 +64,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { VSelect } from '@/components'
 import custList from '@/views/common/custList.vue'
-import { shelfSave } from '@/api/shelf'
+import { shelfSave, updateShelfPriceShow } from '@/api/shelf'
 export default {
   name: 'ShelfSetBasicInfoModal',
   components: { VSelect, custList },
@@ -121,12 +121,22 @@ export default {
           _this.spinning = true
           shelfSave(form).then(res => {
             if (res.status == 200) {
-              _this.$message.success(res.message)
-              setTimeout(() => {
-                _this.isShow = false
-                _this.$emit('ok', res.data)
-                _this.spinning = false
-              }, 100)
+              // 更新价格显示
+              updateShelfPriceShow({
+                shelfSn: form.shelfSn,
+                paramValue: form.showPrice
+              }).then(ret => {
+                if (ret.status == 200) {
+                  _this.$message.success(ret.message)
+                  setTimeout(() => {
+                    _this.isShow = false
+                    _this.$emit('ok', res.data)
+                    _this.spinning = false
+                  }, 100)
+                } else {
+                  _this.spinning = false
+                }
+              })
             } else {
               _this.spinning = false
             }

+ 14 - 3
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -39,7 +39,7 @@
                     价格显示<a-icon type="question-circle" style="color: rgba(0,0,0,.65);font-size: 16px;margin-left: 2px;vertical-align: sub;cursor: pointer;" />
                   </a-tooltip>
                 </template>
-                非铺货产品——{{ basicInfoData&&basicInfoData.showPrice ? '显示': '不显示' }}价格
+                非铺货产品——{{ showPrice == '1' ? '显示': '不显示' }}价格
               </a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
@@ -155,7 +155,7 @@ import bindProductModal from './bindProductModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import importHuoweiModal from './importHuoweiModal.vue'
-import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn } from '@/api/shelf'
+import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn, getShelfPriceShow } from '@/api/shelf'
 export default {
   name: 'ShelfMonitoringWarehousing',
   components: { STable, VSelect, commonModal, bindProductModal, addHwModal, ImportGuideModal, basicInfoModal, importHuoweiModal },
@@ -206,10 +206,20 @@ export default {
       modalType: null,
       openInfoModal: false,
       openHwModal: false,
-      openImportModal: false
+      openImportModal: false,
+      showPrice: ''
     }
   },
   methods: {
+    // 获取价格显示设置
+    getShelfPriceShow () {
+      getShelfPriceShow({ shelfSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.basicInfoData.showPrice = res.data.paramValue
+          this.showPrice = res.data.paramValue
+        }
+      })
+    },
     // 导入或新增货位
     addHW (type) {
       // 导入货位
@@ -239,6 +249,7 @@ export default {
       shelfDetail({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
+          this.getShelfPriceShow()
         } else {
           this.basicInfoData = null
         }

+ 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.215:8503/qpls-md',
-        target: 'http://p.iscm.360arrow.com/qpls-md',
+        target: 'http://192.168.0.215:8503/qpls-md',
+        // target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,
         changeOrigin: true,