Browse Source

bug 修复

lilei 3 năm trước cách đây
mục cha
commit
16a3220890

+ 126 - 0
src/views/financialManagement/financialCollection/baseModal.vue

@@ -0,0 +1,126 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :confirmLoading="confirmLoading"
+    :width="800"
+    :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-form-model-item label="收款事由" prop="buyerSn">
+          <a-input maxLength="100" placeholder="请输入收款事由(最多100个字符)"></a-input>
+        </a-form-model-item>
+        <a-form-model-item label="备注">
+          <a-textarea :rows="4" maxLength="500" placeholder="请输入备注(最多500个字符)"></a-textarea>
+        </a-form-model-item>
+        <a-form-model-item label="附件" help="(支持图片、word、excel、PDF等格式,最多10个附件)">
+          <Upload
+            style="height: 100%;"
+            v-model="form.attachList"
+            ref="attachList"
+            :fileSize="10"
+            :maxNums="10"
+            fileType="*"
+            uploadType="attach"
+            :action="attachAction"
+            @change="changeAttach"
+            upText="上传附件"></Upload>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+          <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect, Upload } from '@/components'
+import { salesSave } from '@/api/sales'
+export default {
+  name: 'SalesChooseCustomModal',
+  mixins: [commonMixin],
+  components: { VSelect, Upload },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      title: '新增财务收款单',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        buyerSn: undefined, // 客户sn
+        buyerName: '',
+        settleStyleSn: undefined
+      },
+      rules: {
+        buyerSn: [ { required: true, message: '请选择客户', trigger: ['change', 'blur'] } ]
+      }
+    }
+  },
+  methods: {
+    //  保存
+    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
+      _this.spinning = true
+      salesSave(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('ok', res.data)
+          if (_this.form.id) {
+            _this.$emit('updateData')
+          }
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.$refs.ruleForm.resetFields()
+      }
+    }
+  }
+}
+</script>

+ 290 - 2
src/views/financialManagement/financialCollection/edit.vue

@@ -1,8 +1,296 @@
 <template>
