Browse Source

Merge remote-tracking branch 'origin/dev' into dev

dev
caoyizhong 2 years ago
parent
commit
1ab7ed36bb
  1. 1
      package.json
  2. 15
      src/components/jeecg/JUpload.vue
  3. 3
      src/main.js
  4. 15
      src/mixins/JeecgListMixin.js
  5. 16
      src/views/activiti/applyHome.vue
  6. 89
      src/views/activiti/form/ProcessUdgetPlanForm.vue
  7. 186
      src/views/activiti/historicDetailBak.vue
  8. 22
      src/views/processmaterials/ProcessUdgetPlanList.vue
  9. 38
      src/views/processmaterials/modules/ProcessUdgetPlanForm.vue
  10. 163
      src/views/processmaterials/modules/ProcessUdgetPlanModal.vue
  11. 115
      src/views/suppliesstronger/ProcessSuppliesStrongerList.vue
  12. 20
      src/views/suppliesstronger/ProcessSuppliesStrongerLists.vue
  13. 24
      src/views/suppliesstronger/modules/ProcessSuppliesStrongerForm.vue
  14. 313
      src/views/waste/ProcessWasteList.vue
  15. 210
      src/views/waste/modules/ProcessWasteForm.vue
  16. 60
      src/views/waste/modules/ProcessWasteModal.vue
  17. 83
      src/views/waste/modules/ProcessWasteModal__Style#Drawer.vue
  18. 9
      yarn.lock

1
package.json

@ -26,6 +26,7 @@
"echarts": "^4.8.0", "echarts": "^4.8.0",
"element-resize-detector": "^1.2.1", "element-resize-detector": "^1.2.1",
"enquire.js": "^2.1.6", "enquire.js": "^2.1.6",
"js-base64": "^3.7.2",
"js-cookie": "^2.2.0", "js-cookie": "^2.2.0",
"lodash.get": "^4.4.2", "lodash.get": "^4.4.2",
"lodash.pick": "^4.4.0", "lodash.pick": "^4.4.0",

15
src/components/jeecg/JUpload.vue

