调整审核界面的提交按钮的展示逻辑

This commit is contained in:
jishenghua
2024-05-14 00:14:53 +08:00
parent 0eb33ad679
commit bbe5dc6172
23 changed files with 56 additions and 24 deletions

View File

@@ -14,6 +14,7 @@
cancelText="关闭"> cancelText="关闭">
<template slot="footer"> <template slot="footer">
<a-button key="back" @click="handleCancel">取消</a-button> <a-button key="back" @click="handleCancel">取消</a-button>
<a-button type="primary" :loading="loading" @click="handleSubmit">确认提交</a-button>
</template> </template>
<a-form :form="form"> <a-form :form="form">
<template> <template>
@@ -36,6 +37,7 @@
<script> <script>
import pick from 'lodash.pick' import pick from 'lodash.pick'
import {mixinDevice} from '@/utils/mixin' import {mixinDevice} from '@/utils/mixin'
import { postAction } from '@api/manage'
export default { export default {
name: 'WorkflowIframe', name: 'WorkflowIframe',
mixins: [mixinDevice], mixins: [mixinDevice],
@@ -49,15 +51,19 @@
height: "", height: "",
model: {}, model: {},
form: this.$form.createForm(this), form: this.$form.createForm(this),
loading: false loading: false,
} }
}, },
created () { created () {
}, },
methods: { methods: {
show(record, sendWorkflowUrl, height) { show(record, sendWorkflowUrl, billNo, type, height) {
this.height = height this.height = height
this.sendWorkflowUrl = sendWorkflowUrl this.sendWorkflowUrl = sendWorkflowUrl
//单号
this.billNo = billNo
//1-进销存单据 2-财务单据 3-生产单据
this.bigType = type
this.visible = true this.visible = true
this.modalStyle = 'top:20%; height: 55%;' this.modalStyle = 'top:20%; height: 55%;'
this.model = Object.assign({}, record) this.model = Object.assign({}, record)
@@ -65,6 +71,26 @@
this.form.setFieldsValue(pick(this.model,'id')) this.form.setFieldsValue(pick(this.model,'id'))
}); });
}, },
handleSubmit() {
const that = this
let formData = {}
formData.bigType = this.bigType
formData.billNo = this.billNo
that.loading = true
postAction('/api/plugin/workflow/workflowTask/add', formData).then((res)=>{
if(res.code === 200){
that.$message.success('提交成功')
that.close()
setTimeout(function (){
that.$emit('ok')
},2000)
}else{
that.$message.warning(res.data.message)
}
}).finally(() => {
that.loading = false
})
},
handleCancel() { handleCancel() {
this.close() this.close()
}, },

View File

