|
|
|
@ -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) |
|
|
|
|
}) |
|
|
|
|