@ -23,6 +23,8 @@
:returnUrl="returnUrl" :returnUrl="returnUrl"
:listType="complistType" :listType="complistType"
@preview="handlePreview" @preview="handlePreview"
@download="handleDownload"
:showUploadList="{ showRemoveIcon: true, showDownloadIcon: true }"
:class="{'uploadty-disabled':disabled}"> :class="{'uploadty-disabled':disabled}">
<template> <template>
<div v-if="isImageComp"> <div v-if="isImageComp">
@ -63,7 +65,7 @@
name: 'JUpload', name: 'JUpload',
data(){ data(){
return { return {
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload", uploadAction:window._CONFIG['domianURL']+"/sys/upload/uploadMinio",
headers:{}, headers:{},
fileList: [], fileList: [],
newFileList: [], newFileList: [],
@ -310,10 +312,17 @@
if(this.fileType === FILE_TYPE_IMG){ if(this.fileType === FILE_TYPE_IMG){
this.previewImage = file.url || file.thumbUrl; this.previewImage = file.url || file.thumbUrl;
this.previewVisible = true; this.previewVisible = true;
}else{ }else if (file.url) {
location.href=file.url // base
let base = "http://127.0.0.1:8012/onlinePreview?url="
let url = base+encodeURIComponent(this.$Base64.encode(file.url))
window.open(url, '_blank')
} }
}, },
//
handleDownload (file) {
location.href=file.url
},
handleCancel(){ handleCancel(){
this.previewVisible = false; this.previewVisible = false;
}, },

3
src/main.js

@ -7,6 +7,9 @@ import Storage from 'vue-ls'
import router from './router' import router from './router'
import store from './store/' import store from './store/'
import { VueAxios } from "@/utils/request" import { VueAxios } from "@/utils/request"
//main.js
import { Base64 } from 'js-base64';
Vue.prototype.$Base64 = Base64
require('@jeecg/antd-online-mini') require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css') require('@jeecg/antd-online-mini/dist/OnlineForm.css')

15
src/mixins/JeecgListMixin.js

@ -345,6 +345,7 @@ export const JeecgListMixin = {
/* 文件下载 */ /* 文件下载 */
// update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------ // update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
downloadFile(text){ downloadFile(text){
if(!text){ if(!text){
this.$message.warning("未知的文件") this.$message.warning("未知的文件")
return; return;
@ -352,9 +353,23 @@ export const JeecgListMixin = {
if(text.indexOf(",")>0){ if(text.indexOf(",")>0){
text = text.substring(0,text.indexOf(",")) text = text.substring(0,text.indexOf(","))
} }
let url = getFileAccessHttpUrl(text) let url = getFileAccessHttpUrl(text)
console.log(this.$Base64.encode(url))
window.open(url); window.open(url);
}, },
//文件预览
onlineFile(text){
if(!text){
this.$message.warning("未知的文件")
return;
}
if(text.indexOf(",")>0){
text = text.substring(0,text.indexOf(","))
}
let url = getFileAccessHttpUrl(text)
window.open('http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(this.$Base64.encode(url)));
},
} }
} }

16
src/views/activiti/applyHome.vue

@ -31,10 +31,19 @@
</a-collapse> </a-collapse>
</div> </div>
<!--流程表单--> <!--流程表单-->
<a-modal :destroyOnClose="true" :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="80%"> <a-modal
:destroyOnClose="true"
:title="lcModa.title"
v-model="lcModa.visible"
switchFullscreen
:footer="null"
:maskClosable="false"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
width="80%">
<component :disabled="lcModa.disabled" v-if="lcModa.visible" :is="lcModa.formComponent" <component :disabled="lcModa.disabled" v-if="lcModa.visible" :is="lcModa.formComponent"
:processData="lcModa.processData" :isNew = "lcModa.isNew" :processData="lcModa.processData" :isNew = "lcModa.isNew"
@afterSubmit="afterSub" @close="lcModa.visible=false,lcModa.disabled = false"></component> @afterSubmit="afterSub" @close="lcModa.visible=false,lcModa.disabled = false" >
</component>
</a-modal> </a-modal>
</a-card> </a-card>
@ -58,6 +67,7 @@
return { return {
description: '所有', description: '所有',
dictOptions:[], dictOptions:[],
disableSubmit: false,
url: { url: {
getProcessDataList: "/activiti_process/listData", getProcessDataList: "/activiti_process/listData",
getFirstNode:'/actProcessIns/getFirstNode', getFirstNode:'/actProcessIns/getFirstNode',
@ -163,7 +173,7 @@
/*提交成功申请后*/ /*提交成功申请后*/
afterSub(formData){ afterSub(formData){
this.lcModa.visible = false; this.lcModa.visible = false;
this.$message("请前往我的申请列表提交审批!") this.$message.success("请前往我的申请列表提交审批!")
}, },
/*前往我的申请页面*/ /*前往我的申请页面*/
handleToApplyList() { handleToApplyList() {

89
src/views/activiti/form/ProcessUdgetPlanForm.vue

@ -57,7 +57,7 @@
</a-form> </a-form>
</j-form-container> </j-form-container>
<!-- 子表单区域 --> <!-- 子表单区域 -->
<a-tabs v-model="activeKey" @change="handleChangeTabs"> <a-tabs v-model="activeKey" @change="handleChangeTabs" ref="tabs">
<a-tab-pane tab="预算计划采购流程物料清单表" :key="refKeys[0]" :forceRender="true"> <a-tab-pane tab="预算计划采购流程物料清单表" :key="refKeys[0]" :forceRender="true">
<j-editable-table <j-editable-table
:ref="refKeys[0]" :ref="refKeys[0]"
@ -85,12 +85,13 @@
</template> </template>
<script> <script>
import { validateTables } from '../../../utils/JEditableTableUtil'
const VALIDATE_NO_PASSED = Symbol()
import pick from 'lodash.pick' import pick from 'lodash.pick'
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
import { FormTypes, getRefPromise } from '@/utils/JEditableTableUtil' import { FormTypes, getRefPromise,validateFormAndTables } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer' import JFormContainer from '@/components/jeecg/JFormContainer'
import JDate from '@/components/jeecg/JDate' import JDate from '@/components/jeecg/JDate'
import JUpload from '@/components/jeecg/JUpload' import JUpload from '@/components/jeecg/JUpload'
@ -108,7 +109,7 @@
JSelectDepart, JSelectDepart,
JSelectUserByDep, JSelectUserByDep,
JDictSelectTag, JDictSelectTag,
JSelectCompany JSelectCompany,
}, },
data() { data() {
return { return {
@ -142,7 +143,7 @@
{ {
title: '物料组', title: '物料组',
key: 'materialGroup', key: 'materialGroup',
type: FormTypes.sel_search, type: FormTypes.select,
dictCode: '', dictCode: '',
width: '200px', width: '200px',
placeholder: '请输入${title}', placeholder: '请输入${title}',
@ -259,10 +260,7 @@
{ {
title: '对比单价', title: '对比单价',
key: 'contrastPrice', key: 'contrastPrice',
type: FormTypes.popup, type: FormTypes.normal,
popupCode: '',
destFields: '',
orgFields: '',
width: '200px', width: '200px',
placeholder: '请输入${title}', placeholder: '请输入${title}',
defaultValue: '' defaultValue: ''
@ -370,6 +368,7 @@
if (!this.isNew){ if (!this.isNew){
this.init(); this.init();
} }
this.getAllTable()
}, },
methods: { methods: {
/*回显数据*/ /*回显数据*/
@ -386,7 +385,7 @@
this.data = formData; this.data = formData;
console.log("表单回显数据",this.data) console.log("表单回显数据",this.data)
this.$nextTick(() => { this.$nextTick(() => {
this.form.setFieldsValue(pick(this.data,'name')) this.form.setFieldsValue(pick(this.data,'company', 'createTime', 'sysOrgCode', 'createBy', 'materialType', 'processPlan', 'needTime', 'orderNumber', 'fileId'))
}); });
this.btndisabled = false; this.btndisabled = false;
}else { }else {
@ -411,7 +410,11 @@
this.processUdgetPlanMaterialTable.dataSource = [] this.processUdgetPlanMaterialTable.dataSource = []
}, },
getAllTable() { getAllTable() {
let values = this.tableKeys.map(key => getRefPromise(this, key)) console.log('-------------------->')
if (!(this.refKeys instanceof Array)) {
throw this.throwNotArray('refKeys')
}
let values = this.refKeys.map(key => getRefPromise(this, key))
return Promise.all(values) return Promise.all(values)
}, },
/** 调用完edit()方法之后会自动调用此方法 */ /** 调用完edit()方法之后会自动调用此方法 */
@ -445,6 +448,7 @@
}) })
} }
}, },
validateError(msg) { validateError(msg) {
this.$message.error(msg) this.$message.error(msg)
}, },
@ -453,34 +457,45 @@
}, },
// handler // handler
handleSubmit (e) { handleSubmit (e) {
e.preventDefault() this.getAllTable().then(tables => {
this.form.validateFields((err, values) => { return validateFormAndTables(this.form, tables)
if (!err) { }).then(allValues=>{
let formData = Object.assign(this.data||{}, values) console.log('所有数据',allValues)
formData.procDefId = this.processData.id; if (typeof this.classifyIntoFormData !== 'function') {
formData.procDeTitle = this.processData.name; throw this.throwNotFunction('classifyIntoFormData')
if (!formData.tableName)formData.tableName = this.processData.businessTable;
formData.filedNames = _.keys(values).join(",");
console.log('formData', values)
var url = this.url.add;
if (!this.isNew){
url = this.url.edit;
}
this.btndisabled = true;
this.postFormAction(url,formData).then((res)=>{
if (res.success){
this.$message.success("保存成功!")
//todo
this.$emit('afterSubmit',formData)
}else {
this.$message.error(res.message)
}
}).finally(()=>{
this.btndisabled = false;
})
} }
let formData = this.classifyIntoFormData(allValues)
console.log('格式化后的数据',formData)
// this.form.validateFields((err, values) => {
// if (!err) {
// let formData = Object.assign(this.data||{}, values)
// formData.procDefId = this.processData.id;
// formData.procDeTitle = this.processData.name;
// if (!formData.tableName)formData.tableName = this.processData.businessTable;
// formData.filedNames = _.keys(values).join(",");
// console.log('formData', values)
// this.processUdgetPlanMaterialTable.dataSource=[]
// console.log('')
// var url = this.url.add;
// if (!this.isNew){
// url = this.url.edit;
// }
// //this.btndisabled = true;
// // this.postFormAction(url,formData).then((res)=>{
// // if (res.success){
// // this.$message.success("")
// // //todo
// // this.$emit('afterSubmit',formData)
// // }else {
// // this.$message.error(res.message)
// // }
// // }).finally(()=>{
// // this.btndisabled = false;
// // })
// }
// })
}) })
}, },
} }

186
src/views/activiti/historicDetailBak.vue

@ -0,0 +1,186 @@
<style lang="less">
</style>
<template>
<div class="search">
<a-card style="margin-bottom:10px;">
<p slot="title">
<span>流程审批进度历史</span>
</p>
<a-row style="position:relative">
<a-table :loading="loading" rowKey="id"
:dataSource="data"
:pagination="false"
ref="table">
<a-table-column title="#" width="50">
<template slot-scope="t,r,i" >
<span> {{i+1}} </span>
</template>
</a-table-column>
<a-table-column title="任务名称" dataIndex="name" width="150" align="center">
<template slot-scope="t">
<span> {{t}} </span>
</template>
</a-table-column>
<a-table-column title="处理人" dataIndex="assignees" width="150" align="center">
<template slot-scope="t">
<div v-if="t">
<span v-for="item in t">
<span v-if="item.isExecutor" style="color: #00DB00;">{{item.username}} </span>
<span v-else style="color: #999;">{{item.username}} </span>
</span>
</div>
</template>
</a-table-column>
<a-table-column title="审批操作" dataIndex="deleteReason" width="150" align="center">
<template slot-scope="t">
<span v-if="t.toString().indexOf('通过')>-1" style="color: #00DB00">{{t}}</span>
<span v-else-if="t.toString().indexOf('驳回')>-1" style="color: red;">{{t}}</span>
<span v-else>{{t}}</span>
</template>
</a-table-column>
<a-table-column title="审批意见" dataIndex="comment" width="150" align="center">
<template slot-scope="t">
<span>{{t}}</span>
</template>
</a-table-column>
<a-table-column title="耗时" dataIndex="duration" width="150" align="center">
<template slot-scope="t">
<span>{{millsToTime(t)}}</span>
</template>
</a-table-column>
<a-table-column title="创建时间" dataIndex="createTime" width="150" align="center">
<template slot-scope="t">
<span>{{t}}</span>
</template>
</a-table-column>
<a-table-column title="完成时间" dataIndex="endTime" width="150" align="center">
<template slot-scope="t">
<span>{{t}}</span>
</template>
</a-table-column>
<a-table-column title="状态" dataIndex="endTime" key="aaa" width="150" align="center">
<template slot-scope="t">
<span v-if="t" style="color: blue;">已办理</span>
<span v-else style="color: #999999">待处理</span>
</template>
</a-table-column>
</a-table>
</a-row>
</a-card>
<a-tabs type="card" @change="callback">
<a-tab-pane key="1" tab="实时流程图">
<a-card>
<!--<p slot="title">
<span>实时流程图</span>
</p>-->
<a-row style="position:relative">
<img :src="imgUrl" />
<a-spin size="large" fix v-if="loadingImg"></a-spin>
</a-row>
</a-card>
</a-tab-pane>
<a-tab-pane key="2" tab="表单数据" v-if="lcModa">
<a-card>
<!--流程表单-->
<component :disabled="lcModa.disabled" :is="lcModa.formComponent"
:processData="lcModa.processData" :isNew="lcModa.isNew" :task="lcModa.isTask"
@afterSubmit="afterSub"
@passTask="pass(lcModa.processData)"
@backTask="back(lcModa.processData)"
@close="lcModa.visible=false,lcModa.disabled = false"></component>
</a-card>
</a-tab-pane>
</a-tabs>
</div>
</template>
<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import { activitiMixin } from '@/views/activiti/mixins/activitiMixin'
export default {
name: "historic_detail_bak",
mixins:[activitiMixin,JeecgListMixin],
props: {
/**/
procInstId: {
type: String,
default: '',
required: true
},
lcModa: {
type: Object,
required: false
}
},
data() {
return {
url:{
historicFlow:'/actTask/historicFlow/',
getHighlightImg:`${window._CONFIG['domianURL']}/activiti/models/getHighlightImg/`
},
type: 0,
loading: false, //
loadingImg: false,
data: [],
id: "",
imgUrl: "",
backRoute: ""
};
},
created() {
this.init();
},
watch: {
procInstId:function(newval ,oldName) {
this.init();
}
},
methods: {
loadData(){
},
init() {
this.id = this.procInstId;
this.imgUrl =this.url.getHighlightImg + this.id + "?time=" + new Date();
this.getDataList();
},
getDataList() {
this.loading = true;
this.getAction(this.url.historicFlow+this.id).then(res => {
this.loading = false;
if (res.success) {
this.data = res.result;
if (!res.result || res.result.length == 0) {
this.$message.info( "未找到该记录审批历史数据,历史数据可能已被删除");
}
}else {
this.$message.error( res.message);
}
});
},
handleTableChange(pagination, filters, sorter) {
//
//TODO
if (Object.keys(sorter).length > 0) {
this.isorter.column = sorter.field;
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
}
this.ipagination = pagination;
// this.loadData();
},
callback(key){
},
afterSub(){
},
pass(v){
this.$emit('passTask',v)
},
back(v){
this.$emit('backTask',v)
}
},
};
</script>

22
src/views/processmaterials/ProcessUdgetPlanList.vue

@ -82,6 +82,18 @@
</a-button> </a-button>
</template> </template>
<!-- <template slot="fileOn" slot-scope="text">-->
<!-- <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>-->
<!-- <a-button-->
<!-- v-else-->
<!-- :ghost="true"-->
<!-- type="primary"-->
<!-- size="small"-->
<!-- @click="onlineFile(text)">-->
<!-- 预览-->
<!-- </a-button>-->
<!-- </template>-->
<span slot="action" slot-scope="text, record"> <span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a> <a @click="handleEdit(record)">编辑</a>
@ -106,7 +118,6 @@
<ProcessUdgetPlanMaterialList :mainId="selectedMainId" /> <ProcessUdgetPlanMaterialList :mainId="selectedMainId" />
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
<processUdgetPlan-modal ref="modalForm" @ok="modalFormOk"></processUdgetPlan-modal> <processUdgetPlan-modal ref="modalForm" @ok="modalFormOk"></processUdgetPlan-modal>
</a-card> </a-card>
</template> </template>
@ -186,6 +197,12 @@
dataIndex: 'fileId', dataIndex: 'fileId',
scopedSlots: {customRender: 'fileSlot'} scopedSlots: {customRender: 'fileSlot'}
}, },
// {
// title:'',
// align:"center",
// dataIndex: 'fileId',
// scopedSlots: {customRender: 'fileOn'}
// },
{ {
title: '操作', title: '操作',
dataIndex: 'action', dataIndex: 'action',
@ -308,11 +325,12 @@
fieldList.push({type:'date',value:'needTime',text:'需求时间'}) fieldList.push({type:'date',value:'needTime',text:'需求时间'})
fieldList.push({type:'int',value:'orderNumber',text:'顺序号',dictCode:''}) fieldList.push({type:'int',value:'orderNumber',text:'顺序号',dictCode:''})
fieldList.push({type:'string',value:'fileId',text:'文件id',dictCode:''}) fieldList.push({type:'string',value:'fileId',text:'文件id',dictCode:''})
// fieldList.push({type:'string',value:'fileId',text:'',dictCode:'1'})
this.superFieldList = fieldList this.superFieldList = fieldList
} }
} }
} }
</script> </script>
<style scoped> <style scoped>
@import '~@assets/less/common.less' @import '~@assets/less/common.less';
</style> </style>

