浏览代码

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

lilei 2 年之前
父节点
当前提交
29c38e43b5

+ 13 - 5
src/views/allocationManagement/transfersPrint/list.vue

@@ -148,8 +148,16 @@
       @close="openModal=false" />
     <!-- 打印记录 -->
     <recordModal v-drag ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
-    <!-- 调拨打印 -->
-    <printModalTip v-drag :show="printIsShow" :info="printInfo" @cancel="printIsShow=false"></printModalTip>
+    <!-- 操作提示 -->
+    <commonModal modalTit="操作提示" okText="暂不打印" :openModal="showPrintModal" @cancel="canselModal" @ok="updatePrintStatus">
+      <div style="text-align: center;">
+        <div style="margin-bottom: 15px;font-size: 14px;">如需将打印状态回退至<strong>【暂不打印】</strong>,请点击下方按钮</div>
+        <div style="line-height: 24px;">
+          <div>收款单号:{{ tipData&&tipData.bookNo }}</div>
+          <div>客户名称:{{ tipData&&tipData.payerName }}</div>
+        </div>
+      </div>
+    </commonModal>
   </div>
 </template>
 
@@ -164,13 +172,13 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import printModal from '@/views/allocationManagement/transferOut/printModal.vue'
 import recordModal from './recordModal.vue'
