diff --git a/src/views/activiti/applyHome.vue b/src/views/activiti/applyHome.vue
index 5bd72e3..8e0d0e8 100644
--- a/src/views/activiti/applyHome.vue
+++ b/src/views/activiti/applyHome.vue
@@ -290,7 +290,7 @@
})
},
filterDictText(dictOptions, text) {
- console.log("-=-=",dictOptions,text);
+ // console.log("-=-=",dictOptions,text);
if (dictOptions instanceof Array) {
for (let dictItem of dictOptions) {
if (text === dictItem.value) {
diff --git a/src/views/burst/form/purchase/ProcessIndustrialDeliveryForm.vue b/src/views/burst/form/purchase/ProcessIndustrialDeliveryForm.vue
index eea40d9..740a478 100644
--- a/src/views/burst/form/purchase/ProcessIndustrialDeliveryForm.vue
+++ b/src/views/burst/form/purchase/ProcessIndustrialDeliveryForm.vue
@@ -22,7 +22,10 @@
-
+
+
@@ -505,4 +508,7 @@ import { getStringArry } from '@api/manage'
\ No newline at end of file
diff --git a/src/views/burst/form/purchase/ProcessIndustrialPurchaseForm.vue b/src/views/burst/form/purchase/ProcessIndustrialPurchaseForm.vue
index 25c3317..46de104 100644
--- a/src/views/burst/form/purchase/ProcessIndustrialPurchaseForm.vue
+++ b/src/views/burst/form/purchase/ProcessIndustrialPurchaseForm.vue
@@ -2,26 +2,24 @@
-
+
-
-
-
+
-
+
-
+
@@ -43,17 +41,17 @@
-
-
-
-
-
-
+
+
+
+
+
@@ -66,7 +64,7 @@
-
+
@@ -79,28 +77,28 @@
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
+
-
+
@@ -152,7 +150,8 @@ import { FormTypes, getRefPromise, VALIDATE_NO_PASSED, validateFormAndTables } f
import JSelectUserByDep from '@/components/jeecgbiz/JSelectUserByDep'
import JDictSelectTag from '@/components/dict/JDictSelectTag'
import JSelectCompany from '../../../../components/jeecgbiz/JSelectCompany'
-import { getStringArry, httpAction } from '@api/manage'
+import { getCurrentTime, getStringArry, httpAction } from '@api/manage'
+import pick from 'lodash.pick'
export default {
name: 'ProcessIndustrialPurchaseForm',
@@ -168,7 +167,6 @@ import { getStringArry, httpAction } from '@api/manage'
},
data() {
return {
-
isGetOneAndLast: true, //提交按钮显示
btndisabled: false,
labelCol: {
@@ -179,39 +177,41 @@ import { getStringArry, httpAction } from '@api/manage'
xs: { span: 24 },
sm: { span: 16 },
},
+ labelCol3: {
+ xs: { span: 24 },
+ sm: { span: 6 }
+ },
+ wrapperCol3: {
+ xs: { span: 24 },
+ sm: { span: 5 }
+ },
// form:{
// planType:null,
// company:null,
// departId:null,
// },
validatorRules: {
- planType: [
- { required: true, message: '请输入计划采购类型!'},
- ],
- ifDirect: [
- { required: true, message: '请输入是否属于直达物资!'},
- ],
- ifInspection: [
+
+ planType: { rules:[
+ { required: true, message: '请输入计划采购类型!'}
+ ]},
+ ifDirect: { rules:[
+ { required: true, message: '请输入是否属于直达物资!'}
+ ]},
+ ifInspection: { rules:[
{ required: true, message: '请输入是否需要送检!'},
- ],
- sourceCapital: [
+ ]},
+ sourceCapital: { rules:[
{ required: true, message: '请输入资金来源!'},
- ],
- departId: [
- { required: true, message: '请输入流程发起部门!'},
- ],
- materialType: [
+ ]},
+
+ materialType: { rules:[
{ required: true, message: '请输入物资类型!'},
- ],
- orderNumber: [
+ ]},
+ orderNumber: { rules:[
{ required: true, message: '请输入顺序号!'},
- ],
- actStatus: [
- { required: true, message: '请输入流程状态描述!'},
- ],
- warehousingBatch: [
- { required: true, message: '请输入入库批次号!'},
- ],
+ ]},
+ needTime: { rules:[{ required: true, message: '请选择需求时间!' } ]},
},
// 新增时子表默认添加几行空数据
addDefaultRowNum: 1,
@@ -302,14 +302,14 @@ import { getStringArry, httpAction } from '@api/manage'
defaultValue:'',
validateRules: [{ required: true, message: '${title}不能为空' }],
},
- {
- title: '执行标准',
- key: 'materialStandard',
- type: FormTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
+ // {
+ // title: '执行标准',
+ // key: 'materialStandard',
+ // type: FormTypes.input,
+ // width:"200px",
+ // placeholder: '请输入${title}',
+ // defaultValue:'',
+ // },
{
title: '交货时间',
key: 'deliveryTime',
@@ -318,27 +318,19 @@ import { getStringArry, httpAction } from '@api/manage'
placeholder: '请输入${title}',
defaultValue:'',
},
- {
- title: '备注',
- key: 'remarks',
- type: FormTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
- {
- title: '关联id',
- key: 'processIndustrialPurchaseId',
- type: FormTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- validateRules: [{ required: true, message: '${title}不能为空' }],
- },
+ // {
+ // title: '关联id',
+ // key: 'processIndustrialPurchaseId',
+ // type: FormTypes.input,
+ // width:"200px",
+ // placeholder: '请输入${title}',
+ // defaultValue:'',
+ // validateRules: [{ required: true, message: '${title}不能为空' }],
+ // },
{
title: '保质期',
key: 'expirationDate',
- type: FormTypes.date,
+ type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
@@ -369,23 +361,23 @@ import { getStringArry, httpAction } from '@api/manage'
// placeholder: '请输入${title}',
// defaultValue:'',
// },
- {
- title: '商品详情id',
- key: 'commodityDetailsId',
- type: FormTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- validateRules: [{ required: true, message: '${title}不能为空' }],
- },
- {
- title: '物料描述',
- key: 'materialDescription',
- type: FormTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- },
+ // {
+ // title: '商品详情id',
+ // key: 'commodityDetailsId',
+ // type: FormTypes.input,
+ // width:"200px",
+ // placeholder: '请输入${title}',
+ // defaultValue:'',
+ // validateRules: [{ required: true, message: '${title}不能为空' }],
+ // },
+ // {
+ // title: '物料描述',
+ // key: 'materialDescription',
+ // type: FormTypes.input,
+ // width:"200px",
+ // placeholder: '请输入${title}',
+ // defaultValue:'',
+ // },
{
title: '生产时间',
key: 'productionTime',
@@ -393,7 +385,7 @@ import { getStringArry, httpAction } from '@api/manage'
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
- validateRules: [{ required: true, message: '${title}不能为空' }],
+ // validateRules: [{ required: true, message: '${title}不能为空' }],
},
// {
// title: '入库时间',
@@ -403,23 +395,31 @@ import { getStringArry, httpAction } from '@api/manage'
// placeholder: '请输入${title}',
// defaultValue:'',
// },
+ // {
+ // title: '商品id',
+ // key: 'commodityId',
+ // type: FormTypes.input,
+ // width:"200px",
+ // placeholder: '请输入${title}',
+ // defaultValue:'',
+ // validateRules: [{ required: true, message: '${title}不能为空' }],
+ // },
{
- title: '商品id',
- key: 'commodityId',
+ title: '供应商',
+ key: 'supplierId',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
- validateRules: [{ required: true, message: '${title}不能为空' }],
+ // validateRules: [{ required: true, message: '${title}不能为空' }],
},
{
- title: '供应商',
- key: 'supplierId',
+ title: '备注',
+ key: 'remarks',
type: FormTypes.input,
width:"200px",
placeholder: '请输入${title}',
defaultValue:'',
- validateRules: [{ required: true, message: '${title}不能为空' }],
},
// {
// title: '库房id',
@@ -430,15 +430,15 @@ import { getStringArry, httpAction } from '@api/manage'
// defaultValue:'',
// validateRules: [{ required: true, message: '${title}不能为空' }],
// },
- {
- title: '核算属性',
- key: 'materialType',
- type: FormTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- validateRules: [{ required: true, message: '${title}不能为空' }],
- },
+ // {
+ // title: '核算属性',
+ // key: 'materialType',
+ // type: FormTypes.input,
+ // width:"200px",
+ // placeholder: '请输入${title}',
+ // defaultValue:'',
+ // validateRules: [{ required: true, message: '${title}不能为空' }],
+ // },
// {
// title: '删除时间',
// key: 'delTime',
@@ -455,15 +455,15 @@ import { getStringArry, httpAction } from '@api/manage'
// placeholder: '请输入${title}',
// defaultValue:'',
// },
- {
- title: '批次数',
- key: 'supplierBatch',
- type: FormTypes.input,
- width:"200px",
- placeholder: '请输入${title}',
- defaultValue:'',
- validateRules: [{ required: true, message: '${title}不能为空' }],
- },
+ // {
+ // title: '批次数',
+ // key: 'supplierBatch',
+ // type: FormTypes.input,
+ // width:"200px",
+ // placeholder: '请输入${title}',
+ // defaultValue:'',
+ // validateRules: [{ required: true, message: '${title}不能为空' }],
+ // },
// {
// title: '是否完结0未完结 1完结',
// key: 'status',
@@ -477,6 +477,7 @@ import { getStringArry, httpAction } from '@api/manage'
url: {
add: "/burst/processIndustrialPurchase/add",
edit: "/burst/processIndustrialPurchase/edit",
+ addFromTableApply: "/burst/processIndustrialPurchase/addFromTableApply",
processIndustrialPurchaseMaterial: {
list: '/burst/processIndustrialPurchase/queryProcessIndustrialPurchaseMaterialByMainId'
},
@@ -485,12 +486,22 @@ import { getStringArry, httpAction } from '@api/manage'
}
},
props: {
+ /*流程数据*/
+ processData: {
+ type: Object,
+ default: () => {
+ return {}
+ },
+ required: false
+ },
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
},
+ /*是否新增*/
+ isNew: { type: Boolean, default: false, required: false },
/*是否处理流程*/
task: { type: Boolean, default: false, required: false },
/*采购类型*/
@@ -508,6 +519,9 @@ import { getStringArry, httpAction } from '@api/manage'
this.popupCallback(company, userInfo, puwwcid)
},
methods: {
+ onChange(date, dateString) {
+ console.log(date, dateString);
+ },
//物资类型切换
elect(val) {
if (val != undefined) {
@@ -532,7 +546,7 @@ import { getStringArry, httpAction } from '@api/manage'
}
let formData = this.classifyIntoFormData(allValues)
console.log("=--=-=-",formData);
- /* if (formData.processIndustrialPurchaseMaterialList==0){
+ if (formData.processIndustrialPurchaseMaterialList == 0){
this.$message.error('请填写清单内容')
return
}
@@ -543,11 +557,6 @@ import { getStringArry, httpAction } from '@api/manage'
this.describes = this.describes + '---' + formData.processIndustrialPurchaseMaterialList[i].materialName
}
}
-
- */
-
-
-
formData.fileId = getStringArry(formData.fileId)
// if (this.materialPrice != 0 && this.materialPrice != null) {
// formData.materialPrice = this.materialPrice;
@@ -561,13 +570,14 @@ import { getStringArry, httpAction } from '@api/manage'
}
// console.log(this.opinion, '流程说明')
this.form.validateFields((err, values) => {
+
if (!err) {
// console.log(this.processData, '申请列表传值数据')
formData.procDefId = this.processData.id
formData.procDeTitle = this.processData.name
formData.title = this.processData.description
//formData.sourceCapital
- // console.log('this.planType++', this.planType)
+ // console.log('this.planType++');
if (!formData.tableName) formData.tableName = this.processData.businessTable
var url = this.url.addFromTableApply
let method = 'post'
@@ -598,18 +608,18 @@ import { getStringArry, httpAction } from '@api/manage'
console.log(formData, '表单数据')
if (this.btndisabled === false) {
this.btndisabled = true
- // httpAction(url, formData, method).then((res) => {
- // if (res.success) {
- // this.$message.success('提交申请成功!')
- // //todo 将表单的数据传给父组件
- // this.$emit('loadData')
- // this.close()
- // } else {
- // this.$message.error(res.message)
- // }
- // }).finally(() => {
- // this.btndisabled = false
- // })
+ httpAction(url, formData, method).then((res) => {
+ if (res.success) {
+ this.$message.success('提交申请成功!')
+ //todo 将表单的数据传给父组件
+ this.$emit('loadData')
+ this.close()
+ } else {
+ this.$message.error(res.message)
+ }
+ }).finally(() => {
+ this.btndisabled = false
+ })
}
}
})
@@ -700,19 +710,19 @@ import { getStringArry, httpAction } from '@api/manage'
if(!!formData.ifInspection) formData.ifInspection = parseInt(formData.ifInspection);
console.log(formData, '格式化的数据');
if (this.btndisabled === false) {
- // this.btndisabled = true
- // httpAction(url, formData, method).then((res) => {
- // if (res.success) {
- // //todo 将表单的数据传给父组件
- // if (e != true) {
- // this.$emit('afterSubmit', formData)
- // }
- // } else {
- // this.$message.error(res.message)
- // }
- // }).finally(() => {
- // this.btndisabled = false
- // })
+ this.btndisabled = true
+ httpAction(url, formData, method).then((res) => {
+ if (res.success) {
+ //todo 将表单的数据传给父组件
+ if (e != true) {
+ this.$emit('afterSubmit', formData)
+ }
+ } else {
+ this.$message.error(res.message)
+ }
+ }).finally(() => {
+ this.btndisabled = false
+ })
}
}
})
@@ -721,9 +731,18 @@ import { getStringArry, httpAction } from '@api/manage'
},
popupCallback(company, row, puwwcid) {
let res = JSON.parse(row)
- this.form.planType = res.username
- this.form.company = company
- this.form.departId = res.departIds
+ let param = {}
+ param.createBy = res.username
+ param.company = company
+ param.departId = res.departIds;
+ //查询数据
+ // this.getSortNum(res.departIds);
+ // param.createTime = getCurrentTime();
+ this.data = param
+ let fieldval = pick(this.data, 'createBy', 'company', 'departId')
+ this.$nextTick(() => {
+ this.form.setFieldsValue(fieldval);
+ })
// if (puwwcid != null) {
// let params = {}
// params.id = puwwcid
@@ -811,7 +830,7 @@ import { getStringArry, httpAction } from '@api/manage'
close() {
this.visible = false
this.$emit('close')
- this.$refs.form.clearValidate();
+ // this.$refs.form.clearValidate();
},
}
diff --git a/src/views/burst/form/purchase/ProcessIndustrialRestoreForm.vue b/src/views/burst/form/purchase/ProcessIndustrialRestoreForm.vue
index aaeca0c..eaaff8f 100644
--- a/src/views/burst/form/purchase/ProcessIndustrialRestoreForm.vue
+++ b/src/views/burst/form/purchase/ProcessIndustrialRestoreForm.vue
@@ -22,7 +22,10 @@
-
+
+
@@ -507,4 +510,7 @@ import { getAction, getStringArry } from '@/api/manage'
\ No newline at end of file
diff --git a/src/views/burst/form/purchase/ProcessIndustrialScrapsForm.vue b/src/views/burst/form/purchase/ProcessIndustrialScrapsForm.vue
index 13328d3..ed8d829 100644
--- a/src/views/burst/form/purchase/ProcessIndustrialScrapsForm.vue
+++ b/src/views/burst/form/purchase/ProcessIndustrialScrapsForm.vue
@@ -28,7 +28,10 @@
-
+
+
@@ -495,4 +498,7 @@ import { getStringArry } from '@api/manage'
\ No newline at end of file
diff --git a/src/views/burst/form/purchase/ProcessIndustrialStorageForm.vue b/src/views/burst/form/purchase/ProcessIndustrialStorageForm.vue
index 1e011aa..7dc37cd 100644
--- a/src/views/burst/form/purchase/ProcessIndustrialStorageForm.vue
+++ b/src/views/burst/form/purchase/ProcessIndustrialStorageForm.vue
@@ -27,7 +27,10 @@
-
+
+
@@ -529,4 +532,7 @@ import { getStringArry } from '@api/manage'
\ No newline at end of file