拆分详情合并按钮
This commit is contained in:
@@ -558,4 +558,8 @@ module.exports = {
|
|||||||
deleteNodes:'If there are child nodes under this node, they will be deleted synchronously. Are you sure to delete this data?',
|
deleteNodes:'If there are child nodes under this node, they will be deleted synchronously. Are you sure to delete this data?',
|
||||||
leastTwo: 'please select at least two pieces of data',
|
leastTwo: 'please select at least two pieces of data',
|
||||||
vehicleInProductionDate:'vehicle in Production Date',
|
vehicleInProductionDate:'vehicle in Production Date',
|
||||||
|
mergeTerms:'determine merger terms',
|
||||||
|
documentSplitTemplate:'document split template',
|
||||||
|
batSetting:'batch setting',
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -562,5 +562,8 @@ module.exports = {
|
|||||||
vehicleInProductionDate:'在产车实施日期',
|
vehicleInProductionDate:'在产车实施日期',
|
||||||
deleteNodes:'该节点下若有子节点将同步删除,确认删除该条数据?',
|
deleteNodes:'该节点下若有子节点将同步删除,确认删除该条数据?',
|
||||||
leastTwo:'请选择至少两条数据',
|
leastTwo:'请选择至少两条数据',
|
||||||
|
mergeTerms:'确定合并条款',
|
||||||
|
documentSplitTemplate:'文档拆分模板',
|
||||||
|
batSetting:'批量设置',
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading" style="width: 100%;">
|
||||||
<a-form-model :model="formInline" v-if="isFormInline" class="formAdd" :rules="rules" ref="ruleForm1">
|
<a-form-model :model="formInline" v-if="isFormInline" class="formAdd" :rules="rules" ref="ruleForm1">
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<div v-for="(item,index) in dataList" :key="index">
|
<div v-for="(item,index) in dataList" :key="index">
|
||||||
|
|||||||
@@ -0,0 +1,544 @@
|
|||||||
|
<template>
|
||||||
|
<a-spin :spinning="confirmLoading" style="width: 100%">
|
||||||
|
<a-form-model :model="formInline" v-if="isFormInline" class="formAdd" :rules="rules" ref="ruleForm1">
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<div v-for="(item,index) in dataList" :key="index">
|
||||||
|
<a-col :span="12" v-if="item.field_show_type === '1'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<a-input class="box-input" v-model="formInline[item.db_field_name]"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('PleaseEnter')+item.db_field_txt"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '2'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('selectStatus')" :type="'checkbox'"
|
||||||
|
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '5'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<a-date-picker class="box-input" v-model="formInline[item.db_field_name]"
|
||||||
|
@change="dateChange(item)"
|
||||||
|
format="YYYY-MM-DD"
|
||||||
|
:disabled="disabled"
|
||||||
|
style="width: 100%"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '6'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<a-range-picker v-model="formInline[item.db_field_name]"
|
||||||
|
:disabled="disabled"
|
||||||
|
@change="onChange(item.db_field_name)"></a-range-picker>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '2'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<a-input-number class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline[item.db_field_name]" :min="1" :max="99999999"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '3'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<j-dict-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('selectStatus')" :type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '4'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<j-multi-select-tag class="box-input" v-model="formInline[item.db_field_name]"
|
||||||
|
:disabled="disabled"
|
||||||
|
:placeholder="$t('selectStatus')" :type="'select'"
|
||||||
|
:triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === 'RADIO'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<j-dict-select-tag v-model="formInline[item.db_field_name]" :placeholder="$t('selectStatus')"
|
||||||
|
:disabled="disabled"
|
||||||
|
:type="'radio'" :triggerChange="false" :dictCode="item.dict_field"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '8'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<a-textarea :placeholder="$t('selectStatus')"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline[item.db_field_name]" :rows="4"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === 'treeSelect'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<a-tree-select
|
||||||
|
v-model="formInline[item.db_field_name]"
|
||||||
|
style="width: 100%"
|
||||||
|
:maxTagCount="1"
|
||||||
|
:tree-data="treeData"
|
||||||
|
tree-checkable
|
||||||
|
placeholder="Please select"
|
||||||
|
/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '7'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<uploadFile ref="uploadFile" :accept="accept" :disabled="disabled" @uploadSuccess="uploadSuccess"></uploadFile>
|
||||||
|
<!-- <a-button type="primary" class="button-text"-->
|
||||||
|
<!-- @click="clickButtonToUpload(item.db_field_name)">-->
|
||||||
|
<!-- {{ (formInline[item.db_field_name] === 'null' || formInline[item.db_field_name] === '' ||-->
|
||||||
|
<!-- formInline[item.db_field_name] == null) ? $t('clickUpload') : $t('viewUploadedFiles')-->
|
||||||
|
<!-- }}-->
|
||||||
|
<!-- </a-button>-->
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '9'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<span class="title-text-text" :title="item.db_field_txt">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<PersonnelSelection :query="item"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline[item.db_field_name]"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.field_show_type === '10'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required" v-if="item.field_must_input == 1">*</span>
|
||||||
|
<!-- <span :class="{'title-text-text':false}">{{item.db_field_en_name}}</span><br>-->
|
||||||
|
<span class="title-text-text">{{item.db_field_txt}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.db_field_name">
|
||||||
|
<Standardselection :query="item"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="formInline[item.db_field_name]"/>
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
|
</div>
|
||||||
|
</a-row>
|
||||||
|
|
||||||
|
</a-form-model>
|
||||||
|
</a-spin>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import uploadFile from '@/components/OcrUpload/index'
|
||||||
|
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||||
|
import Standardselection from '@/components/Standardselection/index'
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
import eventBUs from '../../common/event'
|
||||||
|
import moment from 'moment'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SplitBatForm',
|
||||||
|
components: {
|
||||||
|
uploadFile,
|
||||||
|
Standardselection,
|
||||||
|
PersonnelSelection
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
url: {
|
||||||
|
type: Object,
|
||||||
|
default: {}
|
||||||
|
},
|
||||||
|
flag: {
|
||||||
|
type: String,
|
||||||
|
default: ''
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
// accept:{
|
||||||
|
// type:String,
|
||||||
|
// },
|
||||||
|
ids: {
|
||||||
|
type:String,
|
||||||
|
default:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
formInline: {},
|
||||||
|
isFormInline: false,
|
||||||
|
rules: {},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 6 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 17 }
|
||||||
|
},
|
||||||
|
dataList: [],
|
||||||
|
ruleList: [],
|
||||||
|
validatorRules: {},
|
||||||
|
confirmLoading: false,
|
||||||
|
uploadName: 'attId',
|
||||||
|
accept:'application/pdf',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getForm()
|
||||||
|
// console.log('idssss111',this.ids)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
sumber() {
|
||||||
|
// console.log('vilidate',this.formInline)
|
||||||
|
this.$refs.ruleForm1.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
let url = ''
|
||||||
|
if (this.formInline.id) {
|
||||||
|
url = this.url.updateInfo
|
||||||
|
} else {
|
||||||
|
url = this.url.addInfo
|
||||||
|
}
|
||||||
|
console.log('res',this.ids)
|
||||||
|
this.formInline.ids=this.ids
|
||||||
|
getAction(url, this.formInline).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
eventBUs.$emit('searchReset')
|
||||||
|
this.$emit('addFormClick')
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
clickButtonToUpload(current) {
|
||||||
|
this.$refs.uploadFile.visible = true
|
||||||
|
// this.uploadName = current
|
||||||
|
},
|
||||||
|
/** 上传文件的回调 */
|
||||||
|
uploadSuccess(data) {
|
||||||
|
// console.log(data)
|
||||||
|
let attIdList = []
|
||||||
|
if(data && data.length>0){
|
||||||
|
data.map(item => {
|
||||||
|
attIdList.push(item.id || data.name)
|
||||||
|
})
|
||||||
|
/** 赋值给当前对应的表单文件 */
|
||||||
|
this.formInline[this.uploadName] = attIdList.join(',')
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
// console.log('form',this.formInline)
|
||||||
|
}else{
|
||||||
|
this.formInline[this.uploadName]=''
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
// console.log('form',this.formInline)
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleInput(value) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.formInline = { ...this.formInline }
|
||||||
|
this.$refs.ruleForm1.validateField([value])
|
||||||
|
})
|
||||||
|
},
|
||||||
|
IntegrateData() {
|
||||||
|
this.isFormInline = false
|
||||||
|
let rules = {}
|
||||||
|
this.ruleList.forEach((res, index) => {
|
||||||
|
const rule = []
|
||||||
|
if (res.field_must_input == 1) {
|
||||||
|
if (res.field_show_type === '1') {
|
||||||
|
rule.push({
|
||||||
|
required: true,
|
||||||
|
message: res.db_field_txt + '不能为空',
|
||||||
|
trigger: 'blur'
|
||||||
|
})
|
||||||
|
if(res.db_field_name=='standNumber'){
|
||||||
|
rule.push(
|
||||||
|
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||||
|
)
|
||||||
|
}else if(res.db_field_name=='standName'){
|
||||||
|
rule.push(
|
||||||
|
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
} else if (res.field_show_type === 'CHECKBOX' || res.field_show_type === 'list_multi' ||
|
||||||
|
res.field_show_type === 'date' || res.field_show_type === 'file') {
|
||||||
|
rule.push({
|
||||||
|
required: true,
|
||||||
|
message: res.db_field_txt + '不能为空',
|
||||||
|
trigger: 'change'
|
||||||
|
})
|
||||||
|
} else if (res.field_show_type === 'NUMBER') {
|
||||||
|
rule.push({
|
||||||
|
required: true,
|
||||||
|
message: res.db_field_txt + '不能为空',
|
||||||
|
trigger: 'blur'
|
||||||
|
})
|
||||||
|
} else if (res.field_show_type === 'TEXTAREA') {
|
||||||
|
rule.push({
|
||||||
|
required: true,
|
||||||
|
message: res.db_field_txt + '不能为空',
|
||||||
|
trigger: 'blur'
|
||||||
|
})
|
||||||
|
} else if (res.field_show_type === 'RADIO' || res.field_show_type === '3') {
|
||||||
|
rule.push({
|
||||||
|
required: true,
|
||||||
|
message: res.db_field_txt + '不能为空',
|
||||||
|
trigger: 'change'
|
||||||
|
})
|
||||||
|
}else if (res.field_show_type === '7') {
|
||||||
|
rule.push({
|
||||||
|
required: true,
|
||||||
|
message: res.db_field_txt + '不能为空',
|
||||||
|
trigger: 'change',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rule.length > 0) {
|
||||||
|
rules[res.db_field_name] = rule
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// console.log(rules)
|
||||||
|
this.$set(this, 'rules', rules)
|
||||||
|
this.isFormInline = true
|
||||||
|
this.confirmLoading = false
|
||||||
|
},
|
||||||
|
getForm() {
|
||||||
|
this.confirmLoading = true
|
||||||
|
let params = {
|
||||||
|
flag: this.flag
|
||||||
|
}
|
||||||
|
getAction(this.url.getAddForm, params).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.dataList = res.result
|
||||||
|
this.ruleList = res.result
|
||||||
|
this.IntegrateData()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
dateChange(item) {
|
||||||
|
this.formInline[item.db_field_name] = moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD')
|
||||||
|
},
|
||||||
|
onChange(item) {
|
||||||
|
let dateOne = moment(this.formInline[item][0]).format('YYYY-MM-DD')
|
||||||
|
let dateTwo = moment(this.formInline[item][1]).format('YYYY-MM-DD')
|
||||||
|
this.formInline[item] = [dateOne, dateTwo]
|
||||||
|
},
|
||||||
|
edit(item) {
|
||||||
|
getAction(this.url.getDocumentInfo, { id: item.id }).then((res) => {
|
||||||
|
if (res.success) {
|
||||||
|
this.formInline = res.result[0]
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
add(){
|
||||||
|
this.formInline = {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style>
|
||||||
|
.formAdd .ant-form-item-label {
|
||||||
|
width: 130px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd .ant-form-item-control-wrapper {
|
||||||
|
display: inline-block;
|
||||||
|
width: calc(100% - 130px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*.formAdd .ant-form-item {*/
|
||||||
|
/* margin-bottom: 20px;*/
|
||||||
|
/*}*/
|
||||||
|
|
||||||
|
.itemModel .ant-form-item-control-wrapper {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-select-selection--single {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-select-selection--multiple {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-select-selection__rendered {
|
||||||
|
line-height: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-calendar-picker {
|
||||||
|
line-height: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-calendar-picker-input {
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input .ant-input-number-input-wrap {
|
||||||
|
line-height: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style scoped>
|
||||||
|
.box-title-text {
|
||||||
|
line-height: 1.4;
|
||||||
|
display: flex;
|
||||||
|
/*align-items: center;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text {
|
||||||
|
width: 90px;
|
||||||
|
text-align: right;
|
||||||
|
display: inline-block;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 16px;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.box-input {
|
||||||
|
display: inline-block;
|
||||||
|
height: 38px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemModel {
|
||||||
|
width: calc(100% - 130px);
|
||||||
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Required {
|
||||||
|
color: red;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title-text-text {
|
||||||
|
margin-top: 11px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-text {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: bold;
|
||||||
|
margin-left: 15px;
|
||||||
|
/*border-bottom: 1px #d9d9d9 dashed;*/
|
||||||
|
height: 30px;
|
||||||
|
margin-bottom: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.formAdd {
|
||||||
|
/*margin-bottom: 40px;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-text {
|
||||||
|
height: 38px;
|
||||||
|
width: calc(100% - 120px);
|
||||||
|
line-height: 38px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px #00B3BE solid;
|
||||||
|
color: #00B3BE;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -655,6 +655,12 @@
|
|||||||
url = this.url.addInfo
|
url = this.url.addInfo
|
||||||
}
|
}
|
||||||
let params = JSON.parse(JSON.stringify(this.formInline))
|
let params = JSON.parse(JSON.stringify(this.formInline))
|
||||||
|
|
||||||
|
Object.keys(params).forEach(res => {
|
||||||
|
if (params[res] instanceof Array) {
|
||||||
|
params[res] = params[res].join(',')
|
||||||
|
}
|
||||||
|
})
|
||||||
// console.log('item',this.item,JSON.stringify(this.item)=="{}")
|
// console.log('item',this.item,JSON.stringify(this.item)=="{}")
|
||||||
if(JSON.stringify(this.item)=="{}"){
|
if(JSON.stringify(this.item)=="{}"){
|
||||||
params.info_id=this.infoId
|
params.info_id=this.infoId
|
||||||
|
|||||||
@@ -39,32 +39,6 @@
|
|||||||
<div class="split-detail-right-wraper">
|
<div class="split-detail-right-wraper">
|
||||||
<div class="split-detail-search-header">
|
<div class="split-detail-search-header">
|
||||||
<search :flag="'4'" :url="url"/>
|
<search :flag="'4'" :url="url"/>
|
||||||
<!-- <a-form layout="inline" @keyup.enter.native="searchQuery(queryParams)">-->
|
|
||||||
<!-- <a-form-model-->
|
|
||||||
<!-- class="split-detail-content"-->
|
|
||||||
<!-- :model="queryParams"-->
|
|
||||||
<!-- ref="queryForm"-->
|
|
||||||
<!-- >-->
|
|
||||||
<!-- <a-row :gutter="24">-->
|
|
||||||
<!-- <a-col :md="6" :sm="8">-->
|
|
||||||
<!-- <a-form-model-item :label="$t('clauseName')" class="split-item">-->
|
|
||||||
<!-- <j-input :placeholder="$t('pleaseEnter') + $t('clauseName')" v-model="queryParams.serialNumber"></j-input>-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
<!-- </a-col>-->
|
|
||||||
<!-- <a-col :md="6" :sm="8">-->
|
|
||||||
<!-- <a-form-model-item :label="$t('clauseContent')" class="split-item">-->
|
|
||||||
<!-- <j-input :placeholder="$t('pleaseEnter')+$t('clauseContent')" v-model="queryParams.title"></j-input>-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
<!-- </a-col>-->
|
|
||||||
<!-- <a-col :md="6" :sm="6">-->
|
|
||||||
<!-- <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">-->
|
|
||||||
<!-- <a-button type="primary" @click="searchQuery" icon="search">{{$t('query')}}</a-button>-->
|
|
||||||
<!-- <a-button @click="searchReset" icon="reload" style="margin-left: 8px">{{ $t('reset') }}</a-button>-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </a-col>-->
|
|
||||||
<!-- </a-row>-->
|
|
||||||
<!-- </a-form-model>-->
|
|
||||||
<!-- </a-form>-->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<div class="operator-text" @click="handleCopyManage">
|
<div class="operator-text" @click="handleCopyManage">
|
||||||
@@ -105,7 +79,7 @@
|
|||||||
:url="url"
|
:url="url"
|
||||||
:flag="'4'"
|
:flag="'4'"
|
||||||
:OperationList="OperationList"
|
:OperationList="OperationList"
|
||||||
:infoId="infoId"
|
:infoId="$route.query.infoId"
|
||||||
:menuId="menuId"
|
:menuId="menuId"
|
||||||
showAction
|
showAction
|
||||||
@onSelectChange="onSelectChange"
|
@onSelectChange="onSelectChange"
|
||||||
@@ -113,27 +87,6 @@
|
|||||||
@editClick="editClick"
|
@editClick="editClick"
|
||||||
@showContent="showContent"
|
@showContent="showContent"
|
||||||
></table-data>
|
></table-data>
|
||||||
<!-- <a-table :data-source="tableData" :columns="columns" rowKey="id" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :pagination="false" :loading="loading" class="tag-con-table">-->
|
|
||||||
<!-- <template slot="clauseContent" slot-scope="text, record">-->
|
|
||||||
<!-- <a class="content-show" href="javascript:;" :title="record.serialContent" @click="showContent">{{record.serialContent}}</a>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- <template slot="action" slot-scope="text, record">-->
|
|
||||||
<!-- <a class="action-edit" href="javascript:;" @click="onEdit(record)">{{$t('edit')}}</a>-->
|
|
||||||
<!-- <a class="action-delete" href="javascript:;" @click="onCancel(record)">{{$t('delete')}}</a>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </a-table>-->
|
|
||||||
<!-- <div class="page" v-if="tableData.length > 0">-->
|
|
||||||
<!-- <a-pagination-->
|
|
||||||
<!-- :show-total= "total => $t('total')+` ${total} `+ $t('strip')"-->
|
|
||||||
<!-- show-quick-jumper-->
|
|
||||||
<!-- show-size-changer-->
|
|
||||||
<!-- :current="queryParams.pageNo"-->
|
|
||||||
<!-- :page-size.sync="queryParams.pageSize"-->
|
|
||||||
<!-- :total="total"-->
|
|
||||||
<!-- @change="onChangePage"-->
|
|
||||||
<!-- @showSizeChange="SizeChange"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </div>-->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -177,6 +130,25 @@
|
|||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<!-- 批量设置弹框-->
|
||||||
|
<a-modal
|
||||||
|
class="show-setting"
|
||||||
|
:title="$t('batSetting')"
|
||||||
|
:visible="batSetVisible"
|
||||||
|
:confirm-loading="confirmLoading"
|
||||||
|
@ok="modalOk"
|
||||||
|
@cancel="batSetCancel"
|
||||||
|
style="width: 1000px"
|
||||||
|
>
|
||||||
|
<split-bat-form
|
||||||
|
ref="fileForm"
|
||||||
|
@addFormClick="addFormClick"
|
||||||
|
:flag="'4'"
|
||||||
|
v-if="batSetVisible&&ids"
|
||||||
|
:url="urlBatSet"
|
||||||
|
:ids="ids">
|
||||||
|
</split-bat-form>
|
||||||
|
</a-modal>
|
||||||
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" :item="item" @closeVisible="closeVisible"></split-add-form>
|
<split-add-form ref="splitForm" v-if="addVisible" :addVisible="addVisible" :formTitle="formTitle" :flag="'4'" :url="url" :infoId="infoId" :menuId="menuId" :itemId="itemId" :item="item" @closeVisible="closeVisible"></split-add-form>
|
||||||
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
|
<upload ref="uploadSplit" @uploadSuccess="uploadSuccess"></upload>
|
||||||
</div>
|
</div>
|
||||||
@@ -189,6 +161,7 @@
|
|||||||
import search from '@/components/search/index'
|
import search from '@/components/search/index'
|
||||||
import TableData from '@/components/SplitDetailTable/index'
|
import TableData from '@/components/SplitDetailTable/index'
|
||||||
import upload from '@/components/uploadFile/file.vue'
|
import upload from '@/components/uploadFile/file.vue'
|
||||||
|
import SplitBatForm from '@/components/SplitBatForm/index'
|
||||||
import SplitAddForm from './SplitAddForm'
|
import SplitAddForm from './SplitAddForm'
|
||||||
import eventBUs from '@/common/event'
|
import eventBUs from '@/common/event'
|
||||||
export default {
|
export default {
|
||||||
@@ -196,6 +169,7 @@
|
|||||||
components:{
|
components:{
|
||||||
search,
|
search,
|
||||||
TableData,
|
TableData,
|
||||||
|
SplitBatForm,
|
||||||
SplitAddForm,
|
SplitAddForm,
|
||||||
upload
|
upload
|
||||||
},
|
},
|
||||||
@@ -209,49 +183,14 @@
|
|||||||
pageSize:10
|
pageSize:10
|
||||||
},
|
},
|
||||||
total:0,
|
total:0,
|
||||||
tableData:[
|
tableData:[],
|
||||||
{
|
|
||||||
serialNumber:'001',
|
|
||||||
serialName:'条款001',
|
|
||||||
serialContent:'12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米; 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米; 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;',
|
|
||||||
functionArea:'aaa',
|
|
||||||
tecArea:'bbb'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
expandedKeys: [],
|
expandedKeys: [],
|
||||||
searchValue: '',
|
searchValue: '',
|
||||||
autoExpandParent: true,
|
autoExpandParent: true,
|
||||||
dataList: [],
|
dataList: [],
|
||||||
contentValue:'12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米; 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;',
|
contentValue:'12. 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米; 附加光反射器,可以是贴纸,具有以下规格: a) 正面左右两侧呈白色或淡黄色; b) 背面左右两侧呈红色; c) 防护板下面是白色;和 d) 高至少400(四百)毫米和宽至少100(一百)毫米;',
|
||||||
gData: [
|
gData: [],
|
||||||
{
|
|
||||||
title: '总目录',
|
|
||||||
key: '0-0',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
title: '第一条 替代品',
|
|
||||||
key: '0-0-0',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '第二条',
|
|
||||||
key: '0-0-1',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '第三条',
|
|
||||||
key: '0-0-2',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '第四条',
|
|
||||||
key: '0-0-3',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '第五条',
|
|
||||||
key: '0-0-4',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
||||||
],
|
|
||||||
selecIds:[],
|
selecIds:[],
|
||||||
loading:false,
|
loading:false,
|
||||||
columns: [
|
columns: [
|
||||||
@@ -345,13 +284,19 @@
|
|||||||
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
addInfo: '/jero-boot/split/sarFileSplitItems/addSplitItems', //新增
|
||||||
updateInfo:'/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
updateInfo:'/jero-boot/split/sarFileSplitItems/updateSplitItems', //编辑
|
||||||
},
|
},
|
||||||
|
urlBatSet:{
|
||||||
|
getAddForm:'split/sarFileSplitItems/getBatchSetForm',
|
||||||
|
addInfo:'/split/sarFileSplitItems/batchSet',
|
||||||
|
},
|
||||||
|
batSetVisible:false, //批量设置弹框显示
|
||||||
|
ids:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.infoId=this.$route.query.infoId
|
this.infoId=this.$route.query.infoId
|
||||||
// console.log('info',this.$route.query)
|
// console.log('info',this.$route.query)
|
||||||
this.loadMenuData()
|
this.loadMenuData()
|
||||||
this.loadData()
|
// this.loadData()
|
||||||
this.generateList(this.gData);
|
this.generateList(this.gData);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -412,6 +357,7 @@
|
|||||||
//获取左侧目录数据
|
//获取左侧目录数据
|
||||||
loadMenuData(){
|
loadMenuData(){
|
||||||
let params={
|
let params={
|
||||||
|
infoId:this.infoId
|
||||||
}
|
}
|
||||||
this.loading=true
|
this.loading=true
|
||||||
getAction(`split/sarFileSplitMenu/getSplitMenusByInfoId`, params).then(res => {
|
getAction(`split/sarFileSplitMenu/getSplitMenusByInfoId`, params).then(res => {
|
||||||
@@ -539,7 +485,7 @@
|
|||||||
expandId.push(this.form.pid)
|
expandId.push(this.form.pid)
|
||||||
if(!this.isEdit){
|
if(!this.isEdit){
|
||||||
let params={
|
let params={
|
||||||
info_id: this.infoId,
|
infoId: this.infoId,
|
||||||
pid:this.nodeItem.id,
|
pid:this.nodeItem.id,
|
||||||
...this.form,
|
...this.form,
|
||||||
}
|
}
|
||||||
@@ -581,7 +527,8 @@
|
|||||||
//获取列表数据
|
//获取列表数据
|
||||||
loadData(){
|
loadData(){
|
||||||
let params={
|
let params={
|
||||||
...this.queryParams
|
...this.queryParams,
|
||||||
|
info_id:this.infoId
|
||||||
}
|
}
|
||||||
this.loading=true
|
this.loading=true
|
||||||
postAction(`split/sarFileSplitItems/getSplitItemsByPage`,params).then(res=>{
|
postAction(`split/sarFileSplitItems/getSplitItemsByPage`,params).then(res=>{
|
||||||
@@ -663,18 +610,55 @@
|
|||||||
},
|
},
|
||||||
//模板下载
|
//模板下载
|
||||||
handleDownManage(){
|
handleDownManage(){
|
||||||
// downloadFile('', fileName, { fileName: val.docRealName })
|
let name = this.$t('documentSplitTemplate')+'.xls'
|
||||||
|
downloadFile('split/sarFileSplitItems/exportTemplate',name, {})
|
||||||
},
|
},
|
||||||
//合并条款
|
//合并条款
|
||||||
handleMergeManage(){
|
handleMergeManage(){
|
||||||
if(this.selectedRowKeys&&this.selectedRowKeys.length<1){
|
if(this.selectedRowKeys&&this.selectedRowKeys.length<2){
|
||||||
this.$message.warning(this.$t('leastTwo'))
|
this.$message.warning(this.$t('leastTwo'))
|
||||||
}else{
|
}else{
|
||||||
|
let ids = this.selectedRowKeys.join(',')
|
||||||
|
this.$confirm({
|
||||||
|
title: this.$t('mergeTerms'),
|
||||||
|
content: '',
|
||||||
|
onOk:
|
||||||
|
async () => {
|
||||||
|
getAction(`split/sarFileSplitItems/batchMergeItems`, { ids: ids }).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
|
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('operationFailed'))
|
||||||
|
}
|
||||||
|
}).finally(()=>{
|
||||||
|
this.selectedRowKeys=[]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//批量设置
|
//批量设置
|
||||||
handleManage(){
|
handleManage(){
|
||||||
|
this.ids = this.selectedRowKeys.join(',')
|
||||||
|
if(this.selectedRowKeys&&this.selectedRowKeys.length<1){
|
||||||
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
|
}else {
|
||||||
|
// console.log('idsss',this.ids)
|
||||||
|
this.batSetVisible=true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//批量设置确定
|
||||||
|
modalOk(){
|
||||||
|
// this.confirmLoading=true
|
||||||
|
this.$refs.fileForm.sumber()
|
||||||
|
},
|
||||||
|
//批量设置取消
|
||||||
|
batSetCancel(){
|
||||||
|
this.batSetVisible=false
|
||||||
|
},
|
||||||
|
//批量设置确定提交
|
||||||
|
addFormClick(){
|
||||||
|
|
||||||
},
|
},
|
||||||
//批量删除
|
//批量删除
|
||||||
@@ -936,4 +920,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.show-setting{
|
||||||
|
.ant-modal{
|
||||||
|
min-width:700px;
|
||||||
|
}
|
||||||
|
.ant-modal-footer{
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user