-import printModalTip from './printModal.vue'
+import commonModal from '@/views/common/commonModal.vue'
 import { allocateBillList, allocateBillDetailPrint } from '@/api/allocateBill'
 import { printFun } from '@/libs/JGPrint.js'
 export default {
   name: 'TransfersPrintList',
   mixins: [commonMixin],
-  components: { STable, VSelect, rangeDate, dealerSubareaScopeList, printModal,printModalTip, recordModal, subarea, Area },
+  components: { STable, VSelect, rangeDate, dealerSubareaScopeList, printModal,commonModal, recordModal, subarea, Area },
   data () {
     return {
       spinning: false,
@@ -178,7 +186,7 @@ export default {
       tableHeight: 0,
       itemData: null,
       showRecordModal: false,
-      printIsShow:false,
+      showPrintModal:false,
       time: [
         moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
         moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')

+ 0 - 109
src/views/allocationManagement/transfersPrint/printModal.vue

@@ -1,109 +0,0 @@
-<template>
-  <a-modal
-    v-model="opened"
-    :title="title"
-    centered
-    :maskClosable="false"
-    :footer="null"
-    @cancel="cancel"
-    width="30%">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <div>如需将打印状态退至【暂不打印】,请点击下方按钮</div>
-      <a-form-model
-        id="chooseCustom-form"
-        ref="ruleForm"
-        :model="form"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol">
-        <a-form-model-item label="调拨单号:" prop="no"> <span>{{ form.no }}{{ form.printState=='UNABLE_PRINT'?'(暂不打印)':form.printStatus=='CANCEL_PRINT'?'(取消打印)':'' }}</span>
-        </a-form-model-item>
-        <a-form-model-item label="调往对象:" prop="targetName"> <span>{{ form.targetName }}</span>
-        </a-form-model-item>
-        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
-          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
-          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">暂不打印
-          </a-button>
-        </a-form-model-item>
-      </a-form-model>
-    </a-spin>
-  </a-modal>
-</template>
-
-<script>
-import {
-  updateFinanceBookDetail
-} from '@/api/financeBook.js'
-export default {
-  name: 'PrintModal',
-  props: {
-    show: [Boolean],
-    info: {
-      type: Object,
-      default: () => {
-        return null
-      }
-    }
-  },
-  data () {
-    return {
-      opened: this.show,
-      spinning: false,
-      title: '操作提示',
-
-      confirmLoading: false,
-      formItemLayout: {
-        labelCol: {
-          span: 6
-        },
-        wrapperCol: {
-          span: 18
-        }
-      },
-      form: {
-        no: undefined,
-        payerName: undefined,
-        printStatus: '',
-        id: '',
-        type: undefined
-      }
-    }
-  },
-  methods: {
-    //  保存
-    handleSubmit () {
-      const _this = this
-      const ajax_form = {
-        id: this.form.id,
-        printStatus: this.form.printStatus
-      }
-      _this.spinning = true
-      _this.confirmLoading = true
-      updateFinanceBookDetail(ajax_form).then(res => {
-        if (res.status == 200) {
-          _this.$message.success(res.message)
-          _this.cancel()
-          _this.spinning = false
-        } else {
-          _this.spinning = false
-        }
-        _this.confirmLoading = false
-      })
-    },
-    cancel () {
-      this.opened = false
-      this.$emit('cancel')
-      this.$refs.ruleForm.resetFields()
-    }
-  },
-  watch: {
-    show (newValue, oldValue) {
-      this.opened = newValue
-      if (!newValue) {
-        this.cancel()
-      } else {
-        this.form = this.info
-      }
-    }
-  }
-}
-</script>

+ 18 - 5
src/views/salesManagement/salesCollection/detailModal.vue

@@ -12,7 +12,7 @@
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main">
         <div class="toolsBar">
-          <div v-if="handlePlData.length">{{ handlePlData[0].settleClientName }},共 {{ handlePlData && handlePlData.length }} 个备货单,合计 {{ totalAmount }} 元,已选择 {{ chooseData.length }} 个收款单</div>
+          <!-- <div v-if="handlePlData.length">{{ handlePlData[0].settleClientName }},共 {{ handlePlData && handlePlData.length }} 个备货单,合计 {{ totalAmount }} 元,已选择 {{ chooseData.length }} 个收款单</div> -->
           <a-button type="primary" class="button-primary" @click="handleCommonOk">{{ okText }}</a-button>
         </div>
         <div>
@@ -59,7 +59,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="申请时间">
-                  <rangeDate ref="rangeApply" :value="settleDate" @change="dateSettleChange" />
+                  <rangeDate ref="rangeApply" :value="applyDate" @change="dateApplyChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -117,13 +117,16 @@
 <script>
 import { STable, VSelect } from '@/components'
 import { financeBookQueryPage } from '@/api/financeBook.js'
+import rangeDate from '@/views/common/rangeDate.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import detailModal from '@/views/financialManagement/financialCollection/detail.vue'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 import employee from '../../expenseManagement/expenseReimbursement/employee.js'
 import { settleReceiptBookBatch } from '@/api/settleReceipt'
 export default {
   name: 'GlDetailModal',
-  components: { STable, VSelect, employee, commonModal, detailModal },
+  components: { STable, VSelect, employee, commonModal, detailModal, rangeDate },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -153,11 +156,17 @@ export default {
       spinning: false,
       showDetailModal: false,
       handlePlData: [],
+      applyDate: [
+        moment(getDate.getCurrMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
       queryParam: {
         bookNo: '',
         bookReason: '',
         applyPersonSn: undefined,
-        status: 'AUDIT_PASS'
+        status: 'AUDIT_PASS',
+        auditBeginDate: undefined,
+        auditEndDate: undefined
       },
       chooseData: [],
       columns: [
@@ -165,7 +174,7 @@ export default {
         { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
         { title: '申请人', dataIndex: 'applyPersonName', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '财务收款事由', dataIndex: 'bookReason', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '付款方', dataIndex: 'bookReason', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '付款方', dataIndex: 'payerName', width: '12%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '收款总金额', dataIndex: 'receiptTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
@@ -221,6 +230,10 @@ export default {
       this.handlePlData = data
       this.snList = snList
     },
+    dateApplyChange (date) {
+      this.queryParam.auditBeginDate = date[0]
+      this.queryParam.auditEndDate = date[1]
+    },
     // 删除
     handleDel (row) {
       const i = this.chooseData.findIndex(item => row.bookSn == item.bookSn)

+ 24 - 20
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -101,6 +101,14 @@
       @cancel="showDetailModal=false">
       <detailModal ref="detailModal"></detailModal>
     </commonModal>
+    <!-- 关联收款单 -->
+    <collectDetailModal
+      v-drag
+      ref="collectDetailModal"
+      modalTit="关联收款单"
+      @ok="relationSuccess"
+      :openModal="showCollectDetail"
+      @cancel="showCollectDetail=false"></collectDetailModal>
   </a-modal>
 </template>
 
@@ -109,10 +117,11 @@ import { STable, VSelect } from '@/components'
 import commonModal from '@/views/common/commonModal.vue'
 import printModel from '../receiptPrint/printModel.vue'
 import detailModal from '@/views/financialManagement/financialCollection/detail.vue'
+import collectDetailModal from './detailModal.vue'
 import { settleReceiptFindBySn, settleReceiptBookBatch } from '@/api/settleReceipt.js'
 export default {
   name: 'VoucherModal',
-  components: { STable, VSelect, commonModal, printModel, detailModal },
+  components: { STable, VSelect, commonModal, printModel, detailModal, collectDetailModal },
   props: {
     openModal: { //  弹框显示状态
       type: Boolean,
@@ -153,7 +162,9 @@ export default {
         { title: '状态', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       tableData: [],
-      associatedLoading: false
+      associatedLoading: false,
+      showCollectDetail: false,
+      handlePlData: null
     }
   },
   methods: {
@@ -165,6 +176,7 @@ export default {
       })
     },
     getData (data) {
+      this.handlePlData = data
       this.spinning = true
       settleReceiptFindBySn({ sn: data.accountReceiptSn }).then(res => {
         this.detail = res.data || null
@@ -195,25 +207,17 @@ export default {
       this.detail = null
       this.tableData = []
     },
-    // 关联收款单
+    // 打开关联收款单弹窗
     handleAssociated () {
-      const snList = []; const bookSnList = []
-      snList.push(this.detail.accountReceiptSn)
-      bookSnList.push(this.detail.bookSn)
-      const ajax_data = {
-        snList: snList,
-        bookSnList: bookSnList
-      }
-      this.associatedLoading = true
-      settleReceiptBookBatch(ajax_data).then(res => {
-        if (res.status == 200) {
-          this.$message.success(res.message)
-          setTimeout(() => {
-            this.handleCommonCancel()
-          }, 800)
-        }
-        this.associatedLoading = false
-      })
+      const snList = []
+      snList.push(this.handlePlData.accountReceiptSn)
+      this.$refs.collectDetailModal.setData(this.handlePlData, snList)
+      this.showCollectDetail = true
+    },
+    // 关联收款成功
+    relationSuccess () {
+      this.handleCommonCancel()
+      this.showCollectDetail = false
     }
   },
   watch: {