浏览代码

Merge branch 'develop_yh39' of http://git.chelingzhu.com/jianguan-web/jg-ocs-html into develop_yh39

lilei 1 年之前
父节点
当前提交
7a96256a6b

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

@@ -3027,7 +3027,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'permissionSetting/:sn/:name',
+                path: 'permissionSetting/:sn/:name/:dealerLevel',
                 name: 'merchantInfoManagementSet',
                 component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/merchantInfoManagement/permissionSettingNew.vue'),
                 meta: {

+ 2 - 1
src/views/allocationManagement/transferOut/detail.vue

@@ -257,6 +257,7 @@ export default {
         { title: '产品名称', dataIndex: 'productEntity.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productEntity.origCode', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '单位', dataIndex: 'productEntity.unit', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '调出数量', dataIndex: 'qty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } }
       ]
       if (this.$hasPermissions('M_transferOut_detail_costPrice') || this.$hasPermissions('M_tfoPrint_detail_salesPrice') || this.$hasPermissions('M_mso_detail_costPrice')) { // 成本价权限
@@ -266,7 +267,7 @@ export default {
       if (this.$hasPermissions('M_transferOut_detail_salesPrice') || this.$hasPermissions('M_tfoPrint_detail_salesPrice') || this.$hasPermissions('M_mso_detail_salesPrice')) { //  售价权限
         const ind = this.$hasPermissions('M_transferOut_detail_costPrice') || this.$hasPermissions('M_tfoPrint_detail_costPrice') ? 6 : 5
         arr.splice(ind, 0, { title: '售价', dataIndex: 'price', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
-        arr.splice(ind + 3, 0, { title: '售价小计', dataIndex: 'totalPrice', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(ind + 4, 0, { title: '售价小计', dataIndex: 'totalPrice', width: '9%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
       arr.push({ title: '费用归属部门', dataIndex: 'departmentName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
       return arr

+ 29 - 2
src/views/allocationManagement/transferOut/edit.vue

@@ -145,6 +145,27 @@
           :defaultLoadData="false"
           :scroll="{ y: 300 }"
           bordered>
+          <!-- 售价 -->
+          <template slot="productPriceInfo" slot-scope="text, record">
+            <span v-if="!record.priceLevel">{{ (record.priceValue || record.priceValue==0) ? toThousands(record.priceValue):'--' }}</span>
+            <span v-else>{{ record.priceLevel=='PROVINCE'?record.provincePrice:record.priceLevel=='CITY'?record.cityPrice:record.specialPrice }}</span>
+          </template>
+          <!-- 价格级别 -->
+          <template slot="priceLevel" slot-scope="text, record, index">
+            <span v-if="!$hasPermissions('M_transferOut_edit_salesPrice')">--</span>
+            <div v-else>
+              <span v-if="record.priceValue ||record.priceValue==0">{{ record.priceLevelDictValue }}</span>
+              <v-select
+                v-else
+                style="width:90%;"
+                size="small"
+                code="PRICE_LEVEL"
+                v-model="record.priceLevel"
+                allowClear
+                placeholder="请选择价格级别"
+                @change="e => handlePriceLevel(e,index)"></v-select>
+            </div>
+          </template>
           <!-- 调出数量 -->
           <template slot="qty" slot-scope="text, record">
             <a-input-number
@@ -390,6 +411,8 @@ export default {
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
             data.list[i].qty = 1
+            data.list[i].priceLevel = undefined
+            data.list[i].priceValue = data.list[i].productPrice
           }
           this.loadDataSource = data.list || []
           this.disabled = false
@@ -441,7 +464,7 @@ export default {
         { title: '原厂编码', dataIndex: 'productOrigCode', width: '24%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         // { title: '成本价', dataIndex: 'lastStockCost', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '售价', dataIndex: 'productPrice', width: '10%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '价格级别', dataIndex: 'priceLevelDictValue', width: '10%', align: 'center', scopedSlots: { customRender: 'priceLevel' } },
         { title: '库存数量', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '调出数量', scopedSlots: { customRender: 'qty' }, width: '6%', align: 'center' },
         { title: '单位', dataIndex: 'productUnit', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -452,7 +475,7 @@ export default {
       }
       if (this.$hasPermissions('M_transferOut_edit_salesPrice')) { //  售价权限
         const ind = this.$hasPermissions('M_transferOut_edit_costPrice') ? 5 : 4
-        arr.splice(ind, 0, { title: '售价', dataIndex: 'productPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
+        arr.splice(ind, 0, { title: '售价', dataIndex: 'productPrice', width: '6%', align: 'right', scopedSlots: { customRender: 'productPriceInfo' } })
       }
       return arr
     },
@@ -656,6 +679,10 @@ export default {
         }
       })
     },
+    // 价格等级
+    handlePriceLevel (val, pos) {
+      this.loadDataSource[pos].productPrice = val == 'PROVINCE' ? this.loadDataSource[pos].provincePrice : val == 'CITY' ? this.loadDataSource[pos].cityPrice : this.loadDataSource[pos].specialPrice
+    },
     //  提交
     handleOpen () {
       if (this.localDataSource.length) {

+ 1 - 1
src/views/allocationManagement/transfersPrint/list.vue

@@ -135,7 +135,7 @@
           <div slot="costTitle">
             <a-tooltip placement="top">
               <template slot="title">
-                当调拨对象是经销商时,如果收货客户名称不为空,则按照收货客户的价格级别计算得到
+                当调拨对象是经销商时,如果收货客户名称不为空,则按照收货客户的开单金额(授权价+商户级别价),有经销权则使用授权价,没有经销权则使用商户级别价
               </template>
               <span style="margin-right: 5px;">实际总售价</span> <a-icon type="question-circle" />
             </a-tooltip>

+ 1 - 1
src/views/dealerManagement/merchantInfoManagement/chooseTypeList.vue

@@ -10,7 +10,7 @@
                 id="inventoryQueryList-productBrandType"
                 v-model="queryParam.productBrandType"
                 allowClear
-                placeholder="请选择价格级别"></v-select>
+                placeholder="请选择品牌分类"></v-select>
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">

+ 11 - 1
src/views/dealerManagement/merchantInfoManagement/chooseTypeModal.vue

@@ -20,10 +20,12 @@
         <a-form-model-item label="价格级别" prop="priceLevel">
           <v-select
             code="PRICE_LEVEL"
+            :notIn="notArr"
             style="width: 50%;"
             id="productPriceLevel-level"
             v-model="form.priceLevel"
             allowClear
+            :disabled="notArrFlag"
             placeholder="请选择价格级别"></v-select>
         </a-form-model-item>
         <a-form-model-item label="添加品类" prop="productScopeList"></a-form-model-item>
@@ -72,7 +74,9 @@ export default {
         productScopeList: [
           { required: true, message: '请选择产品品类', trigger: 'blur' }
         ]
-      }
+      },
+      notArr: [],
+      notArrFlag: false
     }
   },
   methods: {
@@ -114,6 +118,12 @@ export default {
         this.$refs.chooseTypeInfo.clearSelectTable()
         this.$emit('close')
       } else {
+        if (this.$route.params.dealerLevel === 'special') {
+          this.form.priceLevel = 'SPECIAL'
+          this.notArrFlag = true
+        } else {
+          this.notArr = ['SPECIAL']
+        }
         this.$nextTick(() => {
           this.$refs.chooseTypeInfo.getTableData()
         })

+ 1 - 1
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -248,7 +248,7 @@ export default {
     },
     // 经销权
     handleDistribution (row) {
-      this.$router.push({ name: `merchantInfoManagementSet`, params: { sn: row.dealerSn, name: row.dealerName } })
+      this.$router.push({ name: `merchantInfoManagementSet`, params: { sn: row.dealerSn, name: row.dealerName, dealerLevel: row.dealerType1 } })
     },
     // 差价
     handlePriceSpread (row) {

+ 1 - 1
src/views/dealerManagement/merchantInfoManagement/permissionSettingNew.vue

@@ -60,7 +60,7 @@
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link" class="button-info" @click="handleEdit(record)">编辑</a-button>
+            <a-button v-if="$route.params.dealerLevel != 'special'" size="small" type="link" class="button-info" @click="handleEdit(record)">编辑</a-button>
             <a-button size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
           </template>
         </s-table>