@@ -369,6 +369,9 @@ export const BillModalMixin = {
accountModalFormOk() { accountModalFormOk() {
this.initAccount(1) this.initAccount(1)
}, },
workflowModalFormOk() {
this.close()
},
onAdded(event) { onAdded(event) {
const { row, target } = event const { row, target } = event
target.setValues([{rowKey: row.id, values: {operNumber:0}}]) target.setValues([{rowKey: row.id, values: {operNumber:0}}])
@@ -970,7 +973,7 @@ export const BillModalMixin = {
getPlatformConfigByKey({ "platformKey": "send_workflow_url" }).then((res) => { getPlatformConfigByKey({ "platformKey": "send_workflow_url" }).then((res) => {
if (res && res.code === 200) { if (res && res.code === 200) {
let sendWorkflowUrl = res.data.platformValue + '?no=' + this.model.number + '&type=1' let sendWorkflowUrl = res.data.platformValue + '?no=' + this.model.number + '&type=1'
this.$refs.modalWorkflow.show(this.model, sendWorkflowUrl, 320) this.$refs.modalWorkflow.show(this.model, sendWorkflowUrl, this.model.number, 1, 320)
this.$refs.modalWorkflow.title = "发起流程" this.$refs.modalWorkflow.title = "发起流程"
} }
}) })

View File

@@ -85,7 +85,7 @@
</a-spin> </a-spin>
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal> <depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -84,7 +84,7 @@
</a-spin> </a-spin>
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal> <depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -84,7 +84,7 @@
</a-spin> </a-spin>
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal> <depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -110,7 +110,7 @@
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal> <import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
<wait-bill-list ref="waitBillList" @ok="waitBillListOk"></wait-bill-list> <wait-bill-list ref="waitBillList" @ok="waitBillListOk"></wait-bill-list>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -110,7 +110,7 @@
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal> <import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
<wait-bill-list ref="waitBillList" @ok="waitBillListOk"></wait-bill-list> <wait-bill-list ref="waitBillList" @ok="waitBillListOk"></wait-bill-list>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -92,7 +92,7 @@
</a-spin> </a-spin>
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal> <import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
<history-bill-list ref="historyBillListModalForm"></history-bill-list> <history-bill-list ref="historyBillListModalForm"></history-bill-list>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -163,7 +163,7 @@
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal> <depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -190,7 +190,7 @@
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<history-bill-list ref="historyBillListModalForm"></history-bill-list> <history-bill-list ref="historyBillListModalForm"></history-bill-list>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>

View File

@@ -176,7 +176,7 @@
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list> <link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-bill-list>
<history-bill-list ref="historyBillListModalForm"></history-bill-list> <history-bill-list ref="historyBillListModalForm"></history-bill-list>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -152,7 +152,7 @@
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal> <depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -166,7 +166,7 @@
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal> <depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -166,7 +166,7 @@
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal> <depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -168,7 +168,7 @@
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal> <customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<history-bill-list ref="historyBillListModalForm"></history-bill-list> <history-bill-list ref="historyBillListModalForm"></history-bill-list>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -205,7 +205,7 @@
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot> <batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
<history-bill-list ref="historyBillListModalForm"></history-bill-list> <history-bill-list ref="historyBillListModalForm"></history-bill-list>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -203,6 +203,9 @@ export const FinancialModalMixin = {
personModalFormOk() { personModalFormOk() {
this.initPerson() this.initPerson()
}, },
workflowModalFormOk() {
this.close()
},
//单元值改变一个字符就触发一次 //单元值改变一个字符就触发一次
onValueChange(event) { onValueChange(event) {
let that = this let that = this
@@ -308,7 +311,7 @@ export const FinancialModalMixin = {
getPlatformConfigByKey({ "platformKey": "send_workflow_url" }).then((res) => { getPlatformConfigByKey({ "platformKey": "send_workflow_url" }).then((res) => {
if (res && res.code === 200) { if (res && res.code === 200) {
let sendWorkflowUrl = res.data.platformValue + '?no=' + this.model.billNo + '&type=2' let sendWorkflowUrl = res.data.platformValue + '?no=' + this.model.billNo + '&type=2'
this.$refs.modalWorkflow.show(this.model, sendWorkflowUrl, 320) this.$refs.modalWorkflow.show(this.model, sendWorkflowUrl, this.model.billNo, 2, 320)
this.$refs.modalWorkflow.title = "发起流程" this.$refs.modalWorkflow.title = "发起流程"
} }
}) })

View File

@@ -100,7 +100,7 @@
</a-form> </a-form>
</a-spin> </a-spin>
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal> <person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -104,7 +104,7 @@
</a-spin> </a-spin>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal> <person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -112,7 +112,7 @@
</a-spin> </a-spin>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal> <person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -112,7 +112,7 @@
</a-spin> </a-spin>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal> <person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -142,7 +142,7 @@
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal> <customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal> <person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>

View File

@@ -142,7 +142,7 @@
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal> <vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal> <account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal> <person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
<workflow-iframe ref="modalWorkflow"></workflow-iframe> <workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
</j-modal> </j-modal>
</template> </template>
<script> <script>