38
src/views/processmaterials/modules/ProcessUdgetPlanForm.vue

@ -26,12 +26,12 @@
</a-col> </a-col>
<a-col :span="12" > <a-col :span="12" >
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['materialType']" :trigger-change="true" dictCode="" placeholder="请选择物资类型" /> <j-dict-select-tag type="list" v-decorator="['materialType']" :trigger-change="true" dictCode="material_type" placeholder="请选择物资类型" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12" > <a-col :span="12" >
<a-form-item label="流程计划" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="流程计划" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['processPlan']" :trigger-change="true" dictCode="" placeholder="请选择流程计划" /> <j-dict-select-tag type="list" v-decorator="['processPlan']" :trigger-change="true" dictCode="process_plan" placeholder="请选择流程计划" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12" > <a-col :span="12" >
@ -76,7 +76,6 @@
import { getAction } from '@/api/manage' import { getAction } from '@/api/manage'
import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil' import { FormTypes,getRefPromise } from '@/utils/JEditableTableUtil'
import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { JEditableTableMixin } from '@/mixins/JEditableTableMixin'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer' import JFormContainer from '@/components/jeecg/JFormContainer'
import JDate from '@/components/jeecg/JDate' import JDate from '@/components/jeecg/JDate'
import JUpload from '@/components/jeecg/JUpload' import JUpload from '@/components/jeecg/JUpload'
@ -85,7 +84,7 @@
import JDictSelectTag from "@/components/dict/JDictSelectTag" import JDictSelectTag from "@/components/dict/JDictSelectTag"
export default { export default {
name: 'ProcessUdgetPlanForm', name: 'ProcessUdgetPlanFormff',
mixins: [JEditableTableMixin], mixins: [JEditableTableMixin],
components: { components: {
JFormContainer, JFormContainer,
@ -245,10 +244,7 @@
{ {
title: '对比单价', title: '对比单价',
key: 'contrastPrice', key: 'contrastPrice',
type: FormTypes.popup, type: FormTypes.inputNumber,
popupCode:"",
destFields:"",
orgFields:"",
width:"200px", width:"200px",
placeholder: '请输入${title}', placeholder: '请输入${title}',
defaultValue:'', defaultValue:'',
@ -285,6 +281,30 @@
placeholder: '请输入${title}', placeholder: '请输入${title}',
defaultValue:'', defaultValue:'',
}, },
{
title: '删除标志',
key: 'delFlag',
type: FormTypes.inputNumber,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '删除时间',
key: 'delTime',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
{
title: '修改人',
key: 'updateBy',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
},
] ]
}, },
url: { url: {
@ -342,11 +362,13 @@
}, },
methods: { methods: {
addBefore(){ addBefore(){
alert(3)
this.form.resetFields() this.form.resetFields()
this.processUdgetPlanMaterialTable.dataSource=[] this.processUdgetPlanMaterialTable.dataSource=[]
}, },
getAllTable() { getAllTable() {
let values = this.tableKeys.map(key => getRefPromise(this, key)) let values = this.tableKeys.map(key => getRefPromise(this, key))
console.log('-------->',values)
return Promise.all(values) return Promise.all(values)
}, },
/** 调用完edit()方法之后会自动调用此方法 */ /** 调用完edit()方法之后会自动调用此方法 */

163
src/views/processmaterials/modules/ProcessUdgetPlanModal.vue

@ -1,125 +1,45 @@
<template> <template>
<j-modal <j-modal
:title="title" :title="title"
:width="width" :width="1200"
:visible="visible" :visible="visible"
:confirmLoading="confirmLoading" :maskClosable="false"
switchFullscreen switchFullscreen
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
cancelText="关闭"> @cancel="handleCancel">
<a-spin :spinning="confirmLoading"> <process-udget-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"/>
<a-form :form="form">
<a-row>
<a-col :span="24">
<a-form-item label="流程发起公司" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['company']" multi />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="流程发起时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择流程发起时间" v-decorator="['createTime']" :trigger-change="true" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="流程发起部门" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-depart v-decorator="['sysOrgCode']" multi />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="物资类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['materialType']" :trigger-change="true" dictCode="" placeholder="请选择物资类型" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="流程计划" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['processPlan']" :trigger-change="true" dictCode="" placeholder="请选择流程计划" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="需求时间" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择需求时间" v-decorator="['needTime']" :trigger-change="true" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="顺序号" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number v-decorator="['orderNumber']" placeholder="请输入顺序号" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="文件id" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-upload v-decorator="['fileId']" :trigger-change="true" ></j-upload>
</a-form-item>
</a-col>
</a-row>
</a-form>
</a-spin>
</j-modal> </j-modal>
</template> </template>
<script> <script>
import { httpAction } from '@/api/manage' import ProcessUdgetPlanForm from './ProcessUdgetPlanForm'
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JDate from '@/components/jeecg/JDate'
import JUpload from '@/components/jeecg/JUpload'
import JSelectDepart from '@/components/jeecgbiz/JSelectDepart'
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
import JDictSelectTag from "@/components/dict/JDictSelectTag"
export default { export default {
name: "ProcessUdgetPlanModal", name: 'ProcessUdgetPlanModal',
components: { components: {
JDate, ProcessUdgetPlanForm
JUpload,
JSelectDepart,
JSelectUserByDep,
JDictSelectTag,
}, },
data () { data() {
return { return {
form: this.$form.createForm(this), title:'',
title:"操作",
width:800, width:800,
visible: false, visible: false,
model: {}, disableSubmit: false
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/hy/processUdgetPlan/add",
edit: "/hy/processUdgetPlan/edit",
}
} }
}, },
created () { methods:{
},
methods: {
add () { add () {
this.edit({}); this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
}, },
edit (record) { edit (record) {
this.form.resetFields(); this.visible=true
this.model = Object.assign({}, record); this.$nextTick(()=>{
this.visible = true; this.$refs.realForm.edit(record);
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'company','createTime','sysOrgCode','createBy','materialType','processPlan','needTime','orderNumber','fileId'))
}) })
}, },
close () { close () {
@ -127,45 +47,18 @@
this.visible = false; this.visible = false;
}, },
handleOk () { handleOk () {
const that = this; this.$refs.realForm.handleOk();
// },
this.form.validateFields((err, values) => { submitCallback(){
if (!err) { this.$emit('ok');
that.confirmLoading = true; this.visible = false;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
let formData = Object.assign(this.model, values);
console.log("表单提交数据",formData)
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
that.close();
})
}
})
}, },
handleCancel () { handleCancel () {
this.close() this.close()
}, }
popupCallback(row){
this.form.setFieldsValue(pick(row,'company','createTime','sysOrgCode','createBy','materialType','processPlan','needTime','orderNumber','fileId'))
},
} }
} }
</script> </script>
<style scoped>
</style>

