lilei před 1 rokem
rodič
revize
8a1c78909d

+ 1 - 1
public/version.json

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

+ 4 - 5
src/api/shelf.js

@@ -86,16 +86,15 @@ export const shelfProductEnable = (params) => {
 // 获取价格显示
 export const getShelfPriceShow = (params) => {
   return axios({
-    url: `/bizparam/getShelfPriceShow`,
-    data: params,
-    method: 'post'
+    url: `/shelf/queryShelfPriceShowParam/${params.shelfSn}`,
+    method: 'get'
   })
 }
 // 更新价格显示
 export const updateShelfPriceShow = (params) => {
   return axios({
-    url: `/bizparam/updateShelfPriceShow`,
-    data: params,
+    url: `/shelf/updateShelfPriceShowParam/${params.shelfSn}`,
+    data: params.paramValue,
     method: 'post'
   })
 }

+ 1 - 1
src/views/common/custList.vue

@@ -60,7 +60,7 @@ export default {
       default: false
     },
     dealerFlag: { // 0不含下级,1 只是下级,all是全部
-      type: String,
+      type: [String, Number],
       default: 'all'
     }
   },

+ 45 - 3
src/views/numsGoodsShelves/approveStore/authPass.vue

@@ -137,6 +137,27 @@
                   placeholder="请输入大于100的数字(最多允许两位小数)"></a-input-number>
               </a-form-model-item>
             </a-col>
+            <a-col :span="12">
+              <a-form-model-item prop="showPrice">
+                <template slot="label">
+                  <a-tooltip placement="top">
+                    <template slot="title">
+                      1、不勾选则不显示价格,非货架产品只显示车主价,不选择车主价时,非货架产品不显示价格<br>
+                      2、结算价:既易码通进货价
+                    </template>
+                    价格权限设置<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>
+                <a-checkbox-group v-model="showPrice">
+                  <a-checkbox value="shelf_price_show">
+                    车主价
+                  </a-checkbox>
+                  <a-checkbox value="shelf_cost_show">
+                    结算价
+                  </a-checkbox>
+                </a-checkbox-group>
+              </a-form-model-item>
+            </a-col>
           </a-row>
           <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 30px;">
             <a-button type="primary" @click="saveForm" size="large" id="authPass-btn-submit" style="padding: 0 60px;">审核通过</a-button>
@@ -153,6 +174,7 @@ import { STable, VSelect, Upload } from '@/components'
 import { getAreaCgj } from '@/api/data'
 import custList from '@/views/common/custList.vue'
 import { xprhStoreApplyDetail, xprhStoreApplyAudit } from '@/api/approveStore'
