|
|
@ -9,7 +9,7 @@ |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="toSendBack" v-show="formobj.nodeName !== '登记'">退回</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="confirmCLF()" v-show="formobj.nodeName == '结算' && formobj.subject == '保内'">确认材料费</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="toPrintSettle()" v-show="formobj.nodeName == '结算'">打印结算单</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="settleAccounts()" v-show="formobj.nodeName == '结算'">结算</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="toSettle()" v-show="formobj.nodeName == '结算'">结算</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -537,70 +537,7 @@ |
|
|
|
<!-- 选择客户 --> |
|
|
|
<selectCustomer v-show="viewState == 2" ref="divCus" @backData="backData" @doback="resetState"/> |
|
|
|
<!-- 结算 --> |
|
|
|
<el-dialog :visible.sync="settleVisible" width="70%"> |
|
|
|
<el-form ref="formobj" :model="formobj" :rules="rules" class="formaddcopy02"> |
|
|
|
<el-row style="border-top: 1px solid #e0e3eb"> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty"><span class="icon">*</span>付款人姓名</div> |
|
|
|
<el-form-item prop="settleVo.payerName"><el-input class="addinputInfo addinputw" v-model="formobj.settleVo.payerName" clearable placeholder="" /></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">付款人编号</div> |
|
|
|
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.settleVo.payerNo" clearable placeholder="" /></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">应收金额</div> |
|
|
|
<el-form-item><span class="addinputInfo">{{ ysTotal }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">订金抵扣</div> |
|
|
|
<el-form-item><el-input class="addinputInfo addinputw" @keyup.native="formobj.settleVo.depositdeductAmount = getNumber(formobj.settleVo.depositdeductAmount, 2)" v-model="formobj.settleVo.depositdeductAmount" clearable placeholder="" /></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty"><span class="icon">*</span>结算方式</div> |
|
|
|
<el-form-item prop="settleVo.settleValue"> |
|
|
|
<el-select class="addinputInfo" v-model="formobj.settleVo.settleValue" placeholder="请选择" @change="settleChange" clearable filterable> |
|
|
|
<el-option v-for="item in settle_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty"><span class="icon">*</span>结算金额</div> |
|
|
|
<el-form-item prop="settleVo.settleAmount"><el-input class="addinputInfo addinputw" @keyup.native="formobj.settleVo.settleAmount = getNumber(formobj.settleVo.settleAmount, 2)" v-model="formobj.settleVo.settleAmount" clearable placeholder="" /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">其他结算方式</div> |
|
|
|
<el-form-item> |
|
|
|
<el-select class="addinputInfo" v-model="formobj.settleVo.otherSettleValue" placeholder="请选择" @change="otherSettleChange" clearable filterable> |
|
|
|
<el-option v-for="item in otherSettle_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">其他结算金额</div> |
|
|
|
<el-form-item><el-input class="addinputInfo addinputw" @keyup.native="formobj.settleVo.otherSettleAmount = getNumber(formobj.settleVo.otherSettleAmount, 2)" v-model="formobj.settleVo.otherSettleAmount" clearable placeholder="" /></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">欠款金额</div> |
|
|
|
<el-form-item><span class="addinputInfo">{{ qkjeTotal }}</span></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="24"> |
|
|
|
<div class="span-sty"><span class="icon">*</span>结算时间</div> |
|
|
|
<el-form-item prop="settleVo.settleTime"><el-date-picker class="addinputInfo addinputw" v-model="formobj.settleVo.settleTime" value-format="yyyy-MM-dd" format="yyyy-MM-dd" type="date" placeholder="选择日期" /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<div style="text-align:center;margin-top: 20px;"> |
|
|
|
<el-button type="primary" size="mini" @click="confirm">确 定</el-button> |
|
|
|
<el-button type="info " size="mini" @click="settleVisible = false">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<settleAccountsAdd v-show="viewState == 3" ref="divSettle" @doback="resetState" /> |
|
|
|
<!-- 打印结算单(保内) --> |
|
|
|
<el-dialog title="打印类型" :visible.sync="dialogVisible" width="25%" :show-close="false"> |
|
|
|
<el-form :model="temp" class="formaddcopy02"> |
|
|
@ -628,12 +565,14 @@ import req from '@/api/operation/repairbill' |
|
|
|
import additionitem from '@/api/basicinformation/additionitem' |
|
|
|
import { selAllByOrgSidPath, selSubjectInfo, getGroupList, typeValues, getListByUseOrgSid, getServiceItemListPage, getInvoicingList } from '@/api/Common/dictcommons' |
|
|
|
import selectCustomer from '@/components/publicPage/selectCustomer' |
|
|
|
import settleAccountsAdd from '@/views/operation/settleAccounts/settleAccountsAdd' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'RepairBillAdd', |
|
|
|
components: { |
|
|
|
selectCustomer |
|
|
|
selectCustomer, |
|
|
|
settleAccountsAdd |
|
|
|
}, |
|
|
|
data() { |
|
|
|
const claimManufacturerShClaimType = (rule, value, callback) => { |
|
|
@ -669,7 +608,6 @@ export default { |
|
|
|
group_list: [], // 班组 |
|
|
|
mainRepairersChange_list: [], // 主修人 |
|
|
|
people_list: [], // 对接人 |
|
|
|
settleVisible: false, // 结算弹框 |
|
|
|
billType_list: [], // 单据类型 |
|
|
|
responsibility_list: [], // 责任划分 |
|
|
|
responsibilityRatio_list: [], // 对方险种 |
|
|
@ -678,8 +616,6 @@ export default { |
|
|
|
insuranceCompany_list: [], // 保险公司 |
|
|
|
companyInvoicing_list: [], // 开票单位 |
|
|
|
invoiceType_list: [], // 发票类型 |
|
|
|
settle_list: [], // 结算方式 |
|
|
|
otherSettle_list: [], // 其他结算方式 |
|
|
|
activeNames: '1', |
|
|
|
tableKey: 0, |
|
|
|
index: 0, |
|
|
@ -830,11 +766,7 @@ export default { |
|
|
|
waitorName: [{ required: true, message: '服务顾问不能为空', trigger: 'change' }], |
|
|
|
isSpecialSign: [{ required: true, message: '特殊标志不能为空', trigger: 'change' }], |
|
|
|
customerName: [{ required: true, message: '客户信息不能为空', trigger: 'change' }], |
|
|
|
claimManufacturerAndShClaimType: [{ required: true, validator: claimManufacturerShClaimType, trigger: 'change' }], |
|
|
|
'settleVo.payerName': [{ required: true, message: '付款人姓名不能为空', trigger: 'blur' }], |
|
|
|
'settleVo.settleValue': [{ required: true, message: '结算方式不能为空', trigger: 'change' }], |
|
|
|
'settleVo.settleAmount': [{ required: true, message: '结算金额不能为空', trigger: 'blur' }], |
|
|
|
'settleVo.settleTime': [{ required: true, message: '结算时间不能为空', trigger: 'blur' }] |
|
|
|
claimManufacturerAndShClaimType: [{ required: true, validator: claimManufacturerShClaimType, trigger: 'change' }] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -912,12 +844,6 @@ export default { |
|
|
|
let ysje = '0' |
|
|
|
ysje = Math.round((parseFloat(ysje) + parseFloat(this.ysTotal) - parseFloat(this.yhTotal)) * 100) / 100 |
|
|
|
return ysje |
|
|
|
}, |
|
|
|
// 结算页面中计算欠款金额 = 应付金额 - 订金抵扣 - 结算金额 - 其他结算金额 |
|
|
|
qkjeTotal() { |
|
|
|
let qkje = '0' |
|
|
|
// qkje = Math.round((parseFloat(this.ysjeTotal) - parseFloat(this.formobj.settleVo.depositdeductAmount !== '' ? this.formobj.settleVo.depositdeductAmount : '0') - parseFloat(this.formobj.settleVo.settleAmount !== '' ? this.formobj.settleVo.settleAmount : '0') - parseFloat(this.formobj.settleVo.otherSettleAmount !== '' ? this.formobj.settleVo.otherSettleAmount : '0')) * 100) / 100 |
|
|
|
return qkje |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -957,16 +883,6 @@ export default { |
|
|
|
this.invoiceType_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
typeValues({ type: 'settle' }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.settle_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
typeValues({ type: 'otherSettle' }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.otherSettle_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
typeValues({ type: 'sh_claim_type' }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.shClaimType_list = res.data |
|
|
@ -1644,42 +1560,6 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
settleAccounts() { |
|
|
|
this.settleVisible = true |
|
|
|
}, |
|
|
|
settleChange(value) { |
|
|
|
const choose = this.settle_list.filter((item) => item.dictValue === value) |
|
|
|
if (choose.length > 0 && choose !== null) { |
|
|
|
this.formobj.settleVo.settleKey = choose[0].dictKey |
|
|
|
} else { |
|
|
|
this.formobj.settleVo.settleKey = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
otherSettleChange(value) { |
|
|
|
const choose = this.otherSettle_list.filter((item) => item.dictValue === value) |
|
|
|
if (choose.length > 0 && choose !== null) { |
|
|
|
this.formobj.settleVo.otherSettleKey = choose[0].dictKey |
|
|
|
} else { |
|
|
|
this.formobj.settleVo.otherSettleKey = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
confirm() { |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req.settle(this.formobj).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '结算成功' }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.submitdisabled = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
confirmCLF() { |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
@ -1742,6 +1622,16 @@ export default { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '打印类型不能为空' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
toSettle() { |
|
|
|
req.settle(this.formobj).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.viewState = 3 |
|
|
|
this.$refs['divSettle'].showEdit(this.formobj) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: res.msg }) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
resetState() { |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
@ -1860,7 +1750,6 @@ export default { |
|
|
|
this.serviceData = [] |
|
|
|
this.subjoinData = [] |
|
|
|
this.activeNames = '1' |
|
|
|
this.settleVisible = false |
|
|
|
this.submitdisabled = false |
|
|
|
this.$emit('doback') |
|
|
|
} |
|
|
|