From a0654f2c21511a0e16b977427a563a3ccdfd1fba Mon Sep 17 00:00:00 2001
From: kongdeqiang <123456>
Date: 星期二, 14 三月 2023 15:34:06 +0800
Subject: [PATCH] 搜索bug
---
src/views/your/suggest-manage/suggestManage.vue | 178 ++++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 116 insertions(+), 62 deletions(-)
diff --git a/src/views/your/suggest-manage/suggestManage.vue b/src/views/your/suggest-manage/suggestManage.vue
index bc975a7..6ead1ef 100644
--- a/src/views/your/suggest-manage/suggestManage.vue
+++ b/src/views/your/suggest-manage/suggestManage.vue
@@ -7,16 +7,15 @@
<div class="search">
<Card>
<Row class="operation">
- <Button @click="addOil" type="primary" icon="md-add">娣诲姞鍔犳补璁板綍</Button>
<Button @click="init" icon="md-refresh">鍒锋柊</Button>
<Button type="dashed" @click="openTip = !openTip">{{
openTip ? "鍏抽棴鎻愮ず" : "寮�鍚彁绀�"
}}</Button>
<Input
- v-model="searchForm.carNo"
+ v-model="searchForm2.content"
suffix="ios-search"
- @on-change="getDataList"
- placeholder="杈撳叆杞︾墝鍙锋悳绱�"
+ @on-change="getDataList2"
+ placeholder="杈撳叆鍙嶉鍐呭鎼滅储"
clearable
style="width: 250px"
/>
@@ -53,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">{{ 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>
@@ -199,6 +164,9 @@
getCarList,
editCar,
deleteCar,
+ getSuggest,
+ deleteSuggest,
+ editSuggest,
} from "@/api/open";
import util from "@/libs/util.js";
export default {
@@ -219,6 +187,7 @@
modalType: 0,
roleModalVisible: false,
carModalVisible: false,
+ suggestVisible:false,
permModalVisible: false,
depModalVisible: false,
modalTitle: "",
@@ -230,8 +199,19 @@
order: "desc", // 榛樿鎺掑簭鏂瑰紡
key: "",
},
+ searchForm2: {
+ // 鎼滅储妗嗗垵濮嬪寲瀵硅薄
+ pageNumber: 1, // 褰撳墠椤垫暟
+ pageSize: 10, // 椤甸潰澶у皬
+ sort: "createTime", // 榛樿鎺掑簭瀛楁
+ order: "desc", // 榛樿鎺掑簭鏂瑰紡
+ key: "",
+ },
addOilForm: {
status : 0
+ },
+ replyForm: {
+ status : 1
},
removeForm: {
status : 1
@@ -244,44 +224,64 @@
submitLoading: false,
selectList: [],
columns: [
- {
- type: "selection",
- width: 60,
- align: "center",
- },
+ // {
+ // type: "selection",
+ // width: 60,
+ // align: "center",
+ // },
{
type: "index",
width: 60,
align: "center",
},
{
- title: "鎰忚鍒嗙被",
- key: "dictDataId",
- width: 150,
- },
- {
title: "鍐呭",
key: "content",
- width: 200,
+ tooltip:true,
+ width: 230,
},
{
title: "鍙嶉鏃堕棿",
key: "createTime",
- width: 180,
- sortable: true,
+ width: 130,
+ render: (h, params) => {
+ return h("div",params.row.createTime.substr(0,10));
+ }
},
{
title: "鍙嶉鍟嗘埛",
- key: "customerId",
- width: 150,
+ key: "name",
+ tooltip:true,
+ width: 260,
+ },
+ {
+ title: "鍥炲鍐呭",
+ key: "replyContent",
+ tooltip:true,
+ width: 300,
},
{
title: "鎿嶄綔",
key: "action",
align: "center",
- width: 195,
+ width: 150,
render: (h, params) => {
return h("div", [
+ h(
+ "a",
+ {
+ on: {
+ click: () => {
+ this.reply(params.row);
+ },
+ },
+ },
+ "鍥炲"
+ ),h("Divider", {
+ props: {
+ type: "vertical",
+ },
+ }),
h(
"a",
{
@@ -383,7 +383,17 @@
},
getDataList() {
this.loading = true;
- getAddOilList(this.searchForm).then((res) => {
+ getSuggest(this.searchForm).then((res) => {
+ this.loading = false;
+ if (res.success) {
+ this.data = res.result.records;
+ this.total = res.result.total;
+ }
+ });
+ },
+ getDataList2() {
+ this.loading = true;
+ getSuggest(this.searchForm2).then((res) => {
this.loading = false;
if (res.success) {
this.data = res.result.records;
@@ -520,7 +530,7 @@
content: "鎮ㄧ‘璁よ鍒犻櫎鍚� ",
loading: true,
onOk: () => {
- deleteAddOil({ ids: v.id }).then((res) => {
+ deleteSuggest({ ids: v.id }).then((res) => {
this.$Modal.remove();
if (res.success) {
this.clearSelectAll();
@@ -530,6 +540,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;
@@ -645,6 +670,35 @@
e.checked = select;
if (e.children && e.children.length > 0) {
that.selectedTreeAll(e.children, select);
+ }
+ });
+ },
+ 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;
+ }
+ });
+ }
}
});
},
@@ -809,4 +863,4 @@
this.init();
},
};
-</script>
\ No newline at end of file
+</script>
--
Gitblit v1.9.1