|
@@ -1,10 +1,10 @@
|
|
|
<template>
|
|
|
- <div class="salesReturnEdit-wrap">
|
|
|
+ <div class="accountState-wrap">
|
|
|
<a-spin :spinning="spinning" tip="Loading...">
|
|
|
- <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back">
|
|
|
+ <a-page-header :ghost="false" :backIcon="false" class="accountState-back">
|
|
|
<!-- 自定义的二级文字标题 -->
|
|
|
<template slot="subTitle">
|
|
|
- <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack">
|
|
|
+ <a id="accountState-back-btn" href="javascript:;" @click="handleBack">
|
|
|
<a-icon type="left" />
|
|
|
返回列表
|
|
|
</a>
|
|
@@ -15,7 +15,7 @@
|
|
|
</a-button>
|
|
|
</template>
|
|
|
</a-page-header>
|
|
|
- <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
|
|
|
+ <a-card size="small" :bordered="false" class="accountState-cont">
|
|
|
<queryPart
|
|
|
ref="partQuery"
|
|
|
:newLoading="isInster"
|
|
@@ -25,7 +25,7 @@
|
|
|
@add="saveProduct"
|
|
|
@bachAdd="saveMoreProduct"></queryPart>
|
|
|
</a-card>
|
|
|
- <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
|
|
|
+ <a-card size="small" :bordered="false" class="accountState-cont">
|
|
|
<a-alert style="margin-bottom: 10px;" type="info" v-if="countData">
|
|
|
<div slot="message" class="total-bar">
|
|
|
<div>
|
|
@@ -125,7 +125,7 @@
|
|
|
:disabled="spinning"
|
|
|
type="primary"
|
|
|
class="button-primary"
|
|
|
- @click="handleSubmit"
|
|
|
+ @click="handlePreSubmit"
|
|
|
id="salesReturn-handleSubmit">提交</a-button>
|
|
|
</div>
|
|
|
<!-- 编辑基础信息弹窗 -->
|
|
@@ -138,13 +138,35 @@
|
|
|
:itemSn="verifyAccountBillSn"
|
|
|
:dealerSn="dealerSn"
|
|
|
@cancel="baseModal=false"
|
|
|
- @ok="hanldAudit"></baseTzModal>
|
|
|
+ @ok="hanldOk"></baseTzModal>
|
|
|
+ <!-- 提交前弹框 -->
|
|
|
+ <commonModal
|
|
|
+ modalTit="提示"
|
|
|
+ width="500px"
|
|
|
+ okText="提交"
|
|
|
+ :openModal="showTipModal"
|
|
|
+ @cancel="canselModal"
|
|
|
+ @ok="handleSubmit">
|
|
|
+ <div class="tip-list" v-if="detailData">
|
|
|
+ <div><span>经销商:</span>{{ detailData.dealerName }}</div>
|
|
|
+ <div><span>时间区间:</span>{{ detailData.bizFirstDate }}~{{ detailData.bizLastDate }}</div>
|
|
|
+ <div><span>期初余额:</span>{{ toThousands(detailData.beginBalance) }}</div>
|
|
|
+ <div><span>借方合计:</span>{{ toThousands(detailData.debitAmount) }}</div>
|
|
|
+ <div><span>贷方合计:</span>{{ toThousands(detailData.creditAmount) }}</div>
|
|
|
+ <div><span>余额:</span>{{ toThousands(detailData.totalAmount) }}</div>
|
|
|
+ <div>
|
|
|
+ <span style="width:70px;">备注:</span>
|
|
|
+ <a-textarea :rows="6" :maxLength="300" placeholder="请输入备注(最多300个字符)" v-model="detailData.remarks"></a-textarea>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </commonModal>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
+import commonModal from '@/views/common/commonModal.vue'
|
|
|
import queryPart from './queryPart.vue'
|
|
|
import baseModal from './baseModal.vue'
|
|
|
import baseTzModal from '../manualEntryForm/baseModal.vue'
|
|
@@ -168,7 +190,8 @@ export default {
|
|
|
queryPart,
|
|
|
baseModal,
|
|
|
rangeDate,
|
|
|
- baseTzModal
|
|
|
+ baseTzModal,
|
|
|
+ commonModal
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -226,7 +249,8 @@ export default {
|
|
|
detailData: null, // 基础信息数据
|
|
|
addMoreLoading: false, // 批量添加动画
|
|
|
verifyAccountBillSn: undefined, // 单据sn
|
|
|
- itemSn: null
|
|
|
+ itemSn: null,
|
|
|
+ showTipModal: false
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -263,6 +287,9 @@ export default {
|
|
|
handleBack () {
|
|
|
this.$router.push({ name: `accountStatementList` })
|
|
|
},
|
|
|
+ canselModal () {
|
|
|
+ this.showTipModal = false
|
|
|
+ },
|
|
|
// 创建时间 change
|
|
|
dateChange (date) {
|
|
|
this.productForm.beginDate = date[0] ? date[0] : ''
|
|
@@ -273,9 +300,8 @@ export default {
|
|
|
this.itemSn = null
|
|
|
this.baseModal = true
|
|
|
},
|
|
|
- // 打开审核提交弹框
|
|
|
- hanldAudit (data) {
|
|
|
- this.$message.success('提交成功')
|
|
|
+ // 调账成功
|
|
|
+ hanldOk (data) {
|
|
|
this.resetTable(false)
|
|
|
},
|
|
|
// 删除所选产品
|
|
@@ -329,10 +355,12 @@ export default {
|
|
|
},
|
|
|
// 修改备注
|
|
|
changeRemarks (record) {
|
|
|
- this.spinning = true
|
|
|
- verifyAcountBillDetailModify({ id: record.id, remarks: record.remarks }).then(res => {
|
|
|
- this.spinning = false
|
|
|
- })
|
|
|
+ if (record.remarks && record.remarks.length > 0) {
|
|
|
+ this.spinning = true
|
|
|
+ verifyAcountBillDetailModify({ id: record.id, remarks: record.remarks }).then(res => {
|
|
|
+ this.spinning = false
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 单个添加单据
|
|
|
saveProduct (row) {
|
|
@@ -384,7 +412,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
// 提交
|
|
|
- async handleSubmit () {
|
|
|
+ async handlePreSubmit () {
|
|
|
this.spinning = true
|
|
|
const ret = await verifyAcountBillSubmitCheck({ sn: this.verifyAccountBillSn })
|
|
|
this.spinning = false
|
|
@@ -392,14 +420,7 @@ export default {
|
|
|
const snList = ret.data.length ? ret.data.map(item => item.detailSn) : []
|
|
|
// 通过校验提交
|
|
|
if (noList.length == 0) {
|
|
|
- this.spinning = true
|
|
|
- verifyAcountBillSubmit({ sn: this.verifyAccountBillSn }).then(res => {
|
|
|
- if (res.status == 200) {
|
|
|
- this.handleBack()
|
|
|
- this.$message.success(res.message)
|
|
|
- }
|
|
|
- this.spinning = false
|
|
|
- })
|
|
|
+ this.showTipModal = true
|
|
|
} else {
|
|
|
// 提示不能参与的单子
|
|
|
const _this = this
|
|
@@ -414,6 +435,17 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 提交单据
|
|
|
+ handleSubmit () {
|
|
|
+ this.spinning = true
|
|
|
+ verifyAcountBillSubmit({ verifyAccountBillSn: this.verifyAccountBillSn, remarks: this.detailData.remarks }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ this.handleBack()
|
|
|
+ this.$message.success(res.message)
|
|
|
+ }
|
|
|
+ this.spinning = false
|
|
|
+ })
|
|
|
+ },
|
|
|
getChooseList () {
|
|
|
this.$refs.partQuery.pageInit()
|
|
|
},
|
|
@@ -460,7 +492,20 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
-.salesReturnEdit-wrap {
|
|
|
+.tip-list{
|
|
|
+ padding: 10px;
|
|
|
+ > div{
|
|
|
+ display: flex;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ > span{
|
|
|
+ margin-right: 6px;
|
|
|
+ text-align: right;
|
|
|
+ display: block;
|
|
|
+ width: 60px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+.accountState-wrap {
|
|
|
position: relative;
|
|
|
height: 100%;
|
|
|
padding-bottom: 51px;
|
|
@@ -469,7 +514,7 @@ export default {
|
|
|
overflow-y: scroll;
|
|
|
height: 100%;
|
|
|
}
|
|
|
- .salesReturnEdit-cont {
|
|
|
+ .accountState-cont {
|
|
|
margin-top: 6px;
|
|
|
.ant-divider-horizontal {
|
|
|
margin: 10px 0 24px;
|