Преглед изворни кода

Merge branch 'develop_yh65' of jianguan-web/jg-ocs-html into pre-release

李磊 пре 1 дан
родитељ
комит
e5cb3115f0

BIN
public/templ/销售退货价格修改模板.xlsx


+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.064",
+    "version": "2.2.065",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 12 - 0
src/api/salesReturn.js

@@ -56,6 +56,18 @@ export const updateAgain = (params) => {
   })
 }
 
+// 修改退货仓库
+export const updateWarehouse = (params) => {
+  return axios({
+    url: `/salesReturn/updateWarehouse`,
+    data: params,
+    method: 'post',
+    headers:{
+        'module': encodeURIComponent('修改退货仓库')
+    }
+  })
+}
+
 // 根据SN查询销售退货单
 export const salesReturnDetail = (params) => {
   return axios({

+ 25 - 0
src/api/salesReturnDetail.js

@@ -224,4 +224,29 @@ export const insertByCustomerService = (params) => {
         'module': encodeURIComponent('新增产品(客服确认添加)')
     }
   })
+}
+
+// 批量导入-修改价格
+export const updateBatchUpdatePrice = (params) => {
+  return axios({
+    url: '/salesReturn/detail/updateBatchUpdatePrice',
+    data: params,
+    method: 'post',
+    headers:{
+        'module': encodeURIComponent('批量导入修改价格')
+    }
+  })
+}
+
+// 批量导入修改价格错误项
+export const salesReturnDetailExportErrorUpdatePrice = (params) => {
+  return axios({
+    url: '/salesReturn/detail/exportErrorUpdatePrice',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers:{
+        'module': encodeURIComponent('批量导入修改价格错误项')
+    }
+  })
 }

+ 1 - 1
src/views/productManagement/productInfo/list.vue

@@ -103,7 +103,7 @@
         <div class="table-operator">
           <a-button type="primary" id="productInfoList-add" v-if="$hasPermissions('B_productInfo_add')" @click="handleEdit()">新增</a-button>
           <a-button type="primary" id="productInfoList-addProduct" class="button-info" @click="handleMenuClick({key:'1'})" v-if="$hasPermissions('B_productInfo_batchImport')"> 新增产品导入</a-button>
-          <a-button type="primary" id="productInfoList-unline-import" class="button-info" @click="handleMenuClick({key:'3'})" v-if="$hasPermissions('B_offlineProduct_import')"> 上线产品导入</a-button>
+          <a-button type="primary" id="productInfoList-unline-import" class="button-info" @click="handleMenuClick({key:'3'})" v-if="$hasPermissions('B_onlineProduct_import')"> 上线产品导入</a-button>
           <a-button type="primary" id="productInfoList-import" class="button-info" @click="handleMenuClick({key:'2'})" v-if="$hasPermissions('B_offlineProduct_import')"> 下线产品导入</a-button>
           <a-button
             id="productInfoList-batchAudit"

+ 12 - 1
src/views/salesManagement/pushOrderManagement/sendTypeModal.vue

@@ -40,6 +40,13 @@
             </a-select-option>
           </a-select>
         </a-form-model-item>
+        <a-form-model-item label="促销产品" prop="giftPrintType" v-if="nowType=='print'">
+          <a-radio-group v-model="form.giftPrintType">
+            <a-radio value="2">包含</a-radio>
+            <a-radio value="0">不包含</a-radio>
+            <a-radio value="1">仅有</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
         <a-form-model-item label="货位编号" prop="orderBy" v-if="nowType=='print'">
           <a-radio-group v-model="form.orderBy">
             <a-radio value="dispDet.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
