给全部单据的查看界面增加反审核的按钮

This commit is contained in:
季圣华
2022-11-07 22:55:47 +08:00
parent 2a1db9bbf5
commit 0c1e2edd88
23 changed files with 79 additions and 24 deletions

View File

@@ -126,7 +126,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<allocation-out-modal ref="modalForm" @ok="modalFormOk"></allocation-out-modal> <allocation-out-modal ref="modalForm" @ok="modalFormOk"></allocation-out-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -126,7 +126,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<assemble-modal ref="modalForm" @ok="modalFormOk"></assemble-modal> <assemble-modal ref="modalForm" @ok="modalFormOk"></assemble-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -126,7 +126,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<disassemble-modal ref="modalForm" @ok="modalFormOk"></disassemble-modal> <disassemble-modal ref="modalForm" @ok="modalFormOk"></disassemble-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -140,7 +140,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<other-in-modal ref="modalForm" @ok="modalFormOk"></other-in-modal> <other-in-modal ref="modalForm" @ok="modalFormOk"></other-in-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -140,7 +140,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<other-out-modal ref="modalForm" @ok="modalFormOk"></other-out-modal> <other-out-modal ref="modalForm" @ok="modalFormOk"></other-out-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -149,7 +149,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<purchase-back-modal ref="modalForm" @ok="modalFormOk"></purchase-back-modal> <purchase-back-modal ref="modalForm" @ok="modalFormOk"></purchase-back-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -151,7 +151,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<purchase-in-modal ref="modalForm" @ok="modalFormOk"></purchase-in-modal> <purchase-in-modal ref="modalForm" @ok="modalFormOk"></purchase-in-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -131,7 +131,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<purchase-order-modal ref="modalForm" @ok="modalFormOk"></purchase-order-modal> <purchase-order-modal ref="modalForm" @ok="modalFormOk"></purchase-order-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -149,7 +149,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<retail-back-modal ref="modalForm" @ok="modalFormOk"></retail-back-modal> <retail-back-modal ref="modalForm" @ok="modalFormOk"></retail-back-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -144,7 +144,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<retail-out-modal ref="modalForm" @ok="modalFormOk"></retail-out-modal> <retail-out-modal ref="modalForm" @ok="modalFormOk"></retail-out-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -150,7 +150,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<sale-back-modal ref="modalForm" @ok="modalFormOk"></sale-back-modal> <sale-back-modal ref="modalForm" @ok="modalFormOk"></sale-back-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -137,7 +137,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<sale-order-modal ref="modalForm" @ok="modalFormOk"></sale-order-modal> <sale-order-modal ref="modalForm" @ok="modalFormOk"></sale-order-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -152,7 +152,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<sale-out-modal ref="modalForm" @ok="modalFormOk"></sale-out-modal> <sale-out-modal ref="modalForm" @ok="modalFormOk"></sale-out-modal>
<bill-detail ref="modalDetail"></bill-detail> <bill-detail ref="modalDetail" @ok="modalFormOk"></bill-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -28,6 +28,8 @@
<a-button v-if="billType === '盘点复盘'" v-print="'#stockCheckReplayPrint'">普通打印</a-button> <a-button v-if="billType === '盘点复盘'" v-print="'#stockCheckReplayPrint'">普通打印</a-button>
<!--导出Excel--> <!--导出Excel-->
<a-button v-if="billType === '采购订单'||billType === '销售订单'" @click="exportExcel()">导出</a-button> <a-button v-if="billType === '采购订单'||billType === '销售订单'" @click="exportExcel()">导出</a-button>
<!--反审核-->
<a-button v-if="isCanBackCheck && model.status==='1'" @click="handleBackCheck()">反审核</a-button>
<a-button key="back" @click="handleCancel">取消</a-button> <a-button key="back" @click="handleCancel">取消</a-button>
</template> </template>
<a-form :form="form"> <a-form :form="form">
@@ -976,7 +978,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { getAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import { findBillDetailByNumber, findFinancialDetailByNumber, getPlatformConfigByKey, getCurrentSystemConfig} from '@/api/api' import { findBillDetailByNumber, findFinancialDetailByNumber, getPlatformConfigByKey, getCurrentSystemConfig} from '@/api/api'
import { getMpListShort, openDownloadDialog, sheet2blob } from "@/utils/util" import { getMpListShort, openDownloadDialog, sheet2blob } from "@/utils/util"
import BillPrintIframe from './BillPrintIframe' import BillPrintIframe from './BillPrintIframe'
@@ -996,6 +998,7 @@
width: '1600px', width: '1600px',
visible: false, visible: false,
model: {}, model: {},
isCanBackCheck: true,
billType: '', billType: '',
billPrintFlag: false, billPrintFlag: false,
fileList: [], fileList: [],
@@ -1019,7 +1022,8 @@
loading: false, loading: false,
dataSource: [], dataSource: [],
url: { url: {
detailList: '/depotItem/getDetailList' detailList: '/depotItem/getDetailList',
batchSetStatusUrl: "/depotHead/batchSetStatus"
}, },
//表头 //表头
columns:[], columns:[],
@@ -1463,6 +1467,27 @@
this.loading = false this.loading = false
}) })
}, },
handleBackCheck() {
let that = this
this.$confirm({
title: "确认操作",
content: "是否对该单据进行反审核?",
onOk: function () {
that.loading = true
postAction(that.url.batchSetStatusUrl, {status: '0', ids: that.model.id}).then((res) => {
if(res.code === 200){
that.$emit('ok')
that.loading = false
that.close()
} else {
that.$message.warning(res.data.message)
that.loading = false
}
}).finally(() => {
})
}
})
},
handleCancel() { handleCancel() {
this.close() this.close()
}, },

