lilei 5 روز پیش
والد
کامیت
08806905b1

+ 19 - 7
src/views/financialManagement/accountStatement/confrontModal.vue

@@ -113,7 +113,14 @@
         </div>
         <div class="conFrontModal-footer-bar" v-if="detailData">
           <a-button @click="cancel" style="margin-right: 15px" id="conFrontModal-btn-back">取消</a-button>
-          <a-button type="primary" v-if="orderType==1" :loading="confirmLoading" @click="handleSubmit" id="conFrontModal-btn-submit">对单</a-button>
+          <a-button type="primary" v-if="orderType==1" :loading="confirmLoading" @click="handleSubmit(0)" id="conFrontModal-btn-submit">对单</a-button>
+          <a-button
+            type="primary"
+            class="button-success"
+            v-if="orderType==1"
+            :loading="confirmLoading"
+            @click="handleSubmit(1)"
+            id="conFrontModal-btn-submit-sync">对单并同步</a-button>
         </div>
       </a-card>
     </a-spin>
@@ -420,8 +427,8 @@ export default {
       const excelTitle = '(' + this.detailData.dealerName + ')应收账款明细表'
       this.exportTable(this.$refs.table.$el.querySelector('table'), excelTitle)
     },
-    // 对单
-    async handleSubmit () {
+    // 对单, type 0 对单 1 对单且同步
+    async handleSubmit (type) {
       const _this = this
       this.confirmLoading = true
       const ret = await verifyAcountBillConfirmCheck({ sn: this.verifyAccountBillSn })
@@ -440,10 +447,15 @@ export default {
       } else {
         this.confirmLoading = true
         verifyAcountBillConfirm({ sn: this.verifyAccountBillSn }).then(res => {
-          this.confirmLoading = false
-          this.$message.success('对单成功')
-          this.$emit('confirm')
-          this.cancel()
+          // 对单成功
+          if (type == 0) {
+            this.confirmLoading = false
+            this.$message.success('对单成功')
+            this.$emit('confirm')
+            this.cancel()
+          } else {
+            // 对单成功且同步
+          }
         })
       }
     },

+ 38 - 3
src/views/financialManagement/accountStatement/edit.vue

@@ -71,13 +71,16 @@
                       allowClear></v-select>
                   </a-form-item>
                 </a-col>
-                <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+                <a-col :md="4" :sm="24">
                   <a-button id="accountStatement-2-search" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
                   <a-button id="accountStatement-2-restForm" style="margin-left: 5px" @click="resetSearchForm">重置</a-button>
                 </a-col>
               </a-row>
             </a-form>
           </div>
+          <div>
+            <a-button id="accountStatement-tzhang" style="margin-bottom: 10px;" type="primary" @click="handleAdd">调账</a-button>
+          </div>
         </div>
         <!-- 已选配件列表 -->
         <s-table
@@ -127,6 +130,10 @@
     </div>
     <!-- 编辑基础信息弹窗 -->
     <baseModal v-drag :show="openModal" @cancel="openModal=false" :itemSn="verifyAccountBillSn" @refashData="getBasicsData"></baseModal>
+    <!-- 基础信息 -->
+    <baseTzModal v-drag :show="baseModal" :itemSn="itemSn" @cancel="baseModal=false" @ok="hanldAudit"></baseTzModal>
+    <!-- 提交  选择审批人员 -->
+    <chooseDepartUserModal :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSave"></chooseDepartUserModal>
   </div>
 </template>
 
@@ -135,6 +142,8 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import queryPart from './queryPart.vue'
 import baseModal from './baseModal.vue'
+import baseTzModal from '../manualEntryForm/baseModal.vue'
+import chooseDepartUserModal from '../manualEntryForm/chooseDepartUserModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import {
   verifyAcountBillDetailList,
@@ -154,12 +163,16 @@ export default {
     VSelect,
     queryPart,
     baseModal,
-    rangeDate
+    rangeDate,
+    baseTzModal,
+    chooseDepartUserModal
   },
   data () {
     return {
       spinning: false,
       isInster: false, // 是否正在添加产品
+      baseModal: false,
+      openDepartUserModal: false,
       delLoading: false,
       productForm: {
         beginDate: '',
@@ -206,7 +219,8 @@ export default {
       countData: null, // 统计明细
       detailData: null, // 基础信息数据
       addMoreLoading: false, // 批量添加动画
-      verifyAccountBillSn: undefined // 单据sn
+      verifyAccountBillSn: undefined, // 单据sn
+      itemSn: null
     }
   },
   computed: {
@@ -248,6 +262,27 @@ export default {
       this.productForm.beginDate = date[0] ? date[0] : ''
       this.productForm.endDate = date[1] ? date[1] : ''
     },
+    // 调账
+    handleAdd () {
+      this.itemSn = null
+      this.baseModal = true
+    },
+    // 打开审核提交弹框
+    hanldAudit (data) {
+      this.resetTable(false)
+      this.itemSn = data.changeSn
+      this.openDepartUserModal = true
+    },
+    // 提交审核人员
+    handleSave (data) {
+      verifyAcountBillSubmit({ changeSn: this.itemSn, ...data }).then(res => {
+        if (res.status == 200) {
+          this.$message.success('提交成功')
+          this.openDepartUserModal = false
+          this.resetTable(false)
+        }
+      })
+    },
     // 删除所选产品
     handleDel (row) {
       const _this = this

+ 29 - 8
src/views/financialManagement/accountStatement/list.vue

@@ -31,7 +31,18 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align: center;">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="同步状态">
+                <v-select
+                  v-model="queryParam.syncFlag"
+                  ref="syncFlag"
+                  id="accountStatement-syncFlag"
+                  code="VERIFY_ACCOUNT_STATUS"
+                  placeholder="请选择同步状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="accountStatement-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="accountStatement-reset">重置</a-button>
             </a-col>
@@ -67,6 +78,10 @@
             <span v-if="$hasPermissions('B_as_detail')" class="link-bule" @click="handleDetail(record,0)">{{ record.verifyAccountBillNo }}</span>
             <span v-else>{{ record.verifyAccountBillNo }}</span>
           </template>
+          <!-- 业务时间区间 -->
+          <template slot="bizDate" slot-scope="text, record">
+            {{ record.bizFirstDate }} ~ {{ record.bizLastDate }}
+          </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
             <div>
@@ -177,13 +192,19 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对账单号', scopedSlots: { customRender: 'verifyAccountBillNo' }, width: '10%', align: 'center' },
-        { title: '客户名称', dataIndex: 'dealerName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '余额', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-        { title: '对单时间', dataIndex: 'confirmDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '对账时间', dataIndex: 'verifyDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账单号', scopedSlots: { customRender: 'verifyAccountBillNo' }, width: '8%', align: 'center' },
+        { title: '客户名称', dataIndex: 'dealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '借方', dataIndex: 'debitAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '贷方', dataIndex: 'creditAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '期初余额', dataIndex: 'beginBalance', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '余额', dataIndex: 'totalAmount', width: '5%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '业务单数', dataIndex: 'bizNum', width: '5%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务时间区间', dataIndex: 'bizDate', scopedSlots: { customRender: 'bizDate' }, width: '14%', align: 'center' },
+        { title: '对单时间', dataIndex: 'confirmDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账时间', dataIndex: 'verifyDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '同步状态', dataIndex: 'syncFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
       ]
       return arr