更新0926
This commit is contained in:
parent
8ff6caa45e
commit
9a66d679a1
@ -130,7 +130,7 @@
|
||||
<!-- <el-button v-if="TicketType === 'tp'" size="mini" type="text" icon="el-icon-refresh-right"-->
|
||||
<!-- >返结-->
|
||||
<!-- </el-button>-->
|
||||
<el-button v-if="TicketType !== 'tv'" size="mini" type="text" icon="el-icon-delete"
|
||||
<el-button v-if="TicketType == 'tu'" size="mini" type="text" icon="el-icon-delete"
|
||||
@click="handleVoid(scope.row)" v-hasPermi="['repair:tk:void']"
|
||||
>作废
|
||||
</el-button>
|
||||
@ -143,7 +143,7 @@
|
||||
@click="handleConfirmPayment(scope.row)"
|
||||
>确认收款
|
||||
</el-button>
|
||||
<!-- <el-button size="mini" v-hasPermi="['repair:tk:edit']" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)">-->
|
||||
<!-- <el-button v-if="TicketType === 'tp'" size="mini" type="text" icon="el-icon-setting" @click="handleEditTicket(scope.row)">-->
|
||||
<!-- 编辑工单-->
|
||||
<!-- </el-button>-->
|
||||
<!-- <el-button size="mini" v-hasPermi="['repair:tk:remove']" type="text" icon="el-icon-remove"
|
||||
@ -225,6 +225,16 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="是否支付" prop="isPaid">
|
||||
<el-select v-model="formData.isPaid" placeholder="请选择是否支付">
|
||||
<el-option label="未支付" value="0"></el-option>
|
||||
<el-option label="已支付" value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="1">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="收款备注" prop="remark">
|
||||
@ -234,10 +244,10 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<template slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doPaid">确 定</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :title="settlementType === 'jssh' ? '结算审核': '结算信息'" :visible.sync="dialogVisibleSettlement"
|
||||
@ -402,7 +412,9 @@ export default {
|
||||
id: null,
|
||||
ticketsStatus: null,
|
||||
billingRemark: null,
|
||||
payType: null
|
||||
payType: null,
|
||||
isPaid: '1',
|
||||
remark: ''
|
||||
},
|
||||
settlementFormData: {
|
||||
actualMoney: 0,
|
||||
@ -410,7 +422,9 @@ export default {
|
||||
discount: 0
|
||||
},
|
||||
formRules: {
|
||||
payType: [{required: true, message: '支付方式不能为空', trigger: 'blur'}]
|
||||
payType: [{required: true, message: '支付方式不能为空', trigger: 'blur'}],
|
||||
isPaid: [{required: true, message: '请选择是否支付', trigger: 'blur'}],
|
||||
remark: [{required: false, message: '收款备注不能为空', trigger: 'blur'}]
|
||||
},
|
||||
settlementFormRules: {
|
||||
discountType: [{required: true, message: '优惠类型不能为空', trigger: 'blur'}],
|
||||
@ -464,6 +478,16 @@ export default {
|
||||
]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
// 监听是否支付状态变化
|
||||
'formData.isPaid': {
|
||||
handler(newVal) {
|
||||
this.updateFormRules(newVal);
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleShow(row) {
|
||||
this.$refs.ticketsShow.open(row)
|
||||
@ -521,7 +545,9 @@ export default {
|
||||
id: null,
|
||||
ticketsStatus: null,
|
||||
billingRemark: null,
|
||||
payType: null
|
||||
payType: null,
|
||||
isPaid: '1',
|
||||
remark: ''
|
||||
}
|
||||
this.formData['id'] = row.id
|
||||
this.formData['ticketsStatus'] = '02'
|
||||
@ -636,7 +662,8 @@ export default {
|
||||
paidTime: row.paidTime || '', // 收款时间
|
||||
payTypeLabel: this.getPayTypeLabel(row.payType), // 收款方式标签
|
||||
payConfirm: row.payConfirm || '', // 确认状态
|
||||
payConfirmRemark: row.payConfirmRemark || '' // 确认备注
|
||||
payConfirmRemark: row.payConfirmRemark || '', // 确认备注
|
||||
payTime: row.payTime || '', // 付款时间
|
||||
}
|
||||
this.confirmPaymentVisible = true
|
||||
},
|
||||
@ -683,7 +710,27 @@ export default {
|
||||
resetConfirmPaymentForm() {
|
||||
this.confirmPaymentSubmitLoading = false
|
||||
this.$refs['confirmPaymentForm'] && this.$refs['confirmPaymentForm'].resetFields()
|
||||
}
|
||||
},
|
||||
|
||||
// 根据是否支付状态更新表单验证规则
|
||||
updateFormRules(isPaid) {
|
||||
if (isPaid === '0') {
|
||||
// 未支付:收款方式可选,收款备注必填
|
||||
this.formRules.payType = [{required: false, message: '支付方式不能为空', trigger: 'blur'}];
|
||||
this.formRules.remark = [{required: true, message: '收款备注不能为空', trigger: 'blur'}];
|
||||
} else {
|
||||
// 已支付:收款方式必填,收款备注可选
|
||||
this.formRules.payType = [{required: true, message: '支付方式不能为空', trigger: 'blur'}];
|
||||
this.formRules.remark = [{required: false, message: '收款备注不能为空', trigger: 'blur'}];
|
||||
}
|
||||
|
||||
// 重新设置表单验证规则
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.formRef) {
|
||||
this.$refs.formRef.clearValidate();
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user