| | |
| | | </Card> |
| | | |
| | | <!-- 编辑 --> |
| | | <Modal |
| | | :title="modalTitle" |
| | | v-model="roleModalVisible" |
| | | :mask-closable="false" |
| | | :width="500" |
| | | > |
| | | <Form |
| | | ref="addOilForm" |
| | | :model="addOilForm" |
| | | :label-width="80" |
| | | :rules="addOilFormValidate" |
| | | > |
| | | <FormItem label="车辆" prop="carId"> |
| | | <Select v-model="addOilForm.carId" filterable> |
| | | <Option v-for="item in carList" :value="item.id" :key="item.id">{{ item.carNo }}</Option> |
| | | </Select> |
| | | </FormItem> |
| | | <Form-item label="加油日期" prop="addDate"> |
| | | <Row> |
| | | <Col span="11"> |
| | | <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"/> |
| | | </FormItem> |
| | | <FormItem label="备注" prop="remarks"> |
| | | <Input v-model="addOilForm.remarks" /> |
| | | <Modal :title="modalTitle" v-model="suggestVisible" :mask-closable="false" :width="500"> |
| | | <Form ref="replyForm" :model="replyForm" :label-width="80" :rules="equipmentFormValidate"> |
| | | <FormItem label="回复内容" prop="replyContent"> |
| | | <Input v-model="replyForm.replyContent" type="textarea" :autosize="{minRows: 2,maxRows: 5}" placeholder="请输入回复内容..."></Input> |
| | | </FormItem> |
| | | </Form> |
| | | <div slot="footer"> |
| | | <Button type="text" @click="carRole">取消</Button> |
| | | <Button type="primary" :loading="submitLoading" @click="submitAddOil" |
| | | <Button type="primary" :loading="submitLoading" @click="submitReplay" |
| | | >提交</Button |
| | | > |
| | | </div> |
| | |
| | | deleteCar, |
| | | getSuggest, |
| | | deleteSuggest, |
| | | editSuggest, |
| | | } from "@/api/open"; |
| | | import util from "@/libs/util.js"; |
| | | export default { |
| | |
| | | modalType: 0, |
| | | roleModalVisible: false, |
| | | carModalVisible: false, |
| | | suggestVisible:false, |
| | | permModalVisible: false, |
| | | depModalVisible: false, |
| | | modalTitle: "", |
| | |
| | | }, |
| | | addOilForm: { |
| | | status : 0 |
| | | }, |
| | | replyForm: { |
| | | status : 1 |
| | | }, |
| | | removeForm: { |
| | | status : 1 |
| | |
| | | align: "center", |
| | | }, |
| | | { |
| | | title: "意见分类", |
| | | key: "title", |
| | | width: 150, |
| | | }, |
| | | { |
| | | title: "内容", |
| | | key: "content", |
| | | tooltip:true, |
| | |
| | | { |
| | | title: "反馈时间", |
| | | key: "createTime", |
| | | width: 200, |
| | | sortable: true, |
| | | width: 110, |
| | | render: (h, params) => { |
| | | return h("div",params.row.createTime.substr(0,10)); |
| | | } |
| | |
| | | { |
| | | title: "反馈商户", |
| | | key: "name", |
| | | tooltip:true, |
| | | width: 260, |
| | | }, |
| | | { |
| | | title: "回复内容", |
| | | key: "replyContent", |
| | | tooltip:true, |
| | | width: 300, |
| | | }, |
| | | { |
| | | title: "操作", |
| | | key: "action", |
| | | align: "center", |
| | | width: 150, |
| | | render: (h, params) => { |
| | | return h("div", [ |
| | | h( |
| | | "a", |
| | | { |
| | | on: { |
| | | click: () => { |
| | | this.reply(params.row); |
| | | }, |
| | | }, |
| | | }, |
| | | "回复" |
| | | ),h("Divider", { |
| | | props: { |
| | | type: "vertical", |
| | | }, |
| | | }), |
| | | h( |
| | | "a", |
| | | { |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | reply(v) { |
| | | |
| | | this.modalType = 1; |
| | | this.modalTitle = "回复"; |
| | | // 转换null为"" |
| | | for (let attr in v) { |
| | | if (v[attr] == null) { |
| | | v[attr] = ""; |
| | | } |
| | | } |
| | | let str = JSON.stringify(v); |
| | | let roleInfo = JSON.parse(str); |
| | | this.replyForm = roleInfo; |
| | | this.suggestVisible = true; |
| | | }, |
| | | setDefault(v) { |
| | | this.loading = true; |
| | | let params = { |
| | |
| | | } |
| | | }); |
| | | }, |
| | | submitReplay(v){ |
| | | this.$refs.replyForm.validate((valid) => { |
| | | this.replyForm.status=1; |
| | | if (valid) { |
| | | if (this.modalType == 0) { |
| | | // 添加 |
| | | this.submitLoading = true; |
| | | editSuggest(this.replyForm).then((res) => { |
| | | this.submitLoading = false; |
| | | if (res.success) { |
| | | this.$Message.success("操作成功"); |
| | | this.getDataList(); |
| | | this.suggestVisible = false; |
| | | } |
| | | }); |
| | | } else { |
| | | this.submitLoading = true; |
| | | editSuggest(this.replyForm).then((res) => { |
| | | this.submitLoading = false; |
| | | if (res.success) { |
| | | this.$Message.success("操作成功"); |
| | | this.getDataList(); |
| | | this.suggestVisible = false; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | submitPermEdit() { |
| | | this.submitPermLoading = true; |
| | | let permIds = ""; |