Commit 16c6c081 authored by 谢子梦's avatar 谢子梦

stage:合作机构-签约合同加入默认税率

parent a7c4060f
......@@ -41,15 +41,14 @@
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-tickets" @click="viewContract(scope.row)"
v-if="scope.row.signStatus && 2 === scope.row.signStatus && scope.row.contractUrl"
v-hasPermi="['business:laborSign:add']">查看合同
v-if="scope.row.signStatus && 2 === scope.row.signStatus && scope.row.contractUrl"
v-hasPermi="['business:laborSign:add']">查看合同
</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="doAgree(scope.row)"
v-if="scope.row.signStatus && 1 === scope.row.signStatus" v-hasPermi="['business:laborSign:add']">签约合约
</el-button>
<el-button size="mini" type="text" icon="el-icon-lollipop" @click="givePayAcc(scope.row)"
v-if="scope.row.signStatus && 2 === scope.row.signStatus"
v-hasPermi="['business:laborSign:add']">代发账户
v-if="scope.row.signStatus && 2 === scope.row.signStatus" v-hasPermi="['business:laborSign:add']">代发账户
</el-button>
</template>
</el-table-column>
......@@ -62,6 +61,26 @@
<el-button @click="doAgreePanelCancel">取 消</el-button>
</div>
</el-dialog>
<!-- 签约合同-提交税费弹窗 -->
<el-dialog title="操作提示" class="setDefaulttaxRateMain" width="25%" :visible.sync="setDefaulttaxRateDialog">
<div class="setDefaulttaxRateConter">
<div class="setDefaulttaxRateTitle">
<i class="el-icon-warning"></i>
<span class="setDefaulttaxRateText">确认签订与{{ this.doAgreeData.inviterName }}的合约吗?</span>
</div>
<el-form class="setDefaulttaxRateForm" :model="setDefaulttaxRateForm" ref="setDefaulttaxRateFormRef"
:rules="setDefaulttaxRateRules" label-width="60px">
<el-form-item label="税率" prop="taxRate">
<el-input-number style="width: 90%;" v-model="setDefaulttaxRateForm.taxRate" :step="0.00001" :min="0"
:max="1" placeholder="请输入税率" :precision="6"></el-input-number>
</el-form-item>
</el-form>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="setDefaulttaxRateDialog = false">取 消</el-button>
<el-button type="primary" @click="etDefaulttaxRateSubmit">确 认</el-button>
</div>
</el-dialog>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
</div>
......@@ -99,6 +118,16 @@ export default {
doAgreeData: {},
/** 合同查看弹窗 */
doAgreePanelVisible: false,
// 签约合同-提交税费弹窗
setDefaulttaxRateDialog: false,
setDefaulttaxRateForm: {
taxRate: 0
},
setDefaulttaxRateRules: {
taxRate: [
{ required: true, message: '请输入税费比例', trigger: 'blur' },
]
},
}
},
created() {
......@@ -169,7 +198,7 @@ export default {
// this.doAgreeData.contractUrl = contractUrl;
const sealObj = {
id: this.doAgreeData.id,
contractUrl:contractUrl,
contractUrl: contractUrl,
inviterId: this.doAgreeData.inviterId,
taxUnitId: this.doAgreeData.taxUnitId,
};
......@@ -179,7 +208,7 @@ export default {
this.$modal.msgSuccess("签订合同成功");
this.doAgreePanelVisible = false;
this.getList();
}else {
} else {
this.$modal.msgError("签订合同失败:" + (resp.msg || "未知错误"));
}
} else {
......@@ -193,21 +222,23 @@ export default {
}
},
doAgreePanelSubmit() {
this.$confirm(`确认签订与${this.doAgreeData.inviterName}的合约吗?`, '操作提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
// TODO 这里换成用户输入的费率
const taxRate = '';
agreeSign(this.doAgreeData.id, taxRate).then(resp => {
if (200 === resp.code) {
this.$modal.msgSuccess("操作成功")
this.doAgreePanelVisible = false
this.getList()
}
})
}).catch(() => { });
this.setDefaulttaxRateForm.taxRate = 0
this.setDefaulttaxRateDialog = true
},
// 签约合同确认按钮-方法
etDefaulttaxRateSubmit() {
this.$refs.setDefaulttaxRateFormRef.validate((valid) => {
if (valid) {
agreeSign(this.doAgreeData.id, this.setDefaulttaxRateForm.taxRate).then(resp => {
if (200 === resp.code) {
this.$modal.msgSuccess("操作成功")
this.doAgreePanelVisible = false
this.setDefaulttaxRateDialog = false
this.getList()
}
})
}
})
},
doAgreePanelCancel() {
this.doAgreePanelVisible = false
......@@ -221,3 +252,42 @@ export default {
}
}
</script>
<style lang="scss">
.setDefaulttaxRateMain {
margin-top: 25vh !important;
.el-dialog__header {
padding: 18px 10px 12px 20px !important;
}
.el-dialog__body {
padding: 2px 20px 0px !important;
}
.el-dialog__footer {
padding: 5px 20px 10px 10px !important;
}
.setDefaulttaxRateConter {
.setDefaulttaxRateTitle {
display: flex;
align-items: center;
justify-content: flex-start;
gap: 8px;
.el-icon-warning {
color: #ffba00;
font-size: 22px;
}
.setDefaulttaxRateText {
font-size: 14px;
}
}
.setDefaulttaxRateForm {
margin-top: 16px;
}
}
}
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment