浏览代码

经销权

chenrui 1 年之前
父节点
当前提交
b7fa1f7539

+ 32 - 17
src/api/allocateReturn.js

@@ -5,7 +5,7 @@ export const allocateReturnAudit = params => {
     url: '/allocateReturn/audit',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('审核')
     }
   })
@@ -16,7 +16,7 @@ export const allocateReturnDelete = params => {
     url: `/allocateReturn/delete/${params.allocateReturnSn}`,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('删除')
     }
   })
@@ -27,7 +27,7 @@ export const allocateReturnCheckSubmit = params => {
     url: '/allocateReturn/check',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('提交')
     }
   })
@@ -38,7 +38,7 @@ export const allocateReturnFinanceAudit = params => {
     url: '/allocateReturn/financeAudit',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('退货确认')
     }
   })
@@ -49,7 +49,7 @@ export const allocateReturnExcel = params => {
     url: `/allocateReturn/excel/${params.allocateReturnSn}`,
     method: 'get',
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('导出excel')
     }
   })
@@ -61,7 +61,7 @@ export const allocateReturnPrint = params => {
     method: 'post',
     data: params,
     responseType: 'blob',
-    headers:{
+    headers: {
       'module': encodeURIComponent('打印')
     }
   })
@@ -82,7 +82,7 @@ export const allocateReturnQueryPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -96,7 +96,7 @@ export const allocateReturnQueryConfirmPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('列表查询')
     }
   })
@@ -107,7 +107,7 @@ export const allocateReturnSave = params => {
     url: '/allocateReturn/save',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('新增')
     }
   })
@@ -118,7 +118,7 @@ export const allocateReturnSubmit = params => {
     url: '/allocateReturn/submit',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('提交')
     }
   })
@@ -130,8 +130,8 @@ export const allocateReturnCheck = params => {
     url: `/allocReturnDetail/check/${params.allocateReturnSn}/${params.allocateCheckType}`,
     data: params.list,
     method: 'post',
-    headers:{
-      'module': encodeURIComponent(params.allocateCheckType == 'CUSTOM' ? '修改返库数量':'批量返库')
+    headers: {
+      'module': encodeURIComponent(params.allocateCheckType == 'CUSTOM' ? '修改返库数量' : '批量返库')
     }
   })
 }
@@ -142,7 +142,7 @@ export const allocReturnDetailDelete = params => {
     url: '/allocReturnDetail/delete',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('删除')
     }
   })
@@ -153,7 +153,7 @@ export const allocReturnDetailInsert = params => {
     url: '/allocReturnDetail/insert',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('添加')
     }
   })
@@ -164,7 +164,7 @@ export const allocReturnDetailInsertBatch = params => {
     url: '/allocReturnDetail/insertBatch',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('批量添加')
     }
   })
@@ -178,7 +178,7 @@ export const allocReturnDetailQueryPage = (params) => {
     url: url,
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('明细列表查询')
     }
   })
@@ -189,8 +189,23 @@ export const allocReturnDetailUpdate = params => {
     url: '/allocReturnDetail/update',
     data: params,
     method: 'post',
-    headers:{
+    headers: {
       'module': encodeURIComponent('修改明细')
     }
   })
 }
