Browse Source

修改采购,入库表单展示

dev
long 2 years ago
parent
commit
3b6c266342
  1. 7
      src/views/activiti/form/ProcessMaterialWarehousing.vue
  2. 86
      src/views/activiti/form/ProcessMaterialWarehousingForm.vue
  3. 7
      src/views/activiti/form/ProcessUdgetPlanForm.vue
  4. 61
      src/views/activiti/todoManage.vue
  5. 5
      src/views/suppliesstronger/ProcessSuppliesStrongerLists.vue
  6. 9
      src/views/wastematerials/ProcessWasteMaterialsLists.vue

7
src/views/activiti/form/ProcessMaterialWarehousing.vue

@ -5,7 +5,8 @@
<a-tab-pane tab="流程正文" key="1" forceRender>
<process-material-warehousing-form :isNew="isNew" :processData="processData" :disabled="disabled"
@afterSubmit="afterSub" @close="close" :task="task" @passTask="passTask"
@backTask="backTask" @loadData="loadData"/>
@backTask="backTask" @loadData="loadData" :isPlanType="isPlanType"
:isSourceCapital="isSourceCapital"/>
</a-tab-pane>
<a-tab-pane tab="流程节点图" key="2" forceRender>
@ -33,6 +34,10 @@
/*流程数据*/
isNew: { type: Boolean, default: false, required: false },
task: { type: Boolean, default: false, required: false },
/*采购类型*/
isPlanType: {type: Boolean, default: false, required: false},
/*资金来源*/
isSourceCapital:{type: Boolean, default: false, required: false},
processData: {
type: Object,
default: () => {

86
src/views/activiti/form/ProcessMaterialWarehousingForm.vue

@ -9,6 +9,11 @@
<a-input v-decorator="['id']" placeholder="" style="width: 100%"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="planType" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['planType']" placeholder="" style="width: 100%"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
@ -55,8 +60,8 @@
</a-col>
<a-col :span="8" v-show="this.isTargetLibrary">
<a-form-item label="入库目标库" :labelCol="labelCol" :wrapperCol="wrapperCol">
<!-- <j-select-item v-decorator="['targetLibrary',validatorRules.targetLibrary]"/>-->
<j-select-depart v-decorator="['targetLibrary']" multi />
<!-- <j-select-item v-decorator="['targetLibrary',validatorRules.targetLibrary]"/>-->
<j-select-depart v-decorator="['targetLibrary']" multi/>
<!-- <a-radio v-for="item in puwwOptions" :key="item.id" :label="item.invisibleCode" :value="item.id"></a-radio>-->
</a-form-item>
</a-col>
@ -66,6 +71,20 @@
style="width: 100%"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="是否属于直达物资" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['ifDirect',validatorRules.ifDirect]"
:trigger-change="true" dictCode="if_status"
placeholder="请选择是否属于直达物资"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="是否需要送检" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag type="list" v-decorator="['ifInspection',validatorRules.ifInspection]"
:trigger-change="true" dictCode="if_status"
placeholder="请选择是否需要送检"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-upload v-decorator="['fileId']" :trigger-change="true"></j-upload>
@ -103,14 +122,21 @@
</a-form>
</j-form-container>
<div class="div_process">
<a-form-item v-if="!disabled" :wrapperCol="{ span: 24 }" style="text-align: center">
<a-button type="primary" :disabled="disabled||btndisabled" @click="handleSubmit">保存</a-button>
<a-button style="margin-left: 8px" type="primary" :disabled="disabled||btndisabled" @click="applySubmit">提交申请
</a-button>
<a-button style="margin-left: 8px" :disabled="disabled" @click="close">取消</a-button>
</a-form-item>
<a-form-item v-if="task" :wrapperCol="{ span: 24 }" style="text-align: center">
<a-button type="primary" @click="passTask">通过</a-button>
<div v-if="isGetOneAndLast">
<a-form-item v-if="!disabled" :wrapperCol="{ span: 24 }" style="text-align: center">
<a-button type="primary" :disabled="disabled||btndisabled" @click="handleSubmit">保存</a-button>
<a-button style="margin-left: 8px" type="primary" :disabled="disabled||btndisabled" @click="applySubmit">提交申请
</a-button>
<a-button style="margin-left: 8px" :disabled="disabled" @click="close">取消</a-button>
</a-form-item>
<a-form-item v-if="task" :wrapperCol="{ span: 24 }" style="text-align: center">
<a-button type="primary" @click="passTask">通过</a-button>
<a-button style="margin-left: 8px" @click="backTask">驳回</a-button>
</a-form-item>
</div>
<a-form-item v-if="isPlanType" :wrapperCol="{ span: 24 }" style="text-align: center">
<a-button type="primary" @click="saveAndpassTask">保存并通过</a-button>
<!-- <a-button type="primary" @click="ewrold">下载</a-button>-->
<a-button style="margin-left: 8px" @click="backTask">驳回</a-button>
</a-form-item>
</div>
@ -150,7 +176,7 @@
puwwOptions: [],
labelCol: {
xs: { span: 24 },
sm: { span: 6 }
sm: { span: 8 }
},
wrapperCol: {
xs: { span: 24 },
@ -316,7 +342,9 @@
// 'blur'
processUdgetPlanId: { rules: [{ required: true, message: '关联预算流程不能为空!' }] },
targetLibrary: { rules: [{ required: this.isTargetLibrary, message: '入库目标库不能为空!' }] },
warehousingBatch: { rules: [{ required: true, message: '入库总批次不能为空!' }] }
warehousingBatch: { rules: [{ required: true, message: '入库总批次不能为空!' }] },
ifDirect: { rules: [{ required: true, message: '是否属于直达物资不能为空!' }] },
ifInspection: { rules: [{ required: true, message: '是否需要送检不能为空!' }] }
}
}
},
@ -334,6 +362,10 @@
isNew: { type: Boolean, default: false, required: false },
/*是否处理流程*/
task: { type: Boolean, default: false, required: false },
/*采购类型*/
isPlanType: {type: Boolean, default: false, required: false},
/*资金来源*/
isSourceCapital:{type: Boolean, default: false, required: false},
//data
formData: {
type: Object,
@ -481,8 +513,8 @@
this.$message.error('请选择入库目标库')
return
}
}else {//
formData.targetLibrary=null;
} else {//
formData.targetLibrary = null
}
console.log('格式化后的数据', formData)
this.form.validateFields((err, values) => {
@ -504,7 +536,7 @@
formData.title = this.processData.title
formData.processInstanceId = this.processData.id
}
if(this.btndisabled === false){
if (this.btndisabled === false) {
this.btndisabled = true
httpAction(url, formData, method).then((res) => {
if (res.success) {
@ -537,8 +569,8 @@
this.$message.error('请选择入库目标库')
return
}
}else {//
formData.targetLibrary=null;
} else {//
formData.targetLibrary = null
}
formData.fileId = getStringArry(formData.fileId)
for (let i = 0; i < formData.processMaterialWarehousingListList.length; i++) {
@ -564,7 +596,7 @@
method = 'put'
}
console.log('格式化后的数据', formData)
if(this.btndisabled === false){
if (this.btndisabled === false) {
this.btndisabled = true
httpAction(url, formData, method).then((res) => {
if (res.success) {
@ -598,7 +630,7 @@
this.data = getRecord(this.data)
}
// console.log(this.data,'')
let fieldval = pick(this.data, 'id', 'company', 'createTime', 'departId', 'createBy', 'processUdgetPlanId', 'materialType', 'targetLibrary', 'warehousingBatch', 'fileId', 'opinion')
let fieldval = pick(this.data, 'id', 'company', 'createTime', 'departId', 'createBy', 'processUdgetPlanId', 'materialType', 'targetLibrary', 'warehousingBatch', 'fileId', 'opinion', 'planType', 'ifDirect', 'ifInspection')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
@ -686,6 +718,10 @@
}
this.processUdgetPlanIds = ids.join(',')
},
saveAndpassTask() {
this.handleSubmit()
this.passTask()
},
validateError(msg) {
this.$message.error(msg)
},
@ -713,6 +749,14 @@
// console.log('',res.result)
// }
// })
let res = val[0]
let param = {}
param.planType = res.planType
this.data = param
let fieldval = pick(this.data, 'planType')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})
},
/** 查询某个tab的数据 */
requestSubTableDatas(url, params, tab, success) {
@ -775,15 +819,17 @@
},
popupCallback(company, row, puwwcid) {
let res = JSON.parse(row)
console.log(res, '-----------------')
let param = {}
param.createBy = res.username
param.company = company
param.departId = res.departIds
param.createTime = getCurrentTime()
param.targetLibrary = res.departIds
param.planType = res.planType
this.data = param
let fieldval = pick(this.data, 'createBy', 'company', 'departId', 'createTime', 'targetLibrary')
let fieldval = pick(this.data, 'createBy', 'company', 'departId', 'createTime', 'targetLibrary', 'planType')
this.$nextTick(() => {
this.form.setFieldsValue(fieldval)
})

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

@ -10,6 +10,11 @@
<a-input v-decorator="['id']" placeholder="" style="width: 100%"/>
</a-form-item>
</a-col>
<a-col :span="8" v-show="false">
<a-form-item label="ID" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['putUnder']" placeholder="" style="width: 100%"/>
</a-form-item>
</a-col>
<a-col :span="8">
<a-form-item label="流程发起人" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-select-user-by-dep v-decorator="['createBy']" disabled/>
@ -593,6 +598,8 @@
//this.showFlowData()
if (!this.isPlanType){
this.isGetOneAndLast=true;
}else {
this.hiegs=false;
}
this.getAllTable()

61
src/views/activiti/todoManage.vue

@ -150,7 +150,7 @@
<a-modal :title="lcModa.title" v-model="lcModa.visible" :footer="null" :maskClosable="false" width="80%" height="93%">
<component :disabled="lcModa.disabled" v-if="lcModa.visible" :is="lcModa.formComponent"
:processData="lcModa.processData" :isNew="lcModa.isNew" :isPlanType="lcModa.isPlanType" :isSourceCapital="lcModa.isSourceCapital"
:task="true"
:task="true" :hieg ="lcModa.hieg"
@passTask="()=>passTask(lcModa.processData)"
@backTask="()=>backTask(lcModa.processData)" :procInstId="lcModa.procInstId"
:pictureId="lcModa.pictureId"
@ -165,7 +165,7 @@
<j-editor v-model="form.comment"></j-editor>
</a-form-item>
<a-form-item label="下一审批人" prop="assignees" v-show="showAssign" :error="error">
<a-form-item label="下一审批人" prop="assignees" v-show="false" :error="error" >
<a-select
v-model="form.assignees"
placeholder="请选择"
@ -287,6 +287,7 @@
visible: false,
formComponent: null,
isNew: false,
hieg: true,
isSourceCapital:false,
isPlanType: false
},
@ -470,33 +471,67 @@
}
this.lcModa.disabled = true
//
if (r.processName === '预算计划采购流程') {
let userInfo = sessionStorage.getItem('USER_INFORMATION')
let res = JSON.parse(userInfo)
let param = {}
param.id = r.procDefId
// param.id = r.procDefId
param.id = r.procInstId
param.tableName = r.tableName
param.tableId = r.tableId
param.username = res.username
let res2 =await this.getAction('/hy/processMaterialsAllot/getOne', param)
if (res2.success) {
if (res2.result) {
this.lcModa.isPlanType = true;
this.lcModa.isSourceCapital = true;
this.lcModa.disabled = false;
// let res2 =await this.getAction('/hy/processMaterialsAllot/getOne', param)
// if (res2.success) {
// if (res2.result) {
// this.lcModa.isPlanType = true;
// this.lcModa.isSourceCapital = true;
// this.lcModa.disabled = false;
// }
// }
// let res1=await this.getAction('/hy/processMaterialsAllot/getLast', param)
// if (res1.success) {
// if (res1.result) {
// if (param.username==res1.result.username){
// this.lcModa.isPlanType = true;
// this.lcModa.isSourceCapital = true;
// this.lcModa.disabled = false;
// }
// }
// }
//username
let res3=await this.getAction('/hy/processMaterialsAllot/getCurrent', param)
if (res3.success) {
if (res3.result) {
if(param.username==res3.result.relateId){
if ( res3.result.name=='生产供应站' || res3.result.name=='物装公司' || res3.result.name=='采购员' ){
this.lcModa.isPlanType = true;
this.lcModa.isSourceCapital = true;
this.lcModa.disabled = false;
this.lcModa.hieg=false;
}
}
}
}
let res1=await this.getAction('/hy/processMaterialsAllot/getLast', param)
}
if (r.processName === '物资入库流程') {
let userInfo = sessionStorage.getItem('USER_INFORMATION')
let res = JSON.parse(userInfo)
let param = {}
param.id = r.procInstId
param.tableName = r.tableName
param.tableId = r.tableId
param.username = res.username
let res1=await this.getAction('/hy/processMaterialsAllot/getCurrent', param)
if (res1.success) {
if (res1.result) {
if (param.username==res1.result.username){
if (param.username==res1.result.relateId && res1.result.name=='采购员'){
console.log(res1.result)
this.lcModa.isPlanType = true;
this.lcModa.isSourceCapital = true;
this.lcModa.disabled = false;
}
}
}
}

5
src/views/suppliesstronger/ProcessSuppliesStrongerLists.vue

@ -345,7 +345,10 @@
title:'金额',
align:"center",
scopedSlots: { customRender: 'rates' },
dataIndex: 'rates'
dataIndex: 'rates',
customRender:function (text) {
return !text?"":(Math.floor(text * 100) / 100 )
}
},
{
title:'仓储地点',

9
src/views/wastematerials/ProcessWasteMaterialsLists.vue

@ -99,6 +99,9 @@
<!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"-->
<span slot="rates" slot-scope="text, record">
Math.floor(text * 100) / 100
</span>
<span slot="supplierName" slot-scope="text, record">
<j-ellipsis :value="text" :length="10"/>
</span>
@ -255,7 +258,11 @@
{
title:'金额(元)',
align:"center",
dataIndex: 'rates'
dataIndex: 'rates',
customRender:function (text) {
return !text?"":(Math.floor(text * 100) / 100 )
}
},
{
title:'生产日期',

Loading…
Cancel
Save