|
@@ -4,6 +4,10 @@ var initdata_ = {
|
|
|
// 基础信息--------------------
|
|
|
// 维保项目
|
|
|
rpProjectRepairId: "",
|
|
|
+ // 工程编号
|
|
|
+ projectNo: "",
|
|
|
+ // 工程名称
|
|
|
+ projectName: "",
|
|
|
// 客户名称
|
|
|
userName: "",
|
|
|
// 联系人
|
|
@@ -34,6 +38,7 @@ var initdata_ = {
|
|
|
// 销售单位
|
|
|
saleCompany: "",
|
|
|
source: "",
|
|
|
+ saleType: "",
|
|
|
// 产品信息------------------------
|
|
|
orderProducts: [],
|
|
|
// 其它信息------------------------
|
|
@@ -57,7 +62,7 @@ export default {
|
|
|
},
|
|
|
workOrderType: {
|
|
|
type: Number,
|
|
|
- default: 0, // 0普通工单, 1维保工单
|
|
|
+ default: 1, // 1普通工单, 4维保工单
|
|
|
},
|
|
|
},
|
|
|
data() {
|
|
@@ -69,14 +74,14 @@ export default {
|
|
|
id: {
|
|
|
handler(newVal, oldVal) {
|
|
|
this.getorderDetail((data) => {
|
|
|
- if (this.workOrderType == 0) {
|
|
|
+ if (!!~[1, 2, 3].indexOf(this?.workOrderType)) {
|
|
|
this.$nextTick(() => {
|
|
|
// 获取地址信息
|
|
|
this.getinitlbslist()
|
|
|
// 获取可选师傅
|
|
|
this.getWorkers()
|
|
|
})
|
|
|
- } else if (this.workOrderType == 1) {
|
|
|
+ } else if (this.workOrderType == 4) {
|
|
|
this.$nextTick(() => {
|
|
|
// 获取维保单详情
|
|
|
this.getWeiBaoDetail()
|
|
@@ -150,24 +155,35 @@ export default {
|
|
|
// 维保项目
|
|
|
rpProjectRepairId: {
|
|
|
isEdit: this.id ? false : true,
|
|
|
- isShow: this.workOrderType == 1,
|
|
|
+ isShow: this.workOrderType == 4,
|
|
|
+ isRules: [...required]
|
|
|
+ },
|
|
|
+ // 工程项目
|
|
|
+ projectNo: {
|
|
|
+ isEdit: this.id ? false : true,
|
|
|
+ isShow: this.workOrderType == 2,
|
|
|
+ isRules: [...required]
|
|
|
+ },
|
|
|
+ projectName: {
|
|
|
+ isEdit: this.id ? false : true,
|
|
|
+ isShow: this.workOrderType == 2,
|
|
|
isRules: [...required]
|
|
|
},
|
|
|
// 客户名称
|
|
|
userName: {
|
|
|
- isEdit: this.workOrderType == 0 && !finish,
|
|
|
+ isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
|
|
|
isShow: true,
|
|
|
isRules: [...required]
|
|
|
},
|
|
|
// 联系人
|
|
|
linkName: {
|
|
|
- isEdit: this.workOrderType == 0 && !finish,
|
|
|
+ isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
|
|
|
isShow: true,
|
|
|
isRules: [...required]
|
|
|
},
|
|
|
// 客户电话
|
|
|
userMobile: {
|
|
|
- isEdit: this.workOrderType == 0 && !finish,
|
|
|
+ isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
|
|
|
isShow: true,
|
|
|
isRules: [...mobileRequired]
|
|
|
},
|
|
@@ -179,13 +195,13 @@ export default {
|
|
|
},
|
|
|
// gps地址
|
|
|
gpsAddress: {
|
|
|
- isEdit: this.workOrderType == 0 && !finish,
|
|
|
+ isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
|
|
|
isShow: true,
|
|
|
isRules: [...required]
|
|
|
},
|
|
|
// 详细地址
|
|
|
address: {
|
|
|
- isEdit: this.workOrderType == 0 && !finish,
|
|
|
+ isEdit: !!~[1, 3].indexOf(this?.workOrderType) && !finish,
|
|
|
isShow: true,
|
|
|
isRules: []
|
|
|
},
|
|
@@ -207,6 +223,11 @@ export default {
|
|
|
isShow: true,
|
|
|
isRules: [...required]
|
|
|
},
|
|
|
+ saleType: {
|
|
|
+ isEdit: false,
|
|
|
+ isShow: true,
|
|
|
+ isRules: [...required]
|
|
|
+ },
|
|
|
saleCompany: {
|
|
|
isEdit: !finish,
|
|
|
isShow: true,
|
|
@@ -280,6 +301,7 @@ export default {
|
|
|
} else {
|
|
|
// 创建工单
|
|
|
this.orderInfo = Object.assign({}, JSON.parse(JSON.stringify(initdata_)), {
|
|
|
+ saleType: this?.workOrderType,
|
|
|
workerId_fz: ""
|
|
|
})
|
|
|
cb && cb(this.orderInfo)
|