Commit 3103e905 by lichengming

修改了合同评审添加

parent 948d669a
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
style="width:100%;" style="width:100%;"
> >
<Input <Input
v-model="value" v-model="dataValue"
:name="name" :name="name"
:placeholder="placeholder" :placeholder="placeholder"
:class="{'iview-input-error':showError === ''}" :class="{'iview-input-error':showError === ''}"
...@@ -45,6 +45,17 @@ ...@@ -45,6 +45,17 @@
<script> <script>
export default { export default {
// props: [
// 'name',
// 'showKey',
// 'placeholder',
// 'downData',
// 'value',
// 'showError',
// 'blur',
// 'focus',
// 'handleObj'
// ],
props: { props: {
name: null, name: null,
showKey: null, showKey: null,
...@@ -59,20 +70,28 @@ export default { ...@@ -59,20 +70,28 @@ export default {
}, },
data() { data() {
return { return {
selectObj: {} selectObj: {},
// value: null // value: null
dataValue: this.value,
dataHandObj: this.handleObj
// isFocus: false // isFocus: false
} }
}, },
watch: {
value: function(newVal, oldVal) {
console.log(newVal)
this.dataValue = newVal
}
},
mounted() {}, mounted() {},
methods: { methods: {
// 选择 // 选择
_dropDown(data) { _dropDown(data) {
this.$emit('on-result-change', 'select', data, this.handleObj) this.$emit('on-result-change', 'select', data, this.dataHandObj)
if (this.showKey) { if (this.showKey) {
this.value = data[this.showKey] this.dataValue = data[this.showKey]
} else { } else {
this.value = data this.dataValue = data
} }
this.selectObj = data this.selectObj = data
// this.isFocus = false; // this.isFocus = false;
...@@ -81,23 +100,30 @@ export default { ...@@ -81,23 +100,30 @@ export default {
_query() { _query() {
if (this.showKey) { if (this.showKey) {
const obj = {} const obj = {}
obj[this.showKey] = this.value obj[this.showKey] = this.dataValue
this.$emit('on-result-change', 'query', obj, this.handleObj) this.$emit('on-result-change', 'query', obj, this.dataHandObj)
} else { } 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() { _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() { _inputFocus() {
// this.isFocus = true; // this.isFocus = true;
console.log('默认单位名', this.value, this.dataValue)
if (this.focus !== undefined) { if (this.focus !== undefined) {
this.$emit('on-result-change', 'focus', '', this.handleObj) this.$emit('on-result-change', 'focus', '', this.dataHandObj)
} }
} }
} }
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
transfer transfer
change-on-select> change-on-select>
<Input <Input
v-model="value" v-model="value.join(' ')"
@on-change="_clear" @on-change="_clear"
placeholder="请选择省、市、区" placeholder="请选择省、市、区"
readonly readonly
......
...@@ -6,24 +6,24 @@ ...@@ -6,24 +6,24 @@
<Row> <Row>
<!--查询--> <!--查询-->
<Col span="24" style="margin-top: 10px"> <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> <label class="label-sign"></label>
<Form-item class="search-item" 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>
<Form-item class="search-item" label="资质:"> <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>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button type="primary" @click="_formSearch">搜索</Button> <Button @click="_formSearch" type="primary">搜索</Button>
</Form-item> </Form-item>
</Form> </Form>
</Col> </Col>
<!--操作--> <!--操作-->
<Col span="24"> <Col span="24">
<btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" class="contHide" <btn-list :msg="btn" :open="searchOpen" :show-search-btn="true" @on-result-change="_btnClick"
@on-result-change="_btnClick"></btn-list> class="contHide"></btn-list>
</Col> </Col>
<!--表格--> <!--表格-->
<Col span="24"> <Col span="24">
...@@ -48,25 +48,31 @@ ...@@ -48,25 +48,31 @@
<FileManage ref="FileManage"></FileManage> <FileManage ref="FileManage"></FileManage>
<MeterSendOperation ref="operationModal"></MeterSendOperation> <MeterSendOperation ref="operationModal"></MeterSendOperation>
<MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit> <MeterSubcontractorEdit ref="editSubcontractorModal" @on-result-change="_formSearch"></MeterSubcontractorEdit>
<MeterSubcontractorAddEdit ref="addEditModal"></MeterSubcontractorAddEdit>
</div> </div>
</template> </template>
<script> <script>
import { meterContract, meterSubcontractor } from '../../../api' import { meterContract, meterSubcontractor } from '../../../api'
import MeterSubcontractorEdit from './MeterContractReviewEdit' import MeterSubcontractorEdit from './MeterContractReviewEdit'
import MeterSubcontractorAddEdit from './MeterContractReviewAddEdit'
import MeterSendOperation from './MeterContractReviewOperation' import MeterSendOperation from './MeterContractReviewOperation'
export default { export default {
components: { MeterSubcontractorEdit, MeterSendOperation }, components: {
MeterSubcontractorEdit,
MeterSendOperation,
MeterSubcontractorAddEdit
},
data() { data() {
return { return {
currentComponent: '', currentComponent: '',
formId: 'meterSubcontractorFormId', formId: 'meterSubcontractorFormId',
searchOpen: false, searchOpen: false,
btn: [ btn: [
// { {
// type: 'success', type: 'success',
// id: '', id: '',
// name: '提交' name: '添加'
// } }
], ],
iconMsg: [ iconMsg: [
{ {
...@@ -235,7 +241,7 @@ export default { ...@@ -235,7 +241,7 @@ export default {
this._getById(id) this._getById(id)
} else { } 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