|
@@ -27,6 +27,7 @@
|
|
|
import { listPageV2 } from '@/api/workOrder/appraise'
|
|
|
import { tableDataParsing } from '@/utils/common.js'
|
|
|
import { changeOrderGetOrderList, enginMaterialDetailWorker, enginMaterialCancel } from '@/api/workOrderPool.js'
|
|
|
+import { orderBaseDetail } from '@/api/workOrderPool.js'
|
|
|
export default {
|
|
|
props: {
|
|
|
id: {
|
|
@@ -40,7 +41,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- payData: []
|
|
|
+ payData: [],
|
|
|
+ orderBaseDetail: {}
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -59,7 +61,7 @@ export default {
|
|
|
md: 24,
|
|
|
name: 'slot-component',
|
|
|
formItemAttributes: {
|
|
|
- label: '维修费用信息'
|
|
|
+ label: '费用信息'
|
|
|
},
|
|
|
render: (h, { props, onInput }) => {
|
|
|
var { formData } = props
|
|
@@ -245,8 +247,8 @@ export default {
|
|
|
)
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
+ isShow: this.orderBaseDetail.orderType == 'REPAIR',
|
|
|
md: 24,
|
|
|
name: 'slot-component',
|
|
|
formItemAttributes: {
|
|
@@ -295,6 +297,47 @@ export default {
|
|
|
/>
|
|
|
)
|
|
|
}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ md: 24,
|
|
|
+ name: 'slot-component',
|
|
|
+ formItemAttributes: {
|
|
|
+ label: '其它费用表'
|
|
|
+ },
|
|
|
+ render: (h, { props, onInput }) => {
|
|
|
+ var { formData } = props
|
|
|
+ return (
|
|
|
+ <zj-table
|
|
|
+ columns={[
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '费用名称',
|
|
|
+ prop: 'amountName'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '费用金额',
|
|
|
+ prop: 'normAmount'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '师傅分账金额',
|
|
|
+ prop: 'sffzje'
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '师傅手续费',
|
|
|
+ prop: 'sfsxf'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]}
|
|
|
+ table-data={formData.gengduofeiyong || []}
|
|
|
+ />
|
|
|
+ )
|
|
|
+ }
|
|
|
}
|
|
|
]
|
|
|
}
|
|
@@ -595,19 +638,66 @@ export default {
|
|
|
},
|
|
|
getxiangqing() {
|
|
|
if (this.id) {
|
|
|
- if (!!~[1, 2, 3].indexOf(this?.workOrderType)) {
|
|
|
- changeOrderGetOrderList({
|
|
|
- id: this.id
|
|
|
- }).then(res => {
|
|
|
- this.payData = res.data
|
|
|
- })
|
|
|
- } else if (this?.workOrderType == 4) {
|
|
|
- enginMaterialDetailWorker({
|
|
|
- workerOrderId: this.id
|
|
|
- }).then(res => {
|
|
|
- this.payData = res.data
|
|
|
- })
|
|
|
- }
|
|
|
+ orderBaseDetail({
|
|
|
+ orderBaseId: this.id
|
|
|
+ }).then(resData => {
|
|
|
+ this.orderBaseDetail = resData.data
|
|
|
+ if (!!~[1, 2, 3].indexOf(this?.workOrderType)) {
|
|
|
+ changeOrderGetOrderList({
|
|
|
+ id: this.id
|
|
|
+ }).then(res => {
|
|
|
+ this.payData = res.data.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ gengduofeiyong: [
|
|
|
+ {
|
|
|
+ chargeType: 'SERV',
|
|
|
+ amountName: '服务费用',
|
|
|
+ normAmount: item.servicePrice || 0,
|
|
|
+ sfsxf: Math.ceil((item.servicePrice || 0) * 0.6) / 100,
|
|
|
+ sffzje: item.servicePrice - Math.ceil((item.servicePrice || 0) * 0.6) / 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ chargeType: 'SERV',
|
|
|
+ amountName: '其他费用',
|
|
|
+ normAmount: item.otherPrice || 0,
|
|
|
+ sfsxf: Math.ceil((item.otherPrice || 0) * 0.6) / 100,
|
|
|
+ sffzje: item.otherPrice - Math.ceil((item.otherPrice || 0) * 0.6) / 100
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.payData)
|
|
|
+ })
|
|
|
+ } else if (this?.workOrderType == 4) {
|
|
|
+ enginMaterialDetailWorker({
|
|
|
+ workerOrderId: this.id
|
|
|
+ }).then(res => {
|
|
|
+ this.payData = res.data.map(item => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ gengduofeiyong: [
|
|
|
+ {
|
|
|
+ chargeType: 'SERV',
|
|
|
+ amountName: '服务费用',
|
|
|
+ normAmount: item.servicePrice || 0,
|
|
|
+ sfsxf: Math.ceil((item.servicePrice || 0) * 0.6) / 100,
|
|
|
+ sffzje: item.servicePrice - Math.ceil((item.servicePrice || 0) * 0.6) / 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ chargeType: 'SERV',
|
|
|
+ amountName: '其他费用',
|
|
|
+ normAmount: item.otherPrice || 0,
|
|
|
+ sfsxf: Math.ceil((item.otherPrice || 0) * 0.6) / 100,
|
|
|
+ sffzje: item.otherPrice - Math.ceil((item.otherPrice || 0) * 0.6) / 100
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(this.payData)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
enginMaterialCancelFun(item) {
|