Parcourir la source

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

# Conflicts:
#	src/views/salesManagement/salesCollection/detailModal.vue
lilei il y a 2 ans
Parent
commit
add0a34c47

+ 1 - 1
public/version.json

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

+ 4 - 1
src/App.vue

@@ -10,12 +10,15 @@
 <script>
 import zhCN from 'ant-design-vue/es/locale/zh_CN'
 import { AppDeviceEnquire } from '@/utils/mixin'
+import moment from 'moment'
+import 'moment/locale/zh-cn'
 export default {
   mixins: [AppDeviceEnquire],
   data () {
     return {
       locale: zhCN,
-      envtips: ''
+      envtips: '',
+      moment
     }
   },
   created () {

+ 2 - 12
src/components/Table/index.js

@@ -349,24 +349,14 @@ export default {
       return {
         // 自定义属性,也就是官方文档中的props,可通过条件来控制样式
         style: {
-          // 设置字体颜色
-          // 'color': record.id === this.leftAlignId ? '#fff' : '',
           //  设置行背景色
-          'background-color': record.id === this.leftAlignId ? '#fff1c5' : ''
-          // 设置字体类型
-          // 'font-family': 'Microsoft YaHei',
-          // // 下划线
-          // 'text-decoration': 'underline',
-          // // 字体样式-斜体
-          // 'font-style': 'italic',
-          // // 字体加粗
-          // 'font-weight': 'bold'
+          'background-color': record[this.rowKeyName] === this.leftAlignId ? '#fff1c5' : ''
         },
         on: {
           // 鼠标单击行
           click: event => {
             // 记录当前点击的行标识
-            this.leftAlignId = record.id
+            this.leftAlignId = record[this.rowKeyName]
           }
         }
       }

+ 5 - 0
src/views/common/dealerSubareaScopeList.vue

@@ -12,6 +12,7 @@
     @search="fetchUser"
     @change="handleChange"
     allowClear
+    :disabled="disabled"
   >
     <a-spin v-if="fetching" slot="notFoundContent" size="small" />
     <a-select-option v-for="item in data" :key="item.dealerSn" :value="item.dealerSn">
@@ -31,6 +32,10 @@ export default {
     placeholder: {
       type: String,
       default: '请输入名称搜索'
+    },
+    disabled: {
+      type: Boolean,
+      default: false
     }
   },
   data () {

+ 2 - 1
src/views/expenseManagement/expenseReimbursementDetail/list.vue

@@ -165,7 +165,8 @@
         ref="table"
         :style="{ height: tableHeight+70+'px' }"
         size="small"
-        :rowKey="(record) => record.id"
+        rowKeyName="no"
+        :rowKey="(record) => record.no"
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight,x:2250 }"

+ 3 - 6
src/views/financialManagement/collectionDetailStatic/invoiceModal.vue

@@ -20,12 +20,9 @@
         </a-form-model-item>
         <a-form-model-item label="开票日期:" prop="invoiceDate">
           <a-date-picker
-            show-time
             id="noticeEdit-releaseDate"
-            format="YYYY-MM-DD HH:mm:ss"
-            placeholder="请选择开票时间"
-            :disabled-date="disabledDate"
-            :disabledTime="disabledDateTime"
+            format="YYYY-MM-DD"
+            placeholder="请选择开票日期"
             v-model="form.invoiceDate"/>
           <div style="color:#999">如果没有开票,则不填写即可</div>
         </a-form-model-item>
@@ -142,7 +139,7 @@ export default {
       const invoiceDate = moment(this.form.invoiceDate).format('YYYY-MM-DD')
       const ajax_form = {
         'bookDetailSn': this.form.bookDetailSn,
-        'invoiceDate': invoiceDate
+        'invoiceDate': this.form.invoiceDate ? invoiceDate : ''
       }
       _this.spinning = true
       updateDetailInvoiceDate(ajax_form).then(res => {

+ 47 - 15
src/views/financialManagement/collectionDetailStatic/list.vue

@@ -10,12 +10,12 @@
                 <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="收款单号">
                 <a-input id="collectionDetail-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入收款单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="申请人">
                 <employee style="width: 100%;" id="collectionDetail-Employee" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
               </a-form-item>
@@ -26,23 +26,32 @@
                 <rangeDate ref="receiptDate" :value="receiptDate" @change="receiptDateChange" />
               </a-form-item>
             </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="付款方类型">
+                <v-select
+                  v-model="queryParam.payerType"
+                  code="PAYER_TYPE"
+                  placeholder="请选择付款方类型"
+                ></v-select>
+              </a-form-item>
+            </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="付款方">
                 <a-input id="financialCollectionList-payerName" v-model.trim="queryParam.payerName" allowClear placeholder="请输入付款方"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="财务编码">
                 <a-input id="collectionDetail-kdMidCustomerFnumber" placeholder="请输入财务编码" v-model="queryParam.kdMidCustomerFnumber"></a-input>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="付款账户">
                 <a-input id="collectionDetail-payerAccountInfo" placeholder="请输入付款账户" v-model="queryParam.payerAccountInfo"></a-input>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="足额打款">
                   <v-select
                     v-model="queryParam.fullPaymentFlag"
@@ -70,7 +79,7 @@
                   </a-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="开票状态">
                   <a-select v-model="queryParam.invoiceDateType" style="width: 100%" placeholder="请选择开票状态">
                     <a-select-option value="1">
@@ -83,11 +92,11 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="收款日期">
-                  <rangeDate ref="receiptDate" :value="receiptDate" @change="receiptDateChange" />
+                <a-form-item label="开票日期">
+                  <rangeDate ref="invoiceDate" :value="invoiceDate" @change="invoiceDateChange" />
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="所属区域">
                   <subarea id="collectionDetail-subarea" v-model="queryParam.subareaSn"></subarea>
                 </a-form-item>
@@ -170,6 +179,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
 import { STable, VSelect } from '@/components'
 import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -206,13 +216,17 @@ export default {
         bankName: undefined,
         subareaSn: undefined,
         provinceSn: undefined,
-        invoiceDateType: undefined
+        invoiceDateType: undefined,
+        invoiceBeginDate: '',
+        invoiceEndDate: '',
+        payerType: undefined
       },
       invoiceIsShow: false,
       noteIsShow: false,
       printIsShow: false,
       disabled: false, //  查询、重置按钮是否可操作
       receiptDate: [], //  收款时间
+      invoiceDate: [], // 开票日期
       auditDate: [
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
@@ -223,6 +237,7 @@ export default {
         this.disabled = true
         this.spinning = true
         const params = Object.assign(parameter, this.queryParam)
+        params.invoiceDate = params.invoiceDate ? moment(params.invoiceDate).format('YYYY-MM-DD') : ''
         return financeBookDetailQueryPage(params).then(res => {
           let data
           if (res.status == 200) {
@@ -318,11 +333,16 @@ export default {
         this.queryParam.bankName = undefined
       }
     },
-    //  创建时间  change
+    //  收款日期  change
     receiptDateChange (date) {
       this.queryParam.receiptBeginDate = date[0] ? date[0] : ''
       this.queryParam.receiptEndDate = date[1] ? date[1] : ''
     },
+    //  开票时间  change
+    invoiceDateChange (date) {
+      this.queryParam.invoiceBeginDate = date[0] ? date[0] : ''
+      this.queryParam.invoiceEndDate = date[1] ? date[1] : ''
+    },
     //  审核时间  change
     dateAuditChange (date) {
       this.queryParam.auditBeginDate = date[0] ? date[0] : ''
@@ -330,10 +350,7 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.receiptDate = []
-      this.queryParam.receiptBeginDate = ''
-      this.queryParam.receiptEndDate = ''
-      this.$refs.receiptDate.resetDate(this.receiptDate)
+      // 审核日期
       this.auditDate = [
         getDate.getCurrMonthDays().starttime,
         getDate.getCurrMonthDays().endtime
@@ -341,6 +358,19 @@ export default {
       this.$refs.rangeAuditDate.resetDate(this.auditDate)
       this.queryParam.auditBeginDate = getDate.getCurrMonthDays().starttime
       this.queryParam.auditEndDate = getDate.getCurrMonthDays().endtime
+      // 收款日期
+      this.receiptDate = []
+      this.queryParam.receiptBeginDate = ''
+      this.queryParam.receiptEndDate = ''
+      this.$refs.receiptDate.resetDate(this.receiptDate)
+
+      // 开票日期
+      this.invoiceDate = []
+      this.queryParam.invoiceBeginDate = ''
+      this.queryParam.invoiceEndDate = ''
+      if (this.advanced) {
+        this.$refs.invoiceDate.resetDate(this.invoiceDate)
+      }
 
       this.queryParam.bookNo = ''
       this.queryParam.dispatchBillNo = ''
@@ -354,6 +384,8 @@ export default {
       this.queryParam.subareaSn = undefined
       this.queryParam.provinceSn = undefined
       this.queryParam.invoiceDateType = undefined
+      this.queryParam.invoiceDate = ''
+      this.queryParam.payerType = undefined
       this.$refs.table.refresh(true)
     },
     //  导出

+ 3 - 3
src/views/financialManagement/collectionDetailStatic/noteModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :footer="null"
     @cancel="cancel"
-    width="40%">
+    width="550px">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
         id="chooseCustom-form"
@@ -54,10 +54,10 @@ export default {
       confirmLoading: false,
       formItemLayout: {
         labelCol: {
-          span: 6
+          span: 4
         },
         wrapperCol: {
-          span: 18
+          span: 17
         }
       },
       form: {

+ 9 - 4
src/views/financialManagement/collectionDetailStatic/printModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :footer="null"
     @cancel="cancel"
-    width="40%">
+    width="500px">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
         id="chooseCustom-form"
@@ -57,8 +57,7 @@ export default {
     return {
       opened: this.show,
       spinning: false,
-      title: '备注',
-
+      title: '收款打印状态',
       confirmLoading: false,
       formItemLayout: {
         labelCol: {
@@ -75,7 +74,7 @@ export default {
         id: '',
         type: undefined
       },
-      printStatus: ''
+      printStatus: '',
     }
   },
   methods: {
@@ -86,6 +85,11 @@ export default {
         id: this.form.id,
         printStatus: this.printStatus
       }
+      if(!this.printStatus){
+        this.$message.info("请选择收款打印状态")
+        return
+      }
+      
       _this.spinning = true
       _this.confirmLoading = true
       updateFinanceBookDetail(ajax_form).then(res => {
@@ -102,6 +106,7 @@ export default {
     cancel () {
       this.opened = false
       this.$emit('cancel')
+      this.printStatus = ''
       this.$refs.ruleForm.resetFields()
     }
   },

+ 40 - 59
src/views/financialManagement/financialCollection/dispatchModal.vue

@@ -3,10 +3,10 @@
     centered
     :footer="null"
     :maskClosable="false"
-    title="关联备货单"
+    title="关联单"
     v-model="isShow"
     @cancel="handleCommonCancel"
-    width="50%">
+    width="70%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div v-if="detailData">
         <a-descriptions :column="{ xs: 2, sm: 3, md: 2}">
@@ -27,44 +27,20 @@
         :showPagination="false"
         :defaultLoadData="true"
         bordered>
-        <!-- 销售单号 -->
-        <template slot="salesBillNo" slot-scope="text, record">
-          <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
-          <span v-else>{{ record.salesBillNo }}</span>
-        </template>
-        <!-- 备货单号 -->
-        <template slot="dispatchBillNo" slot-scope="text, record">
-          <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
-          <span v-else>{{ record.dispatchBillNo }}</span>
-        </template>
       </s-table>
       <div class="btn-box" style="text-align:center;padding-top:20px;">
         <a-button @click="handleCommonCancel">关闭</a-button>
       </div>
     </a-spin>
-    <!-- 查看销售单或备货单详情 -->
-    <commonModal
-      :modalTit="detailType?'备货单详情':'销售单详情'"
-      bodyPadding="10px"
-      width="70%"
-      :showFooter="false"
-      :openModal="showDetailModal"
-      @cancel="cancelDetail">
-      <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
-      <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
-    </commonModal>
   </a-modal>
 </template>
 
 <script>
 import { STable } from '@/components'
-import commonModal from '@/views/common/commonModal.vue'
-import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
-import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
-import { queryDispatchBillListBySn } from '@/api/financeBook.js'
+import { querySettleReceiptFinanceBookList } from '@/api/financeBook.js'
 export default {
   name: 'DispatchModal',
-  components: { STable, commonModal, salesDetail, dispatchDetail },
+  components: { STable },
   props: {
     openModal: {
       type: Boolean,
@@ -78,40 +54,55 @@ export default {
   data () {
     return {
       spinning: false,
-      showDetailModal: false,
-      detailType: 2,
-      bizSn: null,
       isShow: this.openModal,
       detailData: null,
       columns: [
         { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
-        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '13%', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '13%', align: 'center' },
-        { title: '发货编号', dataIndex: 'sendNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '收货客户名称', dataIndex: 'receiverName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '产品款数', dataIndex: 'totalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '产品数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总售价', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'buyerName', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '收货客户名称', dataIndex: 'receiverName', align: 'center', width: '12%', customRender: function (text) { return text || '--' } },
+        { title: '发货编号', dataIndex: 'sendNo', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '产品款数', dataIndex: 'totalCategory', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '产品数量', dataIndex: 'totalQty', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '总售价', dataIndex: 'totalAmount', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '财务状态', dataIndex: 'financialStatusDictValue', align: 'center', width: '8%', customRender: function (text) { return (text == 0 || text) ? text : '--' } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
-        this.spinning = true
-        delete parameter.tableId
-        delete parameter.index
-        return queryDispatchBillListBySn({ bookSn: this.itemSn }).then(res => {
+        const params = Object.assign(parameter, { bookSn: this.itemSn })
+        return querySettleReceiptFinanceBookList(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
+              data[i].no = i + 1
+              const cons = data[i].bizType == 'DISPATCH' ? {
+                buyerName: data[i].dispatchBill.buyerName,
+                receiverName: data[i].dispatchBill.receiverName,
+                sendNo: data[i].dispatchBill.sendNo,
+                totalCategory: data[i].dispatchBill.totalCategory,
+                totalQty: data[i].dispatchBill.totalQty,
+                totalAmount: data[i].dispatchBill.totalAmount,
+                billStatusDictValue: data[i].dispatchBill.billStatusDictValue,
+                financialStatusDictValue: data[i].dispatchBill.financialStatusDictValue,
+                dispatchBillSn: data[i].dispatchBill.dispatchBillSn,
+                salesBillSn: data[i].dispatchBill.salesBillSn
+              } : {
+                buyerName: data[i].allocateBill.targetName,
+                receiverName: data[i].allocateBill.receiverName,
+                sendNo: data[i].allocateBill.sendNo,
+                totalCategory: data[i].allocateBill.totalCategory,
+                totalQty: data[i].allocateBill.totalQty,
+                totalAmount: data[i].allocateBill.totalPrice,
+                billStatusDictValue: data[i].allocateBill.stateDictValue,
+                allocateNo: data[i].allocateBill.allocateNo,
+                allocateSn: data[i].allocateBill.allocateSn
+              }
+              data[i] = Object.assign(data[i], cons)
             }
-            this.total = data.length
-            this.disabled = false
           }
-          this.spinning = false
           return data
         })
       }
@@ -125,16 +116,6 @@ export default {
     },
     setDetail (data) {
       this.detailData = data
-    },
-    handleDetail (row, type) {
-      this.detailType = type
-      this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
-      this.showDetailModal = true
-    },
-    cancelDetail () {
-      this.showDetailModal = false
-      this.detailType = 2
-      this.bizSn = null
     }
   },
   watch: {

+ 1 - 1
src/views/financialManagement/financialCollection/edit.vue

@@ -287,7 +287,7 @@ export default {
                 dispatchBillSn: data[i].dispatchBill.dispatchBillSn,
                 salesBillSn: data[i].dispatchBill.salesBillSn
               } : {
-                buyerName: data[i].allocateBill.buyerName,
+                buyerName: data[i].allocateBill.targetName,
                 receiverName: data[i].allocateBill.receiverName,
                 sendNo: data[i].allocateBill.sendNo,
                 totalCategory: data[i].allocateBill.totalCategory,

+ 17 - 5
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -38,8 +38,8 @@
         <a-row v-if="form.payerType=='DEALER'" >
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="dealerSn">
-              <!-- <dealerSubareaScopeList ref="settleClientName" @change="custChange" /> -->
-              {{ form.payerName }}
+              <!-- <dealerSubareaScopeList ref="settleClientName" @change="custChange" :disabled="true" /> -->
+              {{form.payerName}}
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -77,8 +77,8 @@
         <a-row v-if="form.payerType=='DEPT'" >
           <a-col :span="12">
             <a-form-model-item style="margin-bottom:5px;" label="付款方" prop="payerName">
-              <!-- <a-input :maxLength="30" placeholder="请输入付款方名称" v-model="form.payerName"></a-input> -->
-              {{ form.payerName }}
+              <!-- <a-input :maxLength="30" placeholder="请输入付款方名称" disabled v-model="form.payerName"></a-input> -->
+              {{form.payerName}}
             </a-form-model-item>
           </a-col>
           <a-col :span="12">
@@ -206,6 +206,7 @@ import { VSelect, Upload } from '@/components'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import fcDetailSxItem from './fcDetailSxItem.vue'
 import { financeBookDetailSave, financeBookDetailQueryBySn, lastPayerAccountInfo } from '@/api/financeBook.js'
+import { dealerDetailBySn } from '@/api/dealer'
 export default {
   name: 'FcDetailModal',
   mixins: [commonMixin],
@@ -328,6 +329,14 @@ export default {
         this.form.payerAccountInfo = res.data || ''
       })
     },
+    // 查询经销商信息
+    getDealerDetail (sn) {
+      dealerDetailBySn({ sn: sn }).then(res => {
+        const val = { key: sn }
+        val.row = res.data
+        this.custChange(val)
+      })
+    },
     // 客户
     custChange (v) {
       console.log(v)
@@ -404,7 +413,10 @@ export default {
     setDetail (data) {
       this.form = Object.assign(this.form, { payerTypeDictValue: data.payerTypeDictValue, payerType: data.payerType, dealerSn: data.dealerSn, payerName: data.payerName })
       this.$nextTick(() => {
-        this.accountTypeChange()
+        if(this.form.dealerSn){
+          // this.$refs.settleClientName.getDetail(this.form.dealerSn)
+          this.getDealerDetail(this.form.dealerSn)
+        }
       })
     },
     //  详情

+ 3 - 3
src/views/financialManagement/financialCollection/list.vue

@@ -16,8 +16,8 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="关联备货单号">
-                <a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
+              <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">
@@ -229,7 +229,7 @@ export default {
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
-        { title: '关联备货单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
+        { title: '关联单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
         { title: '收款事由', dataIndex: 'bookReason', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '付款方', dataIndex: 'payerName', width: '9%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },

+ 12 - 12
src/views/salesManagement/receiptPrint/list.vue

@@ -51,7 +51,7 @@
           </a-form>
           <!-- 操作按钮 -->
           <div class="table-operator" v-if="$hasPermissions('B_SkPrint')">
-            <a-button type="primary" @click="handlePlPrint()" class="button-error">批量打印</a-button>
+            <a-button type="primary" :loading="spinning" @click="handlePlPrint()" class="button-error">批量打印</a-button>
             <span style="margin-left: 8px">
               <template v-if="rowSelectionInfo && rowSelectionInfo.selectedRowKeys.length>0">{{ `已选 ${rowSelectionInfo.selectedRowKeys.length} 项` }}</template>
             </span>
@@ -89,7 +89,7 @@
               <a-button
                 size="small"
                 type="link"
-                class="button-warning"
+                class="button-success"
                 v-if="record.printStatus == 'PRINT'&&$hasPermissions('B_SKPrintRecord')"
                 @click="viewPrint(record)"
               >打印记录</a-button>
@@ -98,15 +98,7 @@
         </s-table>
 
         <!-- 收款打印 -->
-        <commonModal
-          modalTit="收款打印预览"
-          bodyPadding="10px"
-          width="1024px"
-          :showFooter="false"
-          :openModal="showTipModal"
-          @cancel="closeTipModal">
-          <printModel ref="printModel" @cancel="closeTipModal" @printOk="printOk"></printModel>
-        </commonModal>
+        <printModel ref="printModel" @cancel="closeTipModal" @printOk="printOk"></printModel>
         <!-- 打印记录 -->
         <recordModal v-drag ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
         <!-- 操作提示 -->
@@ -169,6 +161,10 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        if(this.currentTab == 1){
+          this.queryParam.isAll = '1'
+          this.queryParam.status = 'AUDIT_PASS'
+        }
         return financeBookDetailList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
@@ -202,7 +198,7 @@ export default {
         { title: '户名', dataIndex: 'bankAccount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '汇入银行', dataIndex: 'bankName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '说明', dataIndex: 'remarks', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '说明', dataIndex: 'explainInfo', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '收款打印状态', dataIndex: 'printStatusDictValue', width: '6%', align: 'center', scopedSlots: { customRender: 'printStatus' } },
         { title: '打印次数', dataIndex: 'printNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
@@ -229,6 +225,7 @@ export default {
         _this.$message.warning('请在列表勾选后再进行批量操作!')
         return false
       }
+      this.spinning = true
       const bookSns = []
       rows.map(item => {
         if (bookSns.indexOf(item.bookSn) < 0) {
@@ -255,6 +252,7 @@ export default {
     },
     // 收款打印
     async handlePrint (row, type, list, bookSns) {
+      this.spinning = true
       this.showTipModal = true
       let detailItemUseStr = ''
       let auditInfo = null
@@ -272,6 +270,7 @@ export default {
       })
     },
     printOk () {
+      this.spinning = false
       this.$refs.table.refresh()
     },
     //  时间  change
@@ -301,6 +300,7 @@ export default {
     },
     closeTipModal () {
       this.showTipModal = false
+      this.spinning = false
       this.$refs.printModel.clearData()
     },
     // 打印记录

+ 36 - 28
src/views/salesManagement/receiptPrint/printModel.vue

@@ -1,12 +1,12 @@
 <template>
   <!-- 发货打印 -->
-  <div>
+  <div style="position:absolute;left:-10000px;top:-10000px;height:0;overflow: hidden;">
     <div id="sendGood-print" v-if="financeBookList&&financeBookList.length">
       <div
         v-for="(fcItem,index) in financeBookList"
         class="sendGood-print-box"
         :key="index+'-fcitem'"
-        style="width:564pt;margin:0 auto;font-size:14px;">
+        style="width:564pt;margin:0 auto;">
         <table
           ref="printBox"
           cellspacing="0"
@@ -15,53 +15,57 @@
           <tr>
             <td>
               <div class="print-box" style="width: 564pt;margin-left:1.5pt;">
-                <div style="text-align:center;margin:15pt 0 5pt;font-size:24px;font-weight: bold;">收款通知单</div>
+                <div style="text-align:center;margin:15pt 0 5pt;font-size:22px;font-weight: bold;">收款通知单</div>
                 <div>
                   <div>
                     <table border="1" style="width: 564pt;border-collapse: collapse;text-align: center;">
                       <tr>
                         <th style="line-height: 20pt;width: 56pt;background:#f6f6f6;">日期</th>
-                        <th style="line-height: 20pt;width: 80pt;background:#f6f6f6;">客户名称</th>
-                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">订单金额</th>
-                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">收款金额</th>
-                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">使用授信</th>
-                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">余款抵扣</th>
-                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">汇入银行</th>
-                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">足额打款</th>
-                        <th style="line-height: 20pt;width: 68pt;background:#f6f6f6;">说明</th>
+                        <th style="line-height: 20pt;width: 62pt;background:#f6f6f6;">客户名称</th>
+                        <th style="line-height: 20pt;width: 62pt;background:#f6f6f6;">营业执照名称</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">订单金额</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">收款金额</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">使用授信</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">余款抵扣</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">汇入银行</th>
+                        <th style="line-height: 20pt;width: 54pt;background:#f6f6f6;">足额打款</th>
+                        <th style="line-height: 20pt;width: 60pt;background:#f6f6f6;">说明</th>
                       </tr>
                       <tr v-for="item in fcItem.subList" :key="item.bookDetailSn">
-                        <td style="padding:3pt;width: 50pt;">{{ moment(item.receiptDate).format('MM月DD日') }}</td>
-                        <td style="padding:3pt;width: 74pt;text-align:left;">
+                        <td style="padding:3pt;width: 50pt;">{{ moment(item.receiptDate).format('YYYY/MM/DD') }}</td>
+                        <td style="padding:3pt;width: 56pt;text-align:left;">
                           {{ item.payerName }}
                           <div>
                             {{ item.dealerEntity ? item.dealerEntity.kdMidCustomerFnumber : '' }}
                           </div>
                         </td>
-                        <td style="padding:3pt;width: 54pt;text-align:center;">
+                        <td style="padding:3pt;width: 56pt;text-align:left;">
+                          {{ item.payerAccountInfo }}
+                        </td>
+                        <td style="padding:3pt;width: 48pt;text-align:center;">
                           {{ item.orderAmount?item.orderAmount.toFixed(2):'0.00' }}
                         </td>
-                        <td style="padding:3pt;width: 54pt;text-align:center;">
+                        <td style="padding:3pt;width: 48pt;text-align:center;">
                           {{ item.receiptAmount?item.receiptAmount.toFixed(2):'0.00' }}
                         </td>
-                        <td style="padding:3pt;width: 54pt;text-align:center;">
+                        <td style="padding:3pt;width: 48pt;text-align:center;">
                           {{ getTotal(item.detailItemUseList||[]) }}
                         </td>
-                        <td style="padding:3pt;width: 54pt;text-align:center;">
+                        <td style="padding:3pt;width: 48pt;text-align:center;">
                           {{ item.balanceAmount?item.balanceAmount.toFixed(2):'0.00' }}
                         </td>
-                        <td style="padding:3pt;width: 54pt;">
+                        <td style="padding:3pt;width: 48pt;">
                           {{ item.bankAccount }}<br>
                           {{ item.bankName }}
                         </td>
-                        <td style="padding:3pt;width: 54pt;">{{ item.fullPaymentFlagDictValue }}</td>
-                        <td style="padding:3pt;width: 62pt;word-break:break-all;">{{ item.remarks }}</td>
+                        <td style="padding:3pt;width: 48pt;">{{ item.fullPaymentFlagDictValue }}</td>
+                        <td style="padding:3pt;width: 54pt;word-break:break-all;">{{ item.explainInfo }}</td>
                       </tr>
                     </table>
-                    <div style="padding:5pt 0;border-bottom: 1px solid #333;">使用授信明细:{{ fcItem.detail||'' }}</div>
+                    <div style="padding:5pt 0;border-bottom: 1px solid #333;">使用授信明细:{{ fcItem.detail||'暂无。' }}</div>
                     <div style="padding:5pt 0;" v-if="fcItem.audit&&fcItem.audit.taskVOList">
                       审批人员:
-                      <span v-for="audit in fcItem.audit.taskVOList" :key="audit.processInstanceId">
+                      <span v-for="audit in fcItem.audit.taskVOList" :key="audit.processInstanceId" v-if="audit.userType == '审批人'">
                         {{ audit.userName }}({{ audit.state }});
                       </span>
                     </div>
@@ -76,10 +80,10 @@
         </table>
       </div>
     </div>
-    <div class="btn-box" style="display:flex;align-item:center;justify-content: center;">
+    <!-- <div class="btn-box" style="display:flex;align-item:center;justify-content: center;">
       <a-button @click="handleCommonCancel">取消</a-button>
       <a-button :loading="spinning" type="primary" @click="handleCommonOk">立即打印</a-button>
-    </div>
+    </div> -->
   </div>
 </template>
 
@@ -89,7 +93,7 @@ import moment from 'moment'
 export default {
   data () {
     return {
-      spinning: false,
+      // spinning: false,
       detail: null,
       financeBookList: [],
       printNums: []
@@ -130,10 +134,8 @@ export default {
         htmlStr.push(printCons[i].t)
       }
 
-      _this.spinning = true
       // html, type, callback, printLogParams
       jGPlPrint(htmlStr, 'preview', function (res) {
-        _this.spinning = false
         _this.handleCommonCancel()
         _this.$emit('printOk')
       }, this.printNums, this.financeBookList)
@@ -145,9 +147,15 @@ export default {
         this.printNums.push({
           billType: 'FINANCE_BOOK_DETAIL',
           billSn: item.bookDetailSn,
-          billNo: item.bookNo
+          billNo: item.bookNo,
+          printType: '收款打印'
         })
       })
+
+      // 打印预览
+      this.$nextTick(() => {
+        this.handleCommonOk()
+      })
     },
     handleCommonCancel () {
       this.$emit('cancel')

+ 4 - 2
src/views/salesManagement/salesCollection/detailModal.vue

@@ -284,8 +284,10 @@ export default {
         status: 'AUDIT_PASS'
       }
       this.orginData = []
-      this.$refs.rangeApply.resetDate()
-      this.$refs.table.refresh(true)
+      this.$nextTick(()=>{
+        this.$refs.rangeApply.resetDate()
+        this.$refs.table.refresh(true)
+      })
     }
   },
   watch: {

+ 17 - 38
src/views/salesManagement/salesCollection/list.vue

@@ -181,14 +181,6 @@
         </template>
       </s-table>
 
-      <!-- 关联收款单 -->
-      <detailModal
-        v-drag
-        ref="detailModal"
-        modalTit="关联收款单"
-        @ok="relationSuccess"
-        :openModal="showDetail"
-        @cancel="showDetail=false"></detailModal>
       <!-- 销售收款凭证 -->
       <voucherModal v-drag ref="voucherModal" modalTit="销售收款凭证" :openModal="showVoucher" @cancel="showVoucher=false"></voucherModal>
 
@@ -239,7 +231,6 @@ import Area from '@/views/common/area.js'
 import commonModal from '@/views/common/commonModal.vue'
 import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
 import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
-import detailModal from './detailModal.vue'
 import voucherModal from './voucherModal.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import { settleReceiptList, settleReceiptBatch } from '@/api/settleReceipt'
@@ -247,7 +238,7 @@ import { settleReceiptList, settleReceiptBatch } from '@/api/settleReceipt'
 export default {
   name: 'SalesCollectionList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, rangeDate, commonModal, detailModal, Area, voucherModal, dealerSubareaScopeList, salesDetail, dispatchDetail },
+  components: { STable, VSelect, subarea, rangeDate, commonModal, Area, voucherModal, dealerSubareaScopeList, salesDetail, dispatchDetail },
   data () {
     return {
       spinning: false,
@@ -441,7 +432,9 @@ export default {
     // 凭证
     handleVoucher (row) {
       this.showVoucher = true
-      this.$refs.voucherModal.getData(row)
+      this.$nextTick(()=>{
+        this.$refs.voucherModal.getData(row)
+      })
     },
     // 点击收款
     handleColle (row) {
@@ -455,33 +448,19 @@ export default {
       this.handlePlData.map(item => {
         snList.push(item.accountReceiptSn)
       })
-      // 关联收款
-      if (this.collectionType == 1) {
-        this.showDetail = true
-        this.$refs.detailModal.setData(this.handlePlData, snList)
-        this.showSkModal = false
-        _this.collectionType = 0
-      } else {
-        // 仅标记收款
-        _this.spinning = true
-        _this.showSkModal = false
-        settleReceiptBatch({ snList: snList }).then(res => {
-          if (res.status == 200) {
-            _this.$message.success(res.message)
-            _this.$refs.table.refresh()
-            _this.spinning = false
-            _this.collectionType = 0
-          } else {
-            _this.spinning = false
-          }
-        })
-      }
-    },
-    // 关联收款成功
-    relationSuccess () {
-      this.$refs.table.refresh()
-      this.showDetail = false
-      this.$refs.table.clearSelected()
+      // 仅标记收款
+      _this.spinning = true
+      _this.showSkModal = false
+      settleReceiptBatch({ snList: snList }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+          _this.collectionType = 0
+        } else {
+          _this.spinning = false
+        }
+      })
     },
     pageInit () {
       const _this = this

+ 3 - 1
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -211,8 +211,10 @@ export default {
     handleAssociated () {
       const snList = []
       snList.push(this.handlePlData.accountReceiptSn)
-      this.$refs.collectDetailModal.setData(this.handlePlData, snList)
       this.showCollectDetail = true
+      this.$nextTick(()=>{
+        this.$refs.collectDetailModal.setData([this.handlePlData], snList)
+      })
     },
     // 关联收款成功
     relationSuccess () {