@@ -113,6 +120,7 @@ export default {
       form: { // 打印、导出选项
         id: 'all',
         orderBy: undefined,
+        giftPrintType: '2',
         origCode: '0',
         packNo: '1'
       },
@@ -121,7 +129,8 @@ export default {
         id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
         orderBy: [{ required: true, message: '请选择货位编号', trigger: 'change' }],
         origCode: [{ required: true, message: '请选择原厂编码', trigger: 'change' }],
-        packNo: [{ required: true, message: '请选择装箱号', trigger: 'change' }]
+        packNo: [{ required: true, message: '请选择装箱号', trigger: 'change' }],
+        giftPrintType: [{ required: true, message: '请选择促销产品', trigger: 'change' }]
       },
       formItemLayout: {
         labelCol: { span: 6 },
@@ -153,6 +162,7 @@ export default {
             }
             obj.origCode = _this.form.origCode
             obj.packNo = _this.form.packNo
+            obj.giftPrintType = _this.form.giftPrintType
             _this.$emit('ok', obj, '发货分类', type)
           }
           _this.isShow = false
@@ -170,6 +180,7 @@ export default {
       this.form.orderBy = undefined
       this.form.origCode = '0'
       this.form.packNo = '1'
+      this.form.giftPrintType = '2'
     },
     // 获取该销售单产品二级分类
     getTypeData (dispatchBillSn) {

+ 12 - 1
src/views/salesManagement/stockPrint/sendTypeModal.vue

@@ -40,6 +40,13 @@
             </a-select-option>
           </a-select>
         </a-form-model-item>
+        <a-form-model-item label="促销产品" prop="giftPrintType" v-if="nowType=='print'">
+          <a-radio-group v-model="form.giftPrintType">
+            <a-radio value="2">包含</a-radio>
+            <a-radio value="0">不包含</a-radio>
+            <a-radio value="1">仅有</a-radio>
+          </a-radio-group>
+        </a-form-model-item>
         <a-form-model-item label="货位编号" prop="orderBy" v-if="nowType=='print'">
           <a-radio-group v-model="form.orderBy">
             <a-radio value="dispDet.STACK_PLACE_CODE ASC">打印(↑升序)</a-radio>
@@ -107,6 +114,7 @@ export default {
       form: {
         id: 'all',
         orderBy: undefined,
+        giftPrintType: '2',
         origCode: '0',
         packNo: '1'
       },
@@ -114,7 +122,8 @@ export default {
         id: [{ required: true, message: '请选择产品分类', trigger: 'change' }],
         orderBy: [{ required: true, message: '请选择货位编号', trigger: 'change' }],
         origCode: [{ required: true, message: '请选择原厂编码', trigger: 'change' }],
-        packNo: [{ required: true, message: '请选择装箱号', trigger: 'change' }]
+        packNo: [{ required: true, message: '请选择装箱号', trigger: 'change' }],
+        giftPrintType: [{ required: true, message: '请选择促销产品', trigger: 'change' }]
       },
       formItemLayout: {
         labelCol: { span: 6 },
@@ -146,6 +155,7 @@ export default {
             }
             obj.origCode = _this.form.origCode
             obj.packNo = _this.form.packNo
+            obj.giftPrintType = _this.form.giftPrintType
             _this.$emit('ok', obj, '发货分类', type)
           }
           _this.isShow = false
@@ -162,6 +172,7 @@ export default {
       this.form.id = 'all'
       this.form.orderBy = undefined
       this.form.packNo = '1'
+      this.form.giftPrintType = '2'
     },
     // 获取该销售单产品二级分类
     getTypeData (dispatchBillSn) {

+ 194 - 0
src/views/salesReturnManagement/custConfirm/chooseImportModal.vue

@@ -0,0 +1,194 @@
+<template>
+  <a-modal
+    centered
+    class="chooseImport-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="确认导入"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="80%">
+    <div class="chooseImport-con">
+      <!-- 可导入数据 -->
+      <p class="">可导入数据{{ loadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.allocateSn"
+        :columns="nowColumns"
+        :dataSource="loadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+      </a-table>
+      <a-divider />
+      <!-- 不可导入数据 -->
+      <p class="red">不可导入数据{{ unLoadData.length }}条</p>
+      <a-table
+        class="sTable"
+        ref="unTable"
+        size="small"
+        :rowKey="(record) => record.errorDesc"
+        :columns="nowUnColumns"
+        :dataSource="unLoadData"
+        :loading="loading"
+        :scroll="{ y: 200 }"
+        :pagination="false"
+        bordered>
+        <template slot="errorMsg" slot-scope="text,record">
+          <a-popover placement="topRight">
+            <template slot="content">
+              <p v-for="d in record.importErrorMsgSet">{{ d }}</p>
+            </template>
+            <a-button type="link">
+              查看
+            </a-button>
+          </a-popover>
+        </template>
+      </a-table>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="chooseImport-submit"
+          size="large"
+          :class="loadData.length?'button-primary':'button-grey'"
+          @click="handleSubmit"
+          style="padding: 0 40px;">确认导入</a-button>
+        <a-button
+          id="chooseImport-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 40px;margin-left: 15px;">取消</a-button>
+        <a-button
+          type="primary"
+          id="chooseImport-error"
+          size="large"
+          class="button-error"
+          @click="handleError"
+          style="padding: 0 40px;margin-left: 15px;">导出错误项</a-button>
+      </div>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { salesReturnDetailExportErrorUpdatePrice } from '@/api/salesReturnDetail.js'
+export default {
+  name: 'ChooseImportModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    paramsData: {
+      type: Object,
+      default: () => {
+        return {}
+      }
+    }
+  },
+  data () {
+    const _this = this
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      nowColumns: [
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省级价', dataIndex: 'provincePrice', width: '15%', align: 'center', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
+        { title: '市级价', dataIndex: 'cityPrice', width: '15%', align: 'center', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
+        { title: '特约价', dataIndex: 'specialPrice', width: '15%', align: 'center', customRender: text => ((text || text == 0) ? _this.toThousands(text) : '--') },
+        { title: '退货单价说明', dataIndex: 'priceRemark', width: '30%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      loadData: [],
+      nowUnColumns: [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省级价', dataIndex: 'provincePrice', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '市级价', dataIndex: 'cityPrice', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '特约价', dataIndex: 'specialPrice', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '退货单价说明', dataIndex: 'priceRemark', width: '30%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '错误说明', scopedSlots: { customRender: 'errorMsg' }, width: '13%', align: 'center' }
+      ],
+      unLoadData: [],
+      loading: false
+    }
+  },
+  methods: {
+    getData () {
+      const paramsData = JSON.parse(JSON.stringify(this.paramsData))
+      this.loadData = paramsData.rightList || []
+      this.unLoadData = paramsData.errorList || []
+      this.loadData.map((item, index) => {
+        item.no = index + 1
+      })
+      this.unLoadData.map((item, index) => {
+        item.no = index + 1
+        item.importErrorMsgSet = item.remarks.split(',')
+      })
+    },
+    // 确认导入
+    handleSubmit () {
+      if (this.loadData.length) {
+        const data = this.paramsData.rightList
+        this.$emit('ok', data)
+        this.isShow = false
+      } else {
+        this.$message.info('暂无可导入数据!')
+      }
+    },
+    // 导出
+    handleError () {
+      const _this = this
+      if (_this.paramsData.errorList.length < 1) {
+        _this.$message.info('暂无可导出错误项~')
+        return
+      }
+      const errorList = _this.paramsData.errorList || []
+      _this.spinning = true
+      hdExportExcel(salesReturnDetailExportErrorUpdatePrice, errorList, '批量导入修改价格错误项', function () {
+        _this.spinning = false
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.loadData = []
+        this.unLoadData = []
+      } else {
+        this.getData()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .chooseImport-modal{
+    .chooseImport-con{
+      .red{
+        color: #f30;
+      }
+      .btn-con{
+        text-align: center;
+        margin: 30px 0 20px;
+        .button-cancel,.button-error{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 203 - 0
src/views/salesReturnManagement/custConfirm/importGuideModal.vue

@@ -0,0 +1,203 @@
+<template>
+  <a-modal
+    centered
+    class="importGuide-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="导入产品"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="800">
+    <div class="importGuide-con">
+      <div class="explain-con">
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>1</span>准备导入
+          </div>
+          <ul>
+            <li>1) 导入的Excel文件中必须包含"产品编码"、"省级价"、"市级价"、"特约价"、"退货单价说明"5列,且名称必须相同</li>
+            <li>2) 产品编码必须系统中已经存在的产品</li>
+            <li>3) 产品编码、省级价、市级价、特约价不能为空</li>
+            <li>
+              <a :href="filePath" style="margin: 5px 0 0;display: block;">
+                <a-icon type="download" style="padding-right: 5px;" />下载导入模板
+              </a>
+            </li>
+          </ul>
+        </div>
+        <div class="explain-item">
+          <div class="explain-tit">
+            <span>2</span>上传数据文件
+          </div>
+          <p>目前支持的文件类型*.xls,*.xlsx.</p>
+          <div style="overflow: hidden;padding-left: 23px;">
+            <Upload
+              id="importGuide-attachList"
+              ref="importUpload"
+              :maxNums="1"
+              fileType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel"
+              uploadType="attach"
+              :action="attachAction"
+              :uploadParams="uploadParams"
+              upText="选择导入文件"
+              @remove="resetSearchForm"
+              @change="changeImport"></Upload>
+          </div>
+        </div>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-con">
+        <a-button
+          type="primary"
+          id="importGuide-nextStep"
+          size="large"
+          class="button-primary"
+          @click="handlerNextStep"
+          style="padding: 0 60px;">下一步</a-button>
+        <a-button
+          id="importGuide-cancel"
+          size="large"
+          class="button-cancel"
+          @click="isShow=false"
+          style="padding: 0 60px;margin-left: 15px;">取消</a-button>
+      </div>
+    </div>
+    <!-- 导入 -->
+    <chooseImportModal :openModal="openImportModal" :paramsData="paramsData" @close="handleClose" @ok="hanldeOk" />
+  </a-modal>
+</template>
+
+<script>
+import ChooseImportModal from './chooseImportModal.vue'
+import { Upload } from '@/components'
+export default {
+  name: 'ImportGuideModal',
+  components: { ChooseImportModal, Upload },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    params: {
+      type: Object,
+      default: null
+    },
+    goodFlag: {
+      type: [String, Number],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      openImportModal: false, //  导入
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/salesReturn/detail/importUpdatePrice',
+      paramsData: null,
+      uploadParams: {
+        savePathType: 'local',
+        salesReturnBillSn: this.params.salesReturnBillSn
+      },
+      filePath: ''
+    }
+  },
+  methods: {
+    // 清空数据
+    resetSearchForm () {
+      this.$refs.importUpload.setFileList() //  清空导入文件
+      this.paramsData = null //  清空上传数据
+    },
+    // 下一步
+    handlerNextStep () {
+      if (this.paramsData) {
+        this.openImportModal = true
+      } else {
+        this.$message.warning('添加文件后再进行下一步操作!')
+      }
+    },
+    // 上传文件  change
+    changeImport (file) {
+      // console.log(file, JSON.parse(file))
+      if (file && JSON.parse(file).length > 0) {
+        this.paramsData = Object.assign({}, JSON.parse(file)[0] || null, this.params)
+      } else {
+        this.paramsData = null
+      }
+    },
+    // 导入
+    hanldeOk (obj) {
+      if (obj && obj.length > 0) {
+        this.$emit('ok', obj)
+        this.isShow = false
+      }
+    },
+    // 关闭
+    handleClose () {
+      this.openImportModal = false
+      this.isShow = false
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetSearchForm()
+      } else {
+        this.filePath = location.protocol + '//' + location.host + '/templ/销售退货价格修改模板.xlsx'
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+  .importGuide-modal{
+    .importGuide-con{
+      .explain-con{
+        .explain-item{
+          margin-bottom: 10px;
+          .explain-tit{
+            font-weight: bold;
+            span{
+              display: inline-block;
+              width: 18px;
+              height: 18px;
+              line-height: 16px;
+              text-align: center;
+              margin-right: 5px;
+              border-radius: 50%;
+              border: 1px solid rgba(0, 0, 0, 0.3);
+            }
+          }
+          p{
+            margin: 8px 0;
+            padding-left: 23px;
+          }
+          ul{
+            list-style: none;
+            padding: 0;
+            padding-left: 23px;
+            margin: 0;
+            li{
+              line-height: 26px;
+            }
+          }
+        }
+        #importGuide-attachList{
+          width: 100%;
+        }
+      }
+      .btn-con{
+        margin: 10px 0 20px;
+        text-align: center;
+        .button-cancel{
+          font-size: 12px;
+        }
+      }
+    }
+  }
+</style>

+ 33 - 4
src/views/salesReturnManagement/custConfirm/list.vue

@@ -27,9 +27,22 @@
         <div style="border-top:1px solid #eee;padding-top:10px;">
           <a-button type="primary" :loading="loading" @click="openProductModal=true">新增产品</a-button>
           <a-button type="primary" :loading="loading" class="button-info" @click="setNewSalesRetrunOrder">生成新销退单</a-button>
-          <a-button type="primary" ghost style="margin-left:10px;" :loading="loading" @click="handlePlss">批量设置退货单价</a-button>
-          <a-button type="primary" ghost style="margin-left:5px;" class="button-info" :loading="loading" @click="openPlSetReason">批量设置退货原因</a-button>
+          <a-button type="primary" ghost :loading="loading" @click="handlePlss">批量设置退货单价</a-button>
+          <a-button
+            type="primary"
+            ghost
+            style="margin-left:5px;"
+            class="button-info"
+            :loading="loading"
+            @click="openPlSetReason">批量设置退货原因</a-button>
           <span style="margin-left:10px;" v-if="selNums">已选{{ selNums }}项</span>
+          <a-button
+            style="margin-left:10px;"
+            ghost
+            type="primary"
+            @click="openGuideModal=true"
+            class="button-error"
+            :loading="loading">批量导入退货单价</a-button>
           <div style="float:right;color:#999;margin-top:8px;">说明:红色行表示收货时新增的产品;黄色行表示客服确认时新增的产品;退货原因文字显示红色表示退货原因和退货类别不一致;</div>
         </div>
         <!-- 已选配件列表 -->
@@ -220,6 +233,8 @@
         </div>
       </div>
     </commonModal>
+    <!-- 批量导入修改价格 -->
+    <importGuideModal :params="{salesReturnBillSn: $route.params.sn}" :openModal="openGuideModal" @close="openGuideModal=false" @ok="importOk" />
   </div>
 </template>
 
@@ -230,8 +245,9 @@ import setPriceModal from './setPriceModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import returnReason from '@/views/common/returnReason'
 import chooseProductsModal from '../receiveCheck/chooseProductsModal.vue'
+import importGuideModal from './importGuideModal.vue'
 import { salesReturnDetail, customerServiceConfirm } from '@/api/salesReturn'
-import { salesReturnDetailList, updateByCustomerService, deleteByCustomerService, insertByCustomerService, salesReturnDetailSetReason, salesReturnAgainCreate } from '@/api/salesReturnDetail'
+import { salesReturnDetailList, updateByCustomerService, deleteByCustomerService, insertByCustomerService, salesReturnDetailSetReason, salesReturnAgainCreate, updateBatchUpdatePrice } from '@/api/salesReturnDetail'
 export default {
   name: 'CustConfirm',
   mixins: [commonMixin],
@@ -241,12 +257,14 @@ export default {
     setPriceModal,
     chooseProductsModal,
     returnReason,
-    commonModal
+    commonModal,
+    importGuideModal
   },
   data () {
     return {
       spinning: false,
       tableHeight: 0, // 表格高度
+      openGuideModal: false,
       orderSn: null,
       disabled: false,
       showEditRemarks: false,
@@ -330,6 +348,17 @@ export default {
     }
   },
   methods: {
+    // 确认批量修改价格
+    importOk (data) {
+      this.spinning = true
+      updateBatchUpdatePrice(data).then(res => {
+        if (res.status == 200) {
+          this.resetSearchForm(false)
+          this.$message.info(res.message)
+        }
+        this.spinning = false
+      })
+    },
     // 生成新销退单
     setNewSalesRetrunOrder () {
       if (!this.selNums) {

+ 52 - 5
src/views/salesReturnManagement/salesReturn/salesReturnEdit.vue

@@ -9,12 +9,15 @@
             单号:{{ ordeDetail&&ordeDetail.salesReturnBillNo }}
           </span>
           <span style="margin: 0 10px;color: #666;">客户名称:{{ ordeDetail&&ordeDetail.buyerName || '--' }}</span>
-          <span style="margin: 0 10px;color: #666;">
-            退货仓库:{{ ordeDetail&&ordeDetail.warehouseName }}
-          </span>
-          <span style="margin: 0 10px;color: #666;">
+          <span style="color: #666;">
             退货类别:{{ ordeDetail&&ordeDetail.goodFlagDictValue }}
           </span>
+          <span style="margin: 0 0 0 10px;color: #666;">
+            退货仓库:{{ ordeDetail&&ordeDetail.warehouseName }}
+          </span>
+          <a-button size="small" type="link" @click="showEditModal=true">
+            <a-icon type="edit"></a-icon>修改
+          </a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
@@ -163,6 +166,27 @@
         </div>
       </div>
     </commonModal>
+    <!-- 修改仓库 -->
+    <commonModal modalTit="修改退货仓库" :openModal="showEditModal" @cancel="showEditModal=false" @ok="editOk">
+      <div>
+        <span>退货单号:</span>
+        {{ ordeDetail&&ordeDetail.salesReturnBillNo }}
+      </div>
+      <div style="margin: 10px 0;">
+        <span>原退货仓库:</span>
+        {{ ordeDetail&&ordeDetail.warehouseName }}
+      </div>
+      <div>
+        <span>新退货仓库:</span>
+        <warehouse
+          v-model="newWarehouseSn"
+          style="width: 250px"
+          showDef
+          id="chooseCustom-edit-warehouseSn"
+          placeholder="请选择退货仓库"
+        />
+      </div>
+    </commonModal>
   </div>
 </template>
 
@@ -184,7 +208,8 @@ import {
   salesReturnPrint,
   salesReturnExport,
   salesReturnModify,
-  submitVerify
+  submitVerify,
+  updateWarehouse
 } from '@/api/salesReturn'
 import {
   salesReturnDetailList,
@@ -218,6 +243,8 @@ export default {
       disabled: false,
       isInster: false, // 是否正在添加产品
       openDepartUserModal: false,
+      showEditModal: false,
+      newWarehouseSn: undefined,
       ordeDetail: { discountAmount: 0 },
       delLoading: false,
       // 已选产品
@@ -268,6 +295,11 @@ export default {
         this.plReturnRemark = undefined
         this.showEditRemarks = false
       }
+    },
+    showEditModal (a, b) {
+      if (!a) {
+        this.newWarehouseSn = undefined
+      }
     }
   },
   computed: {
@@ -329,6 +361,21 @@ export default {
         record.initialQty = valBackups
       }
     },
+    // 修改单据退货仓库
+    editOk () {
+      if (this.newWarehouseSn) {
+        updateWarehouse({ salesReturnBillSn: this.orderSn, warehouseSn: this.newWarehouseSn }).then(res => {
+          if (res.status == 200) {
+            this.$message.success(res.message)
+            this.getOrderDetail(true)
+            this.showEditModal = false
+            this.newWarehouseSn = undefined
+          }
+        })
+      } else {
+        this.$message.info('请选择退货仓库')
+      }
+    },
     // 修改仓库
     updateWarehouse (warehouseSn) {
       const _this = this

+ 2 - 2
src/views/setting/dailyReportSettings/salesReturnRemove.vue

@@ -6,7 +6,7 @@
         <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="退货日期">
+              <a-form-item label="业务时间">
                 <rangeDate ref="rangeCreateDate" id="salesReturnRemove-createDate" :value="createDate" @change="dateCreateChange" />
               </a-form-item>
             </a-col>
@@ -174,7 +174,7 @@ export default {
         { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'billStatusName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货日期', dataIndex: 'bizDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务时间', dataIndex: 'bizDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'dealerName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '全国销售日报', dataIndex: 'countrySalesDay', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
         { title: '项目销售日报1', dataIndex: 'dailyPl', width: '10%', align: 'center', customRender: function (text) { return a[text] } },

+ 188 - 0
src/views/setting/removeSetting/erpBaseModal.vue

@@ -0,0 +1,188 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    :width="560"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol"
+      >
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="业务单号" prop="bizNo">
+              <a-input
+                id="base-bizNo"
+                :disabled="bizSn"
+                v-model.trim="form.bizNo"
+                @change="fetchUser"
+                allowClear
+                placeholder="请输入业务单号"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="15">
+          <a-col :span="20">
+            <a-form-model-item label="客户名称" prop="dealerSn">
+              {{ dealerData&&dealerData.dealerName||'--' }}
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+import debounce from 'lodash/debounce'
+import warehouse from '@/views/common/chooseWarehouse.js'
+import { bizRemoveConfigCreate, bizRemoveConfigModify, bizRemoveConfigDetail, salesReturnDetailByNo } from '@/api/bizRemove'
+export default {
+  name: 'ErpBaseModal',
+  mixins: [commonMixin],
+  components: { VSelect, warehouse },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    this.lastFetchId = 0
+    this.fetchUser = debounce(this.fetchUser, 800)
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '新增配置',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 8 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        bizNo: '',
+        dealerSn: undefined,
+        configType: 'SALES_RETURN_SYNC',
+        bizSn: undefined, // bizsn
+        salesReturnSyncErp: '1'
+      },
+      rules: {
+        bizNo: [{ required: true, message: '请输入业务单号', trigger: ['change', 'blur'] }],
+        dealerSn: [{ required: true, message: '请选择客户', trigger: ['change', 'blur'] }],
+        salesReturnSyncErp: [{ required: true, message: '请选择', trigger: ['change', 'blur'] }]
+      },
+      fetching: false,
+      dealerData: null,
+      bizSn: undefined
+    }
+  },
+  methods: {
+    fetchUser () {
+      if (!this.form.bizNo) return
+      this.lastFetchId += 1
+      const fetchId = this.lastFetchId
+      this.dealerData = null
+      this.spinning = true
+      this.fetching = true
+      salesReturnDetailByNo({ bizNo: this.form.bizNo, configType: 'SALES_RETURN_SYNC' }).then(res => {
+        if (fetchId !== this.lastFetchId) {
+          return
+        }
+        if (res.data) {
+          this.dealerData = res.data
+          this.form.dealerSn = res.data.dealerSn
+          this.form.bizSn = res.data.bizSn
+        } else {
+          this.dealerData = null
+          this.form.dealerSn = undefined
+          this.form.bizSn = undefined
+        }
+        this.fetching = false
+        this.spinning = false
+      })
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          // 保存
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    // 新建业务单
+    salesSaveFun () {
+      const _this = this
+      const form = this.form
+      const funs = !this.bizSn ? bizRemoveConfigCreate : bizRemoveConfigModify
+      _this.spinning = true
+      funs(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('ok', res.data)
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.form = {
+        configType: 'SALES_RETURN_SYNC',
+        bizNo: '',
+        dealerSn: undefined,
+        bizSn: undefined, // bizsn
+        salesReturnSyncErp: '1'
+      }
+      this.bizSn = undefined
+      this.dealerData = null
+      this.$refs.ruleForm.resetFields()
+      this.$emit('cancel')
+    },
+    getDetail () {
+      bizRemoveConfigDetail({ bizSn: this.bizSn, configType: 'SALES_RETURN_SYNC' }).then(res => {
+        const { bizSn, bizNo, dealerSn, dealerName } = res.data
+        this.dealerData = { dealerName: dealerName }
+        this.form = Object.assign(this.form, {
+          bizNo: bizNo,
+          dealerSn: dealerSn,
+          bizSn: bizSn,
+          salesReturnSyncErp: '1'
+        })
+      })
+    },
+    edit (row) {
+      if (row && row.bizSn) {
+        this.title = '编辑配置'
+        this.bizSn = row.bizSn
+        this.getDetail()
+      } else {
+        this.title = '新增配置'
+        this.bizSn = undefined
+      }
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+    }
+  }
+}
+</script>

+ 267 - 0
src/views/setting/removeSetting/erpList.vue

@@ -0,0 +1,267 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" 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="业务时间">
+                <rangeDate ref="rangeCreateDate" id="salesReturnRemove-createDate" :value="createDate" @change="dateCreateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
+                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="salesReturnRemove-dealerSn" @change="custChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="销售退货单号">
+                <a-input id="salesReturnRemove-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售退货单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <span class="table-page-search-submitButtons">
+                <a-button id="salesReturnRemove-search" type="primary" :disabled="disabled" @click="$refs.table.refresh(true)">查询</a-button>
+                <a-button id="salesReturnRemove-reset" style="margin-left: 8px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  class="button-warning"
+                  v-if="$hasPermissions('B_srr_export')"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                  id="salesReturnRemove-export">导出</a-button>
+              </span>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <div class="table-operator" style="flex-grow: 1;display: flex;justify-content: space-between;align-items: center;">
+          <div style="flex-grow: 1;display: flex;align-items: center;">
+            <!-- 操作按钮 -->
+            <div>
+              <a-button type="primary" v-if="$hasPermissions('B_srr_add')" @click="handleEdit">新增</a-button>
+            </div>
+          </div>
+          <div></div>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+75+'px' }"
+          size="small"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record, index">
+            <div>
+              <a-button
+                size="small"
+                type="link"
+                class="button-error"
+                v-if="record.show&&$hasPermissions('B_srr_del')"
+                @click="handleDel(record)"
+                :id="'salesReturnRemove-del-btn'+index">删除</a-button>
+            </div>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 选择客户弹框 -->
+      <baseModal :show="openModal" ref="openModal" @ok="handleOk" @cancel="openModal=false"></baseModal>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import baseModal from './erpBaseModal.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { bizRemoveConfigPageList, bizRemoveConfigDelete, bizRemoveConfigReportExport } from '@/api/bizRemove'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+export default {
+  name: 'SrrErpSetting',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    baseModal,
+    dealerSubareaScopeList,
+    rangeDate
+  },
+  data () {
+    return {
+      spinning: false,
+      // 高级搜索 展开/关闭
+      advanced: true,
+      tableHeight: 0,
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      createDate: [], //  创建时间
+      openModal: false, // 选择客户弹框是否显示
+      openDepartUserModal: false,
+      // 查询参数
+      queryParam: {
+        configType: 'SALES_RETURN_SYNC',
+        beginDate: undefined,
+        endDate: undefined,
+        dealerSn: undefined, //  客户名称
+        bizNo: undefined, //  业务单号
+        bizType: undefined
+      },
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return bizRemoveConfigPageList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
+              data.list[i].show = data.list[i].billStatus != 'FINISH' && data.list[i].billStatus != 'CANCEL'
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false
+    }
+  },
+  computed: {
+    columns () {
+      const a = ['', '剔除']
+      const arr = [
+        { title: '编号', dataIndex: 'no', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '销售退货单号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务时间', dataIndex: 'bizDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: '46%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateCreateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    // 选择客户
+    custChange (val) {
+      this.queryParam.dealerSn = val.key
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(bizRemoveConfigReportExport, params, '销售退货同步erp剔除配置-', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
+    // 编辑
+    handleEdit (row) {
+      this.openModal = true
+      this.$refs.openModal.edit(row)
+    },
+    handleOk (res) {
+      this.$refs.table.refresh()
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: <div>销售退货单号:{row.bizNo}<div>确认要删除吗?</div></div>,
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          bizRemoveConfigDelete({ bizSn: row.bizSn, configType: 'SALES_RETURN_SYNC' }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    // 重置查询
+    resetSearchForm () {
+      this.createDate = []
+      this.$refs.rangeCreateDate.resetDate(this.createDate)
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
+      this.queryParam.dealerSn = undefined
+      this.$refs.dealerSubareaScopeList.resetForm()
+      this.queryParam.bizNo = ''
+      this.queryParam.bizType = undefined
+
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 295
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>

+ 5 - 1
src/views/setting/removeSetting/index.vue

@@ -11,6 +11,9 @@
         <a-tab-pane key="3" tab="轮胎补贴剔除" force-render>
           <list3></list3>
         </a-tab-pane>
+        <a-tab-pane key="4" tab="销售退货同步erp剔除" force-render>
+          <list4></list4>
+        </a-tab-pane>
       </a-tabs>
     </a-card>
   </div>
@@ -21,10 +24,11 @@ import { commonMixin } from '@/utils/mixin'
 import list1 from '../salesReturnRemove/list.vue'
 import list2 from '../dailyReportSettings/salesReturnRemove.vue'
 import list3 from './list.vue'
+import list4 from './erpList.vue'
 export default {
   name: 'DailyReportSettingsIndex',
   mixins: [commonMixin],
-  components: { list1, list2, list3 },
+  components: { list1, list2, list3, list4 },
   data () {
     return {
       tabVal: '1'

+ 2 - 2
src/views/setting/salesReturnRemove/list.vue

@@ -6,7 +6,7 @@
         <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="退货日期">
+              <a-form-item label="业务时间">
                 <rangeDate ref="rangeCreateDate" id="salesReturnRemove-createDate" :value="createDate" @change="dateCreateChange" />
               </a-form-item>
             </a-col>
@@ -173,7 +173,7 @@ export default {
         { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务单号', dataIndex: 'bizNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '业务状态', dataIndex: 'billStatusName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '退货日期', dataIndex: 'bizDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务时间', dataIndex: 'bizDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客户名称', dataIndex: 'dealerName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '开单统计(客户)', dataIndex: 'salesStatsDealer', width: '10%', align: 'center', customRender: function (text) { return a[text] } },
         { title: '开单统计(省份)', dataIndex: 'salesStatsProvince', width: '10%', align: 'center', customRender: function (text) { return a[text] } },

+ 1 - 1
vue.config.js

@@ -107,7 +107,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.132/ocs-admin',
+        // target: 'http://192.168.2.10/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,