|
@@ -5,23 +5,27 @@
|
|
|
:confirmLoading="confirmLoading"
|
|
|
width="86%"
|
|
|
style="top:330px;left:100px;"
|
|
|
+ @cancel="handlecLose"
|
|
|
>
|
|
|
<template slot="footer">
|
|
|
- <a-button >
|
|
|
+ <a-button @click="Submit" :disabled="!(status=='保存'||status=='返单')">
|
|
|
提交
|
|
|
</a-button>
|
|
|
- <a-button >
|
|
|
+ <a-button @click="assign" :disabled="!(status=='提交')">
|
|
|
指派
|
|
|
</a-button>
|
|
|
- <a-button >
|
|
|
+ <a-button @click="Approved" :disabled="!(status=='已指派')">
|
|
|
审批通过
|
|
|
</a-button>
|
|
|
- <a-button >
|
|
|
+ <a-button @click="reject" :disabled="!(status=='已指派')">
|
|
|
驳回
|
|
|
</a-button>
|
|
|
- <a-button >
|
|
|
+ <a-button @click="revokeApproval" :disabled="!(status=='完成')">
|
|
|
撤销审批
|
|
|
</a-button>
|
|
|
+ <a-button @click="handlecLose">
|
|
|
+ 取消
|
|
|
+ </a-button>
|
|
|
</template>
|
|
|
<!-- 面料损耗表 -->
|
|
|
<div id="fabricLossTable" >
|
|
@@ -319,6 +323,10 @@
|
|
|
</div>
|
|
|
<!-- 附件 -->
|
|
|
<attachment-display ref="attachmentDisplay"></attachment-display>
|
|
|
+ <!-- 提交信息 -->
|
|
|
+ <submit-information ref="submitInformation" @close="closeInformation"></submit-information>
|
|
|
+ <!-- 选择指派人员 -->
|
|
|
+ <select-user-modal ref="SelectUserModal" @selectFinished="selectFinished"></select-user-modal>
|
|
|
</div>
|
|
|
</a-modal>
|
|
|
</template>
|
|
@@ -336,12 +344,15 @@
|
|
|
// import iquantityMoreLessModal from '@views/reportForms/fabric-loss-table/iquantityMoreLessModal.vue'
|
|
|
// import otherYarnsInModal from '@views/reportForms/fabric-loss-table/otherYarnsInModal.vue'
|
|
|
import AttachmentDisplay from '@views/reportForms/fabric-loss-table/attachment-display.vue'
|
|
|
+import submitInformation from '@views/cost-allocation-total/modal/submitInformation.vue'
|
|
|
+import SelectUserModal from '@views/cost-allocation-total/modal/SelectUserModal.vue'
|
|
|
import { getFabricLossDatas,saveFabricLossData,fileDetail,deleteFileDetail } from '@api/reportForms/fabric-loss-table'
|
|
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
|
|
import JEllipsis from '@/components/jeecg/JEllipsis'
|
|
|
import JUpload from '@/components/jeecg/JUpload'
|
|
|
import moment from 'moment'
|
|
|
import { runInThisContext } from 'vm'
|
|
|
+import {cancelSubmit } from '@api/document/fabricLossesSummary.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'FabricLossTable', // 面料损耗表
|
|
@@ -362,6 +373,8 @@ export default {
|
|
|
moment,
|
|
|
JUpload,
|
|
|
AttachmentDisplay,
|
|
|
+ submitInformation,
|
|
|
+ SelectUserModal,
|
|
|
accessory2:[],
|
|
|
},
|
|
|
data() {
|
|
@@ -653,6 +666,7 @@ export default {
|
|
|
noteOne: '', // 备注 1
|
|
|
noteTwo: '', // 备注 2
|
|
|
dd:0,
|
|
|
+ status:'',
|
|
|
detailModVis:false
|
|
|
}
|
|
|
},
|
|
@@ -931,6 +945,99 @@ export default {
|
|
|
this.$refs.attachmentDisplay.attachmentData = attachList;
|
|
|
|
|
|
},
|
|
|
+ //提交
|
|
|
+ Submit(){
|
|
|
+ this.$refs.submitInformation.submitInformationModVis = true
|
|
|
+ this.$refs.submitInformation.text = '提交'
|
|
|
+
|
|
|
+ },
|
|
|
+ assign(){
|
|
|
+ this.$refs.SelectUserModal.visible = true
|
|
|
+ },
|
|
|
+ handlecLose(){
|
|
|
+ this.detailModVis = false
|
|
|
+ this.fabricLoss={fabricPoOrderList:[],fabricOMOrderList1:[],fabricOMOrderList2:[],fabricCostAssistList:[],fabricCostClothList:[],fabricCostClothesList:[],fabricCostInvoiceList:[],fabricExpensesList:[],fabricAccidentList:[]}
|
|
|
+ },
|
|
|
+ closeInformation(data,text){
|
|
|
+ var syApprovalHistory={
|
|
|
+ stuta:text,
|
|
|
+ plan_no:this.planNO,
|
|
|
+ processing_opinion:data,
|
|
|
+ processed_by:this.$store.getters.userInfo.realname,
|
|
|
+ processing_time:moment(new Date()).format('YYYY-MM-DD hh:mm:ss'),
|
|
|
+ assigned_by:''
|
|
|
+ }
|
|
|
+ cancelSubmit({planNum:this.planNO,status:this.status,currentState:text,syApprovalHistory:syApprovalHistory}).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success(text+'成功')
|
|
|
+ this.handlecLose()
|
|
|
+ this.$emit('close')
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectFinished(data){
|
|
|
+ var syApprovalHistory={
|
|
|
+ stuta:'已指派',
|
|
|
+ plan_no:this.planNO,
|
|
|
+ processing_opinion:'',
|
|
|
+ processed_by:this.$store.getters.userInfo.realname,
|
|
|
+ processing_time:moment(new Date()).format('YYYY-MM-DD hh:mm:ss'),
|
|
|
+ assigned_by:data
|
|
|
+ }
|
|
|
+ cancelSubmit({planNum:this.planNO,status:this.status,currentState:'已指派',syApprovalHistory:syApprovalHistory}).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('指派成功')
|
|
|
+ this.handlecLose()
|
|
|
+ this.$emit('close')
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ Approved(){
|
|
|
+ var syApprovalHistory={
|
|
|
+ stuta:'完成',
|
|
|
+ plan_no:this.planNO,
|
|
|
+ processing_opinion:'',
|
|
|
+ processed_by:this.$store.getters.userInfo.realname,
|
|
|
+ processing_time:moment(new Date()).format('YYYY-MM-DD hh:mm:ss'),
|
|
|
+ assigned_by:''
|
|
|
+ }
|
|
|
+ cancelSubmit({planNum:this.planNO,status:this.status,currentState:'完成',syApprovalHistory:syApprovalHistory}).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('审批通过')
|
|
|
+ this.handlecLose()
|
|
|
+ this.$emit('close')
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ reject(){
|
|
|
+ this.$refs.submitInformation.submitInformationModVis = true
|
|
|
+ this.$refs.submitInformation.text = '返单'
|
|
|
+ },
|
|
|
+ revokeApproval(){
|
|
|
+ var syApprovalHistory={
|
|
|
+ stuta:'保存',
|
|
|
+ plan_no:this.planNO,
|
|
|
+ processing_opinion:'',
|
|
|
+ processed_by:this.$store.getters.userInfo.realname,
|
|
|
+ processing_time:moment(new Date()).format('YYYY-MM-DD hh:mm:ss'),
|
|
|
+ assigned_by:''
|
|
|
+ }
|
|
|
+ cancelSubmit({planNum:this.planNO,status:this.status,currentState:'保存',syApprovalHistory:syApprovalHistory}).then(res => {
|
|
|
+ if (res.success) {
|
|
|
+ this.$message.success('撤销审批成功')
|
|
|
+ this.handlecLose()
|
|
|
+ this.$emit('close')
|
|
|
+ }else{
|
|
|
+ this.$message.error(res.message);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
|
|
|
|
|
|
// father
|