LAPTOP-FO2T5SIU\35838 преди 6 месеца
родител
ревизия
e3c7051ae3

+ 1 - 1
src/views/customerManagement/numberManagement/index.vue

@@ -58,7 +58,7 @@
       <el-col :span="24" style="margin-top: 20px">
         <el-button size="small" class="ch-button" style="float: right; margin-top: 4px" @click="downLoad"><i class="el-icon-menu" />&nbsp;选房通知单</el-button>
         <el-button size="small" class="ch-button-danger" style="float: right; margin-top: 4px;margin-right: 10px;" @click="handleDelete"><i class="el-icon-menu" />&nbsp;删除</el-button>
-        <el-button size="small" class="ch-button-export" style="float: right;margin-top: 4px" @click="batchImport()"><i class="el-icon-menu" />&nbsp;批量导入</el-button>
+        <el-button disabled size="small" class="ch-button-export" style="float: right;margin-top: 4px" @click="batchImport()"><i class="el-icon-menu" />&nbsp;批量导入</el-button>
         <el-button size="small" class="ch-button-add" style="float: right; margin-right: 10px; margin-top: 4px" @click="handleAdd()"><i class="el-icon-menu" />&nbsp;新增</el-button>
         <el-button size="small" class="ch-button" style="float: right; margin-top: 4px" @click="handleSearch()"><i class="el-icon-menu" />&nbsp;查询</el-button>
         <el-button size="small" class="ch-button-warning" style="float: right;margin-top: 4px" @click="handleReset()"><i class="el-icon-menu" />&nbsp;重置</el-button>

+ 30 - 9
src/views/transactionRecord/collectionRecordIndex.vue

@@ -103,9 +103,10 @@
     <el-row class="handle-box" style="margin-bottom: 10px">
       <el-col :span="24" style="margin-top: 20px">
         <el-button size="small" class="ch-button-export" style="float: right" @click="handleExcel"><i class="el-icon-menu" />&nbsp;导出EXCEL</el-button>
-
         <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
         <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
+        <el-button type="primary" size="small" style="float: right" @click="handleAdd()">&nbsp;NCC提交</el-button>
+
       </el-col>
     </el-row>
     <el-row class="handle-box">
@@ -148,15 +149,30 @@
       </el-col>
     </el-row>
 
+    <!-- ncc提交 -->
+    <el-dialog
+      :title="dialogTitle"
+      :visible.sync="dialogVisible"
+      width="50%"
+      top="50px"
+      :close-on-press-escape="false"
+      :close-on-click-modal="false"
+      append-to-body
+      @close="handleClose"
+    >
+      <ncc-submit-index v-if="dialogVisible" ref="nccSubmit" @editClose="handleClose" />
+    </el-dialog>
+
   </div>
 </template>
 <script>
 import Base from '@/views/base/base'
 import BaseData from '@/views/base/baseData'