View File

@@ -72,6 +72,9 @@ export const BillListMixin = {
} }
}, },
myHandleDetail(record, type) { myHandleDetail(record, type) {
if(this.btnEnableList.indexOf(7)===-1) {
this.$refs.modalDetail.isCanBackCheck = false
}
this.handleDetail(record, type); this.handleDetail(record, type);
}, },
handleApprove(record) { handleApprove(record) {

View File

@@ -129,7 +129,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<advance-in-modal ref="modalForm" @ok="modalFormOk"></advance-in-modal> <advance-in-modal ref="modalForm" @ok="modalFormOk"></advance-in-modal>
<financial-detail ref="modalDetail"></financial-detail> <financial-detail ref="modalDetail" @ok="modalFormOk"></financial-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -129,7 +129,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<giro-modal ref="modalForm" @ok="modalFormOk"></giro-modal> <giro-modal ref="modalForm" @ok="modalFormOk"></giro-modal>
<financial-detail ref="modalDetail"></financial-detail> <financial-detail ref="modalDetail" @ok="modalFormOk"></financial-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -138,7 +138,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<item-in-modal ref="modalForm" @ok="modalFormOk"></item-in-modal> <item-in-modal ref="modalForm" @ok="modalFormOk"></item-in-modal>
<financial-detail ref="modalDetail"></financial-detail> <financial-detail ref="modalDetail" @ok="modalFormOk"></financial-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -138,7 +138,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<item-out-modal ref="modalForm" @ok="modalFormOk"></item-out-modal> <item-out-modal ref="modalForm" @ok="modalFormOk"></item-out-modal>
<financial-detail ref="modalDetail"></financial-detail> <financial-detail ref="modalDetail" @ok="modalFormOk"></financial-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -139,7 +139,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<money-in-modal ref="modalForm" @ok="modalFormOk"></money-in-modal> <money-in-modal ref="modalForm" @ok="modalFormOk"></money-in-modal>
<financial-detail ref="modalDetail"></financial-detail> <financial-detail ref="modalDetail" @ok="modalFormOk"></financial-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -139,7 +139,7 @@
<!-- table区域-end --> <!-- table区域-end -->
<!-- 表单区域 --> <!-- 表单区域 -->
<money-out-modal ref="modalForm" @ok="modalFormOk"></money-out-modal> <money-out-modal ref="modalForm" @ok="modalFormOk"></money-out-modal>
<financial-detail ref="modalDetail"></financial-detail> <financial-detail ref="modalDetail" @ok="modalFormOk"></financial-detail>
</a-card> </a-card>
</a-col> </a-col>
</a-row> </a-row>

View File

@@ -17,6 +17,8 @@
<a-button v-if="financialType === '支出'" v-print="'#itemOutPrint'" ghost type="primary">打印</a-button> <a-button v-if="financialType === '支出'" v-print="'#itemOutPrint'" ghost type="primary">打印</a-button>
<a-button v-if="financialType === '收款'" v-print="'#moneyInPrint'" ghost type="primary">打印</a-button> <a-button v-if="financialType === '收款'" v-print="'#moneyInPrint'" ghost type="primary">打印</a-button>
<a-button v-if="financialType === '付款'" v-print="'#moneyOutPrint'" ghost type="primary">打印</a-button> <a-button v-if="financialType === '付款'" v-print="'#moneyOutPrint'" ghost type="primary">打印</a-button>
<!--反审核-->
<a-button v-if="isCanBackCheck && model.status==='1'" @click="handleBackCheck()">反审核</a-button>
<a-button key="back" @click="handleCancel">取消</a-button> <a-button key="back" @click="handleCancel">取消</a-button>
</template> </template>
<a-form :form="form"> <a-form :form="form">
@@ -396,8 +398,7 @@
</template> </template>
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { getAction } from '@/api/manage' import { getAction, postAction } from '@/api/manage'
import { findBillDetailByNumber} from '@/api/api'
import JUpload from '@/components/jeecg/JUpload' import JUpload from '@/components/jeecg/JUpload'
export default { export default {
name: 'FinancialDetail', name: 'FinancialDetail',
@@ -410,6 +411,7 @@
width: '1600px', width: '1600px',
visible: false, visible: false,
model: {}, model: {},
isCanBackCheck: true,
financialType: '', financialType: '',
fileList: [], fileList: [],
labelCol: { labelCol: {
@@ -424,7 +426,8 @@
loading: false, loading: false,
dataSource: [], dataSource: [],
url: { url: {
detailList: '/accountItem/getDetailList' detailList: '/accountItem/getDetailList',
batchSetStatusUrl: '/accountHead/batchSetStatus'
}, },
advanceInColumns: [ advanceInColumns: [
{ title: '账户名称',dataIndex: 'accountName',width: '30%'}, { title: '账户名称',dataIndex: 'accountName',width: '30%'},
@@ -497,6 +500,27 @@
this.loading = false this.loading = false
}) })
}, },
handleBackCheck() {
let that = this
this.$confirm({
title: "确认操作",
content: "是否对该单据进行反审核?",
onOk: function () {
that.loading = true
postAction(that.url.batchSetStatusUrl, {status: '0', ids: that.model.id}).then((res) => {
if(res.code === 200){
that.$emit('ok')
that.loading = false
that.close()
} else {
that.$message.warning(res.data.message)
that.loading = false
}
}).finally(() => {
})
}
})
},
handleCancel() { handleCancel() {
this.close() this.close()
}, },

View File

@@ -56,6 +56,9 @@ export const FinancialListMixin = {
} }
}, },
myHandleDetail(record, type) { myHandleDetail(record, type) {
if(this.btnEnableList.indexOf(7)===-1) {
this.$refs.modalDetail.isCanBackCheck = false
}
this.handleDetail(record, type); this.handleDetail(record, type);
}, },
handleApprove(record) { handleApprove(record) {