|
|
@ -52,7 +52,15 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty"><span class="icon">*</span>科目</div> |
|
|
|
<el-form-item prop="subject"> |
|
|
|
<el-select class="addinputInfo" v-model="formobj.subject" placeholder="请选择" @change="changeSubject" clearable filterable> |
|
|
|
<el-option v-for="item in subject_list" :key="item.subjectSid" :label="item.subject" :value="item.subject"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="16"> |
|
|
|
<div class="span-sty">备注</div> |
|
|
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder="" /></el-form-item> |
|
|
|
</el-col> |
|
|
@ -72,12 +80,6 @@ |
|
|
|
<el-form-item><span class="addinputInfo">{{ formobj.vehMark }}/{{ formobj.vinNo }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty">客户单位</div> |
|
|
|
<el-form-item><span class="addinputInfo">{{ formobj.customerOrg }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div class="title titleOne"> |
|
|
|
<div>服务项目</div> |
|
|
|
<el-button type="primary" size="mini" class="btntopblueline" @click="serviceAdd">添加</el-button> |
|
|
@ -106,21 +108,9 @@ |
|
|
|
</el-popover> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="工时单价" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input @input="computeXSJ(scope.row)" @keyup.native="scope.row.hourPrice = getNumber(scope.row.hourPrice, 2)" v-model="scope.row.hourPrice" clearable placeholder="" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="工时数" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input @input="computeXSJ(scope.row)" @keyup.native="scope.row.hours = getNumber(scope.row.hours, 2)" v-model="scope.row.hours" clearable placeholder="" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="销售价" align="center" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input @input="computeGSS(scope.row)" @keyup.native="scope.row.price = getNumber(scope.row.price, 2)" v-model="scope.row.price" clearable placeholder="" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="hourPrice" label="工时单价" align="center" width="150" /> |
|
|
|
<el-table-column prop="hours" label="工时数" align="center" width="150" /> |
|
|
|
<el-table-column prop="price" label="销售价" align="center" width="150" /> |
|
|
|
<el-table-column label="备注" align="center" min-width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.remarks" clearable placeholder="" /> |
|
|
@ -157,8 +147,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/operation/preregistration' |
|
|
|
import maintenanceitem from '@/api/basicinformation/maintenanceitem' |
|
|
|
import { selAllByOrgSidPath } from '@/api/Common/dictcommons' |
|
|
|
import { selAllByOrgSidPath, selSubjectInfo, getServiceItemListPage } from '@/api/Common/dictcommons' |
|
|
|
import customer from './relation/customer' |
|
|
|
|
|
|
|
export default { |
|
|
@ -173,6 +162,7 @@ export default { |
|
|
|
submitdisabled: false, |
|
|
|
index: 0, |
|
|
|
user_list: [], |
|
|
|
subject_list: [], |
|
|
|
// service服务 |
|
|
|
serviceKey: 1, |
|
|
|
serviceLoading: false, |
|
|
@ -182,8 +172,8 @@ export default { |
|
|
|
total: 0, |
|
|
|
params: { |
|
|
|
sitemName: '', |
|
|
|
type: '0', |
|
|
|
orgPath: '' |
|
|
|
useOrgSid: '', |
|
|
|
subject: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
serviceData: [], |
|
|
@ -212,9 +202,13 @@ export default { |
|
|
|
deptSid: '', |
|
|
|
deptName: '', |
|
|
|
customerOrg: '', |
|
|
|
userSid: '' |
|
|
|
userSid: '', |
|
|
|
subjectSid: '', |
|
|
|
subject: '' |
|
|
|
}, |
|
|
|
rules: {} |
|
|
|
rules: { |
|
|
|
subject: [{ required: true, message: '科目不能为空', trigger: 'change' }] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -244,6 +238,11 @@ export default { |
|
|
|
this.user_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
selSubjectInfo({ useOrgSid: window.sessionStorage.getItem('defaultOrgPath').substring(window.sessionStorage.getItem('defaultOrgPath').lastIndexOf('/') + 1) }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.subject_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
this.viewTitle = '【新增】预约单' |
|
|
@ -309,7 +308,6 @@ export default { |
|
|
|
this.formobj.vehMark = value.vehMark |
|
|
|
this.formobj.vehModel = value.vehModel |
|
|
|
this.formobj.vinNo = value.vinNo |
|
|
|
this.formobj.customerOrg = value.orgName |
|
|
|
}, |
|
|
|
waitorChange(value) { |
|
|
|
const choose = this.user_list.filter((item) => item.name === value) |
|
|
@ -319,6 +317,14 @@ export default { |
|
|
|
this.formobj.waitorSid = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
changeSubject(value) { |
|
|
|
const choose = this.subject_list.filter((item) => item.subject === value) |
|
|
|
if (choose.length > 0 && choose !== null) { |
|
|
|
this.formobj.subjectSid = choose[0].subjectSid |
|
|
|
} else { |
|
|
|
this.formobj.subjectSid = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
serviceAdd() { |
|
|
|
this.formobj.sitemVos.push({ |
|
|
|
serviceItemSid: '', |
|
|
@ -330,10 +336,15 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
serviceInput(value) { |
|
|
|
this.serviceQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
if (this.formobj.subjectSid === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请先选择科目' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.serviceQuery.params.useOrgSid = this.formobj.deptSid |
|
|
|
this.serviceQuery.params.sitemName = value |
|
|
|
this.serviceQuery.params.subject = this.formobj.subject |
|
|
|
this.serviceLoading = true |
|
|
|
maintenanceitem.listPage(this.serviceQuery).then((response) => { |
|
|
|
getServiceItemListPage(this.serviceQuery).then((response) => { |
|
|
|
if (response.success) { |
|
|
|
this.serviceLoading = false |
|
|
|
this.serviceData = response.data.records |
|
|
@ -398,7 +409,6 @@ export default { |
|
|
|
} |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
|
|
|
|
this.submitdisabled = true |
|
|
|
req.saveOrUpdate(this.formobj).then((res) => { |
|
|
|
if (res.success) { |
|
|
@ -501,7 +511,9 @@ export default { |
|
|
|
deptSid: '', |
|
|
|
deptName: '', |
|
|
|
customerOrg: '', |
|
|
|
userSid: '' |
|
|
|
userSid: '', |
|
|
|
subjectSid: '', |
|
|
|
subject: '' |
|
|
|
} |
|
|
|
this.submitdisabled = false |
|
|
|
this.$emit('doback') |
|
|
|