Commit 3103e905 by lichengming

修改了合同评审添加

parent 948d669a
......@@ -24,7 +24,7 @@
style="width:100%;"
>
<Input
v-model="value"
v-model="dataValue"
:name="name"
:placeholder="placeholder"
:class="{'iview-input-error':showError === ''}"
......@@ -45,6 +45,17 @@
<script>
export default {
// props: [
// 'name',
// 'showKey',
// 'placeholder',
// 'downData',
// 'value',
// 'showError',
// 'blur',
// 'focus',
// 'handleObj'
// ],
props: {
name: null,
showKey: null,
......@@ -59,20 +70,28 @@ export default {
},
data() {
return {
selectObj: {}
selectObj: {},
// value: null
dataValue: this.value,
dataHandObj: this.handleObj
// isFocus: false
}
},
watch: {
value: function(newVal, oldVal) {
console.log(newVal)
this.dataValue = newVal
}
},
mounted() {},
methods: {
// 选择
_dropDown(data) {
this.$emit('on-result-change', 'select', data, this.handleObj)
this.$emit('on-result-change', 'select', data, this.dataHandObj)
if (this.showKey) {
this.value = data[this.showKey]
this.dataValue = data[this.showKey]
} else {
this.value = data
this.dataValue = data
}
this.selectObj = data
// this.isFocus = false;
......@@ -81,23 +100,30 @@ export default {
_query() {
if (this.showKey) {
const obj = {}
obj[this.showKey] = this.value
this.$emit('on-result-change', 'query', obj, this.handleObj)
obj[this.showKey] = this.dataValue
this.$emit('on-result-change', 'query', obj, this.dataHandObj)
} else {
this.$emit('on-result-change', 'query', this.value, this.handleObj)
this.$emit(
'on-result-change',
'query',
this.dataValue,
this.dataHandObj
)
// console.log(this.dataValue)
}
},
_inputBlur() {
if (this.value && this.blur !== undefined) {
if (this.dataValue && this.blur !== undefined) {
// 失去焦点有值时触发
this.$emit('on-result-change', 'blur', '', this.handleObj)
this.$emit('on-result-change', 'blur', '', this.dataHandObj)
}
},
// 聚焦
_inputFocus() {
// this.isFocus = true;
console.log('默认单位名', this.value, this.dataValue)
if (this.focus !== undefined) {
this.$emit('on-result-change', 'focus', '', this.handleObj)
this.$emit('on-result-change', 'focus', '', this.dataHandObj)
}
}
}
......
......@@ -16,7 +16,7 @@
transfer
change-on-select>
<Input
v-model="value"
v-model="value.join(' ')"
@on-change="_clear"
placeholder="请选择省、市、区"
readonly
......
......@@ -6,24 +6,24 @@
<Row>
<!--查询-->
<Col span="24" style="margin-top: 10px">
<Form v-show="searchOpen" id="formId" :label-width="90" inline onsubmit="return false">
<Form id="formId" v-show="searchOpen" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item class="search-item" label="实验室名称:">
<Input v-model="formObj.name" name="name" placeholder="请输入实验室名称" clearable @on-enter="_formSearch"/>
<Input v-model="formObj.name" @on-enter="_formSearch" name="name" placeholder="请输入实验室名称" clearable/>
</Form-item>
<Form-item class="search-item" label="资质:">
<Input v-model="formObj.aptitude" name="aptitude" placeholder="请输入资质" clearable @on-enter="_formSearch"/>
<Input v-model="formObj.aptitude" @on-enter="_formSearch" name="aptitude" placeholder="请输入资质" clearable/>
</Form-item>
<Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button>
<Button @click="_formSearch" type="primary">搜索</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide"
@on-result-change="_btnClick"></btn-list>
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick"
class="contHide"></btn-list>
</Col>
<!--表格-->
<Col span="24">
......@@ -48,25 +48,31 @@
<FileManage ref="FileManage"></FileManage>
<MeterSendOperation ref="operationModal"></MeterSendOperation>
<MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit>
<MeterSubcontractorAddEdit ref="addEditModal"></MeterSubcontractorAddEdit>
</div>
</template>
<script>
import { meterContract, meterSubcontractor } from '../../../api'
import MeterSubcontractorEdit from './MeterContractReviewEdit'
import MeterSubcontractorAddEdit from './MeterContractReviewAddEdit'
import MeterSendOperation from './MeterContractReviewOperation'
export default {
components: { MeterSubcontractorEdit, MeterSendOperation },
components: {
MeterSubcontractorEdit,
MeterSendOperation,
MeterSubcontractorAddEdit
},
data() {
return {
currentComponent: '',
formId: 'meterSubcontractorFormId',
searchOpen: false,
btn: [
// {
// type: 'success',
// id: '',
// name: '提交'
// }
{
type: 'success',
id: '',
name: '添加'
}
],
iconMsg: [
{
......@@ -235,7 +241,7 @@ export default {
this._getById(id)
} else {
// 添加
this.$refs.editSubcontractorModal._open()
this.$refs.addEditModal._open()
}
},
// 追加项目
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment