From 6291de84d5f68f1f1cd90031c18183a2c1489555 Mon Sep 17 00:00:00 2001
From: yangfeng <wanwan926_4@163.com>
Date: 星期五, 11 八月 2023 18:20:04 +0800
Subject: [PATCH] 销售模块 删除和查询
---
src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue | 154 ++++++++++++++++++++++----------------------------
1 files changed, 68 insertions(+), 86 deletions(-)
diff --git a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
index 6483d54..e308dae 100644
--- a/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
+++ b/src/views/service/clientServiceOrder/AddCientServiceOrderDialog.vue
@@ -116,7 +116,7 @@
</div>
</el-form-item>
</el-col>
- <el-col :span="12">
+ <!-- <el-col :span="12">
<el-form-item label="浜у搧绫诲埆" prop="productCategory">
<div class="common-select">
<el-select
@@ -136,7 +136,7 @@
<div class="common-select-btn"><i class="el-icon-setting"></i></div>
</div>
</el-form-item>
- </el-col>
+ </el-col> -->
<el-col :span="12">
<el-form-item label="浜у搧鍚嶇О" prop="product_name">
<div class="custom-name">
@@ -167,7 +167,6 @@
placeholder="璇烽�夋嫨"
class="common-select-sel"
size="mini"
- @focus="getServiceTypeList"
>
<el-option v-for="item in serviceTypeOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
@@ -226,7 +225,6 @@
placeholder="璇烽�夋嫨"
class="common-select-sel"
size="mini"
- @focus="getSeverityList"
>
<el-option v-for="item in severityOptions" :key="item.id" :label="item.name" :value="item.id">
</el-option>
@@ -253,7 +251,6 @@
placeholder="璇烽�夋嫨"
class="common-select-sel"
size="mini"
- @focus="getPriorityLevelList"
>
<el-option
v-for="item in priorityLevelOptions"
@@ -341,12 +338,24 @@
</el-col>
<el-col :span="12">
<el-form-item label="浜ら�氳垂" prop="carFare">
- <el-input v-model="editConfig.infomation.carFare"></el-input>
+ <el-input-number
+ v-model="editConfig.infomation.carFare"
+ placeholder="璇疯緭鍏�"
+ :min="0"
+ :controls="false"
+ style="width: 100%; margin-right: 5px"
+ ></el-input-number>
</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-input-number
+ v-model="editConfig.infomation.chargeAmount"
+ placeholder="璇疯緭鍏�"
+ :min="0"
+ :controls="false"
+ style="width: 100%; margin-right: 5px"
+ ></el-input-number>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -357,7 +366,6 @@
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>
@@ -601,7 +609,7 @@
serviceNumber: [{ required: true, message: "璇疯緭鍏ユ湇鍔″崟缂栧彿", trigger: "blur" }],
faultTypeId: [{ required: true, message: "璇烽�夋嫨鏁呴殰绫诲埆", trigger: "change" }],
subject: [{ required: true, message: "璇疯緭鍏ヤ富棰�", trigger: "blur" }],
- productCategory: [{ required: true, message: "璇烽�夋嫨浜у搧绫诲埆", trigger: "change" }],
+ // productCategory: [{ required: true, message: "璇烽�夋嫨浜у搧绫诲埆", trigger: "change" }],
serviceManId: [{ required: true, message: "璇烽�夋嫨浜у搧绫诲埆", trigger: "change" }],
serviceOrderStatusId: [{ required: true, message: "璇烽�夋嫨鏁呴殰绫诲埆", trigger: "change" }],
problemDesc: [{ required: true, message: "璇疯緭鍏ラ棶棰樻弿杩�", trigger: "blur" }]
@@ -654,8 +662,8 @@
},
clientId: this.editCommonConfig.infomation.clientId,
contactId: this.editCommonConfig.infomation.contactId,
- serviceContractId: this.editCommonConfig.infomation.contractId,
- contractId: this.editCommonConfig.infomation.orderId,
+ serviceContractId: this.editCommonConfig.infomation.serviceContractId,
+ SalesDetailsId: this.editCommonConfig.infomation.SalesDetailsId,
productNameId: this.editCommonConfig.infomation.productId,
saleChanceId: this.editCommonConfig.infomation.saleChanceId
}
@@ -664,6 +672,16 @@
this.$store.dispatch("geClient")
this.getCommonData()
this.setTable()
+ },
+ mounted() {
+ this.$store.dispatch("geServiceContract")
+ this.$store.dispatch("geSalesDetails")
+ this.$store.dispatch("geContact")
+ this.$store.dispatch("geChance")
+ this.getFaultTypeList()
+ this.getSeverityList()
+ this.getPriorityLevelList()
+ this.getTimeSpentList()
},
methods: {
setTable() {
@@ -696,37 +714,23 @@
const params = this.saveParams()
console.log(params)
if (this.editConfig.title === "鏂板缓") {
- getAddServiceOrder(params)
- .then((res) => {
- console.log(res)
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message({
- message: "娣诲姞鎴愬姛",
- type: "success"
- })
- this.$parent.getData()
- }
- })
- .catch((err) => {
- console.log(err)
- })
+ getAddServiceOrder(params).then((res) => {
+ console.log(res)
+ this.editConfig.visible = false
+ if (res.code === 200) {
+ this.$message.success("娣诲姞鎴愬姛")
+ this.$parent.getData()
+ }
+ })
} else {
- getUpdateServiceOrder(params)
- .then((res) => {
- console.log(res)
- this.editConfig.visible = false
- if (res.code === 200) {
- this.$message({
- message: "缂栬緫鎴愬姛",
- type: "success"
- })
- this.$parent.getData()
- }
- })
- .catch((err) => {
- console.log(err)
- })
+ getUpdateServiceOrder(params).then((res) => {
+ console.log(res)
+ this.editConfig.visible = false
+ if (res.code === 200) {
+ this.$message.success("缂栬緫鎴愬姛")
+ this.$parent.getData()
+ }
+ })
}
} else {
console.log("error submit")
@@ -741,20 +745,20 @@
appointmentTime: data.appointmentTime || "",
carFare: data.carFare || 0,
chargeAmount: data.chargeAmount || 0,
- clientId: this.clientId,
- contactId: this.contactId,
- contractId: this.serviceContractId,
+ clientId: this.clientId || 0,
+ contactId: this.contactId || 0,
+ serviceContractId: this.serviceContractId || 0,
expectTime: data.expectTime || "",
faqId: data.faqId || 0,
faultTypeId: data.faultTypeId || 0,
id: data.id || 0,
- orderId: this.contractId,
+ SalesDetailsId: this.SalesDetailsId || 0,
priorityLevelId: data.priorityLevelId || 0,
problemDesc: data.problemDesc || "",
productId: this.productNameId,
realTime: data.realTime || "",
remark: data.remark || "",
- saleChanceId: this.saleChanceId,
+ saleChanceId: this.saleChanceId || 0,
serviceManId: data.serviceManId || 0,
serviceNumber: data.serviceNumber || "",
serviceTypeId: data.serviceTypeId || 0,
@@ -772,10 +776,6 @@
},
// 閫夋嫨鐢ㄦ埛鐩稿叧鏂规硶
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
@@ -808,7 +808,7 @@
} else if (value === "serviceContract") {
this.serviceContractId = item.id
} else if (value === "contract") {
- this.contractId = item.id
+ this.SalesDetailsId = item.id
} else if (value === "productName") {
this.productCategoryId = item.id
} else if (value === "contact") {
@@ -852,7 +852,7 @@
this.serviceContractId = row.id
} else if (value === "contract") {
this.editConfig.infomation.number = row.number
- this.contractId = row.id
+ this.SalesDetailsId = row.id
} else if (value === "productName") {
this.editConfig.infomation.product_name = row.name
this.productNameId = row.id
@@ -871,7 +871,7 @@
this.serviceContractId = 0
} else if (value === "contract") {
this.editConfig.infomation.number = ""
- this.contractId = 0
+ this.SalesDetailsId = 0
} else if (value === "productName") {
this.editConfig.infomation.product_name = ""
this.productNameId = 0
@@ -899,53 +899,32 @@
// 鏁呴殰绫诲埆
async getFaultTypeList() {
await getFaultTypeList().then((res) => {
- console.log(res)
this.faultTypeOptions = res.data.data
})
},
// 鏈嶅姟鏂瑰紡
async getServiceTypeList() {
- await getServiceTypeList()
- .then((res) => {
- console.log(res)
- this.serviceTypeOptions = res.data.data
- })
- .catch((err) => {
- console.log(err)
- })
+ await getServiceTypeList().then((res) => {
+ this.serviceTypeOptions = res.data.data
+ })
},
// 涓ラ噸绋嬪害
async getSeverityList() {
- await getSeverityList()
- .then((res) => {
- console.log(res)
- this.severityOptions = res.data.data
- })
- .catch((err) => {
- console.log(err)
- })
+ await getSeverityList().then((res) => {
+ this.severityOptions = res.data.data
+ })
},
// 浼樺厛绾у埆
async getPriorityLevelList() {
- await getPriorityLevelList()
- .then((res) => {
- console.log(res)
- this.priorityLevelOptions = res.data.data
- })
- .catch((err) => {
- console.log(err)
- })
+ await getPriorityLevelList().then((res) => {
+ this.priorityLevelOptions = res.data.data
+ })
},
// 鑺辫垂鏃堕棿
async getTimeSpentList() {
- await getTimeSpentList()
- .then((res) => {
- console.log(res)
- this.timeSpentOptions = res.data.data
- })
- .catch((err) => {
- console.log(err)
- })
+ await getTimeSpentList().then((res) => {
+ this.timeSpentOptions = res.data.data
+ })
}
}
}
@@ -1017,6 +996,9 @@
height: 55px;
line-height: 55px;
}
+ .el-input__inner {
+ text-align: left;
+ }
}
}
</style>
--
Gitblit v1.8.0