+import { updateShelfPriceShow } from '@/api/shelf'
 export default {
   name: 'ApproveStoreAuthPass',
   components: { STable, VSelect, custList, Upload },
@@ -184,6 +206,7 @@ export default {
         applySn: undefined,
         auditStatus: 'PASS' // 通过
       },
+      showPrice:[], // 价格显示
       rules: {
         storeImage: [{ required: true, message: '请上传门头照片', trigger: 'change' }],
         storeName: [{ required: true, message: '请输入门店名称', trigger: 'change' }],
@@ -269,9 +292,28 @@ export default {
       _this.spinning = true
       xprhStoreApplyAudit(_this.form).then(res => {
         if (res.status == 200) {
-          _this.$message.success(res.message)
-          _this.handleBack()
-          _this.spinning = false
+          const shelfSn = res.data.shelfSn
+          // 更新价格显示设置
+          const priceStr = [{paramCode: 'shelf_price_show',paramValue:0},{paramCode: 'shelf_cost_show',paramValue:0}]
+          priceStr.map(item => {
+             item.paramValue = _this.showPrice.includes(item.paramCode) ? 1 : 0
+          })
+          // 更新价格显示
+          updateShelfPriceShow({
+            shelfSn: shelfSn,
+            paramValue: priceStr
+          }).then(ret => {
+            if (ret.status == 200) {
+              setTimeout(() => {
+                _this.$message.success(res.message)
+                _this.handleBack()
+                _this.spinning = false
+              }, 100)
+            } else {
+              _this.spinning = false
+            }
+          })
+          
         } else {
           _this.spinning = false
         }

+ 3 - 2
src/views/numsGoodsShelves/approveStore/list.vue

@@ -105,14 +105,15 @@ export default {
       },
       columns: [
         { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '提交时间', dataIndex: 'applyTime', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '提交时间', dataIndex: 'applyTime', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '联系人手机', dataIndex: 'contactPhone', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '联系人姓名', dataIndex: 'contactName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '门店名称', dataIndex: 'storeName', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '门店地址', dataIndex: 'addrDetail', width: '28%', align: 'center', scopedSlots: { customRender: 'addr' } },
+        { title: '门店地址', dataIndex: 'addrDetail', width: '22%', align: 'center', scopedSlots: { customRender: 'addr' } },
         { title: '门头照片', dataIndex: 'storeImage', width: '6%', align: 'center', scopedSlots: { customRender: 'imageUrl' } },
         { title: '营业执照', dataIndex: 'licenseImage', width: '6%', align: 'center', scopedSlots: { customRender: 'imageUrl' } },
         { title: '审核状态', dataIndex: 'auditStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '价格权限设置', dataIndex: 'storeName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ],
       // 加载数据方法 必须为 Promise 对象

+ 38 - 38
src/views/numsGoodsShelves/shelfSet/basicInfoModal.vue

@@ -31,26 +31,25 @@
           </template>
           <custList ref="custList" :dealerFlag="0" :isEnabled="true" @change="custChange"></custList>
         </a-form-model-item>
-        <!-- <a-form-model-item prop="showPrice">
+        <a-form-model-item prop="showPrice">
           <template slot="label">
             <a-tooltip placement="top">
               <template slot="title">
-                1、非铺货产品,是指不是货架上的产品<br>
-                2、终端会员价,对于汽修厂来说,即进货价<br>
-                3、如果该产品在销售单里有销售记录,则使用最近一次销售价,如果没有销售记录,则使用箭冠总公司的终端会员价
+                1、不勾选则不显示价格,非货架产品只显示车主价,不选择车主价时,非货架产品不显示价格<br>
+                2、结算价:既易码通进货价
               </template>
-              价格显示<a-icon type="question-circle" style="color: rgba(0,0,0,.65);font-size: 16px;margin-left: 2px;vertical-align: sub;cursor: pointer;" />
+              价格权限设置<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>
-          <a-select v-model="form.showPrice" placeholder="请选择价格显示">
-            <a-select-option value="1">
-              非铺货产品——显示价格
-            </a-select-option>
-            <a-select-option value="0">
-              非铺货产品——不显示价格
-            </a-select-option>
-          </a-select>
-        </a-form-model-item> -->
+          <a-checkbox-group v-model="form.showPrice">
+            <a-checkbox value="shelf_price_show">
+              车主价
+            </a-checkbox>
+            <a-checkbox value="shelf_cost_show">
+              结算价
+            </a-checkbox>
+          </a-checkbox-group>
+        </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
         <a-button type="primary" id="shelfSet-basicInfo-modal-save" @click="handleSave">保存</a-button>
@@ -91,7 +90,7 @@ export default {
       spinning: false,
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
-        labelCol: { span: 5 },
+        labelCol: { span: 6 },
         wrapperCol: { span: 17 }
       },
       form: {
@@ -102,7 +101,7 @@ export default {
       rules: {
         shelfName: [{ required: true, message: '请输入货架名称', trigger: 'change' }],
         customerSn: [{ required: true, message: '请选择关联客户', trigger: 'change' }],
-        showPrice: [{ required: true, message: '请选择价格显示', trigger: 'change' }]
+        // showPrice: [{ required: true, message: '请选择价格显示', trigger: 'change' }]
       }
     }
   },
@@ -121,28 +120,29 @@ 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)
+              const paramValue = []
+              this.nowData.showPrice.map(item => {
+                paramValue.push({
+                  paramCode: item.paramCode,
+                  paramValue: form.showPrice.includes(item.paramCode) ? 1 : 0
+                })
+              })
               // 更新价格显示
-              // 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
-              //   }
-              // })
+              updateShelfPriceShow({
+                shelfSn: form.shelfSn,
+                paramValue: paramValue
+              }).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
             }
@@ -169,7 +169,7 @@ export default {
         const _this = this
         this.$nextTick(() => {
           _this.form.shelfName = _this.nowData.shelfName
-          // _this.form.showPrice = _this.nowData.showPrice
+          _this.form.showPrice = _this.nowData.showPrice.filter(item => item.paramValue == 1).map(item => item.paramCode)
           const custome = _this.nowData.customerEntity
           if (custome) {
             _this.form.customerSn = custome.customerSn || ''

+ 48 - 32
src/views/numsGoodsShelves/shelfSet/set.vue

@@ -15,7 +15,7 @@
               <span>基础信息</span>
               <a-button icon="edit" size="small" type="link" style="margin-left: 20px;color: #39f;" @click.stop="openInfoModal = true">编辑</a-button>
             </template>
-            <a-descriptions :column="3">
+            <a-descriptions :column="4">
               <a-descriptions-item label="货架名称">{{ basicInfoData&&basicInfoData.shelfName || '--' }}</a-descriptions-item>
               <a-descriptions-item>
                 <template slot="label">
@@ -28,19 +28,18 @@
                 </template>
                 {{ (basicInfoData&&basicInfoData.customerEntity&&basicInfoData.customerEntity.customerName) || '--' }}
               </a-descriptions-item>
-              <!-- <a-descriptions-item>
+              <a-descriptions-item>
                 <template slot="label">
                   <a-tooltip placement="top">
                     <template slot="title">
-                      1、非铺货产品,是指不是货架上的产品<br>
-                      2、终端会员价,对于汽修厂来说,即进货价<br>
-                      3、如果该产品在销售单里有销售记录,则使用最近一次销售价,如果没有销售记录,则使用箭冠总公司的终端会员价
+                      1、不勾选则不显示价格,非货架产品只显示车主价,不选择车主价时,非货架产品不显示价格<br>
+                      2、结算价:既易码通进货价
                     </template>
-                    价格显示<a-icon type="question-circle" style="color: rgba(0,0,0,.65);font-size: 16px;margin-left: 2px;vertical-align: sub;cursor: pointer;" />
+                    价格权限设置<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>
-                非铺货产品——{{ showPrice == '1' ? '显示': '不显示' }}价格
-              </a-descriptions-item> -->
+                <span>{{showPriceStr.length ? showPriceStr.join("/") : '--'}}</span>
+              </a-descriptions-item>
             </a-descriptions>
           </a-collapse-panel>
         </a-collapse>
@@ -93,6 +92,15 @@
           :showPagination="false"
           :defaultLoadData="false"
           bordered>
+          <span slot="customTitle">
+            结算价
+            <a-popover>
+              <template slot="content">
+                既易码通进货价
+              </template>
+              <a-icon type="question-circle"/>
+            </a-popover>
+          </span>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <a-button
@@ -101,7 +109,7 @@
               :class="record.enableFlag==1?'button-error':'button-primary'"
               v-if="record.shelfProductApiEntity&&(!record.shelfProductApiEntity.qty||(record.enableFlag==0&&record.shelfProductApiEntity.qty))&&record.shelfProductApiEntity.productSn"
               @click="handleEnable(record)"
-            >{{record.enableFlag==1?'禁用':'启用'}}</a-button>
+            >{{ record.enableFlag==1?'禁用':'启用' }}</a-button>
             <a-button
               size="small"
               type="link"
@@ -165,8 +173,7 @@ import bindProductModal from './bindProductModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
 import basicInfoModal from './basicInfoModal.vue'
 import importHuoweiModal from './importHuoweiModal.vue'
-// , getShelfPriceShow
-import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn, shelfProductEnable } from '@/api/shelf'
+import { shelfDetail, shelfProductList, shelfProductBatchInsert, delShelfPlaceSn, shelfProductEnable, getShelfPriceShow } from '@/api/shelf'
 export default {
   name: 'ShelfMonitoringWarehousing',
   components: { STable, VSelect, commonModal, bindProductModal, addHwModal, ImportGuideModal, basicInfoModal, importHuoweiModal },
@@ -188,8 +195,8 @@ export default {
         { title: '货位号', dataIndex: 'shelfPlaceCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '绑定产品编码', dataIndex: 'shelfProductApiEntity.productCode', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '绑定产品名称', dataIndex: 'shelfProductApiEntity.productName', width: '23%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '销售价', dataIndex: 'shelfProductApiEntity.price', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
-        { title: '结算价', dataIndex: 'shelfProductApiEntity.cost', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '车主价', dataIndex: 'shelfProductApiEntity.price', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { slots: { title: 'customTitle' }, dataIndex: 'shelfProductApiEntity.cost', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
         { title: '最大库容', dataIndex: 'shelfProductApiEntity.maxQty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '当前库存', dataIndex: 'shelfProductApiEntity.qty', width: '9%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
@@ -221,19 +228,28 @@ export default {
       openInfoModal: false,
       openHwModal: false,
       openImportModal: false,
-      showPrice: ''
+      showPriceStr: []
     }
   },
   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
-    //     }
-    //   })
-    // },
+    getShelfPriceShow () {
+      this.showPriceStr = []
+      getShelfPriceShow({ shelfSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          const ret = res.data&&res.data
+          this.basicInfoData.showPrice = ret
+          ret.map(item => {
+            if(item.paramCode == 'shelf_price_show'&&item.paramValue == 1){
+              this.showPriceStr.push("车主价")
+            }
+            if(item.paramCode == 'shelf_cost_show'&&item.paramValue == 1){
+              this.showPriceStr.push("结算价")
+            }
+          })
+        }
+      })
+    },
     // 导入或新增货位
     addHW (type) {
       // 导入货位
@@ -247,25 +263,25 @@ export default {
       }
     },
     // 禁用启用
-    handleEnable(row){
+    handleEnable (row) {
       const _this = this
-      if(row.enableFlag == 1){
+      if (row.enableFlag == 1) {
         this.$confirm({
-        title: '提示',
-        content: '禁用后不参于盘点和补货,但是可以退货、调回,确认禁用吗?',
-        centered: true,
-        onOk () {
+          title: '提示',
+          content: '禁用后不参于盘点和补货,但是可以退货、调回,确认禁用吗?',
+          centered: true,
+          onOk () {
             _this.enableFun(row)
           }
         })
-      }else{
+      } else {
         _this.enableFun(row)
       }
     },
-    enableFun(row){
+    enableFun (row) {
       const _this = this
       _this.spinning = true
-      shelfProductEnable({ shelfSn: this.$route.params.sn, shelfProductSn: row.shelfProductApiEntity.shelfProductSn, enableFlag: row.enableFlag==1 ? 0 : 1 }).then(res => {
+      shelfProductEnable({ shelfSn: this.$route.params.sn, shelfProductSn: row.shelfProductApiEntity.shelfProductSn, enableFlag: row.enableFlag == 1 ? 0 : 1 }).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
           _this.$refs.table.refresh()
@@ -290,7 +306,7 @@ export default {
       shelfDetail({ sn: this.$route.params.sn }).then(res => {
         if (res.status == 200) {
           this.basicInfoData = res.data
-          // this.getShelfPriceShow()
+          this.getShelfPriceShow()
         } else {
           this.basicInfoData = null
         }

+ 2 - 2
vue.config.js

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