story#,补充结算单页面,提交按钮显示添加逻辑判断

This commit is contained in:
2025-02-17 15:24:54 +08:00
parent 1c1f62d99c
commit 406fba2615

View File

@ -58,7 +58,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="btn"> <div class="btn" v-if="taskCostShow || finishLt7">
<button @click="submit">提交</button> <button @click="submit">提交</button>
</div> </div>
</div> </div>
@ -86,7 +86,9 @@ export default {
waitAmount:'', waitAmount:'',
dilemmaFee:'', dilemmaFee:'',
customerAmount:'', customerAmount:'',
taskFlowId:'' taskFlowId:'',
auditStatus:'',
finishTime:'',
} }
} }
}, },
@ -97,6 +99,14 @@ export default {
this.orderCode = urlParams.get('orderCode') this.orderCode = urlParams.get('orderCode')
await this.getDetail() await this.getDetail()
}, },
computed:{
taskCostShow() {
return this.form.auditStatus && !([3, 4, 6].includes(this.form.auditStatus))
},
finishLt7(){
return !this.form.finishTime || (this.form.finishTime && new Date().getTime() - new Date(this.form.finishTime).getTime() <= 7 * 24 * 60 * 60 * 1000)
},
},
methods:{ methods:{
handleInput(event) { handleInput(event) {
const newValue = parseInt(event.target.value, 10); const newValue = parseInt(event.target.value, 10);
@ -118,7 +128,6 @@ export default {
}) })
leftCopy(this.form,{...res.data}); leftCopy(this.form,{...res.data});
this.supplierSettlementType= res.data.supplierSettlementType?.code this.supplierSettlementType= res.data.supplierSettlementType?.code
// this.form.taskFlowId =1
}, },
async updatSettlement(){ async updatSettlement(){
let result =await updateOrderSettlement({ let result =await updateOrderSettlement({