Pārlūkot izejas kodu

Merge branch 'develop_yh53' of jianguan-web/qpls-md-html into develop_yh50

李磊 3 mēneši atpakaļ
vecāks
revīzija
c2f1bd2d63

+ 1 - 1
public/version.json

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

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

@@ -1155,7 +1155,7 @@ export const asyncRouterMap = [
                 }
               },
               {
-                path: 'edit/:sn',
+                path: 'edit/:sn/:val',
                 name: 'purchaseReturnApplyFormEdit',
                 component: () => import(/* webpackChunkName: "purchasingManagement" */ '@/views/purchasingManagement/purchaseReturnApplyForm/edit.vue'),
                 meta: {

+ 24 - 18
src/views/numsGoodsShelves/onlinePayInvoice/detail.vue

@@ -1,20 +1,20 @@
 <template>
-  <div class="jg-page-wrap onlinePayDetail-wrap">
+  <div class="jg-page-wrap onlinePayInvoiceDetail-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-      <a-page-header :ghost="false" :backIcon="false" class="onlinePayDetail-cont">
+      <a-page-header :ghost="false" :backIcon="false" class="onlinePayInvoiceDetail-cont">
         <!-- 自定义的二级文字标题 -->
         <template slot="subTitle">
           <span class="billno">货架名称:{{ $route.params.shelfName ||'--' }}</span>
-          <a-button id="onlinePayDetail-seeInfo-btn" type="link" class="button-default" @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:10px;vertical-align:middle;">
+          <a-button id="onlinePayInvoiceDetail-seeInfo-btn" type="link" class="button-default" @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:10px;vertical-align:middle;">
             <a-icon :type="isShowBisiceInfo ? 'eye-invisible' : 'eye'"/>
             {{ isShowBisiceInfo?'隐藏':'查看' }}信息
           </a-button>
-          <a-button id="onlinePayDetail-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
+          <a-button id="onlinePayInvoiceDetail-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
         </template>
       </a-page-header>
       <div class="sales-detail-body">
         <!-- 数据统计 -->
-        <a-card size="small" :bordered="false" class="onlinePayDetail-cont" v-show="isShowBisiceInfo">
+        <a-card size="small" :bordered="false" class="onlinePayInvoiceDetail-cont" v-show="isShowBisiceInfo">
           <a-descriptions size="small" :column="4">
             <div slot="title" style="display:flex;justify-content:space-between;align-items:center;">
               数据统计
@@ -27,37 +27,37 @@
         </a-card>
         <a-card size="small" :bordered="false" class="pages-wrap">
           <div ref="tableSearch" class="table-page-search-wrapper">
-            <a-form layout="inline" id="onlinePayDetail-form" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-form layout="inline" id="onlinePayInvoiceDetail-form" @keyup.enter.native="$refs.table.refresh(true)">
               <a-row :gutter="15">
                 <a-col :xl="6" :lg="6" :md="12" :sm="24">
                   <a-form-item label="下单时间">
-                    <rangeDate id="onlinePayDetail-time" ref="rangeDate" :value="orderDate" @change="orderDateChange" />
+                    <rangeDate id="onlinePayInvoiceDetail-time" ref="rangeDate" :value="orderDate" @change="orderDateChange" />
                   </a-form-item>
                 </a-col>
                 <a-col :xl="6" :lg="6" :md="12" :sm="24">
                   <a-form-item label="付款时间">
-                    <rangeDate id="onlinePayDetail-qhtime" ref="rangePayDate" :value="payDate" @change="date=>{dataChange(date,'pay')}" />
+                    <rangeDate id="onlinePayInvoiceDetail-qhtime" ref="rangePayDate" :value="payDate" @change="date=>{dataChange(date,'pay')}" />
                   </a-form-item>
                 </a-col>
                 <a-col :xl="6" :lg="6" :md="12" :sm="24">
                   <a-form-item label="退款时间">
-                    <rangeDate id="onlinePayDetail-time" ref="rangeRefundDate" :value="refundDate" @change="date=>{dataChange(date,'refund')}" />
+                    <rangeDate id="onlinePayInvoiceDetail-time" ref="rangeRefundDate" :value="refundDate" @change="date=>{dataChange(date,'refund')}" />
                   </a-form-item>
                 </a-col>
                 <a-col :xl="6" :lg="6" :md="12" :sm="24">
                   <a-form-item label="采购单号">
-                    <a-input id="onlinePayDetail-purchaseBillNo" placeholder="请输入采购单号" v-model.trim="queryParam.purchaseBillNo" allowClear/>
+                    <a-input id="onlinePayInvoiceDetail-purchaseBillNo" placeholder="请输入采购单号" v-model.trim="queryParam.purchaseBillNo" allowClear/>
                   </a-form-item>
                 </a-col>
                 <a-col :xl="6" :lg="6" :md="12" :sm="24">
                   <a-form-item label="销售单号">
-                    <a-input id="onlinePayDetail-salesBillNo" placeholder="请输入销售单号" v-model.trim="queryParam.salesBillNo" allowClear/>
+                    <a-input id="onlinePayInvoiceDetail-salesBillNo" placeholder="请输入销售单号" v-model.trim="queryParam.salesBillNo" allowClear/>
                   </a-form-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-item label="业务状态">
                     <v-select
-                      id="onlinePayDetail-billStatus"
+                      id="onlinePayInvoiceDetail-billStatus"
                       code="SALES_BILL_STATUS"
                       :notIn="['WAIT_SUBMIT','SUPERIOR_CHANGE']"
                       v-model="queryParam.billStatus"
@@ -67,17 +67,23 @@
                 </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-item label="财务状态">
-                    <v-select id="onlinePayDetail-financialStatus" code="FINANCIAL_ONLINE_RECEIVE_STATUS" v-model="queryParam.financialStatus" allowClear placeholder="请选择财务状态"></v-select>
+                    <v-select id="onlinePayInvoiceDetail-financialStatus" code="FINANCIAL_ONLINE_RECEIVE_STATUS" v-model="queryParam.financialStatus" allowClear placeholder="请选择财务状态"></v-select>
                   </a-form-item>
                 </a-col>
                 <a-col :md="6" :sm="24">
                   <a-form-item label="到账状态">
-                    <v-select id="onlinePayDetail-receivedMoneyFlag" code="RECEIVED_MONEY_FLAG" :notIn="['2']" v-model="queryParam.receivedMoneyFlag" allowClear placeholder="请选择到账状态"></v-select>
+                    <v-select
+                      id="onlinePayInvoiceDetail-receivedMoneyFlag"
+                      code="RECEIVED_MONEY_FLAG"
+                      :notIn="['2']"
+                      v-model="queryParam.receivedMoneyFlag"
+                      allowClear
+                      placeholder="请选择到账状态"></v-select>
                   </a-form-item>
                 </a-col>
                 <a-col :xl="24" :lg="24" :md="24" :sm="24" style="text-align:center;">
-                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="onlinePayDetail-refresh" >查询</a-button>
-                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="onlinePayDetail-reset">重置</a-button>
+                  <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="onlinePayInvoiceDetail-refresh" >查询</a-button>
+                  <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="onlinePayInvoiceDetail-reset">重置</a-button>
                 </a-col>
               </a-row>
             </a-form>
@@ -280,7 +286,7 @@ export default {
 </script>
 
 <style lang="less" scoped>
-  .onlinePayDetail-wrap{
+  .onlinePayInvoiceDetail-wrap{
     position: relative;
     height: 100%;
     .billno{
@@ -294,7 +300,7 @@ export default {
     .ant-tag-green,.ant-tag-orange{
       vertical-align: middle;
     }
-    .onlinePayDetail-cont{
+    .onlinePayInvoiceDetail-cont{
       margin-bottom: 10px;
       /deep/ .ant-descriptions-title{
           margin-bottom: 10px;

+ 1 - 0
src/views/numsGoodsShelves/onlinePayInvoice/list.vue

@@ -64,6 +64,7 @@ import shelfList from '@/views/common/shelfList'
 import custList from '@/views/common/custList.vue'
 import { queryShelfSettleRulePage, queryShelfSettleRuleCount } from '@/api/merchantNew'
 export default {
+  name: 'OnlinePayInvoiceList',
   components: { STable, shelfList, custList },
   mixins: [commonMixin],
   data () {

+ 11 - 4
src/views/numsGoodsShelves/shelfSet/importGuideModal.vue

@@ -15,9 +15,7 @@
             <span>1</span>下载导入模板
           </div>
           <p>请按照下载的Excel模板填写数据</p>
-          <a :href="filePath" style="padding: 5px 0 0 23px;display: block;" id="importGuide-downloadTpl">
-            <a-icon type="download" style="padding-right: 5px;" />下载导入模板
-          </a>
+          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" @click="handleExport">下载模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -72,6 +70,7 @@
 <script>
 import { hdPrint } from '@/libs/JGPrint.js'
 import ChooseImportModal from './chooseImportModal.vue'
+import { shelfProductDownload } from '@/api/shelf'
 import { Upload } from '@/components'
 export default {
   name: 'ImportGuideModal',
@@ -91,7 +90,6 @@ export default {
       isShow: this.openModal, //  是否打开弹框
       openImportModal: false, //  导入
       attachAction: process.env.VUE_APP_API_BASE_URL + '/upload',
-      filePath: location.protocol + '//' + location.host + '/templ/绑定产品导入模板.xlsx',
       paramsData: null, // 参数
       uploadParams: {
         savePathType: 'local' // 保存到本地
@@ -127,6 +125,15 @@ export default {
     handleClose () {
       this.openImportModal = false
       this.isShow = false
+    },
+    //  导出
+    handleExport () {
+      const _this = this
+      _this.spinning = true
+      // 导出
+      hdPrint('', 'export', shelfProductDownload, { shelfSn: this.params.shelfSn }, '绑定产品导入模板', function () {
+        _this.spinning = false
+      })
     }
   },
   watch: {

+ 1 - 3
src/views/numsGoodsShelves/withdrawalManagementNew/applyWithdrawal.vue

@@ -108,11 +108,9 @@ export default {
               setTimeout(() => {
                 _this.cancel()
                 _this.$emit('refresh')
-                _this.spinning = false
               }, 1000)
-            } else {
-              _this.spinning = false
             }
+            _this.spinning = false
           })
         } else {
           return false

+ 2 - 0
src/views/numsGoodsShelves/withdrawalManagementNew/billFlowModal.vue

@@ -189,10 +189,12 @@ export default {
     },
     // 统计
     getCount (val) {
+      this.spinning = true
       bizTradeQueryGroupCount(val).then(res => {
         if (res.status == 200) {
           this.detailData = res.data
         }
+        this.spinning = false
       })
     },
     //  创建时间  change

+ 2 - 0
src/views/numsGoodsShelves/withdrawalManagementNew/list.vue

@@ -124,6 +124,7 @@ export default {
     },
     // 获取详情信息
     getPageInfo () {
+      this.spinning = true
       merchantCashOutDetail({}).then(res => {
         if (res.status == 200) {
           this.pageInfo = res.data
@@ -132,6 +133,7 @@ export default {
           this.pageInfo = null
           this.errorFlag = true
         }
+        this.spinning = false
       })
     },
     // 查询

+ 142 - 0
src/views/purchasingManagement/purchaseReturnApplyForm/addModal.vue

@@ -0,0 +1,142 @@
+<template>
+  <a-modal
+    centered
+    class="purchaseReturnApply-add-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="新建采购退货申请单"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="500">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="purchaseReturnApply-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol" >
+        <a-form-model-item label="供应商" prop="returnTargetSn">
+          <span>箭冠营销中心</span>
+          <div style="color:#999;margin-left:-48px;">
+            <div>说明:</div>
+            <div>1、采购退货申请单提交后,箭冠营销中心系统将能查看到此单并进行后续处理。</div>
+            <div>2、采购退货申请单中的产品,不会占用库存。</div>
+          </div>
+        </a-form-model-item>
+        <a-form-model-item label="退货类别" prop="goodFlag">
+          <v-select
+            id="purchaseReturnApply-goodFlag"
+            v-model="form.goodFlag"
+            code="GOOD_FLAG"
+            placeholder="请选择退货类别"
+            allowClear></v-select>
+        </a-form-model-item>
+        <a-form-model-item label="产品类别" prop="returnProductType">
+          <v-select
+            id="purchaseReturnApply-returnProductType"
+            showType="radio"
+            v-model="form.returnProductType"
+            code="RETURN_PRODUCT_TYPE"
+            placeholder="请选择产品类别"
+            allowClear></v-select>
+        </a-form-model-item>
+      </a-form-model>
+      <div class="btn-cont">
+        <a-button style="margin-right:25px;" id="writeOff-modal-back" @click="isShow = false">取消</a-button>
+        <a-button type="primary" :loading="confirmLoading" id="writeOff-modal-back" @click="handleSubmit">确定</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+export default {
+  name: 'PurchaseReturnApplyAddModal',
+  components: { VSelect },
+  mixins: [commonMixin],
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      confirmLoading: false, // 按钮loading
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        goodFlag: 'DEFECTIVE_PRODUCT_RETURN', // 退货类别
+        returnProductType: undefined // 产品类别
+      },
+      rules: {
+        goodFlag: [
+          { required: true, message: '请选择退货类别', trigger: 'change' }
+        ],
+        returnProductType: [
+          { required: true, message: '请选择产品类别', trigger: 'change' }
+        ]
+      }
+    }
+  },
+  methods: {
+    // 重置列表
+    resetForm () {
+      this.form.goodFlag = 'DEFECTIVE_PRODUCT_RETURN'
+      this.form.returnProductType = undefined
+      this.$refs.ruleForm.resetFields()
+      this.spinning = false
+      this.confirmLoading = false
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      _this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.spinning = true
+          _this.confirmLoading = true
+          _this.$emit('ok', _this.form)
+        } else {
+          return false
+        }
+      })
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .purchaseReturnApply-add-modal{
+    .ant-modal-body {
+      padding: 20px 40px 24px;
+    }
+    .ant-form-item{
+      margin-bottom:13px !important;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 1 - 0
src/views/purchasingManagement/purchaseReturnApplyForm/detail.vue

@@ -23,6 +23,7 @@
               <a-descriptions-item label="供应商">{{ basicInfoData&&basicInfoData.returnTargetName || '--' }}</a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ basicInfoData&&basicInfoData.billStatusDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="退货类别">{{ basicInfoData&&basicInfoData.goodFlagDictValue || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="产品类别">{{ basicInfoData&&basicInfoData.returnProductTypeDictValue || '--' }}</a-descriptions-item>
               <a-descriptions-item label="创建时间">{{ basicInfoData&&basicInfoData.createDate || '--' }}</a-descriptions-item>
               <a-descriptions-item label="客服审核时间">{{ basicInfoData&&basicInfoData.auditTime || '--' }}</a-descriptions-item>
             </a-descriptions>

+ 2 - 0
src/views/purchasingManagement/purchaseReturnApplyForm/edit.vue

@@ -8,6 +8,7 @@
           <span class="billno" style="margin: 0 10px;color: #666;">单号:{{ detailData&&detailData.purchaseReturnApplyNo }}</span>
           <span style="margin: 0 10px;color: #666;">供应商名称:箭冠营销中心</span>
           <span style="margin: 0 10px;color: #666;">退货类别:{{ detailData&&detailData.goodFlagDictValue||'--' }}</span>
+          <span style="margin: 0 10px;color: #666;">产品类别:{{ detailData&&detailData.returnProductTypeDictValue||'--' }}</span>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="$hasPermissions('B_purchaseReturnApplyPrint')">
@@ -288,6 +289,7 @@ export default {
         this.disabled = true
         this.queryParam.sysFlag = '1' // 剪冠产品
         this.queryParam.onlineFalg = this.goodFlag == 'GOOD_PRODUCT_RETURN' ? 1 : undefined // 上线标志,根据 良品or坏品
+        this.queryParam.returnProductType = this.$route.params.val
         return queryDealerScopeProductPage(Object.assign(parameter, this.queryParam)).then(res => {
           const data = res.data
           const no = (data.pageNo - 1) * data.pageSize

+ 36 - 52
src/views/purchasingManagement/purchaseReturnApplyForm/list.vue

@@ -56,6 +56,17 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="产品类别">
+                  <v-select
+                    v-model="queryParam.returnProductType"
+                    ref="returnProductType"
+                    id="purchaseReturnList-returnProductType"
+                    code="RETURN_PRODUCT_TYPE"
+                    placeholder="请选择产品类别"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
@@ -129,36 +140,10 @@
         </template>
       </s-table>
     </a-spin>
-
     <!-- 生成采购退货单 -->
     <creatPurchaseReutn ref="creatPurchaseReutn" :openModal="openCpModal" @close="openCpModal=false" @creatOk="$refs.table.refresh()"></creatPurchaseReutn>
-    <!-- 新建弹框 -->
-    <common-modal
-      :openModal="openTipsModal"
-      modalTit="新建采购退货申请单"
-      okText="确定"
-      @ok="creatReturnOrder"
-      @close="closeCreatModal">
-      <div>
-        <div style="padding:10px 0;">供应商:箭冠营销中心</div>
-        <div style="color:#999;">
-          <div>说明:</div>
-          <div>1、采购退货申请单提交后,箭冠营销中心系统将能查看到此单并进行后续处理。</div>
-          <div>2、采购退货申请单中的产品,不会占用库存。</div>
-        </div>
-        <div style="display:flex;align-items: center;padding-top: 20px;">
-          <span style="color:red;">*</span>
-          <span>退货类别:</span>
-          <v-select
-            id="purchaseReturnList-goodFlag-btn"
-            style="width:250px;"
-            v-model="goodFlag"
-            code="GOOD_FLAG"
-            placeholder="请选择退货类别"
-            allowClear></v-select>
-        </div>
-      </div>
-    </common-modal>
+    <!-- 新增 -->
+    <addModal ref="attTipsModal" :openModal="openTipsModal" @ok="creatReturnOrder" @close="openTipsModal=false"/>
   </a-card>
 </template>
 
@@ -168,11 +153,11 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import getDate from '@/libs/getDate.js'
 import creatPurchaseReutn from './creatPurchaseReutn.vue'
-import commonModal from '@/views/common/commonModal.vue'
+import addModal from './addModal.vue'
 import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnAgainCreate } from '@/api/purchaseReturnApply'
 export default {
   name: 'PurchaseReturnList',
-  components: { STable, VSelect, rangeDate, creatPurchaseReutn, commonModal },
+  components: { STable, VSelect, rangeDate, creatPurchaseReutn, addModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -193,9 +178,9 @@ export default {
         billSource: undefined, // 单据来源
         goodFlag: undefined, // 退货类别
         beginAuditDate: '', // 审核开始时间
-        endAuditDate: '' // 审核结束时间
+        endAuditDate: '', // 审核结束时间
+        returnProductType: undefined// 产品类别
       },
-      goodFlag: 'DEFECTIVE_PRODUCT_RETURN', // 退货类别默认值
       disabled: false, //  查询、重置按钮是否可操作
       tableHeight: 0, // 表格高度
       // 加载数据方法 必须为 Promise 对象
@@ -228,6 +213,7 @@ export default {
         { title: '采购退货申请单号', scopedSlots: { customRender: 'purchaseReturnApplyNo' }, width: '14%', align: 'center' },
         { title: '供应商', dataIndex: 'returnTargetName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '退货类别', dataIndex: 'goodFlagDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '产品类别', dataIndex: 'returnProductTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '申请退货数量', dataIndex: 'totalInitialQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '总公司实收数量', dataIndex: 'totalReceiveQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -267,6 +253,7 @@ export default {
       this.$refs.auditDate.resetDate(this.auditTime)
       this.queryParam.beginAuditDate = ''
       this.queryParam.endAuditDate = ''
+      this.queryParam.returnProductType = undefined
       if (!flag) {
         this.setIsHomeNav(this.$route.name, null)
       }
@@ -300,7 +287,7 @@ export default {
     handleEdit (row) {
       const _this = this
       if (row) { //  编辑
-        _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: row.purchaseReturnApplySn } })
+        _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: row.purchaseReturnApplySn, val: row.returnProductType } })
       } else { //  新增
         _this.openTipsModal = true
       }
@@ -311,26 +298,23 @@ export default {
       this.goodFlag = 'DEFECTIVE_PRODUCT_RETURN'
     },
     // 生成销售退货单成功
-    creatReturnOrder () {
+    creatReturnOrder (ajaxData) {
       const _this = this
-      if (_this.goodFlag) {
-        _this.spinning = true
-        purchaseReturnSave({ goodFlag: _this.goodFlag }).then(res => {
-          if (res.status == 200) {
-            const data = res.data
-            _this.spinning = false
-            _this.openTipsModal = false
-            // 重置查询条件
-            _this.resetData()
-            // 进入编辑页面
-            _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: data.purchaseReturnApplySn } })
-          } else {
-            _this.spinning = false
-          }
-        })
-      } else {
-        this.$message.success('请选择退货类别')
-      }
+      _this.spinning = true
+      purchaseReturnSave(ajaxData).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          _this.spinning = false
+          _this.openTipsModal = false
+          // 重置查询条件
+          _this.resetData()
+          _this.$refs.attTipsModal.resetForm()
+          // 进入编辑页面
+          _this.$router.push({ name: 'purchaseReturnApplyFormEdit', params: { sn: data.purchaseReturnApplySn, val: data.returnProductType } })
+        } else {
+          _this.spinning = false
+        }
+      })
     },
     // 再次编辑
     handleFinishBill (row) {

+ 7 - 7
src/views/salesManagement/onlinePayOrder/detail.vue

@@ -11,19 +11,19 @@
             <a-icon :type="isShowBisiceInfo ? 'eye-invisible' : 'eye'"/>
             {{ isShowBisiceInfo?'隐藏':'查看' }}信息
           </a-button>
-          <a-button id="purchaseNewOrderEdit-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
+          <a-button id="onlinePayDetail-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra" v-if="outBizSn ? $hasPermissions('B_outboundOrderDetail') : $hasPermissions('B_onlinePayPrint')">
           <div style="margin-top: 5px;">
             <PrintPanel ref="printBox" position="bottomRight" :disabled="localDataSource.length==0" @handlePrint="handlePrint">
               <div style="padding:10px;line-height: 30px;" slot="extendCons">
-                <a-checkbox v-model="printAllName" :checked="printAllName" id="salesQuery-printAllName">打印完整产品名称</a-checkbox>
-                <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="salesQuery-printOrgCode">打印原厂编码</a-checkbox>
-                <a-checkbox v-model="printPrice" :checked="printPrice" id="salesQuery-printPrice">打印售价</a-checkbox>
+                <a-checkbox v-model="printAllName" :checked="printAllName" id="onlinePayDetail-printAllName">打印完整产品名称</a-checkbox>
+                <a-checkbox v-model="printOrgCode" :checked="printOrgCode" id="onlinePayDetail-printOrgCode">打印原厂编码</a-checkbox>
+                <a-checkbox v-model="printPrice" :checked="printPrice" id="onlinePayDetail-printPrice">打印售价</a-checkbox>
                 <br>
-                <a-checkbox v-model="printRemarks" :checked="printRemarks" id="salesQuery-printRemarks">打印备注</a-checkbox>
-                <!-- <a-checkbox v-model="printNo" :checked="printNo" id="salesQuery-printNo">打印销售单号</a-checkbox> -->
+                <a-checkbox v-model="printRemarks" :checked="printRemarks" id="onlinePayDetail-printRemarks">打印备注</a-checkbox>
+                <!-- <a-checkbox v-model="printNo" :checked="printNo" id="onlinePayDetail-printNo">打印销售单号</a-checkbox> -->
               </div>
             </PrintPanel>
           </div>
@@ -84,7 +84,7 @@
               <span v-if="detailData&&detailData.sourceType&&detailData.sourceType==='XPRH_PURCHASE'"> 返券金额:<strong>{{ detailData&&(detailData.totalGiveAmount || detailData.totalGiveAmount==0) ? toThousands(detailData.totalGiveAmount) : '--' }}</strong>;</span>
             </div>
             <div>
-              <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="salesQuery-cost">成本价</a-checkbox>
+              <a-checkbox v-model="showCost" v-if="$hasPermissions('M_ShowAllCost')" id="onlinePayDetail-cost">成本价</a-checkbox>
             </div>
           </div>
           <!-- 列表 -->

+ 23 - 28
src/views/salesManagement/onlinePayOrder/list.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="jg-page-wrap salesManagementList-wrap">
+  <div class="jg-page-wrap onlinePayOrderList-wrap">
     <a-card size="small" :bordered="false" class="table-page-search-wrapper">
       <!-- 搜索条件 -->
       <div ref="tableSearch">
@@ -8,7 +8,7 @@
             <a-col :span="6">
               <a-form-item label="创建时间">
                 <rangeDate
-                  id="salesManagementList-creatdate"
+                  id="onlinePayOrderList-creatdate"
                   :allowClear="isByCustQuery"
                   :hasDisabledAreaTime="false"
                   ref="rangeDate"
@@ -18,12 +18,12 @@
             </a-col>
             <a-col :span="6">
               <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}" :required="isByCustQuery">
-                <custList id="salesManagementList-custList" ref="custList" @change="custChange"></custList>
+                <custList id="onlinePayOrderList-custList" ref="custList" @change="custChange"></custList>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="销售单号">
-                <a-input id="salesManagementList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
+                <a-input id="onlinePayOrderList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -33,7 +33,7 @@
                     v-model="queryParam.billStatus"
                     @change="setIsHomeNav($route.name, null)"
                     ref="billStatus"
-                    id="salesManagementList-billStatus"
+                    id="onlinePayOrderList-billStatus"
                     code="SALES_BILL_STATUS"
                     :notIn="['WAIT_SUBMIT','SUPERIOR_CHANGE']"
                     placeholder="请选择业务状态"
@@ -42,7 +42,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="出库时间">
-                  <rangeDate id="salesManagementList-outWareTime" ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
+                  <rangeDate id="onlinePayOrderList-outWareTime" ref="outWareRangeDate" v-model="outWareTime" @change="outWareDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -52,7 +52,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="采购单号">
-                  <a-input id="salesManagementList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
+                  <a-input id="onlinePayOrderList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -60,7 +60,7 @@
                   <v-select
                     v-model="queryParam.financialStatus"
                     ref="financialStatus"
-                    id="salesManagementList-financialStatus"
+                    id="onlinePayOrderList-financialStatus"
                     code="FINANCIAL_ONLINE_RECEIVE_STATUS"
                     placeholder="请选择财务状态"
                     allowClear></v-select>
@@ -68,19 +68,19 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
-                  <rangeDate id="salesManagementList-auditTime" ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
+                  <rangeDate id="onlinePayOrderList-auditTime" ref="auditRangeDate" v-model="auditTime" @change="auditDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="取消时间">
-                  <rangeDate id="salesManagementList-cancelTime" ref="cancelRangeDate" v-model="cancelTime" @change="cancelDateChange" />
+                  <rangeDate id="onlinePayOrderList-cancelTime" ref="cancelRangeDate" v-model="cancelTime" @change="cancelDateChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="收款方式">
                   <v-select
                     code="SETTLE_STYLE"
-                    id="salesManagementList-settleStyleSn"
+                    id="onlinePayOrderList-settleStyleSn"
                     v-model="queryParam.settleStyleSn"
                     allowClear
                     placeholder="请选择收款方式"
@@ -89,8 +89,8 @@
               </a-col>
             </template>
             <a-col :md="6" :sm="24">
-              <a-button id="salesManagementList-search" type="primary" :disabled="disabled" @click="searchForm">查询</a-button>
-              <a-button id="salesManagementList-reset" style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
+              <a-button id="onlinePayOrderList-search" type="primary" :disabled="disabled" @click="searchForm">查询</a-button>
+              <a-button id="onlinePayOrderList-reset" style="margin-left: 5px" :disabled="disabled" @click="resetSearchForm()">重置</a-button>
               <a-button
                 type="primary"
                 v-if="$hasPermissions('B_onlinePayExport')"
@@ -98,8 +98,8 @@
                 @click="handleExport"
                 :disabled="disabled"
                 :loading="exportLoading"
-                id="salesManagementList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px" id="salesManagementList-advanced">
+                id="onlinePayOrderList-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="onlinePayOrderList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -113,7 +113,7 @@
                   </template>
                   <a-icon type="question-circle" />
                 </a-popover>
-                <a-checkbox id="sales-custQuery" style="margin-left:10px;" v-model="isAbandonOrder" @change="handleAbandonOrder">包括废弃单</a-checkbox>
+                <a-checkbox id="onlinePayOrderList-custQuery" style="margin-left:10px;" v-model="isAbandonOrder" @change="handleAbandonOrder">包括废弃单</a-checkbox>
                 <a-popover placement="right">
                   <template slot="content">
                     废弃单:指【已取消】和【审核不通过】状态的订单
@@ -142,7 +142,7 @@
             已退款金额:<strong>{{ totalData&&(totalData.refundedAmount || totalData.refundedAmount==0) ? toThousands(totalData.refundedAmount) : '--' }}</strong>;
           </div>
           <div class="action-buttons">
-            <hideCellMenus placeholder="显示" :defHiddenKes="colsArr" v-model="showCell"></hideCellMenus>
+            <hideCellMenus id="onlinePayOrderList-showCellMenus" placeholder="显示" :defHiddenKes="colsArr" v-model="showCell"></hideCellMenus>
           </div>
         </div>
 
@@ -160,7 +160,7 @@
           bordered>
           <!-- 销售单号 -->
           <template slot="salesBillNo" slot-scope="text, record">
-            <span class="table-td-link" :id="'salesManagementList-detail-'+record.id" v-if="$hasPermissions('M_onlinePayOrderDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
+            <span class="table-td-link" :id="'onlinePayOrderList-detail-'+record.id" v-if="$hasPermissions('M_onlinePayOrderDetail')" @click="handleDetail(record)">{{ record.salesBillNo }}</span>
             <span v-else>{{ record.salesBillNo }}</span>
             <a-badge count="改" :number-style="{ zoom:'80%',marginLeft:'5px' }" v-if="record.billStatus=='SUPERIOR_CHANGE'"></a-badge>
           </template>
@@ -190,7 +190,7 @@
           <!-- billStatus  WAIT_SUBMIT待提交   WAIT_AUDIT待审核    AUDIT_REJECT审核不通过  WAIT_OUT_WAREHOUSE待出库   FINISH已完结  SUPERIOR_CHANGE上级改单  CANCEL已取消 -->
           <template slot="action" slot-scope="text, record">
             <a-button
-              :id="'salesManagementList-audit-'+record.id"
+              :id="'onlinePayOrderList-audit-'+record.id"
               size="small"
               type="link"
               class="button-primary"
@@ -198,7 +198,7 @@
               @click="handleEexamine(record)"
             >审核</a-button>
             <a-button
-              :id="'salesManagementList-outStock-'+record.id"
+              :id="'onlinePayOrderList-outStock-'+record.id"
               size="small"
               type="link"
               v-if="record.billStatus == 'WAIT_OUT_WAREHOUSE' && $hasPermissions('B_onlinePayStockOut')"
@@ -230,7 +230,7 @@ import hideCellMenus from '@/views/common/hideCellMenus'
 import { salesList, salesWriteAudit, salesWriteStockOut, salesCount, salesExport } from '@/api/sales'
 import moment from 'moment'
 export default {
-  name: 'SalesList',
+  name: 'OnlinePayOrderList',
   components: { STable, VSelect, rangeDate, auditModal, custList, stateIcon, hideCellMenus },
   mixins: [commonMixin],
   data () {
@@ -413,14 +413,11 @@ export default {
         billStatus: billStatus
       }).then(res => {
         if (res.status == 200) {
-          this.visibleAudit = false
           this.$message.success(res.message)
           this.$refs.table.refresh()
-          this.spinningAudit = false
-        } else {
           this.visibleAudit = false
-          this.spinningAudit = false
         }
+        this.spinningAudit = false
       })
     },
     //  出库
@@ -439,10 +436,8 @@ export default {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
             }
+            _this.spinning = false
           })
         }
       })