115
src/views/suppliesstronger/ProcessSuppliesStrongerList.vue

@ -12,7 +12,16 @@
<!-- <a-input placeholder="请输入流程表单号" v-model="queryParam.processId"></a-input>--> <!-- <a-input placeholder="请输入流程表单号" v-model="queryParam.processId"></a-input>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- </a-col>--> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="4" :lg="7" :md="8" :sm="16">-->
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
<!-- </span>-->
<!-- </a-col>-->
<a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="供应商"> <a-form-item label="供应商">
<a-input placeholder="请输入供应商信息" v-model="queryParam.supplierId"></a-input> <a-input placeholder="请输入供应商信息" v-model="queryParam.supplierId"></a-input>
</a-form-item> </a-form-item>
@ -23,19 +32,19 @@
<!-- <j-search-select-tag placeholder="请选择供应商描述" v-model="queryParam.supplierDescription" dict=",,"/>--> <!-- <j-search-select-tag placeholder="请选择供应商描述" v-model="queryParam.supplierDescription" dict=",,"/>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- </a-col>--> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="物料组"> <a-form-item label="物料组">
<j-search-select-tag placeholder="请选择物料组" v-model="queryParam.itemGroup" dict=",,"/> <a-input placeholder="请选择物料组" v-model="queryParam.itemGroup" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="物料"> <a-form-item label="物料">
<j-search-select-tag placeholder="请选择物料" v-model="queryParam.item" dict=",,"/> <a-input placeholder="请选择物料" v-model="queryParam.item" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="物料描述"> <a-form-item label="物料描述">
<j-search-select-tag placeholder="请选择物料描述" v-model="queryParam.itemDescription" dict=",,"/> <a-input placeholder="请选择物料描述" v-model="queryParam.itemDescription" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -60,61 +69,53 @@
<!-- <a-input placeholder="请输入金额" v-model="queryParam.rates"></a-input>--> <!-- <a-input placeholder="请输入金额" v-model="queryParam.rates"></a-input>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- </a-col>--> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="4" :lg="7" :md="8" :sm="16">-->
<a-form-item label="仓储地点"> <!-- <a-form-item label="仓储地点">-->
<j-search-select-tag placeholder="请选择仓储地点" v-model="queryParam.unitWasteWarehouseCodeId" dict=",,"/> <!-- <j-search-select-tag placeholder="请选择仓储地点" v-model="queryParam.unitWasteWarehouseCodeId" dict=",,"/>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="4" :lg="7" :md="8" :sm="16">-->
<a-form-item label="存储仓位"> <!-- <a-form-item label="存储仓位">-->
<j-search-select-tag placeholder="请选择存储仓位" v-model="queryParam.freightSpace" dict=",,"/> <!-- <j-search-select-tag placeholder="请选择存储仓位" v-model="queryParam.freightSpace" dict=",,"/>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="4" :lg="7" :md="8" :sm="16">-->
<a-form-item label="生产时间"> <!-- <a-form-item label="生产时间">-->
<j-date placeholder="请选择生产时间" v-model="queryParam.productionTime"></j-date> <!-- <j-date placeholder="请选择生产时间" v-model="queryParam.productionTime"></j-date>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="4" :lg="7" :md="8" :sm="16">-->
<a-form-item label="保质期"> <!-- <a-form-item label="保质期">-->
<j-date placeholder="请选择保质期" v-model="queryParam.expirationDate"></j-date> <!-- <j-date placeholder="请选择保质期" v-model="queryParam.expirationDate"></j-date>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="4" :lg="7" :md="8" :sm="16">-->
<a-form-item label="批次"> <!-- <a-form-item label="批次">-->
<j-search-select-tag placeholder="请选择批次" v-model="queryParam.batch" dict=",,"/> <!-- <j-search-select-tag placeholder="请选择批次" v-model="queryParam.batch" dict=",,"/>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="是否到货">--> <!-- <a-form-item label="是否到货">-->
<!-- <a-input placeholder="请输入是否到货" v-model="queryParam.arrivalNotice"></a-input>--> <!-- <a-input placeholder="请输入是否到货" v-model="queryParam.arrivalNotice"></a-input>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- </a-col>--> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="4" :lg="7" :md="8" :sm="16">-->
<a-form-item label="入库时间"> <!-- <a-form-item label="入库时间">-->
<j-date placeholder="请选择入库时间" v-model="queryParam.inboundTime"></j-date> <!-- <j-date placeholder="请选择入库时间" v-model="queryParam.inboundTime"></j-date>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <!-- <a-col :xl="4" :lg="7" :md="8" :sm="16">-->
<a-form-item label="入库人"> <!-- <a-form-item label="入库人">-->
<j-search-select-tag placeholder="请选择入库人" v-model="queryParam.librarySign" dict=",,"/> <!-- <j-search-select-tag placeholder="请选择入库人" v-model="queryParam.librarySign" dict=",,"/>-->
</a-form-item> <!-- </a-form-item>-->
</a-col> <!-- </a-col>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="核算属性">--> <!-- <a-form-item label="核算属性">-->
<!-- <a-input placeholder="请输入核算属性" v-model="queryParam.accountingAttributes"></a-input>--> <!-- <a-input placeholder="请输入核算属性" v-model="queryParam.accountingAttributes"></a-input>-->
<!-- </a-form-item>--> <!-- </a-form-item>-->
<!-- </a-col>--> <!-- </a-col>-->
</template> </template>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a @click="handleToggleSearch" style="margin-left: 8px">
{{ toggleSearchStatus ? '收起' : '展开' }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
</a>
</span>
</a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
@ -130,7 +131,7 @@
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -193,7 +194,7 @@
<process-supplies-stronger-modal ref="modalForm" @ok="modalFormOk"></process-supplies-stronger-modal> <process-supplies-stronger-modal ref="modalForm" @ok="modalFormOk"></process-supplies-stronger-modal>
</a-card> </a-card>
<ProcessSuppliesStrongerLists v-if="item" @strongerExit = "strongerExit"/> <!--<ProcessSuppliesStrongerLists v-if="item" @strongerExit = "strongerExit"/>-->
</div> </div>
</template> </template>
@ -206,7 +207,6 @@
import JDate from '@/components/jeecg/JDate.vue' import JDate from '@/components/jeecg/JDate.vue'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag' import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue' import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'
import ProcessSuppliesStrongerLists from '@views/suppliesstronger/modules/ProcessSuppliesStrongerLists'
export default { export default {
name: 'ProcessSuppliesStrongerList', name: 'ProcessSuppliesStrongerList',
@ -216,7 +216,6 @@
JSearchSelectTag, JSearchSelectTag,
ProcessSuppliesStrongerModal, ProcessSuppliesStrongerModal,
JSuperQuery, JSuperQuery,
ProcessSuppliesStrongerLists,
}, },
data () { data () {
return { return {
@ -369,11 +368,13 @@
}, },
methods: { methods: {
handleDetaills(){ handleDetaills(){
this.item = true; // this.item = true;
this.$router.push({path:'/src/views/suppliesstronger/ProcessSuppliesStrongerLists'})
}, },
strongerExit(){ strongerExit(){
this.item = false; this.item = false;
}, },
initDictConfig(){ initDictConfig(){
}, },
getSuperFieldList(){ getSuperFieldList(){
@ -391,9 +392,9 @@
fieldList.push({type:'sel_search',value:'unitWasteWarehouseCodeId',text:'仓储地点',dictTable:'', dictText:'', dictCode:''}) fieldList.push({type:'sel_search',value:'unitWasteWarehouseCodeId',text:'仓储地点',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'sel_search',value:'freightSpace',text:'存储仓位',dictTable:'', dictText:'', dictCode:''}) fieldList.push({type:'sel_search',value:'freightSpace',text:'存储仓位',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'date',value:'productionTime',text:'生产时间'}) fieldList.push({type:'date',value:'productionTime',text:'生产时间'})
fieldList.push({type:'date',value:'expirationDate',text:'保质期'}) fieldList.push({type:'string',value:'expirationDate',text:'保质期'})
fieldList.push({type:'sel_search',value:'batch',text:'批次',dictTable:'', dictText:'', dictCode:''}) fieldList.push({type:'sel_search',value:'batch',text:'批次',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'int',value:'arrivalNotice',text:'是否到货',dictCode:''}) fieldList.push({type:'string',value:'arrivalNotice',text:'是否到货',dictCode:''})
fieldList.push({type:'date',value:'inboundTime',text:'入库时间'}) fieldList.push({type:'date',value:'inboundTime',text:'入库时间'})
fieldList.push({type:'sel_search',value:'librarySign',text:'入库人',dictTable:'', dictText:'', dictCode:''}) fieldList.push({type:'sel_search',value:'librarySign',text:'入库人',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'string',value:'accountingAttributes',text:'核算属性',dictCode:''}) fieldList.push({type:'string',value:'accountingAttributes',text:'核算属性',dictCode:''})

20
src/views/suppliesstronger/modules/ProcessSuppliesStrongerLists.vue → src/views/suppliesstronger/ProcessSuppliesStrongerLists.vue

@ -25,17 +25,17 @@
<!-- </a-col>--> <!-- </a-col>-->
<a-col :xl="4" :lg="7" :md="8" :sm="16"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="物料组"> <a-form-item label="物料组">
<j-search-select-tag placeholder="请选择物料组" v-model="queryParam.itemGroup" dict=",,"/> <a-input placeholder="请选择物料组" v-model="queryParam.itemGroup" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="16"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="物料"> <a-form-item label="物料">
<j-search-select-tag placeholder="请选择物料" v-model="queryParam.item" dict=",,"/> <a-input placeholder="请选择物料" v-model="queryParam.item" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="16"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="物料描述"> <a-form-item label="物料描述">
<j-search-select-tag placeholder="请选择物料描述" v-model="queryParam.itemDescription" dict=",,"/> <a-input placeholder="请选择物料描述" v-model="queryParam.itemDescription" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
@ -62,12 +62,12 @@
<!-- </a-col>--> <!-- </a-col>-->
<a-col :xl="4" :lg="7" :md="8" :sm="16"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="仓储地点"> <a-form-item label="仓储地点">
<j-search-select-tag placeholder="请选择仓储地点" v-model="queryParam.unitWasteWarehouseCodeId" dict=",,"/> <a-input placeholder="请选择仓储地点" v-model="queryParam.unitWasteWarehouseCodeId" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="16"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="存储仓位"> <a-form-item label="存储仓位">
<j-search-select-tag placeholder="请选择存储仓位" v-model="queryParam.freightSpace" dict=",,"/> <a-input placeholder="请选择存储仓位" v-model="queryParam.freightSpace" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="16"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
@ -82,7 +82,7 @@
</a-col> </a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="16"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="批次"> <a-form-item label="批次">
<j-search-select-tag placeholder="请选择批次" v-model="queryParam.batch" dict=",,"/> <a-input placeholder="请选择批次" v-model="queryParam.batch" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
@ -97,7 +97,7 @@
</a-col> </a-col>
<a-col :xl="4" :lg="7" :md="8" :sm="16"> <a-col :xl="4" :lg="7" :md="8" :sm="16">
<a-form-item label="入库人"> <a-form-item label="入库人">
<j-search-select-tag placeholder="请选择入库人" v-model="queryParam.librarySign" dict=",,"/> <a-input placeholder="请选择入库人" v-model="queryParam.librarySign" dict=",,"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">--> <!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
@ -131,7 +131,7 @@
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<!-- 高级查询区域 --> <!-- 高级查询区域 -->
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
@ -139,7 +139,7 @@
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown> </a-dropdown>
<a-button @click="handlereturn" type="primary" style="float-right: 8px">退出</a-button>
</div> </div>
<!-- table区域-begin --> <!-- table区域-begin -->
@ -207,7 +207,7 @@
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin' import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ProcessSuppliesStrongerModal from './ProcessSuppliesStrongerModal' import ProcessSuppliesStrongerModal from './modules/ProcessSuppliesStrongerModal'
import JDate from '@/components/jeecg/JDate.vue' import JDate from '@/components/jeecg/JDate.vue'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag' import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue' import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'

24
src/views/suppliesstronger/modules/ProcessSuppliesStrongerForm.vue

@ -15,27 +15,27 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="供应商描述" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="供应商描述" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['supplierDescription']" type="list" :trigger-change="true" placeholder="请输入供应商描述" /> <a-input v-decorator="['supplierDescription']" type="list" :trigger-change="true" placeholder="请输入供应商描述" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="物料组" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="物料组" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['itemGroup']" type="list" :trigger-change="true" placeholder="请输入物料组" /> <a-input v-decorator="['itemGroup']" type="list" :trigger-change="true" placeholder="请输入物料组" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="物料" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="物料" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['item']" type="list" :trigger-change="true" placeholder="请输入物料" /> <a-input v-decorator="['item']" type="list" :trigger-change="true" placeholder="请输入物料" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="物料描述" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="物料描述" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['itemDescription']" type="list" :trigger-change="true" placeholder="请输入物料描述" /> <a-input v-decorator="['itemDescription']" type="list" :trigger-change="true" placeholder="请输入物料描述" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="计量单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['unitMeasurement']" type="list" :trigger-change="true" placeholder="请输入计量单位" /> <a-input v-decorator="['unitMeasurement']" type="list" :trigger-change="true" placeholder="请输入计量单位" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -55,12 +55,12 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="仓储地点" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="仓储地点" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['unitWasteWarehouseCodeId']" type="list" :trigger-change="true" placeholder="请输入仓储地点" /> <a-input v-decorator="['unitWasteWarehouseCodeId']" type="list" :trigger-change="true" placeholder="请输入仓储地点" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="存储仓位" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="存储仓位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['freightSpace']" type="list" :trigger-change="true" placeholder="请输入储存仓位" /> <a-input v-decorator="['freightSpace']" type="list" :trigger-change="true" placeholder="请输入储存仓位" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -70,17 +70,17 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="保质期" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="保质期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择保质期" v-decorator="['expirationDate']" :trigger-change="true" style="width: 100%" /> <a-input placeholder="请选择保质期" v-decorator="['expirationDate']" :trigger-change="true" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="批次" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['batch']" type="list" :trigger-change="true" placeholder="请输入批次" /> <a-input v-decorator="['batch']" type="list" :trigger-change="true" placeholder="请输入批次" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="到货情况" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="到货情况" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['arrivalNotice']" dict="" /> <a-input v-decorator="['arrivalNotice']" dict="" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
@ -90,12 +90,12 @@
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="入库人" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="入库人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['librarySign']" type="list" :trigger-change="true" placeholder="请输入入库人" /> <a-input v-decorator="['librarySign']" type="list" :trigger-change="true" placeholder="请输入入库人" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-form-item label="核算属性" :labelCol="labelCol" :wrapperCol="wrapperCol"> <a-form-item label="核算属性" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-search-select-tag v-decorator="['accountingAttributes']" type="list" :trigger-change="true" placeholder="请输入核算属性" /> <a-input v-decorator="['accountingAttributes']" type="list" :trigger-change="true" placeholder="请输入核算属性" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center"> <a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">

313
src/views/waste/ProcessWasteList.vue

@ -0,0 +1,313 @@
<template>
<a-card :bordered="false">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :xl="3" :lg="5" :md="5" :sm="18">
<a-form-item label="物资名称">
<a-input placeholder="请选择物资名称" v-model="queryParam.materialName" dict=",,"/>
</a-form-item>
</a-col>
<a-col :xl="3" :lg="5" :md="5" :sm="18">
<a-form-item label="报废日期">
<j-date placeholder="请选择报废日期" v-model="queryParam.scrapDate"></j-date>
</a-form-item>
</a-col>
<a-col :xl="3" :lg="5" :md="5" :sm="18">
<a-form-item label="物料码">
<a-input placeholder="请选择物料码" v-model="queryParam.descriptionId" dict=",,"/>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="品牌">-->
<!-- <a-input placeholder="请输入品牌" v-model="queryParam.brand"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <template v-if="toggleSearchStatus">-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="型号规格">-->
<!-- <a-input placeholder="请输入型号规格" v-model="queryParam.typeSpecification"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="单位">-->
<!-- <j-search-select-tag placeholder="请选择单位" v-model="queryParam.unit" dict=",,"/>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="数量">-->
<!-- <a-input placeholder="请输入数量" v-model="queryParam.number"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="3" :lg="5" :md="5" :sm="18">
<a-form-item label="所属单位">
<a-input placeholder="请选择所属单位" v-model="queryParam.affiliation" dict=",,"/>
</a-form-item>
</a-col>
<a-col :xl="3" :lg="5" :md="5" :sm="18">
<a-form-item label="仓库位置">
<a-input placeholder="请选择仓库位置" v-model="queryParam.depositary" dict=",,"/>
</a-form-item>
</a-col>
<a-col :xl="3" :lg="5" :md="5" :sm="18">
<a-form-item label="创建人">
<a-input placeholder="请选择创建人" v-model="queryParam.createBy" dict=",,"/>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <a-form-item label="报废原因">-->
<!-- <a-input placeholder="请输入报废原因" v-model="queryParam.scrappedBecause"></a-input>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- </template>-->
<!-- <a-col :xl="6" :lg="7" :md="8" :sm="24">-->
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
<!-- <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>-->
<!-- <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>-->
<!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
<!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
<!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
<!-- </a>-->
<!-- </span>-->
<!-- </a-col>-->
</a-row>
</a-form>
</div>
<!-- 查询区域-END -->
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('废旧物资库表')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<!-- 高级查询区域 -->
<!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>-->
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
class="j-table-force-nowrap"
@change="handleTableChange">
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
下载
</a-button>
</template>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handleDetail(record)">详情</a>
</a-menu-item>
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<process-waste-modal ref="modalForm" @ok="modalFormOk"></process-waste-modal>
</a-card>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ProcessWasteModal from './modules/ProcessWasteModal'
import JDate from '@/components/jeecg/JDate.vue'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'
export default {
name: 'ProcessWasteList',
mixins:[JeecgListMixin, mixinDevice],
components: {
JDate,
JSearchSelectTag,
ProcessWasteModal,
JSuperQuery,
},
data () {
return {
description: '废旧物资库表管理页面',
//
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
// {
// title:'',
// align:"center",
// dataIndex: 'createBy_dictText'
// },
{
title:'物料码',
align:"center",
dataIndex: 'descriptionId'
},
{
title:'品牌',
align:"center",
dataIndex: 'brand'
},
{
title:'名称',
align:"center",
dataIndex: 'materialName'
},
{
title:'型号规格',
align:"center",
dataIndex: 'typeSpecification'
},
{
title:'单位',
align:"center",
dataIndex: 'unit'
},
{
title:'数量',
align:"center",
dataIndex: 'number'
},
{
title:'存放位置',
align:"center",
dataIndex: 'depositary'
},
{
title:'报废原因',
align:"center",
dataIndex: 'scrappedBecause'
},
{
title:'所属单位',
align:"center",
dataIndex: 'affiliation'
},
{
title:'报废日期',
align:"center",
dataIndex: 'scrapDate',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
// {
// title: '',
// dataIndex: 'action',
// align:"center",
// fixed:"right",
// width:147,
// scopedSlots: { customRender: 'action' }
// }
],
url: {
list: "/waste/processWaste/list",
delete: "/waste/processWaste/delete",
deleteBatch: "/waste/processWaste/deleteBatch",
exportXlsUrl: "/waste/processWaste/exportXls",
importExcelUrl: "waste/processWaste/importExcel",
},
dictOptions:{},
superFieldList:[],
}
},
created() {
this.getSuperFieldList();
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
getSuperFieldList(){
let fieldList=[];
fieldList.push({type:'sel_search',value:'createBy',text:'创建人',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'sel_search',value:'descriptionId',text:'物料码',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'string',value:'brand',text:'品牌',dictCode:''})
fieldList.push({type:'sel_search',value:'materialName',text:'名称',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'string',value:'typeSpecification',text:'型号规格',dictCode:''})
fieldList.push({type:'sel_search',value:'unit',text:'单位',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'int',value:'number',text:'数量',dictCode:''})
fieldList.push({type:'sel_search',value:'depositary',text:'存放位置',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'string',value:'scrappedBecause',text:'报废原因',dictCode:''})
fieldList.push({type:'sel_search',value:'affiliation',text:'所属单位',dictTable:'', dictText:'', dictCode:''})
fieldList.push({type:'date',value:'scrapDate',text:'报废日期'})
this.superFieldList = fieldList
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

210
src/views/waste/modules/ProcessWasteForm.vue

@ -0,0 +1,210 @@
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form :form="form" slot="detail">
<a-row>
<a-col :span="8">
<a-form-item label="创建人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['createBy']" dict="" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="物料码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['descriptionId']" dict="" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="品牌" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['brand']" placeholder="请输入品牌" ></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="物资名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['materialName']" dict="" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="型号规格" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['typeSpecification']" placeholder="请输入型号规格" ></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['unit']" dict="" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="数量" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number v-decorator="['number']" placeholder="请输入数量" style="width: 100%" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="存放位置" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['depositary']" dict="" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="报废原因" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['scrappedBecause']" placeholder="请输入报废原因" ></a-input>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="所属单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['affiliation']" dict="" />
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="报废日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-date placeholder="请选择报废日期" v-decorator="['scrapDate']" :trigger-change="true" style="width: 100%" />
</a-form-item>
</a-col>
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
<a-button @click="submitForm"> </a-button>
</a-col>
</a-row>
</a-form>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
import JDate from '@/components/jeecg/JDate'
import JSearchSelectTag from '@/components/dict/JSearchSelectTag'
export default {
name: 'ProcessWasteForm',
components: {
JFormContainer,
JDate,
JSearchSelectTag,
},
props: {
//data
formData: {
type: Object,
default: ()=>{},
required: false
},
//true false
formBpm: {
type: Boolean,
default: false,
required: false
},
//
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/waste/processWaste/add",
edit: "/waste/processWaste/edit",
queryById: "/waste/processWaste/queryById"
}
}
},
computed: {
formDisabled(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return false
}
return true
}
return this.disabled
},
showFlowSubmitButton(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return true
}
}
return false
}
},
created () {
//data
this.showFlowData();
},
methods: {
add () {
this.edit({});
},
edit (record) {
this.form.resetFields();
this.model = Object.assign({}, record);
this.visible = true;
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'createBy','descriptionId','brand','materialName','typeSpecification','unit','number','depositary','scrappedBecause','affiliation','scrapDate'))
})
},
//
showFlowData(){
if(this.formBpm === true){
let params = {id:this.formData.dataId};
getAction(this.url.queryById,params).then((res)=>{
if(res.success){
this.edit (res.result);
}
});
}
},
submitForm () {
const that = this;
//
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
let formData = Object.assign(this.model, values);
console.log("表单提交数据",formData)
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'createBy','descriptionId','brand','materialName','typeSpecification','unit','number','depositary','scrappedBecause','affiliation','scrapDate'))
},
}
}
</script>

