From 37e436a97c6753b38f0c462068122b32a8612a6a Mon Sep 17 00:00:00 2001 From: yangfeng <wanwan926_4@163.com> Date: 星期二, 08 八月 2023 16:40:46 +0800 Subject: [PATCH] 客户服务单联调 --- /dev/null | 33 - src/store/modules/getClientName.js | 44 ++ src/api/serviceManage/clientServiceOrder.js | 32 + src/views/service/clientServiceOrder/DetailClientServiceOrder.vue | 109 +---- src/api/common/other.js | 41 ++ src/views/sales/subOrder/AddSubOrderDialog.vue | 1 src/views/service/clientServiceOrder/index.vue | 33 - src/views/other/commonDialog/SelectCommonDialog.vue | 69 +-- src/common/const/commonStatus.js | 9 src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue | 590 +++++++++++++++++++++++++--------- src/views/service/serviceContract/index.vue | 2 11 files changed, 641 insertions(+), 322 deletions(-) diff --git a/src/api/common/other.js b/src/api/common/other.js new file mode 100644 index 0000000..2ef9c72 --- /dev/null +++ b/src/api/common/other.js @@ -0,0 +1,41 @@ +import request from "@/common/untils/request.js" + +// 鑾峰彇鏁呴殰绫诲埆 +export function getFaultTypeList() { + return request({ + url: "/api/faultType/list", + method: "get" + }) +} + +// 鑾峰彇鏈嶅姟鏂瑰紡 +export function getServiceTypeList() { + return request({ + url: "/api/serviceType/list", + method: "get" + }) +} + +// 鑾峰彇涓ラ噸绋嬪害 +export function getSeverityList() { + return request({ + url: "/api/severity/list", + method: "get" + }) +} + +// 鑾峰彇浼樺厛绾у埆 +export function getPriorityLevelList() { + return request({ + url: "/api/priorityLevel/list", + method: "get" + }) +} + +// 鑺辫垂鏃堕棿鍒楄〃 +export function getTimeSpentList() { + return request({ + url: "/api/timeSpent/list", + method: "get" + }) +} diff --git a/src/api/serviceManage/clientServiceOrder.js b/src/api/serviceManage/clientServiceOrder.js new file mode 100644 index 0000000..cd3b4e4 --- /dev/null +++ b/src/api/serviceManage/clientServiceOrder.js @@ -0,0 +1,32 @@ +import request from "@/common/untils/request.js" + +// 鏈嶅姟鍗曞垪琛� +export function getServiceOrderList() { + return request({ + url: "/api/serviceOrder/list", + method: "get" + }) +} +// 娣诲姞鏈嶅姟鍗� +export function getAddServiceOrder(data) { + return request({ + url: "/api/serviceOrder/add", + method: "post", + data + }) +} +// 鍒犻櫎鏈嶅姟鍗� +export function getDelServiceOrder(data) { + return request({ + url: "/api/serviceOrder/delete/" + data.id, + method: "delete" + }) +} +// 鏇存柊鏈嶅姟鍗� +export function getUpdateServiceOrder(data) { + return request({ + url: "/api/serviceOrder/update", + method: "put", + data + }) +} diff --git a/src/api/serviceManage/orderManage.js b/src/api/serviceManage/orderManage.js deleted file mode 100644 index 36986e3..0000000 --- a/src/api/serviceManage/orderManage.js +++ /dev/null @@ -1,33 +0,0 @@ -import request from "@/common/untils/request.js" - -// 宸ュ崟绠$悊鍒楄〃 -export function getOrderManageList(data) { - return request({ - url: "/api/orderManage/list", - method: "post", - data - }) -} -// 娣诲姞宸ュ崟绠$悊 -export function getAddOrderManage(data) { - return request({ - url: "/api/orderManage/add", - method: "post", - data - }) -} -// 鍒犻櫎宸ュ崟绠$悊 -export function getDelOrderManage(data) { - return request({ - url: "/api/orderManage/delete/" + data.id, - method: "delete" - }) -} -// 鏇存柊宸ュ崟绠$悊 -export function getUpdateOrderManage(data) { - return request({ - url: "/api/orderManage/update", - method: "put", - data - }) -} diff --git a/src/common/const/commonStatus.js b/src/common/const/commonStatus.js new file mode 100644 index 0000000..4ecfd36 --- /dev/null +++ b/src/common/const/commonStatus.js @@ -0,0 +1,9 @@ +const status = { + processStatus: [ + { id: 1, name: "鏈鐞�" }, + { id: 2, name: "澶勭悊涓�" }, + { id: 3, name: "绛夊緟鍥炲簲" }, + { id: 4, name: "鎴愬姛鍏抽棴" } + ] +} +export default status diff --git a/src/store/modules/getClientName.js b/src/store/modules/getClientName.js index 18637e3..b815996 100644 --- a/src/store/modules/getClientName.js +++ b/src/store/modules/getClientName.js @@ -3,6 +3,9 @@ import { getSaleChanceList } from "@/api/sales/salesOpportunity" import { getSalesLeadsList } from "@/api/client/salesLead" import { getMasterOrderList } from "@/api/sales/masterOrder" +import { getServiceContractList } from "@/api/serviceManage/serviceContract" +import { getContractList } from "@/api/sales/contractManage" +import { getSalesDetailsList } from "@/api/sales/salesDetails" import { Message } from "element-ui" export default { @@ -11,7 +14,10 @@ contactNamelist: [], // 鑱旂郴浜� saleChancelist: [], // 閿�鍞満浼� saleLeadlist: [], // 閿�鍞嚎绱� - masterOrderList: [] // 閿�鍞�诲崟 + masterOrderList: [], // 閿�鍞�诲崟 + serviceContractList: [], // 鏈嶅姟鍚堝悓 + getContractList: [], // 鍚堝悓璁㈠崟 + salesDetailsList: [] // 閿�鍞槑缁嗗崟 }, mutations: { clientNameList(state, payload) { @@ -28,6 +34,15 @@ }, masterOrderList(state, payload) { state.masterOrderList = payload + }, + serviceContractList(state, payload) { + state.serviceContractList = payload + }, + contractList(state, payload) { + state.contractList = payload + }, + salesDetailsList(state, payload) { + state.salesDetailsList = payload } }, actions: { @@ -75,6 +90,33 @@ Message.error(res.msg) } }) + }, + geServiceContract(context) { + getServiceContractList().then((res) => { + if (res.code == 200) { + context.commit("serviceContractList", res.data.list) + } else { + Message.error(res.msg) + } + }) + }, + geContract(context) { + getContractList().then((res) => { + if (res.code == 200) { + context.commit("contractList", res.data.list) + } else { + Message.error(res.msg) + } + }) + }, + geSalesDetails(context) { + getSalesDetailsList().then((res) => { + if (res.code == 200) { + context.commit("salesDetailsList", res.data.list) + } else { + Message.error(res.msg) + } + }) } } } diff --git a/src/views/other/commonDialog/SelectCommonDialog.vue b/src/views/other/commonDialog/SelectCommonDialog.vue index 04ff4a0..8e42445 100644 --- a/src/views/other/commonDialog/SelectCommonDialog.vue +++ b/src/views/other/commonDialog/SelectCommonDialog.vue @@ -32,9 +32,8 @@ </template> <script> -import { getMasterOrderList } from "@/api/sales/masterOrder" export default { - name: "EditSelChanceDialog", + name: "EditSelCommonDialog", props: { editCommonConfig: { type: Object, @@ -42,7 +41,7 @@ return { editVisible: false, title: "", - infomation: {} + tableInfomation: [] } } } @@ -54,7 +53,7 @@ dialogWidth: "50%", editConfig: this.editCommonConfig, queryInput: "", - select: "1", + select: "鍏ㄩ儴瀛楁", tableData: [], searchSelOptions: [], loading: false, @@ -63,62 +62,60 @@ } }, created() { - this.getData() this.setTable() }, methods: { setTable() { if (this.editConfig.title === "閿�鍞�诲崟") { this.tableList = { - tableInfomation: [], + tableInfomation: this.editConfig.tableInfomation, tableColumn: [ { label: "鍗曟嵁缂栧彿", prop: "number", isClick: true }, // 鍗曟嵁缂栧彿 { label: "璐熻矗浜�", prop: "member_id" } // 璐熻矗浜� ] } + } else if (this.editConfig.title === "鏈嶅姟鍚堝悓") { + this.tableList = { + tableInfomation: this.editConfig.tableInfomation, + tableColumn: [ + { label: "瀹㈡埛鍚嶇О", prop: "clientId" }, // 瀹㈡埛鍚嶇О + { label: "鏈嶅姟鍚堝悓缂栧彿", prop: "number", isClick: true }, // 鏈嶅姟鍚堝悓缂栧彿 + { label: "璐熻矗浜�", prop: "memberId" }, // 璐熻矗浜� + { label: "鍚堣", prop: "total" }, // 鍚堣 + { label: "绛剧害鏃ユ湡", prop: "signTime", isTime: true }, // 绛剧害鏃ユ湡 + { label: "鍚堝悓鐘舵��", prop: "serviceContractStatusId" } // 鍚堝悓鐘舵�� + ] + } + } else if (this.editConfig.title === "閿�鍞槑缁嗗崟") { + this.tableList = { + tableInfomation: this.editConfig.tableInfomation, + tableColumn: [ + { label: "瀹㈡埛鍚嶇О", prop: "clientId" }, // 瀹㈡埛鍚嶇О + { label: "璁㈠崟缂栧彿", prop: "number", isClick: true }, // 璁㈠崟缂栧彿 + { label: "绛剧害鏃ユ湡", prop: "signTime" }, // 绛剧害鏃ユ湡 + { label: "閿�鍞礋璐d汉", prop: "memberId" }, // 閿�鍞礋璐d汉 + { label: "鍚堣", prop: "tptal" } // 鍚堣 + ] + } } - this.commonOptions = [{ value: 1, name: "鍏ㄩ儴瀛楁" }] + this.commonOptions = [{ id: 1, name: "鍏ㄩ儴瀛楁" }] for (let i = 1; i < this.tableList.tableColumn.length; i++) { const label = this.tableList.tableColumn[i].label - this.commonOptions.push({ value: (i + 1).toString(), name: label }) + this.commonOptions.push({ id: (i + 1).toString(), name: label }) } }, handleClose() { this.editConfig.editVisible = false }, - // 璇锋眰鏁版嵁 - async getData() { - this.loading = true - await getMasterOrderList() - .then((res) => { - console.log(res) - if (res.code === 200) { - if (res.data.list && res.data.list.length > 0) { - const list = res.data.list.map((item) => { - return { - ...item - } - }) - this.tableList.tableInfomation = list.slice(0, 5) || [] - } else { - this.tableList.tableInfomation = [] - } - } else { - this.tableList.tableInfomation = [] - } - this.loading = false - }) - .catch((err) => { - console.log(err) - this.tableData = [] - this.loading = false - }) - }, selNameClick(row) { this.editConfig.editVisible = false if (this.editConfig.title === "閿�鍞�诲崟") { this.$emit("selClient", row, "master") + } else if (this.editConfig.title === "鏈嶅姟鍚堝悓") { + this.$emit("selClient", row, "serviceContract") + } else if (this.editConfig.title === "閿�鍞槑缁嗗崟") { + this.$emit("selClient", row, "contract") } } } diff --git a/src/views/sales/subOrder/AddSubOrderDialog.vue b/src/views/sales/subOrder/AddSubOrderDialog.vue index c70c802..e5e664c 100644 --- a/src/views/sales/subOrder/AddSubOrderDialog.vue +++ b/src/views/sales/subOrder/AddSubOrderDialog.vue @@ -421,6 +421,7 @@ } else if (value == "master") { this.editSelectMasterConfig.title = "閿�鍞�诲崟" this.editSelectMasterConfig.editVisible = true + this.editSelectMasterConfig.tableInfomation = [...this.masterOrderList] } }, selClient(row, value) { diff --git a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue index 3247a53..d1571bf 100644 --- a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue +++ b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue @@ -28,52 +28,60 @@ <div class="custom-name"> <el-autocomplete v-model="editConfig.infomation.client_name" - :fetch-suggestions="querySearchAsync" + :fetch-suggestions=" + (queryString, callback) => { + querySearchAsync(queryString, callback, 'client') + } + " value-key="name" - @select="handleSelectClient" + @select="handleSelectClient('client', $event)" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick"> + <div class="common-select-btn" @click="selClientClick('client')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> </div> - <div class="common-select-btn" @click="clearupClient"> + <div class="common-select-btn" @click="clearupClient('client')"> <i class="el-icon-edit-outline" title="娓呴櫎"></i> </div> </div> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鏈嶅姟鍗曠紪鍙�" prop="number"> - <el-input v-model="editConfig.infomation.number"></el-input> + <el-form-item label="鏈嶅姟鍗曠紪鍙�" prop="serviceNumber"> + <el-input v-model="editConfig.infomation.serviceNumber"></el-input> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鏈嶅姟鍚堝悓" prop="name"> + <el-form-item label="鏈嶅姟鍚堝悓"> <div class="custom-name"> <el-autocomplete - v-model="editConfig.infomation.client_name" - :fetch-suggestions="querySearchAsync" - value-key="name" - @select="handleSelectClient" + v-model="editConfig.infomation.service_number" + :fetch-suggestions=" + (queryString, callback) => { + querySearchAsync(queryString, callback, 'serviceContract') + } + " + value-key="number" + @select="handleSelectClient('serviceContract', $event)" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick"> + <div class="common-select-btn" @click="selClientClick('serviceContract')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> </div> - <div class="common-select-btn" @click="clearupClient"> + <div class="common-select-btn" @click="clearupClient('serviceContract')"> <i class="el-icon-edit-outline" title="娓呴櫎"></i> </div> </div> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鏁呴殰绫诲埆" prop="orderType"> + <el-form-item label="鏁呴殰绫诲埆" prop="faultTypeId"> <div class="common-select"> <el-select - v-model="editConfig.infomation.orderType" + v-model="editConfig.infomation.faultTypeId" placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" > - <el-option v-for="item in orderTypeOptions" :key="item.id" :label="item.name" :value="item.id"> + <el-option v-for="item in faultTypeOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> <div class="common-select-btn"><i class="el-icon-setting"></i></div> @@ -81,38 +89,47 @@ </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="涓婚" prop="contactId"> - <el-input v-model="editConfig.infomation.contactId"></el-input> + <el-form-item label="涓婚" prop="subject"> + <el-input v-model="editConfig.infomation.subject"></el-input> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鍚堝悓璁㈠崟" prop="name"> + <el-form-item label="鍚堝悓璁㈠崟"> <div class="custom-name"> <el-autocomplete - v-model="editConfig.infomation.client_name" - :fetch-suggestions="querySearchAsync" - value-key="name" - @select="handleSelectClient" + v-model="editConfig.infomation.number" + :fetch-suggestions=" + (queryString, callback) => { + querySearchAsync(queryString, callback, 'contract') + } + " + value-key="number" + @select="handleSelectClient('contract', $event)" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick"> + <div class="common-select-btn" @click="selClientClick('contract')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> </div> - <div class="common-select-btn" @click="clearupClient"> + <div class="common-select-btn" @click="clearupClient('contract')"> <i class="el-icon-edit-outline" title="娓呴櫎"></i> </div> </div> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="浜у搧绫诲埆" prop="orderType"> + <el-form-item label="浜у搧绫诲埆" prop="productCategory"> <div class="common-select"> <el-select - v-model="editConfig.infomation.orderType" + v-model="editConfig.infomation.productCategory" placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" > - <el-option v-for="item in orderTypeOptions" :key="item.id" :label="item.name" :value="item.id"> + <el-option + v-for="item in productCategoryOptions" + :key="item.id" + :label="item.name" + :value="item.id" + > </el-option> </el-select> <div class="common-select-btn"><i class="el-icon-setting"></i></div> @@ -120,33 +137,38 @@ </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="浜у搧鍚嶇О" prop="name"> + <el-form-item label="浜у搧鍚嶇О" prop="product_name"> <div class="custom-name"> <el-autocomplete - v-model="editConfig.infomation.client_name" - :fetch-suggestions="querySearchAsync" + v-model="editConfig.infomation.product_name" + :fetch-suggestions=" + (queryString, callback) => { + querySearchAsync(queryString, callback, 'productName') + } + " value-key="name" - @select="handleSelectClient" + @select="handleSelectClient('productName', $event)" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick"> + <div class="common-select-btn" @click="selClientClick('productName')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> </div> - <div class="common-select-btn" @click="clearupClient"> + <div class="common-select-btn" @click="clearupClient('productName')"> <i class="el-icon-edit-outline" title="娓呴櫎"></i> </div> </div> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鏈嶅姟鏂瑰紡" prop="orderType"> + <el-form-item label="鏈嶅姟鏂瑰紡" prop="serviceTypeId"> <div class="common-select"> <el-select - v-model="editConfig.infomation.orderType" + v-model="editConfig.infomation.serviceTypeId" placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" + @focus="getServiceTypeList" > - <el-option v-for="item in orderTypeOptions" :key="item.id" :label="item.name" :value="item.id"> + <el-option v-for="item in serviceTypeOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> <div class="common-select-btn"><i class="el-icon-setting"></i></div> @@ -154,15 +176,20 @@ </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鏈嶅姟浜哄憳" prop="orderType"> + <el-form-item label="鏈嶅姟浜哄憳" prop="serviceManId"> <div class="common-select"> <el-select - v-model="editConfig.infomation.orderType" + v-model="editConfig.infomation.serviceManId" placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" > - <el-option v-for="item in orderTypeOptions" :key="item.id" :label="item.name" :value="item.id"> + <el-option + v-for="item in serviceManOptions" + :key="item.id" + :label="item.username" + :value="item.id" + > </el-option> </el-select> </div> @@ -172,30 +199,35 @@ <el-form-item label="鑱旂郴浜哄鍚�" prop="client_name"> <div class="custom-name"> <el-autocomplete - v-model="editConfig.infomation.client_name" - :fetch-suggestions="querySearchAsync" + v-model="editConfig.infomation.contact_name" + :fetch-suggestions=" + (queryString, callback) => { + querySearchAsync(queryString, callback, 'contact') + } + " value-key="name" - @select="handleSelectClient" + @select="handleSelectClient('contact', $event)" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick"> + <div class="common-select-btn" @click="selClientClick('contact')"> <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> </div> - <div class="common-select-btn" @click="clearupClient"> + <div class="common-select-btn" @click="clearupClient('contact')"> <i class="el-icon-edit-outline" title="娓呴櫎"></i> </div> </div> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="涓ラ噸绋嬪害" prop="reportSourceId"> + <el-form-item label="涓ラ噸绋嬪害" prop="severity"> <div class="common-select"> <el-select - v-model="editConfig.infomation.reportSourceId" + v-model="editConfig.infomation.severity" placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" + @focus="getSeverityList" > - <el-option v-for="item in reportSourceOptions" :key="item.id" :label="item.name" :value="item.id"> + <el-option v-for="item in severityOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> <div class="common-select-btn"><i class="el-icon-setting"></i></div> @@ -203,25 +235,31 @@ </el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="涓婇棬鍦板潃" prop="problemDescription"> + <el-form-item label="涓婇棬鍦板潃" prop="address"> <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="璇疯緭鍏ュ唴瀹�" - v-model="editConfig.infomation.problemDescription" + v-model="editConfig.infomation.address" ></el-input> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="浼樺厛绾у埆" prop="reportSourceId"> + <el-form-item label="浼樺厛绾у埆" prop="priorityLevelId"> <div class="common-select"> <el-select - v-model="editConfig.infomation.reportSourceId" + v-model="editConfig.infomation.priorityLevelId" placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" + @focus="getPriorityLevelList" > - <el-option v-for="item in reportSourceOptions" :key="item.id" :label="item.name" :value="item.id"> + <el-option + v-for="item in priorityLevelOptions" + :key="item.id" + :label="item.name" + :value="item.id" + > </el-option> </el-select> <div class="common-select-btn"><i class="el-icon-setting"></i></div> @@ -229,8 +267,12 @@ </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="棰勭害涓婇棬鏃堕棿" prop="startTime"> - <el-date-picker v-model="editConfig.infomation.startTime" type="datetime" placeholder="閫夋嫨鏃ユ湡"> + <el-form-item label="棰勭害涓婇棬鏃堕棿" prop="appointmentTime"> + <el-date-picker + v-model="editConfig.infomation.appointmentTime" + type="datetime" + placeholder="閫夋嫨鏃ユ湡" + > </el-date-picker> </el-form-item> </el-col> @@ -238,16 +280,20 @@ <el-form-item label="閿�鍞満浼�" prop="client_name"> <div class="custom-name"> <el-autocomplete - v-model="editConfig.infomation.client_name" - :fetch-suggestions="querySearchAsync" + v-model="editConfig.infomation.sale_chance_name" + :fetch-suggestions=" + (queryString, callback) => { + querySearchAsync(queryString, callback, 'chance') + } + " value-key="name" - @select="handleSelectClient" + @select="handleSelectClient('chance', $event)" ></el-autocomplete> - <div class="common-select-btn" @click="selClientClick"> - <i class="el-icon-circle-plus-outline" title="閫夋嫨"></i> + <div class="common-select-btn" @click="selClientClick('chance')"> + <i class="el-icon-circle-plus-outline"></i> </div> - <div class="common-select-btn" @click="clearupClient"> - <i class="el-icon-edit-outline" title="娓呴櫎"></i> + <div class="common-select-btn" @click="clearupClient('chance')"> + <i class="el-icon-edit-outline"></i> </div> </div> </el-form-item> @@ -259,37 +305,15 @@ <div class="basic-info-view"> <el-row> <el-col :span="12"> - <el-form-item label="甯屾湜澶勭悊鏃堕棿" prop="startTime"> - <el-date-picker v-model="editConfig.infomation.startTime" type="datetime" placeholder="閫夋嫨鏃ユ湡"> - </el-date-picker> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="瀹為檯澶勭悊鏃堕棿" prop="startTime"> - <el-date-picker v-model="editConfig.infomation.startTime" type="datetime" placeholder="閫夋嫨鏃ユ湡"> - </el-date-picker> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="浜ら�氳垂" prop="reportSourceId"> - <el-input v-model="editConfig.infomation.problemDescription"></el-input> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="鏀惰垂閲戦" prop="reportSourceId"> - <el-input v-model="editConfig.infomation.problemDescription"></el-input> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="鑺辫垂鏃堕棿" prop="reportSourceId"> + <el-form-item label="澶勭悊鐘舵��" prop="status"> <div class="common-select"> <el-select - v-model="editConfig.infomation.reportSourceId" + v-model="editConfig.infomation.status" placeholder="璇烽�夋嫨" class="common-select-sel" size="mini" > - <el-option v-for="item in reportSourceOptions" :key="item.id" :label="item.name" :value="item.id"> + <el-option v-for="item in statusOptions" :key="item.id" :label="item.name" :value="item.id"> </el-option> </el-select> <div class="common-select-btn"><i class="el-icon-setting"></i></div> @@ -303,24 +327,48 @@ <div class="basic-info-view"> <el-row> <el-col :span="12"> - <el-form-item label="甯歌闂" prop="problemDescription"> - <el-input v-model="editConfig.infomation.problemDescription"></el-input> + <el-form-item label="甯屾湜澶勭悊鏃堕棿" prop="expectTime"> + <el-date-picker v-model="editConfig.infomation.expectTime" type="datetime" placeholder="閫夋嫨鏃堕棿"> + </el-date-picker> </el-form-item> </el-col> - <el-col :span="24"> - <el-form-item label="闂鎻忚堪" prop="problemDescription"> - <el-input - type="textarea" - :autosize="{ minRows: 2, maxRows: 4 }" - placeholder="璇疯緭鍏ュ唴瀹�" - v-model="editConfig.infomation.problemDescription" - ></el-input> + <el-col :span="12"> + <el-form-item label="瀹為檯澶勭悊鏃堕棿" prop="realTime"> + <el-date-picker v-model="editConfig.infomation.startTime" type="realTime" placeholder="閫夋嫨鏃堕棿"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="浜ら�氳垂" prop="carFare"> + <el-input v-model="editConfig.infomation.carFare"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鏀惰垂閲戦" prop="chargeAmount"> + <el-input v-model="editConfig.infomation.chargeAmount"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鑺辫垂鏃堕棿" prop="timeSpentId"> + <div class="common-select"> + <el-select + v-model="editConfig.infomation.timeSpentId" + placeholder="璇烽�夋嫨" + class="common-select-sel" + size="mini" + @focus="getTimeSpentList" + > + <el-option v-for="item in timeSpentOptions" :key="item.id" :label="item.name" :value="item.id"> + </el-option> + </el-select> + <div class="common-select-btn"><i class="el-icon-setting"></i></div> + </div> </el-form-item> </el-col> </el-row> </div> <!-- 瀹氫綅鍦板潃 --> - <div class="basic-info-title">瀹氫綅鍦板潃</div> + <!-- <div class="basic-info-title">瀹氫綅鍦板潃</div> <div class="basic-info-view"> <el-row> <el-col :span="24"> @@ -334,23 +382,23 @@ </el-form-item> </el-col> </el-row> - </div> + </div> --> <!-- 闂鎻忚堪 --> <div class="basic-info-title">闂鎻忚堪</div> <div class="basic-info-view"> <el-row> <el-col :span="12"> - <el-form-item label="甯歌闂" prop="problemDescription"> - <el-input v-model="editConfig.infomation.problemDescription"></el-input> + <el-form-item label="甯歌闂" prop="faqId"> + <el-input v-model="editConfig.infomation.faqId"></el-input> </el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="闂鎻忚堪" prop="problemDescription"> + <el-form-item label="闂鎻忚堪" prop="problemDesc"> <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="璇疯緭鍏ュ唴瀹�" - v-model="editConfig.infomation.problemDescription" + v-model="editConfig.infomation.problemDesc" ></el-input> </el-form-item> </el-col> @@ -361,22 +409,22 @@ <div class="basic-info-view"> <el-row> <el-col :span="24"> - <el-form-item label="瑙e喅鏂规硶" prop="problemDescription"> + <el-form-item label="瑙e喅鏂规硶" prop="solution"> <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="璇疯緭鍏ュ唴瀹�" - v-model="editConfig.infomation.problemDescription" + v-model="editConfig.infomation.solution" ></el-input> </el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="鍐呴儴澶囨敞" prop="problemDescription"> + <el-form-item label="鍐呴儴澶囨敞" prop="solutionRemark"> <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="璇疯緭鍏ュ唴瀹�" - v-model="editConfig.infomation.problemDescription" + v-model="editConfig.infomation.solutionRemark" ></el-input> </el-form-item> </el-col> @@ -387,19 +435,19 @@ <div class="basic-info-view"> <el-row> <el-col :span="24"> - <el-form-item label="澶囨敞" prop="problemDescription"> + <el-form-item label="澶囨敞" prop="remark"> <el-input type="textarea" :autosize="{ minRows: 2, maxRows: 4 }" placeholder="璇疯緭鍏ュ唴瀹�" - v-model="editConfig.infomation.problemDescription" + v-model="editConfig.infomation.remark" ></el-input> </el-form-item> </el-col> </el-row> </div> <!-- 闄勪欢淇℃伅 --> - <div class="basic-info-title">闄勪欢淇℃伅</div> + <!-- <div class="basic-info-title">闄勪欢淇℃伅</div> <div class="basic-info-view"> <el-row> <el-col :span="12"> @@ -424,7 +472,7 @@ </el-form-item> </el-col> </el-row> - </div> + </div> --> <!-- 瀹㈡埛鏈嶅姟鍗曞巻鍙茶褰� --> <div v-if="editConfig.title === '缂栬緫'" class="basic-info"> <div class="basic-info-label" @click="expandClick('record')"> @@ -472,15 +520,45 @@ :edit-common-config="editSelectClientConfig" @selClient="selClient" /> + <!-- 閫夋嫨鏈嶅姟鍚堝悓 --> + <SelectCommonDialog + v-if="editSelCommonConfig.editVisible" + :edit-common-config="editSelCommonConfig" + @selClient="selClient" + /> + <!-- 閫夋嫨鑱旂郴浜� --> + <SelectContactDialog + v-if="editSelectContactConfig.editVisible" + :edit-common-config="editSelectContactConfig" + @selClient="selClient" + /> + <!-- 閫夋嫨閿�鍞満浼� --> + <SelectChanceDialog + v-if="editSelectChanceConfig.editVisible" + :edit-common-config="editSelectChanceConfig" + @selClient="selClient" + /> </el-dialog> </div> </template> <script> import { getAllData } from "@/api/client/client" -import { getAddOrderManage, getUpdateOrderManage } from "@/api/serviceManage/orderManage" +import { getAddServiceOrder, getUpdateServiceOrder } from "@/api/serviceManage/clientServiceOrder" import SelectClientDialog from "@/views/other/commonDialog/SelectClientDialog" import pageMixin from "@/components/makepager/pager/mixin/pageMixin" +import SelectCommonDialog from "@/views/other/commonDialog/SelectCommonDialog" +import SelectContactDialog from "@/views/other/commonDialog/SelectContactDialog" +import SelectChanceDialog from "@/views/other/commonDialog/SelectChanceDialog" +import { + getFaultTypeList, + getServiceTypeList, + getSeverityList, + getPriorityLevelList, + getTimeSpentList +} from "@/api/common/other" +import Status from "@/common/const/commonStatus" + export default { name: "AddClientServiceOrderDialog", mixins: [pageMixin], @@ -496,13 +574,22 @@ } } }, - components: { SelectClientDialog }, + components: { SelectClientDialog, SelectCommonDialog, SelectContactDialog, SelectChanceDialog }, computed: { clientList() { return this.$store.state.getClientName.clientList }, - searchCommonHeight() { - return this.$refs.searchCommonView.offsetHeight + serviceContractList() { + return this.$store.state.getClientName.serviceContractList + }, + salesDetailsList() { + return this.$store.state.getClientName.salesDetailsList + }, + contactNamelist() { + return this.$store.state.getClientName.contactNamelist + }, + saleChancelist() { + return this.$store.state.getClientName.saleChancelist } }, data() { @@ -510,18 +597,26 @@ dialogWidth: "80%", editConfig: this.editCommonConfig, rules: { - clientId: [{ required: true, message: "璇疯緭鍏ュ鎴峰悕绉�", trigger: "blur" }], - number: [{ required: true, message: "璇疯緭鍏ュ伐鍗曠紪鍙�", trigger: "blur" }], - orderType: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }], - problemDescription: [{ required: true, message: "璇疯緭鍏ラ棶棰樻弿杩�", trigger: "blur" }] + serviceNumber: [{ required: true, message: "璇疯緭鍏ユ湇鍔″崟缂栧彿", trigger: "blur" }], + faultTypeId: [{ required: true, message: "璇烽�夋嫨鏁呴殰绫诲埆", trigger: "change" }], + subject: [{ required: true, message: "璇疯緭鍏ヤ富棰�", trigger: "blur" }], + productCategory: [{ required: true, message: "璇烽�夋嫨浜у搧绫诲埆", trigger: "change" }], + serviceManId: [{ required: true, message: "璇烽�夋嫨浜у搧绫诲埆", trigger: "change" }], + status: [{ required: true, message: "璇烽�夋嫨鏁呴殰绫诲埆", trigger: "change" }], + problemDesc: [{ required: true, message: "璇疯緭鍏ラ棶棰樻弿杩�", trigger: "blur" }] }, - orderTypeOptions: [{ id: 1, name: "绫诲瀷1" }], // 宸ュ崟绫诲瀷 - reportSourceOptions: [], // 鎶ヤ慨鏉ユ簮 - // sourceSheetOptions: [ - // { value: "1", label: "閿�鍞槑缁嗗崟" }, - // { value: "2", label: "鏈嶅姟鍚堝悓" } - // ], - approvalWorkflowOptions: [], // 瀹℃壒娴佺▼ + faultTypeOptions: [{ id: 1, name: "鏈嶅姟鍥炶" }], // 鏁呴殰绫诲埆 + productCategoryOptions: [ + { id: 1, name: "ERP杩蜂綘鐗�" }, + { id: 2, name: "ERP涓撲笟鐗�-璐㈠姟妯″潡" } + ], // 浜у搧绫诲埆 + productNameList: [], // 浜у搧鍚嶇О + serviceTypeOptions: [], // 鏈嶅姟鏂瑰紡 + serviceManOptions: [], // 鏈嶅姟浜哄憳 + severityOptions: [], // 涓ラ噸绋嬪害 + priorityLevelOptions: [], // 浼樺厛绾у埆 + statusOptions: Status.processStatus, // 澶勭悊鐘舵�� + timeSpentOptions: [], // 鑺辫垂鏃堕棿 editSelectClientConfig: { editVisible: false, title: "", @@ -540,7 +635,28 @@ currPage: 1, pageSize: 5, totalCount: 0 - } + }, + editSelCommonConfig: { + editVisible: false, + title: "", + infomation: {} + }, + editSelectContactConfig: { + editVisible: false, + title: "", + infomation: {} + }, + editSelectChanceConfig: { + editVisible: false, + title: "", + infomation: {} + }, + clientId: this.editCommonConfig.infomation.clientId, + contactId: this.editCommonConfig.infomation.contactId, + serviceContractId: this.editCommonConfig.infomation.contractId, + contractId: this.editCommonConfig.infomation.orderId, + productNameId: this.editCommonConfig.infomation.productId, + saleChanceId: this.editCommonConfig.infomation.saleChanceId } }, created() { @@ -567,7 +683,7 @@ getAllData() .then((res) => { this.memberOptions = res.data.member - this.orderTypeOptions = res.data.orderType + this.serviceManOptions = res.data.member this.reportSourceOptions = res.data.reportSource }) .catch((err) => { @@ -582,7 +698,7 @@ const params = this.saveParams() console.log(params) if (this.editConfig.title === "鏂板缓") { - getAddOrderManage(params) + getAddServiceOrder(params) .then((res) => { console.log(res) this.editConfig.visible = false @@ -598,7 +714,7 @@ console.log(err) }) } else { - getUpdateOrderManage(params) + getUpdateServiceOrder(params) .then((res) => { console.log(res) this.editConfig.visible = false @@ -623,48 +739,151 @@ saveParams() { let data = this.editConfig.infomation let params = { - id: this.editConfig.title === "鏂板缓" ? 0 : data.id, - clientId: parseInt(data.clientId) || 0, - contactId: data.contactId || 0, - file: data.file || "", - name: data.name || "", - number: data.number || "", - orderType: data.orderType || 0, - problemDescription: data.problemDescription || "", - reportSourceId: data.reportSourceId || 0, - sourceSheet: data.sourceSheet || 0 + address: data.address || "", + appointmentTime: data.appointmentTime || "", + carFare: data.carFare || 0, + chargeAmount: data.chargeAmount || 0, + clientId: this.clientId, + contactId: this.contactId, + contractId: this.serviceContractId, + expectTime: data.expectTime || "", + faqId: data.faqId || 0, + faultTypeId: data.faultTypeId || 0, + id: data.id || 0, + orderId: this.contractId, + priorityLevelId: data.priorityLevelId || 0, + problemDesc: data.problemDesc || "", + productId: this.productNameId, + realTime: data.realTime || "", + remark: data.remark || "", + saleChanceId: this.saleChanceId, + serviceManId: data.serviceManId || 0, + serviceNumber: data.serviceNumber || "", + serviceTypeId: data.serviceTypeId || 0, + severity: data.severity || 0, + solution: data.solution || "", + solutionRemark: data.solutionRemark || "", + status: data.status || 0, + subject: data.subject || "", + timeSpentId: data.timeSpentId || 0 } return params }, handleClose() { this.editConfig.visible = false }, - // 閫夋嫨瀹㈡埛鐩稿叧鏂规硶 - querySearchAsync(queryString, cb) { - var restaurants = this.clientList - var results = queryString ? restaurants.filter(this.createStateFilter(queryString)) : restaurants + // 閫夋嫨鐢ㄦ埛鐩稿叧鏂规硶 + querySearchAsync(queryString, cb, value) { + this.$store.dispatch("geServiceContract") + this.$store.dispatch("geSalesDetails") + this.$store.dispatch("geContact") + this.$store.dispatch("geChance") + var restaurants = [] + if (value === "client") { + restaurants = this.clientList + } else if (value === "serviceContract") { + restaurants = this.serviceContractList + } else if (value === "contract") { + restaurants = this.salesDetailsList + } else if (value === "productName") { + restaurants = this.productNameList + } else if (value === "contact") { + restaurants = this.contactNamelist + } else if (value === "chance") { + restaurants = this.saleChancelist + } + var results = queryString ? restaurants.filter(this.createStateFilter(queryString, value)) : restaurants cb(results) }, - createStateFilter(queryString) { + createStateFilter(queryString, value) { return (state) => { - return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 + if (value === "serviceContract" || value === "contract") { + return state.number.toLowerCase().indexOf(queryString.toLowerCase()) === 0 + } else { + return state.name.toLowerCase().indexOf(queryString.toLowerCase()) === 0 + } } }, - handleSelectClient(item) { - this.editConfig.infomation.client_id = item.id + handleSelectClient(value, item) { + if (value === "client") { + this.clientId = item.id + } else if (value === "serviceContract") { + this.serviceContractId = item.id + } else if (value === "contract") { + this.contractId = item.id + } else if (value === "productName") { + this.productCategoryId = item.id + } else if (value === "contact") { + this.contactId = item.id + } else if (value === "chance") { + this.saleChanceId = item.id + } }, - selClientClick() { - this.editSelectClientConfig.editVisible = true + selClientClick(value) { + console.log(value) + if (value === "client") { + this.editSelectClientConfig.editVisible = true + } else if (value === "serviceContract") { + this.editSelCommonConfig.title = "鏈嶅姟鍚堝悓" + this.editSelCommonConfig.editVisible = true + this.editSelCommonConfig.tableInfomation = [...this.serviceContractList] + } else if (value === "contract") { + this.editSelCommonConfig.title = "閿�鍞槑缁嗗崟" + this.editSelCommonConfig.editVisible = true + this.editSelCommonConfig.tableInfomation = [...this.salesDetailsList] + } else if (value === "productName") { + this.editSelCommonConfig.title = "浜у搧鍚嶇О" + this.editSelCommonConfig.editVisible = true + this.editSelCommonConfig.tableInfomation = [...this.productNameList] + } else if (value === "contact") { + this.editSelectContactConfig.editVisible = true + } else if (value === "chance") { + this.editSelectChanceConfig.editVisible = true + } }, - selClient(row) { - console.log(row) - this.editConfig.infomation.client_name = row.name - this.editConfig.infomation.client_id = row.id + selClient(row, value) { + console.log(row, value) + if (value === "contact") { + this.editConfig.infomation.contact_name = row.name + this.contactId = row.id + } else if (value === "client") { + this.editConfig.infomation.client_name = row.name + this.clientId = row.id + } else if (value === "serviceContract") { + this.editConfig.infomation.service_number = row.number + this.serviceContractId = row.id + } else if (value === "contract") { + this.editConfig.infomation.number = row.number + this.contractId = row.id + } else if (value === "productName") { + this.editConfig.infomation.product_name = row.name + this.productNameId = row.id + } else if (value === "chance") { + this.editConfig.infomation.sale_chance_name = row.name + this.saleChanceId = row.id + } }, // 娓呴櫎宸查�夋嫨鐢ㄦ埛 - clearupClient() { - this.editConfig.infomation.client_name = "" - this.editConfig.infomation.client_id = 0 + clearupClient(value) { + if (value === "client") { + this.editConfig.infomation.client_name = "" + this.clientId = 0 + } else if (value === "serviceContract") { + this.editConfig.infomation.service_number = "" + this.serviceContractId = 0 + } else if (value === "contract") { + this.editConfig.infomation.number = "" + this.contractId = 0 + } else if (value === "productName") { + this.editConfig.infomation.product_name = "" + this.productNameId = 0 + } else if (value === "contact") { + this.editConfig.infomation.contact_name = "" + this.contactId = 0 + } else if (value === "chance") { + this.editConfig.infomation.sale_chance_name = "" + this.saleChanceId = 0 + } }, // 娣诲姞闄勪欢 addAnnexClick() {}, @@ -678,6 +897,63 @@ } else if (value === "contract") { this.isConttractExpand = !this.isConttractExpand } + }, + // 鏁呴殰绫诲埆 + async getFaultTypeList(e) { + if (e) { + await getFaultTypeList() + .then((res) => { + console.log(res) + this.faultTypeOptions = res.data.data + }) + .catch((err) => { + console.log(err) + }) + } + }, + // 鏈嶅姟鏂瑰紡 + async getServiceTypeList() { + await getServiceTypeList() + .then((res) => { + console.log(res) + this.serviceTypeOptions = res.data.data + }) + .catch((err) => { + console.log(err) + }) + }, + // 涓ラ噸绋嬪害 + async getSeverityList() { + await getSeverityList() + .then((res) => { + console.log(res) + this.severityOptions = res.data.data + }) + .catch((err) => { + console.log(err) + }) + }, + // 浼樺厛绾у埆 + async getPriorityLevelList() { + await getPriorityLevelList() + .then((res) => { + console.log(res) + this.priorityLevelOptions = res.data.data + }) + .catch((err) => { + console.log(err) + }) + }, + // 鑺辫垂鏃堕棿 + async getTimeSpentList() { + await getTimeSpentList() + .then((res) => { + console.log(res) + this.timeSpentOptions = res.data.data + }) + .catch((err) => { + console.log(err) + }) } } } diff --git a/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue b/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue index 926a42b..d7446de 100644 --- a/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue +++ b/src/views/service/clientServiceOrder/DetailClientServiceOrder.vue @@ -38,11 +38,11 @@ <li v-for="(item, i) in basicInfoList" :key="i"> <div class="left"> <div class="content-title">{{ item.leftStr + "锛�" }}</div> - <div class="content-data">{{ item.leftValue }}</div> + <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> </div> <div class="right"> <div class="content-title">{{ item.rightStr }}</div> - <div class="content-data">{{ item.rightValue }}</div> + <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> </div> </li> </ul> @@ -60,11 +60,11 @@ <li v-for="(item, i) in dynamicInfoList" :key="i"> <div class="left"> <div class="content-title">{{ item.leftStr + "锛�" }}</div> - <div class="content-data">{{ item.leftValue }}</div> + <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> </div> <div class="right"> <div class="content-title">{{ item.rightStr }}</div> - <div class="content-data">{{ item.rightValue }}</div> + <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> </div> </li> </ul> @@ -82,11 +82,11 @@ <li v-for="(item, i) in timeAmountList" :key="i"> <div class="left"> <div class="content-title">{{ item.leftStr + "锛�" }}</div> - <div class="content-data">{{ item.leftValue }}</div> + <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> </div> <div class="right"> <div class="content-title">{{ item.rightStr }}</div> - <div class="content-data">{{ item.rightValue }}</div> + <div class="content-data">{{ item.rightValue ? item.rightValue : "--" }}</div> </div> </li> </ul> @@ -122,7 +122,7 @@ <li v-for="(item, i) in issueList" :key="i"> <div class="all"> <div class="content-title">{{ item.leftStr + "锛�" }}</div> - <div class="content-data">{{ item.leftValue }}</div> + <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> </div> </li> </ul> @@ -140,7 +140,7 @@ <li v-for="(item, i) in solutionList" :key="i"> <div class="all"> <div class="content-title">{{ item.leftStr + "锛�" }}</div> - <div class="content-data">{{ item.leftValue }}</div> + <div class="content-data">{{ item.leftValue ? item.leftValue : "--" }}</div> </div> </li> </ul> @@ -335,48 +335,49 @@ } }, setData() { + const data = this.detailConfig.infomation this.basicInfoList = [ { leftStr: "瀹㈡埛鍚嶇О", - leftValue: "", + leftValue: data.Client.name, rightStr: "鏈嶅姟鍗曠紪鍙�", - rightValue: "" + rightValue: data.serviceNumber }, { leftStr: "鏈嶅姟鍚堝悓", - leftValue: "", + leftValue: data.Contract.number, rightStr: "鏁呴殰绫诲埆", - rightValue: "" + rightValue: data.FaultType.name }, { leftStr: "涓婚", - leftValue: "", + leftValue: data.subject, rightStr: "鍚堝悓璁㈠崟", - rightValue: "" + rightValue: data.OrderManage.number }, { leftStr: "浜у搧绫诲埆", leftValue: "", rightStr: "浜у搧鍚嶇О", - rightValue: "" + rightValue: data.Product.name }, { leftStr: "鏈嶅姟鏂瑰紡", - leftValue: "", + leftValue: data.ServiceType.name, rightStr: "鏈嶅姟浜哄憳", - rightValue: "" + rightValue: data.serviceManId }, { leftStr: "涓婇棬鍦板潃", - leftValue: "", + leftValue: data.address, rightStr: "浼樺厛绾у埆", - rightValue: "" + rightValue: data.PriorityLevel.name }, { leftStr: "棰勭害涓婇棬鏃堕棿", - leftValue: "", + leftValue: data.appointmentTime, rightStr: "閿�鍞満浼�", - rightValue: "" + rightValue: data.SaleChance.name }, { leftStr: "绛惧埌", @@ -394,7 +395,7 @@ this.dynamicInfoList = [ { leftStr: "澶勭悊鐘舵��", - leftValue: "", + leftValue: data.status, rightStr: "鏈�鏂板垎閰嶆椂闂�", rightValue: "" }, @@ -408,19 +409,19 @@ this.timeAmountList = [ { leftStr: "甯屾湜澶勭悊鏃堕棿", - leftValue: "", + leftValue: data.expectTime, rightStr: "瀹為檯澶勭悊鏃堕棿", - rightValue: "" + rightValue: data.realTime }, { leftStr: "浜ら�氳垂", - leftValue: "", + leftValue: data.carFare, rightStr: "鏀惰垂閲戦", - rightValue: "" + rightValue: data.chargeAmount }, { leftStr: "鑺辫垂鏃堕棿", - leftValue: "", + leftValue: data.TimeSpent.name, rightStr: "", rightValue: "" } @@ -428,67 +429,21 @@ this.issueList = [ { leftStr: "甯歌闂", - leftValue: "" + leftValue: data.Faq.name }, { leftStr: "闂鎻忚堪", - leftValue: "" + leftValue: data.problemDesc } ] this.solutionList = [ { leftStr: "瑙e喅鍔炴硶", - leftValue: "" + leftValue: data.solution }, { leftStr: "鍐呭澶囨敞", - leftValue: "" - } - ] - this.businessInfoList = [ - { - leftStr: "鎵�灞炶涓�", - leftValue: "", - rightStr: "娉曞畾浠h〃浜�", - rightValue: "" - }, - { - leftStr: "娉ㄥ唽鏃堕棿", - leftValue: "", - rightStr: "娉ㄥ唽璧勯噾", - rightValue: "" - }, - { - leftStr: "鍏徃鎬ц川", - leftValue: "", - rightStr: "瀹㈡埛瑙勬ā", - rightValue: "" - }, - { - leftStr: "缁忚惀鑼冨洿", - leftValue: "", - rightStr: "", - rightValue: "" - } - ] - this.addressInfoList = [ - { - leftStr: "鍥藉", - leftValue: "", - rightStr: "鐪佷唤", - rightValue: "" - }, - { - leftStr: "鍩庡競", - leftValue: "", - rightStr: "鍖哄煙", - rightValue: "" - }, - { - leftStr: "璇︾粏鍦板潃", - leftValue: "", - rightStr: "", - rightValue: "" + leftValue: data.solutionRemark } ] }, diff --git a/src/views/service/clientServiceOrder/index.vue b/src/views/service/clientServiceOrder/index.vue index d068dfc..689a8c8 100644 --- a/src/views/service/clientServiceOrder/index.vue +++ b/src/views/service/clientServiceOrder/index.vue @@ -42,7 +42,7 @@ <script> import AddClientServiceOrderDialog from "@/views/service/clientServiceOrder/AddCientServiceOrderDialog" -import { getOrderManageList, getDelOrderManage } from "@/api/serviceManage/orderManage" +import { getServiceOrderList, getDelServiceOrder } from "@/api/serviceManage/clientServiceOrder" import pageMixin from "@/components/makepager/pager/mixin/pageMixin" import DetailClientServiceOrder from "@/views/service/clientServiceOrder/DetailClientServiceOrder" @@ -105,14 +105,14 @@ this.tableList = { tableInfomation: [], tableColumn: [ - { label: "鏈嶅姟鍗曠紪鍙�", prop: "number", min: 100, isCommonClick: true }, // 鏈嶅姟鍗曠紪鍙� - { label: "涓婚", prop: "name" }, // 涓婚 - { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 130, isClientClick: true }, // 瀹㈡埛鍚嶇О - { label: "瀹為檯澶勭悊鏃堕棿", prop: "contactName" }, // 瀹為檯澶勭悊鏃堕棿 - { label: "鏈嶅姟浜哄憳", prop: "name" }, // 鏈嶅姟浜哄憳 - { label: "鏈嶅姟鏂瑰紡", prop: "orderType" }, // 鏈嶅姟鏂瑰紡 + { label: "鏈嶅姟鍗曠紪鍙�", prop: "serviceNumber", min: 100, isCommonClick: true }, // 鏈嶅姟鍗曠紪鍙� + { label: "涓婚", prop: "subject" }, // 涓婚 + { label: "瀹㈡埛鍚嶇О", prop: "client_name", min: 130, isClientClick: true }, // 瀹㈡埛鍚嶇О + { label: "瀹為檯澶勭悊鏃堕棿", prop: "realTime" }, // 瀹為檯澶勭悊鏃堕棿 + { label: "鏈嶅姟浜哄憳", prop: "serviceManId" }, // 鏈嶅姟浜哄憳 + { label: "鏈嶅姟鏂瑰紡", prop: "serviceType_name" }, // 鏈嶅姟鏂瑰紡 { label: "浜у搧绫诲埆", prop: "reportSourceId" }, // 浜у搧绫诲埆 - { label: "鏁呴殰绫诲埆", prop: "orderType" } // 鏁呴殰绫诲埆 + { label: "鏁呴殰绫诲埆", prop: "faultType_name" } // 鏁呴殰绫诲埆 ] } this.searchOptions = [] @@ -124,18 +124,17 @@ // 璇锋眰鏁版嵁 async getData() { this.loading = true - await getOrderManageList({ - keyword: "", - page: this.pagerOptions.currPage, - pageSize: this.pagerOptions.pageSize - }) + await getServiceOrderList() .then((res) => { console.log(res) if (res.code === 200) { - if (res.data.list && res.data.list.length > 0) { - const list = res.data.list.map((item) => { + if (res.data.data && res.data.data.length > 0) { + const list = res.data.data.map((item) => { return { - ...item + ...item, + client_name: item.Client.name, + serviceType_name: item.ServiceType.name, + faultType_name: item.FaultType.name } }) this.tableList.tableInfomation = list || [] @@ -179,7 +178,7 @@ type: "warning" }) .then(function () { - return getDelOrderManage({ id: id }) + return getDelServiceOrder({ id: id }) }) .then((response) => { if (response.code === 200) { diff --git a/src/views/service/serviceContract/index.vue b/src/views/service/serviceContract/index.vue index 257a548..40d1ab6 100644 --- a/src/views/service/serviceContract/index.vue +++ b/src/views/service/serviceContract/index.vue @@ -115,7 +115,7 @@ { label: "瀹㈡埛鍚嶇О", prop: "clientId", min: 120, isClientClick: true }, // 瀹㈡埛鍚嶇О { label: "绛剧害鏃ユ湡", prop: "signTime" }, // 绛剧害鏃ユ湡 { label: "鍚堝悓绫诲瀷", prop: "typeId" }, // 鍚堝悓绫诲瀷 - { label: "鍚堝悓鐘舵��", prop: "statusId" }, // 鍚堝悓鐘舵�� + { label: "鍚堝悓鐘舵��", prop: "serviceContractStatusId" }, // 鍚堝悓鐘舵�� { label: "璐熻矗浜�", prop: "memberId" }, // 璐熻矗浜� { label: "浜у搧鍚嶇О", prop: "productName" }, // 浜у搧鍚嶇О { label: "鏈嶅姟寮�濮嬫棩", prop: "startTime" }, // 鏈嶅姟寮�濮嬫棩 -- Gitblit v1.8.0