调整审核界面的提交按钮的展示逻辑
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
cancelText="关闭">
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="handleCancel">取消</a-button>
|
||||
<a-button type="primary" :loading="loading" @click="handleSubmit">确认提交</a-button>
|
||||
</template>
|
||||
<a-form :form="form">
|
||||
<template>
|
||||
@@ -36,6 +37,7 @@
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
import { postAction } from '@api/manage'
|
||||
export default {
|
||||
name: 'WorkflowIframe',
|
||||
mixins: [mixinDevice],
|
||||
@@ -49,15 +51,19 @@
|
||||
height: "",
|
||||
model: {},
|
||||
form: this.$form.createForm(this),
|
||||
loading: false
|
||||
loading: false,
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
show(record, sendWorkflowUrl, height) {
|
||||
show(record, sendWorkflowUrl, billNo, type, height) {
|
||||
this.height = height
|
||||
this.sendWorkflowUrl = sendWorkflowUrl
|
||||
//单号
|
||||
this.billNo = billNo
|
||||
//1-进销存单据 2-财务单据 3-生产单据
|
||||
this.bigType = type
|
||||
this.visible = true
|
||||
this.modalStyle = 'top:20%; height: 55%;'
|
||||
this.model = Object.assign({}, record)
|
||||
@@ -65,6 +71,26 @@
|
||||
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() {
|
||||
this.close()
|
||||
},
|
||||
|
||||
@@ -369,6 +369,9 @@ export const BillModalMixin = {
|
||||
accountModalFormOk() {
|
||||
this.initAccount(1)
|
||||
},
|
||||
workflowModalFormOk() {
|
||||
this.close()
|
||||
},
|
||||
onAdded(event) {
|
||||
const { row, target } = event
|
||||
target.setValues([{rowKey: row.id, values: {operNumber:0}}])
|
||||
@@ -970,7 +973,7 @@ export const BillModalMixin = {
|
||||
getPlatformConfigByKey({ "platformKey": "send_workflow_url" }).then((res) => {
|
||||
if (res && res.code === 200) {
|
||||
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 = "发起流程"
|
||||
}
|
||||
})
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
</a-spin>
|
||||
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
</a-spin>
|
||||
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
</a-spin>
|
||||
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
|
||||
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
|
||||
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
</a-spin>
|
||||
<import-item-modal ref="importItemModalForm" @ok="importItemModalFormOk"></import-item-modal>
|
||||
<history-bill-list ref="historyBillListModalForm"></history-bill-list>
|
||||
<workflow-iframe ref="modalWorkflow"></workflow-iframe>
|
||||
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
|
||||
<history-bill-list ref="historyBillListModalForm"></history-bill-list>
|
||||
<workflow-iframe ref="modalWorkflow"></workflow-iframe>
|
||||
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -176,7 +176,7 @@
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||
<link-bill-list ref="linkBillList" @ok="linkBillListOk"></link-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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -152,7 +152,7 @@
|
||||
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
<depot-modal ref="depotModalForm" @ok="depotModalFormOk"></depot-modal>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||
<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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||
<history-bill-list ref="historyBillListModalForm"></history-bill-list>
|
||||
<workflow-iframe ref="modalWorkflow"></workflow-iframe>
|
||||
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-modal>
|
||||
<batch-set-depot ref="batchSetDepotModalForm" @ok="batchSetDepotModalFormOk"></batch-set-depot>
|
||||
<history-bill-list ref="historyBillListModalForm"></history-bill-list>
|
||||
<workflow-iframe ref="modalWorkflow"></workflow-iframe>
|
||||
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -203,6 +203,9 @@ export const FinancialModalMixin = {
|
||||
personModalFormOk() {
|
||||
this.initPerson()
|
||||
},
|
||||
workflowModalFormOk() {
|
||||
this.close()
|
||||
},
|
||||
//单元值改变一个字符就触发一次
|
||||
onValueChange(event) {
|
||||
let that = this
|
||||
@@ -308,7 +311,7 @@ export const FinancialModalMixin = {
|
||||
getPlatformConfigByKey({ "platformKey": "send_workflow_url" }).then((res) => {
|
||||
if (res && res.code === 200) {
|
||||
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 = "发起流程"
|
||||
}
|
||||
})
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
</a-form>
|
||||
</a-spin>
|
||||
<person-modal ref="personModalForm" @ok="personModalFormOk"></person-modal>
|
||||
<workflow-iframe ref="modalWorkflow"></workflow-iframe>
|
||||
<workflow-iframe ref="modalWorkflow" @ok="workflowModalFormOk"></workflow-iframe>
|
||||
</j-modal>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
</a-spin>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
</a-spin>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
</a-spin>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<customer-modal ref="customerModalForm" @ok="customerModalFormOk"></customer-modal>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
<vendor-modal ref="vendorModalForm" @ok="vendorModalFormOk"></vendor-modal>
|
||||
<account-modal ref="accountModalForm" @ok="accountModalFormOk"></account-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>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
Reference in New Issue
Block a user