Przeglądaj źródła

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

chenrui 1 rok temu
rodzic
commit
3307faf2c6

+ 11 - 0
src/api/expenseManagement.js

@@ -169,6 +169,17 @@ export const expenseAcctDetailSave = (params) => {
     }
   })
 }
+// 批量保存费用明细
+export const updateBatchExpenseAcctDetail = (params) => {
+  return axios({
+    url: `/expenseAcctDetail/updateDetailByAccount`,
+    data: params,
+    method: 'post',
+    headers:{
+      'module': encodeURIComponent('批量修改记账名称')
+    }
+  })
+}
 // 费用类型
 export const expenseTypeList = (params) => {
   return axios({

+ 64 - 11
src/views/expenseManagement/expenseReimbursement/add.vue

@@ -64,6 +64,8 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :row-selection="{ columnWidth: 40 }"
+          @rowSelection="rowSelectionFun"
           :defaultLoadData="false"
           :showPagination="false"
           bordered>
@@ -92,6 +94,10 @@
             <div>{{ text }}</div>
             <div v-if="record.accountNameFnumber">({{ record.accountNameFnumber }})</div>
           </template>
+          <!-- 原记账名称 -->
+          <template slot="yjzname" slot-scope="text,record">
+            <div>{{ text == record.accountName || !text ? '--' : text }}</div>
+          </template>
           <!-- 费用承担方 -->
           <template slot="fycdf" slot-scope="text,record">
             <div v-for="(item,index) in record.detailSplitList" :key="item.id+'-'+index">
@@ -129,6 +135,7 @@
     </div>
     <!-- 费用明细 -->
     <epenseDetailModal
+      ref="epenseDetailForm"
       :openModal="openEpenseDetailModal"
       :expenseAccountSn="$route.params.sn"
       :expenseAccountNo="detailData?detailData.expenseAccountNo:''"
@@ -162,7 +169,7 @@ import productInfoModal from './productInfoModal.vue'
 import baseDataModal from './baseDataModal.vue'
 import ImportGuideModal from './importGuideModal.vue'
 import chooseDepartUserModal from './chooseDepartUserModal.vue'
-import { expenseAccountDetail, expenseAcctDetailDelete, expenseAcctDetailFindList, expenseAccountSubmit, expenseInsertImport } from '@/api/expenseManagement.js'
+import { expenseAccountDetail, expenseAcctDetailDelete, updateBatchExpenseAcctDetail, expenseAcctDetailFindList, expenseAccountSubmit, expenseInsertImport } from '@/api/expenseManagement.js'
 export default {
   name: 'ExpenseReimbursementEdit',
   mixins: [commonMixin],
@@ -205,21 +212,23 @@ export default {
         })
       },
       columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '记账类型', dataIndex: 'accountTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
         { title: '记账名称', dataIndex: 'accountName', scopedSlots: { customRender: 'jzname' }, align: 'center', width: '10%' },
-        { title: '所属区域', dataIndex: 'subareaNames', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属分区', dataIndex: 'subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '记账费用', dataIndex: 'expense', align: 'center', width: '10%', customRender: function (text) { return (text == 0 || text) ? _this.toThousands(text) : '--' } },
+        { title: '原记账名称', dataIndex: 'origAccountName', scopedSlots: { customRender: 'yjzname' }, align: 'center', width: '10%' },
+        { title: '所属区域', dataIndex: 'subareaNames', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属分区', dataIndex: 'subareaAreaName', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
+        { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
+        { title: '记账费用', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? _this.toThousands(text) : '--' } },
         { title: '费用承担方', scopedSlots: { customRender: 'fycdf' }, align: 'center', width: '15%' },
-        { title: '产品信息', scopedSlots: { customRender: 'cpxx' }, align: 'center', width: '12%' },
+        { title: '产品信息', scopedSlots: { customRender: 'cpxx' }, align: 'center', width: '10%' },
         { title: '销售单号', dataIndex: 'salesBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'remarks', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center' }
       ],
-      isBatch: false // 是否变更记账名称
+      isBatch: false, // 是否变更记账名称
+      rowSelectionInfo: null // 批量选择的数据
     }
   },
   methods: {
@@ -227,10 +236,11 @@ export default {
     handleEditBase (event) {
       this.openBaseModal = true
     },
+    // 刷新列表
     refashData () {
       this.getDetail(true)
     },
-    //  费用单基础详情
+    //  获取费用单基础详情
     getDetail (type) {
       this.spinning = true
       this.disabled = true
@@ -248,6 +258,7 @@ export default {
         }
       })
     },
+    // 查询列表
     getExpenseDetailList () {
       this.$refs.table.refresh()
     },
@@ -261,10 +272,18 @@ export default {
     },
     // 批量修改明细
     plEdit () {
+      if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+        this.$message.warning('请在列表勾选后再进行操作!')
+        return
+      }
       this.expenseAccountDetailSn = ''
       this.openEpenseDetailModal = true
       this.isBatch = true
     },
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
     // 新增明细
     newExpenseDetail () {
       this.expenseAccountDetailSn = ''
@@ -280,8 +299,42 @@ export default {
       // 如果是批量修改
       if (this.isBatch) {
         console.log(data)
+        const rows = this.rowSelectionInfo && this.rowSelectionInfo.selectedRows || []
+        const params = []
+        if (rows.length) {
+          rows.forEach(item => {
+            params.push({
+              expenseAccountDetailSn: item.expenseAccountDetailSn,
+              origAccountName: item.origAccountName,
+              origAccountNameSn: item.origAccountNameSn,
+              accountNameSn: data.accountNameSn,
+              accountType: data.accountType,
+              provinceName: data.provinceName,
+              provinceSn: data.provinceSn,
+              subareaArea: data.subareaArea,
+              cityName: data.cityName,
+              citySn: data.citySn,
+              expenseAccountNo: data.expenseAccountNo,
+              expenseAccountSn: data.expenseAccountSn
+            })
+          })
+          // 组织数据
+          updateBatchExpenseAcctDetail(params).then(res => {
+            if (res.status == 200) {
+              this.$message.success(res.message)
+              // 修改成功
+              this.epenseDetailClose()
+              this.getDetail(false)// 刷新列表
+            }
+            this.$refs.epenseDetailForm.spinning = false
+          })
+        } else {
+          this.$message.warning('请在列表勾选后再进行操作!')
+          this.$refs.epenseDetailForm.spinning = false
+        }
       } else {
-        this.openEpenseDetailModal = false
+        // 单个修改成功
+        this.epenseDetailClose()
         this.getDetail(false)// 刷新列表
       }
     },

+ 10 - 9
src/views/expenseManagement/expenseReimbursement/baseDataModal.vue

@@ -174,12 +174,12 @@ export default {
         if (this.expenseAccountSn) { //  编辑页
           this.getDetail()
           this.title = '编辑费用报销单'
-        }else{
+        } else {
           this.title = '新增费用报销单'
         }
       })
     },
