| | |
| | | <Card> |
| | | <Row class="operation"> |
| | | <Button @click="addOil" type="primary" icon="md-add">添加加油记录</Button> |
| | | <Button @click="delAll" icon="md-trash">批量删除</Button> |
| | | <Button @click="init" icon="md-refresh">刷新</Button> |
| | | <Button type="dashed" @click="openTip = !openTip">{{ |
| | | openTip ? "关闭提示" : "开启提示" |
| | |
| | | :label-width="80" |
| | | :rules="addOilFormValidate" |
| | | > |
| | | <FormItem label="车辆" prop="carId"> |
| | | <Select v-model="addOilForm.carId" filterable> |
| | | <Option v-for="item in carList" :value="item.id">{{ item.carNo }}</Option> |
| | | </Select> |
| | | </FormItem> |
| | | <Form-item label="加油日期" prop="addDate"> |
| | | <Row> |
| | | <Col span="11"> |
| | | <Row :gutter="0"> |
| | | <Col span="12"> |
| | | <FormItem label="车辆" prop="carId"> |
| | | <Select v-model="addOilForm.carId" filterable> |
| | | <Option v-for="item in carList" :value="item.id">{{ item.carNo }}</Option> |
| | | </Select> |
| | | </FormItem> |
| | | </Col> |
| | | <Col span="12"> |
| | | <Form-item label="加油日期" prop="addDate"> |
| | | <Date-picker @on-change="change1" type="date" value="yyyy-MM-dd" placeholder="选择日期" v-model="addOilForm.addDate"></Date-picker> |
| | | </Col> |
| | | </Row> |
| | | </Form-item> |
| | | <FormItem label="加油量" prop="amount"> |
| | | <Input v-model="addOilForm.amount" type="number"/> |
| | | </FormItem> |
| | | <FormItem label="单价" prop="unitPrice"> |
| | | <Input v-model="addOilForm.unitPrice" type="number"/> |
| | | </FormItem> |
| | | <FormItem label="加油金额" prop="money"> |
| | | <Input v-model="addOilForm.money" type="number"/> |
| | | </FormItem> |
| | | <FormItem label="加油时里程" prop="mileage"> |
| | | <Input v-model="addOilForm.mileage" type="number"/> |
| | | </Form-item> |
| | | </Col> |
| | | </Row> |
| | | <Row :gutter="0"> |
| | | <Col span="12"> |
| | | <FormItem label="加油量" prop="amount"> |
| | | <Input v-model="addOilForm.amount" type="number"> |
| | | <span slot="append">升</span> |
| | | </Input> |
| | | </FormItem> |
| | | </Col> |
| | | <Col span="12"> |
| | | <FormItem label="单价" prop="unitPrice"> |
| | | <Input v-model="addOilForm.unitPrice" type="number"> |
| | | <span slot="append">元</span> |
| | | </Input> |
| | | </FormItem> |
| | | </Col> |
| | | </Row> |
| | | <Row :gutter="0"> |
| | | <Col span="12"> |
| | | <FormItem label="加油金额" prop="money"> |
| | | <Input v-model="addOilForm.money" type="number"> |
| | | <span slot="append">元</span> |
| | | </Input> |
| | | </FormItem> |
| | | </Col> |
| | | <Col span="12"> |
| | | <FormItem label="里程" prop="mileage"> |
| | | <Input v-model="addOilForm.mileage" type="number"> |
| | | <span slot="append">公里</span> |
| | | </Input> |
| | | </FormItem> |
| | | </Col> |
| | | </Row> |
| | | <FormItem label="加油卡号" prop="addOilCode"> |
| | | <Input v-model="addOilForm.addOilCode" /> |
| | | </FormItem> |
| | | <FormItem label="备注" prop="remarks"> |
| | | <Input v-model="addOilForm.remarks" /> |
| | |
| | | { |
| | | title: "车牌号", |
| | | key: "carNo", |
| | | width: 100, |
| | | width: 120, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | title: "加油卡号", |
| | | key: "addOilCode", |
| | | width: 100, |
| | | }, |
| | | { |
| | | title: "加油日期", |
| | | key: "addDate", |
| | | width: 150, |
| | | width: 120, |
| | | sortable: true, |
| | | }, |
| | | { |
| | |
| | | { |
| | | title: "加油金额", |
| | | key: "money", |
| | | minWidth: 100, |
| | | minWidth: 120, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | title: "加油时里程", |
| | | key: "mileage", |
| | | minWidth: 100, |
| | | minWidth: 130, |
| | | sortable: true, |
| | | }, |
| | | { |