60
src/views/waste/modules/ProcessWasteModal.vue

@ -0,0 +1,60 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
@cancel="handleCancel"
cancelText="关闭">
<process-waste-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></process-waste-form>
</j-modal>
</template>
<script>
import ProcessWasteForm from './ProcessWasteForm'
export default {
name: 'ProcessWasteModal',
components: {
ProcessWasteForm
},
data () {
return {
title:'',
width:1024,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
}
}
</script>

83
src/views/waste/modules/ProcessWasteModal__Style#Drawer.vue

@ -0,0 +1,83 @@
<template>
<a-drawer
:title="title"
:width="width"
placement="right"
:closable="false"
@close="close"
:visible="visible">
<process-waste-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></process-waste-form>
<div class="drawer-footer">
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button>
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button>
</div>
</a-drawer>
</template>
<script>
import ProcessWasteForm from './ProcessWasteForm'
export default {
name: 'ProcessWasteModal',
components: {
ProcessWasteForm
},
data () {
return {
title:"操作",
width:1024,
visible: false,
disableSubmit: false
}
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
});
},
close () {
this.$emit('close');
this.visible = false;
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
handleCancel () {
this.close()
}
}
}
</script>
<style lang="less" scoped>
/** Button按钮间距 */
.ant-btn {
margin-left: 30px;
margin-bottom: 30px;
float: right;
}
.drawer-footer{
position: absolute;
bottom: -8px;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

9
yarn.lock

@ -6747,6 +6747,11 @@ js-base64@^2.1.9:
resolved "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209" resolved "https://registry.npmjs.org/js-base64/-/js-base64-2.5.2.tgz#313b6274dda718f714d00b3330bbae6e38e90209"
integrity sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ== integrity sha512-Vg8czh0Q7sFBSUMWWArX/miJeBWYBPpdU/3M/DKSaekLMqrqVPaedp+5mZhie/r0lgrcaYBfwXatEew6gwgiQQ==
js-base64@^3.7.2:
version "3.7.2"
resolved "https://registry.npmmirror.com/js-base64/-/js-base64-3.7.2.tgz#816d11d81a8aff241603d19ce5761e13e41d7745"
integrity sha512-NnRs6dsyqUXejqk/yv2aiXlAvOs56sLkX6nUdeaNezI5LFFLlsZjOThmwnrcwh5ZZRwZlCMnVAY3CvhIhoVEKQ==
js-cookie@^2.2.0: js-cookie@^2.2.0:
version "2.2.1" version "2.2.1"
resolved "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" resolved "https://registry.npmjs.org/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8"
@ -10028,8 +10033,8 @@ set-value@^2.0.0, set-value@^2.0.1:
setimmediate@^1.0.4: setimmediate@^1.0.4:
version "1.0.5" version "1.0.5"
resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" resolved "https://registry.npmmirror.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285"
integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==
setprototypeof@1.1.0: setprototypeof@1.1.0:
version "1.1.0" version "1.1.0"

Loading…
Cancel
Save