zhangzeli
2022-01-04 7ebd84a4ad1f6561f450d5e92d987d22924d59ec
回复
6个文件已修改
210 ■■■■■ 已修改文件
src/api/open.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/your/area-manage/areaManage.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/your/car-manage/carManage.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/your/carInfo-manage/carInfoManage.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/your/carRepairCost-manage/carRepairCostManage.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/your/suggest-manage/suggestManage.vue 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/open.js
@@ -117,6 +117,11 @@
    return getRequest('/user/getAll', params)
}
// 查询司机信息
export const getDriver = (params) => {
    return getRequest('/user/findByType2', params)
}
// 查询片区信息
export const getArea = (params) => {
    return getRequest('/area/getByPage', params)
@@ -206,3 +211,13 @@
export const getInfo = (params) => {
    return getRequest('/car/getInfo', params)
}
// 根据车辆燃油费用维修费用
export const getCarCount = (params) => {
    return getRequest('/pcStatistic2/getCarCount', params)
}
//添加加油记录
export const editSuggest = (params) => {
    return postRequest('/suggest/insertOrUpdate', params)
}
src/views/your/area-manage/areaManage.vue
@@ -277,6 +277,7 @@
  addCar,
  getCarList,
  getUser,
  getDriver,
  addArea,
  deleteArea,
  getAreaSection,
@@ -600,7 +601,9 @@
      data2: [],
      data3: [],
      total: 0,
      type: {
        type : 1
      },
      total2: 0,
      permData: [],
      editRolePermId: "",
@@ -706,7 +709,7 @@
      });
    },
    getAllUser(){
      getUser().then((res)=>{
      getDriver(this.type).then((res)=>{
        if (res.success){
          this.userList=res.result;
        }
src/views/your/car-manage/carManage.vue
@@ -87,7 +87,7 @@
        </FormItem>
        <FormItem label="跟车人" prop="followUserId">
          <Select v-model="carForm.followUserId" filterable>
            <Option v-for="item in userList" :value="item.id" :key="item.id">{{ item.nickname }}</Option>
            <Option v-for="item in driverList" :value="item.id" :key="item.id">{{ item.nickname }}</Option>
          </Select>
        </FormItem>
      </Form>
@@ -243,6 +243,7 @@
  getEquipment,
  addEquipment,
  getUser,
  getDriver,
  deleteEquipment,
} from "@/api/open";
import util from "@/libs/util.js";
@@ -280,6 +281,9 @@
      carForm: {
        status : 0
      },
      type: {
        type : 0
      },
      equipmentForm: {
        status : 0
      },
@@ -307,7 +311,7 @@
        {
          title: "车牌号",
          key: "carNo",
          width: 100,
          width: 110,
          sortable: true,
        },
        {
@@ -592,6 +596,7 @@
      depData: [],
      dataType: 0,
      carId: '',
      driverList: [],
      userList: [],
      editDepartments: [],
      buyYear:''
@@ -662,9 +667,15 @@
      this.getDataList();
    },
    getAllUser(){
      getUser().then((res)=>{
      getDriver(this.type).then((res)=>{
        if (res.success){
          this.userList=res.result;
        }
      });
      this.type.type=1;
      getDriver(this.type).then((res)=>{
        if (res.success){
          this.driverList=res.result;
        }
      });
    },
@@ -735,7 +746,7 @@
              if (res.success) {
                this.$Message.success("操作成功");
                this.getDataList();
                this.roleModalVisible = false;
                this.roleModalVisible = true;
              }
            });
          } else {
@@ -745,7 +756,7 @@
              if (res.success) {
                this.$Message.success("操作成功");
                this.getDataList();
                this.roleModalVisible = false;
                this.roleModalVisible = true;
              }
            });
          }
src/views/your/carInfo-manage/carInfoManage.vue
@@ -290,9 +290,24 @@
            }
          },
          {
            title: "送货户数",
            key: "oilWear",
            width: 130,
          },
          {
            title: "送货量(件)",
            key: "oilWear",
            width: 130,
          },
          {
            title: "月油耗(升)",
            key: "oilWear",
            width: 130,
          },
          {
            title: "月燃油费(元)",
            key: "money",
            width: 140,
          },
          {
            title: "百公里油耗",
@@ -314,32 +329,6 @@
            render: (h, params) => {
              return h("div",params.row.car.nickName);
            }
          },
          {
            title: "月加油金额(元)",
            key: "money",
            width: 140,
          },
          {
            title: "操作",
            key: "action",
            align: "center",
            width: 120,
            render: (h, params) => {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.remove(params.row);
                      },
                    },
                  },
                  "删除"
                ),
              ]);
            },
          },
        ],
        data: [],
@@ -465,7 +454,7 @@
          this.loading = false;
          if (res.success) {
            this.data = res.result;
            this.total = res.result.length;
            this.total = res.result[0].total;
          }
        });
      },
src/views/your/carRepairCost-manage/carRepairCostManage.vue
@@ -51,7 +51,6 @@
                show-total
                show-elevator
                show-sizer
                v-show="this.page"
        ></Page>
      </Row>
    </Card>
@@ -242,7 +241,7 @@
          {
            title: "车牌号",
            key: "carNo",
            width: 100,
            width: 110,
            align: "center",
          },
          {
@@ -513,7 +512,7 @@
          this.loading = false;
          if (res.success) {
            this.data = res.result;
            this.total = res.result.length;
            this.total = res.result.total;
          }
        });
      },
src/views/your/suggest-manage/suggestManage.vue
@@ -52,49 +52,15 @@
    </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>
@@ -200,6 +166,7 @@
    deleteCar,
    getSuggest,
    deleteSuggest,
    editSuggest,
  } from "@/api/open";
  import util from "@/libs/util.js";
  export default {
@@ -220,6 +187,7 @@
        modalType: 0,
        roleModalVisible: false,
        carModalVisible: false,
        suggestVisible:false,
        permModalVisible: false,
        depModalVisible: false,
        modalTitle: "",
@@ -233,6 +201,9 @@
        },
        addOilForm: {
          status : 0
        },
        replyForm: {
          status : 1
        },
        removeForm: {
          status : 1
@@ -256,11 +227,6 @@
            align: "center",
          },
          {
            title: "意见分类",
            key: "title",
            width: 150,
          },
          {
            title: "内容",
            key: "content",
            tooltip:true,
@@ -281,11 +247,32 @@
            width: 260,
          },
          {
            title: "回复内容",
            key: "replyContent",
            tooltip:true,
            width: 260,
          },
          {
            title: "操作",
            key: "action",
            align: "center",
            render: (h, params) => {
              return h("div", [
                h(
                  "a",
                  {
                    on: {
                      click: () => {
                        this.reply(params.row);
                      },
                    },
                  },
                  "回复"
                ),h("Divider", {
                  props: {
                    type: "vertical",
                  },
                }),
                h(
                  "a",
                  {
@@ -535,6 +522,21 @@
          },
        });
      },
      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 = {
@@ -652,6 +654,35 @@
          }
        });
      },
      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 = "";