+  <div class="expenseReimbursementAddwrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="expenseReimbursementAddcont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack(0)"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
+      <a-collapse :activeKey="['1']" class="expenseReimbursementAddcont" v-if="detailData">
+        <a-collapse-panel key="1" header="基础信息">
+          <div slot="extra" style="padding: 0 20px; color: #00aaff;" @click.stop="handleEditBase" >
+            <a-icon type="edit" /> 编辑基础信息
+          </div>
+          <a-descriptions :column="{ xs: 2, sm: 3, md: 3}">
+            <a-descriptions-item label="创建时间">{{ detailData&&detailData.createDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="审核时间">{{ detailData&&detailData.finishDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.expenseAccountNo || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="状态">{{ detailData&&detailData.stateDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.content.join(',')||'' }}</a-descriptions-item>
+            <a-descriptions-item label="附件" :span="3">
+              <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.expenseAccountFilesList" :key="item.id">
+                {{ item.fileName }}
+              </a>
+            </a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+      <!-- 财务明细 -->
+      <a-card :bordered="false" size="small" class="expenseReimbursementAddcont" v-if="$route.params.sn">
+        <div slot="title">
+          <div style="display: flex;justify-content: space-between;align-items: center;">
+            <div>财务明细</div>
+            <div>
+              <a-button size="small" class="button-error" type="primary" @click="newExpenseDetail">新增收款明细</a-button>
+            </div>
+          </div>
+        </div>
+        <a-alert type="info" style="margin-bottom:10px">
+          <div slot="message">
+            共 2 条,订单金额合计¥56253.60,收款金额合计 ¥56253.60,使用授信合计¥0.00,授信还款合计¥0.00,余款抵扣合计¥0.00
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :showPagination="false"
+          bordered>
+          <template slot="action" slot-scope="text,record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              @click="handleEdit(record)"
+            >编辑</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              @click="handleDel(record)"
+            >删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+    <div class="affix-cont">
+      <a-button
+        type="primary"
+        class="button-primary"
+        :disabled="spinning"
+        id="expenseReimbursementAddsubmit-btn"
+        size="large"
+        @click="beforeSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
+    <!-- 基础信息 -->
+    <baseModal :show="openBaseModal" @cancel="openBaseModal=false"></baseModal>
+  </div>
 </template>
 
 <script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect, STable } from '@/components'
+import baseModal from './baseModal.vue'
+import { expenseAccountDetail, expenseAcctDetailDelete, expenseAcctDetailFindList, expenseAccountSubmit, expenseInsertImport } from '@/api/expenseManagement.js'
+export default {
+  name: 'FinancialCollectionEdit',
+  mixins: [commonMixin],
+  components: { VSelect, STable, baseModal },
+  data () {
+    return {
+      spinning: false,
+      detailData: null,
+      openBaseModal: false,
+      openGuideModal: false,
+      openDepartUserModal: false,
+      openEpenseDetailModal: false, // 财务明细弹框
+      expenseAccountDetailSn: '',
+      openProductInfoModal: false, // 产品信息弹框
+      total: 0,
+      loadData: parameter => {
+        const params = Object.assign(parameter, { expenseAccountSn: this.$route.params.sn })
+        return expenseAcctDetailFindList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+            }
+            this.total = data.length
+            this.disabled = false
+            this.spinning = false
+          }
+          return data
+        })
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '日期', dataIndex: 'accountTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'accountName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '客户编码', dataIndex: 'subareaNames', align: 'center', width: '8%', 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 == 0 || text) ? text : '--' } },
+        { title: '收款金额', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '使用授信', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '授信还款', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '跨月打款', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '户名', dataIndex: 'subareaNames', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '汇入银行', dataIndex: 'provinceName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '足额打款', dataIndex: 'expense', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '备注', dataIndex: 'remarks', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '100px', align: 'center' }
+      ]
+    }
+  },
+  methods: {
+    // 编辑基础信息
+    handleEditBase (event) {
+      this.openBaseModal = true
+    },
+    refashData () {
+      this.getDetail(1)
+    },
+    //  财务单基础详情
+    getDetail (type) {
+      this.spinning = true
+      this.disabled = true
+      expenseAccountDetail({ expenseAccountSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+          this.detailData.content = res.data.content.replace(/\n+/, '\n').split('\n')
+          if (!type) {
+            // 获取财务明细列表
+            this.getExpenseDetailList()
+          } else {
+            this.spinning = false
+            this.disabled = false
+          }
+        }
+      })
+    },
+    getExpenseDetailList () {
+      this.$refs.table.refresh()
+    },
+    // 确认导入明细
+    hanldeImprotOk (obj) {
+      console.log(obj)
+      expenseInsertImport(obj).then(res => {
+        if (res.status == 200) {
+          this.getDetail(false)
+        }
+      })
+    },
+    // 新增明细
+    newExpenseDetail () {
+      this.expenseAccountDetailSn = ''
+      this.openEpenseDetailModal = true
+    },
+    // 新增明细成功
+    epenseDetailOk () {
+      // 刷新列表
+      this.openEpenseDetailModal = false
+      this.getDetail(false)
+    },
+    // 设置产品
+    setProduct (row) {
+      this.openProductInfoModal = true
+      this.expenseAccountDetailSn = row.expenseAccountDetailSn
+      this.$refs.productInfo.setBaseData(row)
+    },
+    // 新增产品成功
+    productInfoOk () {
+      // 刷新列表
+      this.openProductInfoModal = false
+      this.getDetail(false)
+    },
+    // 编辑明细
+    handleEdit (row) {
+      this.openEpenseDetailModal = true
+      this.expenseAccountDetailSn = row.expenseAccountDetailSn
+    },
+    // 删除明细
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          expenseAcctDetailDelete({ detailSn: row.expenseAccountDetailSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.getDetail(false)
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    beforeSubmit () {
+      if (this.total) {
+        this.openDepartUserModal = true
+      } else {
+        this.$message.info('请新增财务明细')
+      }
+    },
+    // 提交信息
+    handleSubmit (data) {
+      this.spinning = true
+      expenseAccountSubmit({ expenseAccountSn: this.$route.params.sn, ...data }).then(res => {
+        if (res.status == '200') {
+          this.$message.success(res.message)
+          this.handleBack()
+        }
+        this.spinning = false
+      })
+    },
+    // 返回
+    handleBack (data) {
+      this.$router.push({ name: 'expenseReimbursementList' })
+    },
+    pageInit () {
+      if (this.$route.params.sn) { //  编辑页
+        this.getDetail()
+      }
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
 </script>
 
-<style>
-</style>
+<style lang="less">
+  .expenseReimbursementAddwrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .expenseReimbursementAddcont{
+      margin-bottom: 10px;
+    }
+    .affix{
+      .ant-affix{
+        z-index: 101;
+      }
+    }
+  }
+</style>

+ 41 - 175
src/views/financialManagement/financialCollection/list.vue

@@ -6,118 +6,47 @@
         <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="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="销售单号">
-                <a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
+              <a-form-item label="收款单号">
+                <a-input id="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入收款单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="备货单号">
+              <a-form-item label="关联备货单号">
                 <a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="客户名称">
-                  <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入经销商名称"/>
+                <a-form-item label="申请人">
+                  <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入申请人"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="商户级别">
-                  <v-select
-                    v-model="queryParam.dealerLevel"
-                    ref="dealerLevel"
-                    id="financialCollectionList-dealerLevel"
-                    code="DEALER_LEVEL"
-                    placeholder="请选择商户级别"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="收款方式">
-                  <v-select
-                    v-model="queryParam.settleStyle"
-                    ref="settleStyle"
-                    id="financialCollectionList-settleStyle"
-                    code="SETTLE_STYLE"
-                    placeholder="请选择收款方式"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="区域">
-                  <subarea id="financialCollectionList-subarea" v-model="queryParam.subareaSn"></subarea>
+                <a-form-item label="收款事由">
+                  <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入收款事由"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="业务状态">
-                  <v-select
-                    v-model="queryParam.billStatus"
-                    ref="billStatus"
-                    id="financialCollectionList-billStatus"
-                    code="DISPATCH_BILL_STATUS"
-                    placeholder="请选择业务状态"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="财务状态">
-                  <v-select
-                    v-model="queryParam.settleState"
-                    ref="settleState"
-                    id="financialCollectionList-settleState"
-                    code="FINANCIAL_RECEIVE_STATUS"
-                    placeholder="请选择财务状态"
-                    allowClear></v-select>
+                <a-form-item label="审核时间">
+                  <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="单据状态">
+                <a-form-item label="状态">
                   <v-select
                     v-model="queryParam.voidFlag"
                     ref="voidFlag"
                     id="financialCollectionList-voidFlag"
                     code="VOID_FLAG"
-                    placeholder="请选择单据状态"
+                    placeholder="请选择状态"
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="收款时间">
-                  <rangeDate ref="rangeSettleDate" @change="dateSettleChange" />
-                </a-form-item>
-              </a-col>
-              <a-col :md="12" :sm="24">
-                <a-row>
-                  <a-form-item label="经销商地区">
-                    <a-col span="7">
-                      <a-form-item prop="dealerProvinceSn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerProvinceSn" allowClear @change="getCityList" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-item prop="dealerCitySn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerCitySn" allowClear @change="getAreaList" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-item prop="dealerCountySn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerCountySn" allowClear placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                  </a-form-item>
-                </a-row>
-              </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="financialCollectionList-refresh">查询</a-button>
@@ -130,6 +59,10 @@
           </a-row>
         </a-form>
       </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <a-button type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      </div>
       <!-- 列表 -->
       <s-table
         class="sTable fixPagination"
@@ -157,14 +90,14 @@
           <a-button
             size="small"
             type="link"
-            v-if="record.settleState=='WAIT' && record.voidFlag!=1 && $hasPermissions('B_financialCollection_receipt')"
             class="button-warning"
-            @click="handleAudit(record)"
-            id="financialCollectionList-audit-btn">收款</a-button>
-          <span v-else>--</span>
+            @click="handleEdit(record)"
+            id="financialCollectionList-audit-btn">编辑</a-button>
         </template>
       </s-table>
     </a-spin>
+    <!-- 基础信息 -->
+    <baseModal :show="openModal" @cancel="openModal=false"></baseModal>
   </a-card>
 </template>
 
@@ -174,16 +107,16 @@ import moment from 'moment'
 import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import subarea from '@/views/common/subarea.js'
-import { getArea } from '@/api/data'
+import baseModal from './baseModal.vue'
 import { settleReceiptList, settleReceipt } from '@/api/settleReceipt'
 export default {
   name: 'FinancialCollectionList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, rangeDate },
+  components: { STable, VSelect, rangeDate, baseModal },
   data () {
     return {
       spinning: false,
+      openModal: false,
       tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
@@ -195,7 +128,6 @@ export default {
         settleClientName: '',
         dealerLevel: undefined,
         settleStyle: undefined,
-        subareaSn: undefined,
         billStatus: undefined,
         settleState: undefined,
         voidFlag: undefined,
@@ -238,24 +170,19 @@ export default {
   computed: {
     columns () {
       const arr = [
-        { title: '审核时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'bizNo' }, width: '10%', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
-        { title: '经销商名称', dataIndex: 'settleClientName', align: 'left', width: '9%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '销售金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '收款时间', dataIndex: 'settleTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款方式', dataIndex: 'settleStyleDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'remark', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款单号', scopedSlots: { customRender: 'bizNo' }, width: '10%', align: 'center' },
+        { title: '关联备货单', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
+        { title: '申请人', dataIndex: 'settleClientName', align: 'left', width: '9%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收款事由', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '订单总金额', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收款总金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '授信总金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '余款抵扣总金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'settleTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '4%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(6, 0, { title: '销售金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-      }
       return arr
     }
   },
@@ -285,7 +212,6 @@ export default {
       this.queryParam.settleClientName = ''
       this.queryParam.dealerLevel = undefined
       this.queryParam.settleStyle = undefined
-      this.queryParam.subareaSn = undefined
       this.queryParam.billStatus = undefined
       this.queryParam.settleState = undefined
       this.queryParam.voidFlag = undefined
@@ -294,6 +220,10 @@ export default {
       this.queryParam.dealerCountySn = undefined
       this.$refs.table.refresh(true)
     },
+    // 新增
+    handleAdd () {
+      this.openModal = true
+    },
     // 详情
     handleDetail (row) {
       this.$router.push({ name: 'salesDetail', params: { sn: row.bizSn, type: 'financialCollection' } })
@@ -301,79 +231,15 @@ export default {
     handleBhDetail (row) {
       this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'financialCollection' } })
     },
-    // 收款
-    handleAudit (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确认要收款吗?',
-        centered: true,
-        onOk () {
-          _this.spinning = true
-          settleReceipt({ sn: row.accountReceiptSn }).then(res => {
-            if (res.status == 200) {
-              _this.$message.success(res.message)
-              _this.$refs.table.refresh()
-              _this.spinning = false
-            } else {
-              _this.spinning = false
-            }
-          })
-        }
-      })
-    },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.queryParam.dealerCitySn = undefined
-      this.queryParam.dealerCountySn = undefined
-      if (val) {
-        this.getArea('city', val)
-      }
-    },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.queryParam.dealerCountySn = undefined
-      if (val) {
-        this.getArea('district', val)
-      }
-    },
-    //  省/市/区
-    getArea (leve, sn) {
-      let params
-      if (leve == 'province') {
-        params = { type: '2' }
-      } else {
-        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
-      }
-      getArea(params).then(res => {
-        if (res.status == 200) {
-          if (leve == 'province') {
-            this.addrProvinceList = res.data || []
-          } else if (leve == 'city') {
-            this.addrCityList = res.data || []
-          } else if (leve == 'district') {
-            this.addrDistrictList = res.data || []
-          }
-        } else {
-          if (leve == 'province') {
-            this.addrProvinceList = []
-          } else if (leve == 'city') {
-            this.addrCityList = []
-          } else if (leve == 'district') {
-            this.addrDistrictList = []
-          }
-        }
-      })
+    // 编辑
+    handleEdit (row) {
+      this.$router.push({ name: 'financialCollectionEdit', params: { sn: row.bizSn } })
     },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getArea('province')
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight

+ 6 - 4
src/views/salesManagement/outboundOrder/detailModal.vue

@@ -10,9 +10,9 @@
     width="60%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main">
-        <div class="toolsBar" v-if="detail.length">
-          <div>箭冠汽配西安大兴店,共 {{ detail && detail.length }} 个出库单,产品款数合计 <span>1266.45</span> ,产品数量合计 <span>158</span>。</div>
-        </div>
+        <a-alert type="info" v-if="detail.length" style="margin-bottom:10px">
+          <div slot="message">箭冠汽配西安大兴店,共 {{ detail && detail.length }} 个出库单,产品款数合计 <span>1266.45</span> ,产品数量合计 <span>158</span>。</div>
+        </a-alert>
         <div class="toolsBar">
           <a-form-model
             ref="ruleForm"
@@ -76,7 +76,7 @@
           </a-form-model>
         </div>
         <div>
-          <a-table :columns="columns" :pagination="false" :data-source="tableData" bordered>
+          <a-table :columns="columns" :pagination="false" :scroll="{ y: 200 }" :data-source="tableData" bordered>
             <!-- 物品名称 -->
             <template slot="goodName" slot-scope="text, record">
               <a-input v-model.trim="record.goodName"></a-input>
@@ -249,6 +249,8 @@ export default {
   .sendGood-detail-modal{
     .common-main{
        .toolsBar{
+         border:1px solid #eee;
+         border-radius: 3px;
          display: flex;
          align-items: center;
          margin-bottom: 10px;

+ 57 - 20
src/views/salesManagement/outboundOrder/list.vue

@@ -75,6 +75,7 @@
       <!-- 列表 -->
       <div style="margin-bottom: 10px" v-if="$hasPermissions('B_stockOut')">
         <a-button type="primary" class="button-error" id="outboundOrder-export" :loading="loading" @click="handleOutbound()">批量出库</a-button>
+        <a-button type="primary" class="button-info" id="outboundOrder-send" :loading="loading" @click="handleSendGood()">批量发货</a-button>
         <span style="margin-left: 5px">
           <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
         </span>
@@ -273,6 +274,60 @@ export default {
     },
     // 出库/批量出库
     handleOutbound (row) {
+      const _this = this
+      let content = ''
+      let params = []
+      if (row) { //  单个出库
+        content = '确认要出库吗?'
+        params = [{
+          stockOutSn: row.stockOutSn,
+          outBizSn: row.outBizSn,
+          outBizSubSn: row.outBizSubSn,
+          outBizType: row.outBizType
+        }]
+      } else { //  批量出库
+        content = '确认要批量出库吗?'
+        if (!this.rowSelectionInfo || (this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length < 1)) {
+          this.$message.warning('请在列表勾选后再进行批量操作!')
+          return
+        }
+        params = []
+        this.rowSelectionInfo && this.rowSelectionInfo.selectedRows.map(item => {
+          params.push({
+            stockOutSn: item.stockOutSn,
+            outBizSn: item.outBizSn,
+            outBizSubSn: item.outBizSubSn,
+            outBizType: item.outBizType
+          })
+        })
+      }
+      this.$confirm({
+        title: '提示',
+        content: content,
+        centered: true,
+        onOk () {
+          if (!row) { //  批量出库
+            _this.loading = true
+          }
+          _this.spinning = true
+          stockOutOut(params).then(res => {
+            _this.loading = false
+            if (res.status == 200) {
+              if (!row) { //  批量出库
+                _this.$refs.table.clearSelected() // 清空表格选中项
+              }
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    // 发货/批量发货
+    handleSendGood (row) {
       const _this = this
       if (row) { //  单个出库
         this.showDetailModal = true
@@ -293,29 +348,11 @@ export default {
           this.$info({
             title: '操作提示',
             centered: true,
-            content: '您所选择的出库单,不属于同一个客户,无法批量出库,请重新选择。只能针对一个客户的出库单进行批量出库。'
+            content: '您所选择的出库单,不属于同一个客户,无法批量发货,请重新选择。只能针对一个客户的出库单进行批量发货。'
           })
         }
       }
     },
-    // 出库
-    outBound (params, row) {
-      const _this = this
-      _this.spinning = true
-      stockOutOut(params).then(res => {
-        _this.loading = false
-        if (res.status == 200) {
-          if (!row) { //  批量出库
-            _this.$refs.table.clearSelected() // 清空表格选中项
-          }
-          _this.$message.success(res.message)
-          _this.$refs.table.refresh()
-          _this.spinning = false
-        } else {
-          _this.spinning = false
-        }
-      })
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -326,7 +363,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 235
+      this.tableHeight = window.innerHeight - tableSearchH - 240
     }
   },
   watch: {

+ 6 - 6
src/views/salesManagement/sendOutOrder/detailModal.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal
     centered
-    class="sendGood-detail-modal"
+    class="sendGood-gz-modal"
     :footer="null"
     :maskClosable="false"
     v-model="isShow"
@@ -10,9 +10,9 @@
     width="60%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main">
-        <div class="toolsBar" v-if="detail">
-          <div>箭冠汽配西安大兴店,共 {{ detail && detail.length }} 个出库单,产品款数合计 <span>1266.45</span> ,产品数量合计 <span>158</span>。</div>
-        </div>
+        <a-alert type="info" v-if="detail" style="margin-bottom:10px">
+          <div slot="message">箭冠汽配西安大兴店,共 {{ detail && detail.length }} 个出库单,产品款数合计 <span>1266.45</span> ,产品数量合计 <span>158</span>。</div>
+        </a-alert>
         <div>
           <a-table :columns="outColumns" :pagination="false" :data-source="outTableData" bordered></a-table>
         </div>
@@ -146,12 +146,12 @@ export default {
 </script>
 
 <style lang="less">
-  .sendGood-detail-modal{
+  .sendGood-gz-modal{
     .common-main{
        .toolsBar{
          display: flex;
          align-items: center;
-         margin: 10px;
+         margin: 10px 0;
        }
        .forms{
          flex-wrap: wrap;