-    retsetForm(){
+    retsetForm () {
       this.form = {
         applyPersonSn: undefined, // 申请人
         applyDepartmentSn: undefined, //  申请部门
@@ -238,19 +238,19 @@ export default {
       })
     },
     // 设置数据
-    setDetail(data, from){
+    setDetail (data, from) {
       console.log(data)
       this.spinning = false
       this.disabled = false
       this.fromPage = from
       this.form = Object.assign(this.form, data)
       // 获取附件列表
-      if(this.$refs.attachList){
+      if (this.$refs.attachList) {
         this.form.expenseAccountFilesList = ''
         this.attachList = data.expenseAccountFilesList
         this.$refs.attachList.setFileList(this.attachList)
       }
-      setTimeout(()=>{
+      setTimeout(() => {
         this.expenseTypes = data.expenseType ? [this.form.expenseType, this.form.expenseType2, this.form.expenseType3] : []
       }, 500)
     },
@@ -277,13 +277,14 @@ export default {
           const form = JSON.parse(JSON.stringify(_this.form))
           form.expenseDate = form.expenseDate + '-01'
           form.expenseAccountFilesList = this.attachList
-          _this.spinning = true
           console.log(form)
+          _this.spinning = true
           // 从销售单转的费用
-          if(_this.fromPage=='sales'){
-            _this.$emit('expenseSaveOk',form)
+          if (_this.fromPage == 'sales') {
+            _this.$emit('expenseSaveOk', form)
             return false
           }
+          // 手动建的费用单
           expenseAccountSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
@@ -311,7 +312,7 @@ export default {
       this.opened = newValue
       if (newValue) {
         this.pageInit()
-      }else{
+      } else {
         this.retsetForm()
       }
     },

+ 22 - 14
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -3,18 +3,19 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <a-page-header :ghost="false" :backIcon="false" class="expenseManagementDetail-cont">
         <template slot="subTitle">
-          <a href="javascript:;" @click="handleBack">
+          <a href="javascript:;" @click="handleBack" id="epenseDetail-back-btn" >
             <a-icon type="left"></a-icon>
             返回列表
           </a>
           <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailData&&detailData.expenseAccountNo || '--' }}</span>
           <span style="margin: 0 10px;color: #666;">申请人:{{ detailData&&detailData.applyPersonName }}</span>
-          <a-button type="link" size="small" class="button-default" @click="showDetail=!showDetail">
+          <a-button id="epenseDetail-showDesc-btn" type="link" size="small" class="button-default" @click="showDetail=!showDetail">
             <a-icon :type="showDetail ? 'eye-invisible' : 'eye'"/> {{ showDetail?'隐藏':'查看' }}信息
           </a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
         <template slot="extra">
+          <a-checkbox v-model="printRemark" id="print-remark">打印备注</a-checkbox>
           <a-button
             :disabled="detailData==null"
             key="1"
@@ -79,6 +80,10 @@
             <div>{{ text }}</div>
             <div v-if="record.accountNameFnumber">({{ record.accountNameFnumber }})</div>
           </template>
+          <!-- 原记账名称 -->
+          <template slot="yjzname" slot-scope="text,record">
+            <div>{{ text == record.accountName || !text ? '--' : text }}</div>
+          </template>
           <!-- 费用承担方 -->
           <template slot="fycdf" slot-scope="text,record">
             <div v-for="(item,index) in record.detailSplitList" :key="item.id+'-'+index">
@@ -139,17 +144,18 @@ export default {
       printType: '',
       count: 0,
       columns: [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '记账类型', dataIndex: 'accountTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '记账名称', dataIndex: 'accountName', scopedSlots: { customRender: 'jzname' }, align: 'center', width: '14%' },
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '记账类型', dataIndex: 'accountTypeDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '记账名称', dataIndex: 'accountName', scopedSlots: { customRender: 'jzname' }, align: 'center', width: '8%' },
+        { title: '原记账名称', dataIndex: 'origAccountName', scopedSlots: { customRender: 'yjzname' }, align: 'center', width: '8%' },
         { title: '所属区域', dataIndex: 'subareaNames', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '所属分区', dataIndex: 'subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '记账费用', dataIndex: 'expense', align: 'right', width: '8%', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' } },
-        { title: '费用承担方', scopedSlots: { customRender: 'fycdf' }, align: 'center', width: '14%' },
-        { title: '产品信息', scopedSlots: { customRender: 'cpxx' }, align: 'center', width: '12%' },
-        { title: '销售单号', dataIndex: 'salesBillNo', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '所属省份', dataIndex: 'provinceName', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
+        { title: '所属城市', dataIndex: 'cityName', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
+        { title: '记账费用', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '费用承担方', scopedSlots: { customRender: 'fycdf' }, align: 'center', width: '12%' },
+        { title: '产品信息', scopedSlots: { customRender: 'cpxx' }, align: 'center', width: '10%' },
+        { title: '销售单号', dataIndex: 'salesBillNo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '备注', dataIndex: 'remarks', align: 'center', width: '8%', customRender: function (text) { return text || '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
@@ -170,9 +176,9 @@ export default {
           return data
         })
       },
-      chooseLoadData: [],
-      detailData: null, //  详情数据
-      total: 0
+      detailData: null, // 详情数据
+      total: 0,
+      printRemark: false // 是否打印备注
     }
   },
   methods: {
@@ -194,6 +200,7 @@ export default {
       }
       this.$nextTick(() => {
         this.$refs.printModal.setData([{
+          printRemark: this.printRemark,
           expenseInfo: this.detailData,
           fyListData,
           spListData: spListData || []
@@ -207,6 +214,7 @@ export default {
         this.spinning = false
       })
     },
+    // 打印成功
     printOk (data) {
       if (data && data.status == 200) {
         expenseAccountUpdateBatch([{

+ 1 - 0
src/views/expenseManagement/expenseReimbursement/epenseDetailModal.vue

@@ -292,6 +292,7 @@ export default {
 
           // 如果是批量修改记账名称
           if (this.isBatch) {
+            _this.spinning = true
             _this.$emit('ok', form)
           } else {
             // 校验明细承担人列表

+ 4 - 1
src/views/expenseManagement/expenseReimbursement/list.vue

@@ -96,6 +96,7 @@
         <div class="table-operator">
           <a-button type="primary" v-if="$hasPermissions('B_eRNew')" @click="handleEdit()">新增</a-button>
           <a-button type="primary" :loading="spinning" @click="handlePlPrint()" ghost>批量打印</a-button>
+          <a-checkbox v-model="printRemark" id="print-remark">打印备注</a-checkbox>
           <span style="margin-left: 8px">
             <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
           </span>
@@ -273,7 +274,8 @@ export default {
           return data
         })
       },
-      rowSelectionInfo: null // 批量选择的数据
+      rowSelectionInfo: null, // 批量选择的数据
+      printRemark: false // 是否打印备注
     }
   },
   methods: {
@@ -324,6 +326,7 @@ export default {
           businessSnList.push(rows[i].expenseAccountSn)
         }
         pageData.push({
+          printRemark: this.printRemark,
           expenseInfo: rows[i],
           fyListData: fyListData,
           spListData: []

+ 116 - 113
src/views/expenseManagement/expenseReimbursement/previewModal.vue

@@ -1,126 +1,129 @@
 <template>
-  <div class="container-print-view" 
-  style="width:100%;font-size: 12pt;height: 600px;overflow: auto;" 
+  <div
+    class="container-print-view"
+    style="width:100%;font-size: 12pt;height: 600px;overflow: auto;"
   >
-  <div class="expense-detail-print" style="width:564pt;margin:0 auto;" v-for="item in list" :key="item.expenseInfo.expenseAccountSn">
-    <div class="container-title" style="text-align: center;font-size: 24px;font-weight: 600;margin: 20px 0;">箭冠汽配企业费用报销单</div>
-    <div class="container-info" style="width:564pt;border: 1px solid #000000;">
-      <div class="container-info-basics" v-if="item.expenseInfo">
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
-          <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">申请人:{{ item.expenseInfo.applyPersonName?item.expenseInfo.applyPersonName:'' }}</span>
-          <span style="display: inline-block;border-right: none;padding: 10px;">申请部门:{{ item.expenseInfo.applyDepartmentName?item.expenseInfo.applyDepartmentName:'' }}</span>
-        </div>
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
-          <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">费用类型:{{ item.expenseInfo.expenseTypeName?item.expenseInfo.expenseTypeName:'' }}</span>
-          <span style="display: inline-block;border-right: none;padding: 10px;">费用发生月份:{{ item.expenseInfo.expenseDate?item.expenseInfo.expenseDate.substring(0, 7):'' }}</span>
-        </div>
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
-          <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">费用单号:{{ item.expenseInfo.expenseAccountNo?item.expenseInfo.expenseAccountNo:'' }}{{ item.expenseInfo.stateDictValue?'('+item.expenseInfo.stateDictValue+')':'' }}</span>
-          <span style="display: inline-block;border-right: none;padding: 10px;">合计金额:{{ (item.expenseInfo.applyExpenseTotal ||item.expenseInfo.applyExpenseTotal==0)?item.expenseInfo.applyExpenseTotal+'元':'' }}</span>
-        </div>
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;overflow: hidden;">
-          <div style="border-right: none;float: left;padding: 10px 0 10px 10px;">主题:</div>
-          <div style="padding: 10px 10px 10px 50px;text-align: center;font-weight: bold;">
-            {{ item.expenseInfo.title?item.expenseInfo.title:'' }}
+    <div class="expense-detail-print" style="width:564pt;margin:0 auto;" v-for="item in list" :key="item.expenseInfo.expenseAccountSn">
+      <div class="container-title" style="text-align: center;font-size: 24px;font-weight: 600;margin: 20px 0;">箭冠汽配企业费用报销单</div>
+      <div class="container-info" style="width:564pt;border: 1px solid #000000;">
+        <div class="container-info-basics" v-if="item.expenseInfo">
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
+            <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">申请人:{{ item.expenseInfo.applyPersonName?item.expenseInfo.applyPersonName:'' }}</span>
+            <span style="display: inline-block;border-right: none;padding: 10px;">申请部门:{{ item.expenseInfo.applyDepartmentName?item.expenseInfo.applyDepartmentName:'' }}</span>
           </div>
-        </div>
-        <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
-          <span style="display: inline-block;width: 100%;padding: 10px 10px 5px;border-right: 1px solid #000000;border-right: none;">详细说明:</span>
-          <div style="padding:0 20px 10px 40px;">
-            <div v-for="(ditem,index) in item.expenseInfo.content" :key="index+'-content'">
-              {{ ditem || '--' }}
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
+            <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">费用类型:{{ item.expenseInfo.expenseTypeName?item.expenseInfo.expenseTypeName:'' }}</span>
+            <span style="display: inline-block;border-right: none;padding: 10px;">费用发生月份:{{ item.expenseInfo.expenseDate?item.expenseInfo.expenseDate.substring(0, 7):'' }}</span>
+          </div>
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
+            <span style="display: inline-block;width: 50%;padding: 10px;border-right: 1px solid #000000;">费用单号:{{ item.expenseInfo.expenseAccountNo?item.expenseInfo.expenseAccountNo:'' }}{{ item.expenseInfo.stateDictValue?'('+item.expenseInfo.stateDictValue+')':'' }}</span>
+            <span style="display: inline-block;border-right: none;padding: 10px;">合计金额:{{ (item.expenseInfo.applyExpenseTotal ||item.expenseInfo.applyExpenseTotal==0)?item.expenseInfo.applyExpenseTotal+'元':'' }}</span>
+          </div>
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;overflow: hidden;">
+            <div style="border-right: none;float: left;padding: 10px 0 10px 10px;">主题:</div>
+            <div style="padding: 10px 10px 10px 50px;text-align: center;font-weight: bold;">
+              {{ item.expenseInfo.title?item.expenseInfo.title:'' }}
+            </div>
+          </div>
+          <div class="basics-item" style="width: 100%;border-bottom: 1px solid #000000;padding:0;margin:0;">
+            <span style="display: inline-block;width: 100%;padding: 10px 10px 5px;border-right: 1px solid #000000;border-right: none;">详细说明:</span>
+            <div style="padding:0 20px 10px 40px;">
+              <div v-for="(ditem,index) in item.expenseInfo.content" :key="index+'-content'">
+                {{ ditem || '--' }}
+              </div>
             </div>
           </div>
         </div>
-      </div>
-      <div class="container-fytable" style="padding:0 10px;" v-if="item.fyListData">
-        <div class="table-title" style="padding: 10px 0;">费用明细:</div>
-        <table
-          border="1"
-          cellspacing="0"
-          cellpadding="0"
-          style="width: 100%;border-collapse: collapse;font-size:10pt;text-align: center;"
-          align="center">
-          <thead>
-            <tr>
-              <th style="padding:5px 0;width:6%;">序号</th>
-              <th style="padding:5px 0;width:22%;">记账方</th>
-              <!-- <th style="padding:5px 0;width:15%;">区域/省/市</th> -->
-              <th style="padding:5px 0;width:10%;">记账费用</th>
-              <th style="padding:5px 0;width:30%;">费用承担方</th>
-              <th style="padding:5px 0;width:22%;">产品信息</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr v-for="(fyItem,index) in item.fyListData" :key="index">
-              <td style="text-align: center;width:6%;">{{ index+1 }}</td>
-              <td style="text-align: left;width:22%;padding:0 5px;">
-                <div>{{ fyItem.accountTypeDictValue }}</div>
-                <div>{{ fyItem.accountName||'' }}</div>
-                <div v-if="fyItem.accountNameFnumber">({{ fyItem.accountNameFnumber }})</div>
-              </td>
-              <!-- <td style="text-align: left;width:15%;padding:5px 5px;">
+        <div class="container-fytable" style="padding:0 10px;" v-if="item.fyListData">
+          <div class="table-title" style="padding: 10px 0;">费用明细:</div>
+          <table
+            border="1"
+            cellspacing="0"
+            cellpadding="0"
+            style="width: 100%;border-collapse: collapse;font-size:10pt;text-align: center;"
+            align="center">
+            <thead>
+              <tr>
+                <th style="padding:5px 0;width:6%;">序号</th>
+                <th style="padding:5px 0;width:22%;">记账方</th>
+                <!-- <th style="padding:5px 0;width:15%;">区域/省/市</th> -->
+                <th style="padding:5px 0;width:10%;">记账费用</th>
+                <th style="padding:5px 0;width:30%;">费用承担方</th>
+                <th style="padding:5px 0;width:22%;">产品信息</th>
+                <th v-if="item.printRemark">备注</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr v-for="(fyItem,index) in item.fyListData" :key="index">
+                <td style="text-align: center;width:6%;">{{ index+1 }}</td>
+                <td style="text-align: left;width:22%;padding:0 5px;">
+                  <div>{{ fyItem.accountTypeDictValue }}</div>
+                  <div>{{ fyItem.accountName||'' }}</div>
+                  <div v-if="fyItem.accountNameFnumber">({{ fyItem.accountNameFnumber }})</div>
+                </td>
+                <!-- <td style="text-align: left;width:15%;padding:5px 5px;">
                 <div>{{ fyItem.subareaNames }}</div>
                 <div>{{ fyItem.provinceName }}</div>
                 <div>{{ fyItem.cityName }}</div>
               </td> -->
-              <td style="text-align: right;width:10%;padding:0 5px;">{{ fyItem.expense||fyItem.expense==0?toThousands(fyItem.expense):'' }}</td>
-              <td style="text-align: left;width:30%;padding:0 5px;vertical-align: top;">
-                <div v-for="(ditem,index) in fyItem.detailSplitList" :key="ditem.id+'-'+index" style="padding: 3px 0;" >
-                  {{ ditem.splitObjName }}
-                  <span v-if="ditem.splitObjFnumber">({{ ditem.splitObjFnumber }})</span>
-                  <span v-if="ditem.childDetailSplit&&ditem.childDetailSplit.splitObjName">/</span>
-                  {{ ditem.childDetailSplit?ditem.childDetailSplit.splitObjName:'' }}: {{ ditem.childDetailSplit?toThousands(ditem.childDetailSplit.splitAmount):toThousands(ditem.splitAmount) }}
-                </div>
-              </td>
-              <td style="text-align: left;width:22%;padding:0 5px;vertical-align: top;">
-                <div v-for="ditem in fyItem.detailProductsList" :key="ditem.id" style="padding: 3px 0;">
-                  <div v-if="ditem.productCode">{{ ditem.productCode }}: {{ toThousands(ditem.expense) }}</div>
-                  <div v-else-if="ditem.productBrandName">{{ ditem.productBrandName }}<span v-if="ditem.productTypeShowName">/</span>{{ ditem.productTypeShowName }}: {{ toThousands(ditem.expense) }}</div>
-                  <div v-else>{{ ditem.productTypeShowName }}: {{ toThousands(ditem.expense) }}</div>
-                </div>
-              </td>
-            </tr>
-          </tbody>
-        </table>
-      </div>
-      <div class="container-fytable" style="padding:0 10px 5px;" v-if="item.spListData&&item.spListData.length">
-        <p class="table-title">审批信息:</p>
-        <table
-          border="1"
-          cellspacing="0"
-          cellpadding="0"
-          style="width: 100%;border-collapse: collapse;border: 1px solid black;font-size:10pt;text-align: center;"
-          align="center">
-          <thead>
-            <tr style="height: 30px;padding: 5px;">
-              <th style="padding:5px 0;width:8%;">序号</th>
-              <th style="padding:5px 0;width:15%;">人员姓名</th>
-              <th style="padding:5px 0;width:15%;">人员类型</th>
-              <th style="padding:5px 0;width:10%;">状态</th>
-              <th style="padding:5px 0;width:17%;">审批意见</th>
-              <th style="padding:5px 0;width:15%;">附件</th>
-              <th style="padding:5px 0;width:20%;">时间</th>
-            </tr>
-          </thead>
-          <tbody>
-            <tr style="height: 30px;padding: 5px;" v-for="(spitem,index) in item.spListData" :key="index">
-              <td style="padding:5px 0;">{{ index+1||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.userName||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.userType||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.state||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.remark||'' }}</td>
-              <td style="padding:5px 0;">{{ spitem.hasAttachments!= '0' ? '请在钉钉中查看附件内容' : '--' }}</td>
-              <td style="padding:5px 0;">{{ spitem.date||'' }}</td>
-            </tr></tbody>
-        </table>
-      </div>
-      <div class="container-fytable" style="padding:0 10px;" v-else>
-        <p class="table-title">审批信息:暂无</p>
+                <td style="text-align: right;width:10%;padding:0 5px;">{{ fyItem.expense||fyItem.expense==0?toThousands(fyItem.expense):'' }}</td>
+                <td style="text-align: left;width:30%;padding:0 5px;vertical-align: top;">
+                  <div v-for="(ditem,index) in fyItem.detailSplitList" :key="ditem.id+'-'+index" style="padding: 3px 0;" >
+                    {{ ditem.splitObjName }}
+                    <span v-if="ditem.splitObjFnumber">({{ ditem.splitObjFnumber }})</span>
+                    <span v-if="ditem.childDetailSplit&&ditem.childDetailSplit.splitObjName">/</span>
+                    {{ ditem.childDetailSplit?ditem.childDetailSplit.splitObjName:'' }}: {{ ditem.childDetailSplit?toThousands(ditem.childDetailSplit.splitAmount):toThousands(ditem.splitAmount) }}
+                  </div>
+                </td>
+                <td style="text-align: left;width:22%;padding:0 5px;vertical-align: top;">
+                  <div v-for="ditem in fyItem.detailProductsList" :key="ditem.id" style="padding: 3px 0;">
+                    <div v-if="ditem.productCode">{{ ditem.productCode }}: {{ toThousands(ditem.expense) }}</div>
+                    <div v-else-if="ditem.productBrandName">{{ ditem.productBrandName }}<span v-if="ditem.productTypeShowName">/</span>{{ ditem.productTypeShowName }}: {{ toThousands(ditem.expense) }}</div>
+                    <div v-else>{{ ditem.productTypeShowName }}: {{ toThousands(ditem.expense) }}</div>
+                  </div>
+                </td>
+                <td v-if="item.printRemark">{{ fyItem.remarks }}</td>
+              </tr>
+            </tbody>
+          </table>
+        </div>
+        <div class="container-fytable" style="padding:0 10px 5px;" v-if="item.spListData&&item.spListData.length">
+          <p class="table-title">审批信息:</p>
+          <table
+            border="1"
+            cellspacing="0"
+            cellpadding="0"
+            style="width: 100%;border-collapse: collapse;border: 1px solid black;font-size:10pt;text-align: center;"
+            align="center">
+            <thead>
+              <tr style="height: 30px;padding: 5px;">
+                <th style="padding:5px 0;width:8%;">序号</th>
+                <th style="padding:5px 0;width:15%;">人员姓名</th>
+                <th style="padding:5px 0;width:15%;">人员类型</th>
+                <th style="padding:5px 0;width:10%;">状态</th>
+                <th style="padding:5px 0;width:17%;">审批意见</th>
+                <th style="padding:5px 0;width:15%;">附件</th>
+                <th style="padding:5px 0;width:20%;">时间</th>
+              </tr>
+            </thead>
+            <tbody>
+              <tr style="height: 30px;padding: 5px;" v-for="(spitem,index) in item.spListData" :key="index">
+                <td style="padding:5px 0;">{{ index+1||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.userName||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.userType||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.state||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.remark||'' }}</td>
+                <td style="padding:5px 0;">{{ spitem.hasAttachments!= '0' ? '请在钉钉中查看附件内容' : '--' }}</td>
+                <td style="padding:5px 0;">{{ spitem.date||'' }}</td>
+              </tr></tbody>
+          </table>
+        </div>
+        <div class="container-fytable" style="padding:0 10px;" v-else>
+          <p class="table-title">审批信息:暂无</p>
+        </div>
       </div>
     </div>
   </div>
-  </div>
 </template>
 
 <script>
@@ -140,17 +143,17 @@ export default {
       this.list = list
     },
     // 打印
-    prints(){
+    prints () {
       const _this = this
       const html = document.getElementsByClassName('expense-detail-print')
       // 自动排版
-      const result = groupLessThan(html,true)
+      const result = groupLessThan(html, true)
       this.$store.state.app.curActionPermission = 'B_eRPrint'
       // html, type, callback, printLogParams
       jGPlPrint(result, 'print', function (res) {
         _this.$store.state.app.curActionPermission = ''
         _this.$emit('printOk', res)
-      },null,'费用报销单')
+      }, null, '费用报销单')
     }
   }
 }

+ 89 - 28
src/views/salesManagement/waitCostOrder/list.vue

@@ -91,54 +91,65 @@
     <div class="affix-cont" :style="{padding:hideFooter?0:'7px 0 4px'}">
       <a-button
         style="width: 100px;"
-        type="primary"
-        class="button-info"
+        type="info"
         @click="handleView()"
       >
-        查看
+        查看已选
       </a-button>
       <a-button
         type="primary"
+        class="button-info"
         :disabled="spinning"
         style="width: 100px;margin: 0 20px;"
         @click="handleSave()"
       >
         提交
       </a-button>
+      <a-button
+        type="primary"
+        :disabled="spinning"
+        style="width: 100px;"
+        @click="handleMerge()"
+      >
+        合并提交
+      </a-button>
     </div>
     <!-- 新增费用单 -->
     <baseDataModal ref="expenseModal" @expenseSaveOk="expenseSaveOk" :show="openBaseModal" @close="openBaseModal=false"></baseDataModal>
     <!-- 查看已选费用单 -->
-    <viewSelectModal ref="viewModal" :openModal="showViewModal" @close="showViewModal=false"></viewSelectModal>
+    <viewSelectModal ref="viewModal" :openModal="showViewModal" @close="showViewModal=false" @submit="meargeSubmit"></viewSelectModal>
+    <!-- 合并选项弹框 -->
+    <meargeOptionModal ref="meargeModal" :openModal="showMeargeModal" @close="showMeargeModal=false" @meargeOk="meargeOk"/>
   </div>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import baseDataModal from '@/views/expenseManagement/expenseReimbursement/baseDataModal.vue'
 import viewSelectModal from './viewSelectModal.vue'
+import meargeOptionModal from './meargeOptionModal.vue'
 import { salesConvertExpenseList, expenseAccountSave, queryBatchCreateBySalesBillSn } from '@/api/salesNew'
 export default {
   name: 'WaitCostOrder',
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, baseDataModal, viewSelectModal },
+  components: { STable, VSelect, dealerSubareaScopeList, baseDataModal, viewSelectModal, meargeOptionModal },
   data () {
     return {
       spinning: false,
       disabled: false,
-      hideFooter: false,
+      hideFooter: false, // 隐藏页面底部
       openBaseModal: false, // 费用弹框
-      fromRouter: '',
-      authCode: '',
+      showMeargeModal: false, // 合并选项弹框
+      fromRouter: '', // 从那个页面打开
+      authCode: '', // 数据权限码
       queryParam: {
-        promotionDescription: '',
-        convertExpenseAccountType: '',
-        salesBillNo: '',
-        promotionRuleDescription: '',
-        buyerName: ''
+        promotionDescription: '', // 销名称/简称
+        convertExpenseAccountType: '', // 费用类型
+        salesBillNo: '', // 销售单号
+        promotionRuleDescription: '', // 规则简称
+        buyerName: '' // 客户名称
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -146,7 +157,7 @@ export default {
         this.spinning = true
         delete parameter.tableId
         delete parameter.index
-        this.getPageHeight()
+        this.getPageHeight() // 获取表格高度
         return salesConvertExpenseList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
@@ -161,14 +172,15 @@ export default {
           return data
         })
       },
-      rowSelectionInfo: null,
-      curExpenseAccountType: '',
-      pageHeight: 300,
-      showViewModal: false,
-      isSearch: false
+      rowSelectionInfo: null, // 已选行
+      curExpenseAccountType: '', // 当前已选费用类型
+      pageHeight: 300, // 默认页面高度
+      showViewModal: false, // 查看已选费用单
+      isSearch: false // 是否查询中
     }
   },
   computed: {
+    // 已选数据数量
     hasSelect () {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length
     },
@@ -194,22 +206,23 @@ export default {
     handleBack () {
       this.$router.push({ name: 'salesQueryNewList' })
     },
+    // 页面高度计算
     getPageHeight () {
       this.pageHeight = window.innerHeight - 290 - (this.$refs.searchbox ? this.$refs.searchbox.clientHeight : 0)
     },
-    // 表格选中项
+    // 表格选中项,只能选中统一费用类型的
     rowSelectionFun (obj) {
-      console.log(obj)
       this.rowSelectionInfo = obj || null
       if (obj.selectedRows) {
         this.curExpenseAccountType = obj.selectedRows && obj.selectedRows[0] && obj.selectedRows[0]['convertExpenseAccountType'] || ''
+        // 没用勾选任何数据,刷新列表
         if (obj.selectedRows.length <= 1) {
           if (!this.isSearch) {
             this.$refs.table.refresh()
           }
           this.isSearch = false
         } else {
-          // 全选
+          // 全选,盘点是否类型一致,否则不能全选
           const ret = obj.selectedRows.filter(item => item.convertExpenseAccountType == this.curExpenseAccountType)
           if (ret.length != obj.selectedRows.length) {
             this.$message.warning('费用类型不一致,请重新勾选!')
@@ -218,10 +231,49 @@ export default {
         }
       }
     },
+    // 客户选中
     custChange (val) {
       this.queryParam.buyerName = val.name || ''
     },
-    // 提交
+    // 合并提交
+    handleMerge () {
+      const _this = this
+      const salesPromoSnList = []
+      const slen = _this.rowSelectionInfo.selectedRowKeys.length
+      if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && slen < 1)) {
+        _this.$message.warning('请在列表勾选后再进行合并提交操作!')
+        return
+      }
+      // 批量合并提交
+      this.rowSelectionInfo.selectedRows.map(item => {
+        salesPromoSnList.push(item.salesPromoSn)
+      })
+      // 打开合并选项弹框
+      this.showMeargeModal = true
+    },
+    // 确定合并
+    meargeOk (data) {
+      console.log(data)
+      // 打开已合并的待转费用报销单弹框
+      if (!this.hasSelect) {
+        this.$message.warning('请先勾选再合并提交!')
+        return
+      }
+      this.showViewModal = true
+      this.$refs.viewModal.title = '已合并的待转费用报销单'
+      this.$refs.viewModal.submitType = 'mearge'
+      this.$refs.viewModal.setData(this.rowSelectionInfo && this.rowSelectionInfo.selectedRows)
+    },
+    // 合并提交
+    meargeSubmit (data) {
+      const salesPromoSnList = []
+      data.map(item => {
+        salesPromoSnList.push(item.salesPromoSn)
+      })
+      // 打开转费用单弹框
+      this.handleExpense(salesPromoSnList)
+    },
+    // 直接不合并提交
     handleSave (row) {
       const _this = this
       const salesPromoSnList = []
@@ -231,7 +283,7 @@ export default {
       } else {
         const slen = _this.rowSelectionInfo.selectedRowKeys.length
         if (!_this.rowSelectionInfo || (_this.rowSelectionInfo && slen < 1)) {
-          _this.$message.warning('请在列表勾选后再进行批量操作!')
+          _this.$message.warning('请在列表勾选后再进行提交操作!')
           return
         }
         // 批量转
@@ -239,27 +291,34 @@ export default {
           salesPromoSnList.push(item.salesPromoSn)
         })
       }
-
+      // 打开转费用单弹框
       this.handleExpense(salesPromoSnList)
     },
     // 转费用单
     async handleExpense (snList) {
       const _this = this
+      this.spinning = true
       const hasExpense = await queryBatchCreateBySalesBillSn({ salesPromoSnList: snList }).then(res => res.data || [])
+
       let result = null
       for (const key in hasExpense) {
         result = hasExpense[key]
       }
+      // 关闭查看弹框
+      this.$refs.viewModal.spinning = false
+      this.showViewModal = false
+      // 转费用单弹框
       _this.expenseSave(result)
     },
-    // 转费用单
+    // 打开新建转费用单弹框
     expenseSave (data) {
-      console.log(data)
       if (data) {
         this.openBaseModal = true
         this.$refs.expenseModal.setDetail(data, 'sales')
+        this.spinning = false
       }
     },
+    // 转费用单成功
     expenseSaveOk (params) {
       expenseAccountSave(params).then(res => {
         if (res.status == 200) {
@@ -277,6 +336,8 @@ export default {
         return
       }
       this.showViewModal = true
+      this.$refs.viewModal.title = '已选待转费用报销单'
+      this.$refs.viewModal.submitType = 'noMearge'
       this.$refs.viewModal.setData(this.rowSelectionInfo && this.rowSelectionInfo.selectedRows)
     },
     //  重置

+ 69 - 0
src/views/salesManagement/waitCostOrder/meargeOptionModal.vue

@@ -0,0 +1,69 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    title="选择合并方式"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="500px">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div style="padding:15px;">
+        <a-icon :style="{ fontSize: '16px', color: '#666', marginRight:'6px' }" type="check-square" /> 相同客户名称
+      </div>
+      <div style="padding:5px 0 25px 40px;" v-if="sameCustomeName">
+        <a-checkbox v-model="sameRules1" @change="sameRules2=undefined">相同促销活动</a-checkbox>
+        <a-checkbox v-model="sameRules2" @change="sameRules1=undefined">相同活动规则(同一促销活动)</a-checkbox>
+      </div>
+      <div class="btn-cont" style="padding:20px 20px 0;text-align: center;">
+        <a-button type="info" @click="isShow=false">取消</a-button>
+        <a-button type="primary" style="margin-left: 10px" @click="submit">确定</a-button>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import {
+  commonMixin
+} from '@/utils/mixin'
+export default {
+  name: 'ViewSelectModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal,
+      sameCustomeName: true, // 是否勾选相同客户名称
+      sameRules1: undefined, // 相同促销活动
+      sameRules2: undefined // 相同活动规则(同一促销活动)
+    }
+  },
+  methods: {
+    submit () {
+      this.$emit('meargeOk', { sameRules1: this.sameRules1, sameRules2: this.sameRules2 })
+      this.isShow = false
+    }
+  },
+  watch: {
+    openModal (nVal, oVal) {
+      this.isShow = nVal
+    },
+    isShow (nVal, oVal) {
+      if (!nVal) {
+        this.$emit('close')
+        this.sameRules = undefined
+      }
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 91 - 75
src/views/salesManagement/waitCostOrder/viewSelectModal.vue

@@ -1,99 +1,115 @@
 <template>
-  <a-modal centered :footer="null" :maskClosable="false" title="已选待转费用报销单" v-model="isShow" @cancel="isShow=false"
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    :title="title"
+    v-model="isShow"
+    @cancel="cancel"
     width="70%">
-    <div style="padding:10px;">共{{dataSource&&dataSource.length}}条</div>
+    <div style="padding:10px;">共{{ dataSource&&dataSource.length }}条</div>
     <a-spin :spinning="spinning" tip="Loading...">
       <div>
         <ve-table
-            border-y
-            v-show="!showEmpty"
-            :scroll-width="0"
-            :max-height="tableHeight"
-            :row-style-option="{clickHighlight: true}"
-            :cellSelectionOption="{enable: false}"
-            :virtual-scroll-option="{enable: true}"
-            :columns="columns"
-            :table-data="dataSource"
-            row-key-field-name="no"
-            :column-width-resize-option="columnWidthResizeOption"
-          />
+          border-y
+          v-show="!showEmpty"
+          :scroll-width="0"
+          :max-height="tableHeight"
+          :row-style-option="{clickHighlight: true}"
+          :cellSelectionOption="{enable: false}"
+          :virtual-scroll-option="{enable: true}"
+          :columns="columns"
+          :table-data="dataSource"
+          row-key-field-name="no"
+          :column-width-resize-option="columnWidthResizeOption"
+        />
         <div v-show="showEmpty" class="empty-data"><a-empty description="暂无数据" :image="simpleImage"/></div>
       </div>
       <div class="btn-cont" style="padding:20px 20px 0;text-align: center;">
-        <a-button type="primary" class="button-info" style="margin-left: 10px" @click="isShow=false">确定</a-button>
+        <a-button type="primary" v-if="submitType=='noMearge'" class="button-info" @click="cancel">关闭</a-button>
+        <a-button type="primary" v-else @click="submit">提交</a-button>
       </div>
     </a-spin>
   </a-modal>
 </template>
 
 <script>
-  import {
-    commonMixin
-  } from '@/utils/mixin'
-  import { Empty } from 'ant-design-vue';
-  export default {
-    name: 'ViewSelectModal',
-    mixins: [commonMixin],
-    props: {
-      openModal: {
-        type: Boolean,
-        default: false
+import {
+  commonMixin
+} from '@/utils/mixin'
+import { Empty } from 'ant-design-vue'
+export default {
+  name: 'ViewSelectModal',
+  mixins: [commonMixin],
+  props: {
+    openModal: {
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal,
+      simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
+      columnWidthResizeOption: {
+        // default false
+        enable: true,
+        // column resize min width
+        minWidth: 50
       },
+      showEmpty: false,
+      tableHeight: 450,
+      dataSource: [],
+      title: '已选待转费用报销单',
+      submitType: 'noMearge' // 默认是,直接勾选的数据,不是合并后的数据
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', field: 'no', key: 'a', width: 50, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '销售单号', field: 'salesBillNo', key: 'b', width: 100, align: 'left', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '客户名称', field: 'buyerName', key: 'c', width: 150, align: 'left', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '费用类型', field: 'convertExpenseAccountTypeDictValue', key: 'd', width: 100, align: 'center', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '待转金额', field: 'expense', key: 'e', width: 80, align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '促销名称', field: 'promotionTitle', key: 'f', width: 150, align: 'left', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '促销简称', field: 'promotionDescription', key: 'g', width: 150, align: 'left', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '规则简称', field: 'promotionRuleDescription', key: 'h', width: 150, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
+        { title: '促销类型', field: 'promotionRuleTypeDictValue', key: 'l', width: 100, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    setData (list) {
+      this.dataSource = JSON.parse(JSON.stringify(list))
+      this.dataSource.map((item, index) => {
+        item.no = index + 1
+      })
     },
-    data() {
-      const _this = this
-      return {
-        spinning: false,
-        isShow: this.openModal,
-        simpleImage: Empty.PRESENTED_IMAGE_SIMPLE,
-        columnWidthResizeOption: {
-            // default false
-            enable: true,
-            // column resize min width
-            minWidth: 50
-        },
-        showEmpty: false,
-        tableHeight: 450,
-        dataSource: []
-      }
-    },
-    computed: {
-      columns() {
-        const arr =  [
-                { title: '序号', field: 'no',key: "a", width: 50, align: 'center',operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
-                { title: '销售单号', field: 'salesBillNo',key: "b", width: 100, align: 'left',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'} },
-                { title: '客户名称', field: 'buyerName',key: "c", width: 150, align: 'left',operationColumn: false , ellipsis: { showTitle: true },renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
-                { title: '费用类型', field: 'convertExpenseAccountTypeDictValue',key: "d", width: 100, align: 'center',operationColumn: false,ellipsis: { showTitle: true },renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'} },
-                { title: '待转金额', field: 'expense',key: "e", width: 80, align: 'right',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
-                { title: '促销名称', field: 'promotionTitle',key: "f", width: 150, align: 'left',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
-                { title: '促销简称', field: 'promotionDescription',key: "g", width: 150, align: 'left',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
-                { title: '规则简称', field: 'promotionRuleDescription',key: "h", width: 150, align: 'center',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}},
-                { title: '促销类型', field: 'promotionRuleTypeDictValue',key: "l", width: 100, align: 'center',operationColumn: false,renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--'}}
-            ]
-        return arr
-      }
+    // 继续提交
+    submit () {
+      this.spinning = true
+      this.$emit('submit', this.dataSource)
     },
-    methods: {
-       setData(list){
-         this.dataSource = JSON.parse(JSON.stringify(list))
-         this.dataSource.map((item,index) => {
-           item.no = index + 1
-         })
-       }
+    cancel () {
+      this.isShow = false
+    }
+  },
+  watch: {
+    openModal (nVal, oVal) {
+      this.isShow = nVal
     },
-    watch: {
-      openModal(nVal, oVal) {
-        this.isShow = nVal
-      },
-      isShow(nVal, oVal) {
-        if (!nVal) {
-          this.$emit('close')
-          this.dataSource = []
-        }
+    isShow (nVal, oVal) {
+      if (!nVal) {
+        this.$emit('close')
+        this.dataSource = []
       }
     }
   }
+}
 </script>
 
 <style>
-</style>
+</style>

+ 1 - 1
vue.config.js

@@ -108,7 +108,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.117/ocs-admin',
+        // target: 'http://192.168.2.113:8660/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
         target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,