+
+// 调拨退货  不抓单  选择产品分页列表
+export const queryStockProductPage = (params) => {
+  const url = `/allocateReturn/queryStockProductPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}

+ 6 - 1
src/views/allocationManagement/transferOut/edit.vue

@@ -441,6 +441,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: '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 || '--' } },
@@ -585,7 +586,11 @@ export default {
         qty: row.qty, //  添加时调出数量默认为1
         productSn: row.productSn,
         departmentSn: row.departmentSn,
-        departmentName: row.departmentName
+        departmentName: row.departmentName,
+        productTypeSn1: row.productTypeSn1,
+        productTypeSn2: row.productTypeSn2,
+        productTypeSn3: row.productTypeSn3,
+        priceLevel: row.priceLevel ? row.priceLevel : undefined
       }
       if (isEdit) { // 编辑
         // 清空数量时,值应保持未清空前的值,因数量不可为空

+ 144 - 144
src/views/allocationManagement/transferReturn/edit.vue

@@ -13,7 +13,7 @@
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
-          <print :params="{allocateReturnSn: allocateReturnSn || outBizSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
+          <print :params="{allocateReturnSn: allocateReturnSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
         </template>
       </a-page-header>
       <a-card size="small" :bordered="false" v-if="basicInfoData" class="allocateBillEdit-cont" v-show="showDetail">
@@ -51,160 +51,160 @@
       </a-card>
       <!-- 选择产品 -->
       <a-card size="small" title="选择产品" :bordered="false" class="allocateBillEdit-cont">
-            <!-- 筛选条件 -->
+        <!-- 筛选条件 -->
+        <div class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品编码" prop="productCode">
+                  <a-input id="allocateBillEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品名称" prop="productName">
+                  <a-input id="allocateBillEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
+                <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          index="0"
+          tableId="table1"
+          :rowKey="(record) => record.stockSn"
+          :columns="columns"
+          :customRow="handleClickRow"
+          :data="loadData"
+          :scroll="{ y: 300 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 退货单价 -->
+          <template slot="returnPrice" slot-scope="text, record">
+            <div @dblclick.stop>
+              <a-input-number
+                size="small"
+                v-model="record.productPrice"
+                :precision="2"
+                :min="0"
+                :max="99999999"
+                placeholder="请输入"
+                style="width: 100%;" />
+            </div>
+          </template>
+          <!-- 退货数量 -->
+          <template slot="returnQty" slot-scope="text, record">
+            <div @dblclick.stop>
+              <a-input-number
+                size="small"
+                v-model="record.qty"
+                :precision="0"
+                :min="1"
+                :max="99999999"
+                placeholder="请输入"
+                style="width: 100%;" />
+            </div>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.lastStockCost"
+              class="button-primary"
+              @click="handleAdd(record)"
+              id="allocateBillEdit-add-btn">添加</a-button>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </a-card>
+      <!-- 已选产品 -->
+      <a-card size="small" title="已选产品" :bordered="false" class="allocateBillEdit-cont">
+        <!-- 总计 -->
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message">
+            退货总数量:<strong>{{ (basicInfoData&&(basicInfoData.totalQty || basicInfoData.totalQty==0)) ? basicInfoData.totalQty : '--' }}</strong> ;
+            <span>退货总金额:<strong>{{ (basicInfoData&&(basicInfoData.totalPrice || basicInfoData.totalPrice==0)) ? toThousands(basicInfoData.totalPrice) : '--' }}</strong>;</span>
+          </div>
+        </a-alert>
+        <!-- 筛选条件 -->
+        <a-row :gutter="15">
+          <a-col :span="17">
             <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+              <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
                 <a-row :gutter="15">
-                  <a-col :md="6" :sm="24">
+                  <a-col :md="9" :sm="24">
                     <a-form-item label="产品编码" prop="productCode">
-                      <a-input id="allocateBillEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
+                      <a-input id="editGrap-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
                     </a-form-item>
                   </a-col>
-                  <a-col :md="6" :sm="24">
+                  <a-col :md="9" :sm="24">
                     <a-form-item label="产品名称" prop="productName">
-                      <a-input id="allocateBillEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
+                      <a-input id="editGrap-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
                     </a-form-item>
                   </a-col>
                   <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                    <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="storeTransferOutList-refresh">查询</a-button>
-                    <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
+                    <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
                   </a-col>
                 </a-row>
               </a-form>
             </div>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="table"
+          </a-col>
+          <a-col :span="7" style="text-align: right;">
+            <!-- <a-button size="small" id="editGrap-import-btn" @click="openGuideModal=true">导入产品</a-button> -->
+            <!-- <a-button size="small" type="danger" style="margin-left: 5px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button> -->
+          </a-col>
+        </a-row>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="chooseTable"
+          size="small"
+          index="1"
+          tableId="table2"
+          :rowKey="(record) => record.id"
+          :columns="chooseColumns"
+          :data="chooseLoadData"
+          :scroll="{ y: 300 }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 退货单价 -->
+          <template slot="returnPrice" slot-scope="text, record">
+            <a-input-number
               size="small"
-              index="0"
-              tableId="table1"
-              :rowKey="(record) => record.stockSn"
-              :columns="columns"
-              :customRow="handleClickRow"
-              :data="loadData"
-              :scroll="{ y: 300 }"
-              :defaultLoadData="false"
-              bordered>
-              <!-- 退货单价 -->
-              <template slot="returnPrice" slot-scope="text, record">
-                <div @dblclick.stop>
-                  <a-input-number
-                    size="small"
-                    v-model="record.productPrice"
-                    :precision="2"
-                    :min="0"
-                    :max="99999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
-                </div>
-              </template>
-              <!-- 退货数量 -->
-              <template slot="returnQty" slot-scope="text, record">
-                <div @dblclick.stop>
-                  <a-input-number
-                    size="small"
-                    v-model="record.qty"
-                    :precision="0"
-                    :min="1"
-                    :max="99999999"
-                    placeholder="请输入"
-                    style="width: 100%;" />
-                </div>
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button
-                  size="small"
-                  type="link"
-                  v-if="record.lastStockCost"
-                  class="button-primary"
-                  @click="handleAdd(record)"
-                  id="allocateBillEdit-add-btn">添加</a-button>
-                <span v-else>--</span>
-              </template>
-            </s-table>
-      </a-card>
-      <!-- 已选产品 -->
-      <a-card size="small" title="已选产品" :bordered="false" class="allocateBillEdit-cont">
-            <!-- 总计 -->
-            <a-alert type="info" style="margin-bottom:10px">
-              <div slot="message">
-                退货总数量:<strong>{{ (basicInfoData&&(basicInfoData.totalQty || basicInfoData.totalQty==0)) ? basicInfoData.totalQty : '--' }}</strong> ;
-                <span>退货总金额:<strong>{{ (basicInfoData&&(basicInfoData.totalPrice || basicInfoData.totalPrice==0)) ? toThousands(basicInfoData.totalPrice) : '--' }}</strong>;</span>
-              </div>
-            </a-alert>
-            <!-- 筛选条件 -->
-            <a-row :gutter="15">
-              <a-col :span="17">
-                <div class="table-page-search-wrapper">
-                  <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
-                    <a-row :gutter="15">
-                      <a-col :md="9" :sm="24">
-                        <a-form-item label="产品编码" prop="productCode">
-                          <a-input id="editGrap-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
-                        </a-form-item>
-                      </a-col>
-                      <a-col :md="9" :sm="24">
-                        <a-form-item label="产品名称" prop="productName">
-                          <a-input id="editGrap-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
-                        </a-form-item>
-                      </a-col>
-                      <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-                        <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
-                        <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
-                      </a-col>
-                    </a-row>
-                  </a-form>
-                </div>
-              </a-col>
-              <a-col :span="7" style="text-align: right;">
-                <!-- <a-button size="small" id="editGrap-import-btn" @click="openGuideModal=true">导入产品</a-button> -->
-                <!-- <a-button size="small" type="danger" style="margin-left: 5px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button> -->
-              </a-col>
-            </a-row>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="chooseTable"
+              v-model="record.price"
+              :precision="2"
+              :min="0"
+              :max="99999999"
+              @blur="e => priceChange(e.target.value, record)"
+              placeholder="请输入"
+              style="width: 100%;" />
+          </template>
+          <!-- 退货数量 -->
+          <template slot="returnQty" slot-scope="text, record">
+            <a-input-number
               size="small"
-              index="1"
-              tableId="table2"
-              :rowKey="(record) => record.id"
-              :columns="chooseColumns"
-              :data="chooseLoadData"
-              :scroll="{ y: 300 }"
-              :defaultLoadData="false"
-              bordered>
-              <!-- 退货单价 -->
-              <template slot="returnPrice" slot-scope="text, record">
-                <a-input-number
-                  size="small"
-                  v-model="record.price"
-                  :precision="2"
-                  :min="0"
-                  :max="99999999"
-                  @blur="e => priceChange(e.target.value, record)"
-                  placeholder="请输入"
-                  style="width: 100%;" />
-              </template>
-              <!-- 退货数量 -->
-              <template slot="returnQty" slot-scope="text, record">
-                <a-input-number
-                  size="small"
-                  v-model="record.returnQty"
-                  :precision="0"
-                  :min="1"
-                  :max="99999999"
-                  @blur="e => qtyBlur(e.target.value, record)"
-                  placeholder="请输入"
-                  style="width: 100%;" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="allocateBillEdit-del-btn">删除</a-button>
-              </template>
-            </s-table>
+              v-model="record.returnQty"
+              :precision="0"
+              :min="1"
+              :max="99999999"
+              @blur="e => qtyBlur(e.target.value, record)"
+              placeholder="请输入"
+              style="width: 100%;" />
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="allocateBillEdit-del-btn">删除</a-button>
+          </template>
+        </s-table>
       </a-card>
     <!-- </a-spin> -->
     </div>
@@ -251,7 +251,6 @@ import { STable, VSelect } from '@/components'
 // import ImportGuideModal from './importGuideModal.vue'
 import print from './print.vue'
 import warehouse from '@/views/common/chooseWarehouse.js'
-import { queryStockProductPage } from '@/api/stock'
 import AllocateType from '@/views/common/allocateType.js'
 import {
   allocateReturnSave,
@@ -260,8 +259,8 @@ import {
   allocReturnDetailInsert,
   allocReturnDetailUpdate,
   allocateReturnSubmit,
-  allocReturnDetailDelete
-  // allocateBillBatchInsert
+  allocReturnDetailDelete,
+  queryStockProductPage
 } from '@/api/allocateReturn'
 
 export default {
@@ -291,7 +290,8 @@ export default {
         this.disabled = true
         const dealerLevel = this.dealerLevel == 'OTHER' ? undefined : this.dealerLevel
         const warehouseSn = this.basicInfoData.warehouseSn
-        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn })).then(res => {
+        const dealerSnInfo = this.dealerLevel != 'OTHER' ? this.basicInfoData.dealerEntity.dealerSn : undefined
+        return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn, dealerSn: dealerSnInfo })).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {

+ 5 - 3
src/views/dealerManagement/merchantInfoManagement/permissionSettingNew.vue

@@ -56,6 +56,7 @@
           :data="loadData"
           :scroll="{ y: tableHeight }"
           :defaultLoadData="false"
+          :showPagination="false"
           bordered>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -79,7 +80,7 @@ import ChooseTypeModal from './chooseTypeModal.vue'
 import editPriceLevelModal from './priceLevelModal.vue'
 import productTypeAll from '@/views/common/productTypeAll.js'
 import ProductBrand from '@/views/common/productBrand.js'
-import { dealerScopeList, dealerScopeModifyPriceLevel, dealerScopeDelete } from '@/api/dealerScope'
+import { dealerScopeModifyPriceLevel, dealerScopeDelete, dealerScopeQueryList } from '@/api/dealerScope'
 export default {
   name: 'MerchantInfoManagementSet',
   mixins: [commonMixin],
@@ -93,7 +94,8 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        priceLevel: undefined
+        priceLevel: undefined,
+        goodsType: 'CATEGORY'
       },
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
@@ -111,7 +113,7 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return dealerScopeList(Object.assign(parameter, this.queryParam, { dealerSn: this.$route.params.sn })).then(res => {
+        return dealerScopeQueryList(Object.assign(parameter, this.queryParam, { dealerSn: this.$route.params.sn })).then(res => {
           let data
           if (res.status == 200) {
             data = res.data