+import NccSubmitIndex from '@/views/transactionRecord/nccSubmitIndex.vue'
 
 export default {
     name: 'CollectionRecordIndex',
-    components: { },
+    components: { NccSubmitIndex },
     mixins: [Base, BaseData],
     props: {
         fromAddress: {
@@ -174,7 +190,7 @@ export default {
             loading: false,
             // 弹框相关
             dialogVisible: false,
-            dialogTitle: '新增',
+            dialogTitle: '',
             selectedRows: [],
             selectId: '',
             options: []
@@ -239,9 +255,17 @@ export default {
             item.ncSubmitStatusStr = item.ncSubmitStatus == '1' ? '已提交' : '未提交'
             return item
         },
-        /* 编辑*/
-        handleEdit: function(val) {
-
+        /* ncc提交*/
+        handleAdd: function(val) {
+            this.dialogTitle = 'NCC提交'
+            this.dialogVisible = true
+            this.$nextTick(() => {
+                this.$refs.nccSubmit.initData('收款')
+            })
+        },
+        handleClose(refresh) {
+            this.dialogVisible = false
+            this.getData()
         },
         handleView(val) {
 
@@ -283,9 +307,6 @@ export default {
                 this.$outputXlsxFile(this.OutData, OutSize, fileName)
             })
         },
-        cancel: function() {
-            this.dialogVisible = false
-        },
         baseRequest(opUrl, postData) {
             return this.$channel.globeRequest('TransactionRecordController', opUrl, postData, 'project')
         },

+ 117 - 0
src/views/transactionRecord/nccSubmitIndex.vue

@@ -0,0 +1,117 @@
+<template>
+  <div>
+    <el-form ref="form" :model="form" style="width: 100%;padding: 5px" :rules="rules">
+      <el-row>
+        <el-col style="padding-bottom: 10px">
+          <el-card shadow="always" style="padding: 15px 5px 5px 15px">
+            <el-row>
+              <el-col :span="5" class="col-txt"><span>请选择导出时段</span></el-col>
+              <el-col :span="18" class="col-input">
+                <el-form-item>
+                  <el-date-picker
+                    v-model="datePicker"
+                    type="daterange"
+                    range-separator="-"
+                    value-format="yyyy-MM-dd"
+                    start-placeholder="开始日期"
+                    end-placeholder="结束日期"
+                    @change="dateChange"
+                  />
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-card>
+        </el-col>
+      </el-row>
+    </el-form>
+    <div slot="footer" style="text-align: right">
+      <el-button @click="handleClose">关 闭</el-button>
+      <el-button type="primary" :loading="loading" @click.native="confirmSubmit()">提 交</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+    name: 'NccSubmitIndex',
+    data() {
+        return {
+            loading: false,
+            form: {
+                collectionDateFrom: '',
+                collectionDateTo: ''
+            },
+            rules: {
+                dateStart: [{ required: true, message: '请选择导出时段', trigger: 'change' }]
+            },
+            datePicker: []
+        }
+    },
+    methods: {
+        initData(data) {
+            console.log('提交类型', data)
+            this.form.type = data
+        },
+        handleClose() {
+            this.$emit('editClose')
+        },
+        dateChange() {
+            if (this.datePicker && this.datePicker.length) {
+                this.form.collectionDateFrom = this.datePicker[0]
+                this.form.collectionDateTo = this.datePicker[1]
+            } else {
+                this.form.collectionDateFrom = ''
+                this.form.collectionDateTo = ''
+            }
+        },
+        confirmSubmit() {
+            const _this = this
+            if (!this.form.collectionDateFrom || !this.form.collectionDateTo) {
+                _this.$message({
+                    message: '请选择时间段',
+                    type: 'warning'
+                })
+                return
+            }
+            let soaUrl = ''
+            if (_this.form.type === '收款') {
+                soaUrl = 'collectionRecordSubmit'
+            }
+            if (_this.form.type === '退款') {
+                soaUrl = 'refundRecordSubmit'
+            }
+            _this.loading = true
+            const postData = Object.assign({}, _this.form)
+            this.baseRequest(soaUrl, postData).then(res => {
+                if (res.data.code === 200) {
+                    _this.$message({
+                        message: '提交成功',
+                        type: 'success'
+                    })
+                    _this.handleClose()
+                } else {
+                    _this.$message({
+                        message: res.msg,
+                        type: 'warning'
+                    })
+                }
+                _this.loading = false
+            }).catch(err => {
+                _this.$message({
+                    message: err,
+                    type: 'warning'
+                })
+                _this.loading = false
+            })
+        },
+        baseRequest(opUrl, postData) {
+            return this.$channel.globeRequest('TransactionRecordController', opUrl, postData, 'project')
+        }
+    }
+
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 30 - 6
src/views/transactionRecord/refundRecordIndex.vue

@@ -104,6 +104,7 @@
         <el-button size="small" class="ch-button-export" style="float: right" @click="handleExcel"><i class="el-icon-menu" />&nbsp;导出EXCEL</el-button>
         <el-button class="ch-button-warning" size="small" style="float: right" @click="handleReset()"><i class="el-icon-search" />&nbsp;重置</el-button>
         <el-button class="ch-button" size="small" style="float: right" @click="handleSearch()"><i class="el-icon-search" />&nbsp;查询</el-button>
+        <el-button type="primary" size="small" style="float: right" @click="handleAdd()">&nbsp;NCC提交</el-button>
       </el-col>
     </el-row>
     <el-row class="handle-box">
@@ -146,15 +147,30 @@
       </el-col>
     </el-row>
 
+    <!-- ncc提交 -->
+    <el-dialog
+      :title="dialogTitle"
+      :visible.sync="dialogVisible"
+      width="50%"
+      top="50px"
+      :close-on-press-escape="false"
+      :close-on-click-modal="false"
+      append-to-body
+      @close="handleClose"
+    >
+      <ncc-submit-index v-if="dialogVisible" ref="nccSubmit" @editClose="handleClose" />
+    </el-dialog>
+
   </div>
 </template>
 <script>
 import Base from '@/views/base/base'
 import BaseData from '@/views/base/baseData'
+import NccSubmitIndex from '@/views/transactionRecord/nccSubmitIndex.vue'
 
 export default {
     name: 'RefundRecordIndexVue',
-    components: { },
+    components: { NccSubmitIndex },
     mixins: [Base, BaseData],
     props: {
         fromAddress: {
@@ -206,7 +222,7 @@ export default {
                 })
                 this.search.discIds = data.join(',')
             }
-            this.baseRequest('collectionRecord', this.search).then((res) => {
+            this.baseRequest('refundRecord', this.search).then((res) => {
                 if (res.data.rows) {
                     res.data.rows.forEach(function(item) {
                         const json = _this.getItemJson(item)
@@ -237,9 +253,17 @@ export default {
             item.ncSubmitStatusStr = item.ncSubmitStatus == '1' ? '已提交' : '未提交'
             return item
         },
-        /* 编辑*/
-        handleEdit: function(val) {
-
+        /* ncc提交*/
+        handleAdd: function(val) {
+            this.dialogTitle = 'NCC提交'
+            this.dialogVisible = true
+            this.$nextTick(() => {
+                this.$refs.nccSubmit.initData('收款')
+            })
+        },
+        handleClose(refresh) {
+            this.dialogVisible = false
+            this.getData()
         },
         handleView(val) {
 
@@ -256,7 +280,7 @@ export default {
                 '可售状态', '已售状态']
             this.OutData.push(title)
             const temp = []
-            this.baseRequest('collectionRecordExcelList', _this.search).then(res => {
+            this.baseRequest('refundRecordListAll', _this.search).then(res => {
                 const data = res.data
                 data.data.forEach(function(item) {
                     const json = _this.getItemJson(item)