| | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="false" |
| | | > |
| | | <!-- @change="handleTableChange" --> |
| | | <!-- :pagination="ipagination" --> |
| | | <template |
| | | v-for="col in columns" |
| | | :slot="col.dataIndex" |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | <a-input |
| | | :value="text" |
| | | v-if="col.dataIndex == 'position'" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="false" |
| | | placeholder="请输入保养部位" |
| | | /> |
| | | <a-textarea |
| | | :value="text" |
| | | v-if="col.dataIndex == 'content'" |
| | | :maxLength="500" |
| | | auto-size |
| | | placeholder="请输入保养内容" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | /> |
| | | <a-textarea |
| | | :value="text" |
| | | v-if="col.dataIndex == 'standard'" |
| | | :maxLength="500" |
| | | auto-size |
| | | placeholder="请输入保养标准" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="false" |
| | | /> |
| | | <a-select |
| | | v-if="col.dataIndex == 'firstInspect'" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | style="width: 100%" |
| | | > |
| | | <a-select-option value="1">通过</a-select-option> |
| | | <a-select-option value="2">未通过</a-select-option> |
| | | </a-select> |
| | | <a-select |
| | | v-if="col.dataIndex == 'secondInspect'" |
| | | :value="text" |
| | | @change="(e) => handleChange(e, record.key, col, index)" |
| | | style="width: 100%" |
| | | > |
| | | <a-select-option value="1">通过</a-select-option> |
| | | <a-select-option value="2">未通过</a-select-option> |
| | | </a-select> |
| | | |
| | | </div> |
| | | </template> |
| | | </a-table> |
| | | <!-- <div :style="{height: '140px',width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | | label="验收结果" |
| | | > |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="24"> |
| | | <a-form-item |
| | | :labelCol="{span:3}" |
| | | :wrapperCol="{span:21}" |
| | | label="备注" |
| | | > |
| | | <a-textarea |
| | | allow-clear |
| | | :disabled="disableSubmit" |
| | | :placeholder="disableSubmit?'':'请输入备注'" |
| | | v-decorator="['remark', {}]" |
| | | /> |
| | | |
| | | </a-form-item> |
| | | </a-col> |
| | | </a-row> |
| | | </div> --> |
| | | </a-form> |
| | | </a-spin> |
| | | <a-table |
| | | ref="table" |
| | | bordered |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination="false" |
| | | > |
| | | <!-- @change="handleTableChange" --> |
| | | <!-- :pagination="ipagination" --> |
| | | <template |
| | | v-for="col in columns" |
| | | :slot="col.dataIndex" |
| | | slot-scope='text, record, index' |
| | | > |
| | | <div :key="col.dataIndex"> |
| | | <a-input |
| | | :value="text" |
| | | v-if="col.dataIndex == 'position'" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="false" |
| | | placeholder="请输入保养部位" |
| | | /> |
| | | <a-textarea |
| | | :value="text" |
| | | v-if="col.dataIndex == 'content'" |
| | | :maxLength="500" |
| | | auto-size |
| | | placeholder="请输入保养内容" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | /> |
| | | <a-textarea |
| | | :value="text" |
| | | v-if="col.dataIndex == 'standard'" |
| | | :maxLength="500" |
| | | auto-size |
| | | placeholder="请输入保养标准" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="false" |
| | | /> |
| | | <a-input |
| | | :value="text" |
| | | v-if="col.dataIndex == 'firstInspect'" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="false" |
| | | placeholder="请输入第一次检" |
| | | /> |
| | | <a-input |
| | | :value="text" |
| | | v-if="col.dataIndex == 'secondInspect'" |
| | | @change="(e)=>handleChange(e, record.key, col, index)" |
| | | :disabled="false" |
| | | placeholder="请输入第二次检" |
| | | /> |
| | | |
| | | </div> |
| | | </template> |
| | | </a-table> |
| | | <div :style="{height: '60px',width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> |
| | | <a-row :gutter="24"> |
| | | <a-col :span="12"> |
| | | <a-col :span="7"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | |
| | | <span v-else>-</span> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :span="12"> |
| | | <a-col :span="17"> |
| | | <a-form-item |
| | | :labelCol="labelCol" |
| | | :wrapperCol="wrapperCol" |
| | |
| | | </a-col> |
| | | </a-row> |
| | | </div> |
| | | <a-button |
| | | <!-- <a-button |
| | | style="width: 100%; margin-top: 0px; margin-bottom: 8px" |
| | | type="dashed" |
| | | icon="plus" |
| | | @click="addHour" |
| | | >添加内容</a-button> |
| | | >添加内容</a-button> --> |
| | | <template slot="footer"> |
| | | <a-button |
| | | :style="{marginRight: '8px'}" |
| | |
| | | |
| | | methods: { |
| | | |
| | | addHour() { |
| | | this.dataSource.push({ id: '', maintenanceOrderId: this.model.id, position: '', content: '', standard: '', firstInspect: '', secondInspect: '' }) |
| | | }, |
| | | // addHour() { |
| | | // this.dataSource.push({ id: '', maintenanceOrderId: this.model.id, position: '', content: '', standard: '', firstInspect: '', secondInspect: '' }) |
| | | // }, |
| | | |
| | | edit(record) { |
| | | let that = this; |
| | |
| | | target['standard'] = value.target.value; |
| | | } |
| | | if (column.dataIndex == 'firstInspect') { |
| | | target[column.dataIndex] = value.target.value; |
| | | target[column.dataIndex] = value; |
| | | } |
| | | if (column.dataIndex == 'secondInspect') { |
| | | target[column.dataIndex] = value.target.value; |
| | | target[column.dataIndex] = value; |
| | | } |
| | | //显示带过来的数据 |
| | | that.dataSource = temp; |