|
@@ -4,7 +4,11 @@
|
|
|
<template v-if="payData.length">
|
|
|
<zj-form-container :formAttributes="{ 'label-position': 'top' }">
|
|
|
<template v-for="(item, index) in payData.length">
|
|
|
- <zj-form-module :title="'支付费用' + (index + 1)" :form-data="payData[index]" :form-items="formItems" />
|
|
|
+ <zj-form-module :title="'支付费用' + (index + 1)" :form-data="payData[index]" :form-items="formItems">
|
|
|
+ <div v-if="item.examineStatus === 'FAIL'" style="text-align:right">
|
|
|
+ <el-button size="mini" type="danger" plain @click="enginMaterialCancelFun(item)">取消申请</el-button>
|
|
|
+ </div>
|
|
|
+ </zj-form-module>
|
|
|
</template>
|
|
|
</zj-form-container>
|
|
|
</template>
|
|
@@ -16,13 +20,18 @@
|
|
|
<script>
|
|
|
import { listPageV2 } from "@/api/workOrder/appraise";
|
|
|
import { tableDataParsing } from "@/utils/common.js"
|
|
|
-import { changeOrderGetOrderList } from "@/api/workOrderPool.js";
|
|
|
+import { changeOrderGetOrderList, enginMaterialDetailWorker, enginMaterialCancel } from "@/api/workOrderPool.js";
|
|
|
+
|
|
|
export default {
|
|
|
props: {
|
|
|
id: {
|
|
|
type: [String, Number],
|
|
|
default: null,
|
|
|
- }
|
|
|
+ },
|
|
|
+ workOrderType: {
|
|
|
+ type: Number,
|
|
|
+ default: 0, // 0普通工单, 1维保工单
|
|
|
+ },
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -32,13 +41,7 @@ export default {
|
|
|
watch: {
|
|
|
id: {
|
|
|
handler(newVal, oldVal) {
|
|
|
- if (this.id) {
|
|
|
- changeOrderGetOrderList({
|
|
|
- id: this.id
|
|
|
- }).then(res => {
|
|
|
- this.payData = res.data
|
|
|
- })
|
|
|
- }
|
|
|
+ this.getxiangqing()
|
|
|
},
|
|
|
deep: true,
|
|
|
immediate: true,
|
|
@@ -62,9 +65,6 @@ export default {
|
|
|
<el-descriptions-item label="工单号">
|
|
|
{formData.workerOrderId}
|
|
|
</el-descriptions-item>
|
|
|
- {/* <el-descriptions-item label="流水号">
|
|
|
- {formData.wechatOrder}
|
|
|
- </el-descriptions-item> */}
|
|
|
<el-descriptions-item label="工程师名称">
|
|
|
{formData.workerName}
|
|
|
</el-descriptions-item>
|
|
@@ -86,12 +86,28 @@ export default {
|
|
|
<el-descriptions-item label="支付总金额">
|
|
|
{formData.totalAmount}
|
|
|
</el-descriptions-item>
|
|
|
- <el-descriptions-item label="总手续费">
|
|
|
- {formData.commissionAmount}
|
|
|
- </el-descriptions-item>
|
|
|
+ {this?.workOrderType == 0 ? (
|
|
|
+ <el-descriptions-item label="总手续费">
|
|
|
+ {formData.commissionAmount}
|
|
|
+ </el-descriptions-item>
|
|
|
+ ) : null}
|
|
|
<el-descriptions-item label="支付时间">
|
|
|
{formData.payTime}
|
|
|
</el-descriptions-item>
|
|
|
+ <el-descriptions-item label="">
|
|
|
+ </el-descriptions-item>
|
|
|
+ {this?.workOrderType == 1 ? [
|
|
|
+ (<el-descriptions-item label=""></el-descriptions-item>),
|
|
|
+ (<el-descriptions-item label="审批状态">
|
|
|
+ {({ WAIT: "待审", OK: "审批", FAIL: "驳回", PAID: "现场支付", NO: "取消", NO_PAID: "未支付" })[formData.examineStatus]}
|
|
|
+ </el-descriptions-item>),
|
|
|
+ (<el-descriptions-item label="审批人">
|
|
|
+ {formData.examineName}
|
|
|
+ </el-descriptions-item>),
|
|
|
+ (<el-descriptions-item label="审批时间">
|
|
|
+ {formData.examineTime}
|
|
|
+ </el-descriptions-item>),
|
|
|
+ ] : null}
|
|
|
</el-descriptions>
|
|
|
)
|
|
|
}
|
|
@@ -125,28 +141,35 @@ export default {
|
|
|
label: '费用金额',
|
|
|
prop: 'totalAmount',
|
|
|
}
|
|
|
- }, {
|
|
|
- columnAttributes: {
|
|
|
- label: '师傅分账金额',
|
|
|
- prop: 'workerAmount',
|
|
|
+ },
|
|
|
+ ...(() => {
|
|
|
+ if (this?.workOrderType == 0) {
|
|
|
+ return [{
|
|
|
+ columnAttributes: {
|
|
|
+ label: '师傅分账金额',
|
|
|
+ prop: 'workerAmount',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '师傅手续费',
|
|
|
+ prop: 'workerProceAmount',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '网点分账金额',
|
|
|
+ prop: 'websitAmount',
|
|
|
+ }
|
|
|
+ }, {
|
|
|
+ columnAttributes: {
|
|
|
+ label: '网点手续费',
|
|
|
+ prop: 'websitProceAmount',
|
|
|
+ }
|
|
|
+ }]
|
|
|
}
|
|
|
- }, {
|
|
|
- columnAttributes: {
|
|
|
- label: '师傅手续费',
|
|
|
- prop: 'workerProceAmount',
|
|
|
- }
|
|
|
- }, {
|
|
|
- columnAttributes: {
|
|
|
- label: '网点分账金额',
|
|
|
- prop: 'websitAmount',
|
|
|
- }
|
|
|
- }, {
|
|
|
- columnAttributes: {
|
|
|
- label: '网点手续费',
|
|
|
- prop: 'websitProceAmount',
|
|
|
- }
|
|
|
- }]}
|
|
|
- table-data={formData.workerOrderItems}
|
|
|
+ return []
|
|
|
+ })(),
|
|
|
+ ]}
|
|
|
+ table-data={[formData.workerOrderItems, formData.rpMaterialOrderItems][this?.workOrderType]}
|
|
|
/>
|
|
|
)
|
|
|
}
|
|
@@ -213,6 +236,40 @@ export default {
|
|
|
}]
|
|
|
}
|
|
|
},
|
|
|
+ methods: {
|
|
|
+ getxiangqing() {
|
|
|
+ if (this.id) {
|
|
|
+ if (this?.workOrderType == 0) {
|
|
|
+ changeOrderGetOrderList({
|
|
|
+ id: this.id
|
|
|
+ }).then(res => {
|
|
|
+ this.payData = res.data
|
|
|
+ })
|
|
|
+ } else if (this?.workOrderType == 1) {
|
|
|
+ enginMaterialDetailWorker({
|
|
|
+ workerOrderId: this.id
|
|
|
+ }).then(res => {
|
|
|
+ this.payData = res.data
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+ enginMaterialCancelFun(item) {
|
|
|
+ this.$confirm('是否确认取消申请?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ enginMaterialCancel({
|
|
|
+ id: item.orderId
|
|
|
+ }).then(res => {
|
|
|
+ this.getxiangqing()
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|