|
|
@ -4,7 +4,6 @@ |
|
|
|
<div class="tab-header webtop"> |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<div> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="chooseGd()">选择工单</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveOrUpdate()">保存</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
@ -26,6 +25,16 @@ |
|
|
|
<el-form-item><span class="addinputInfo">{{ formobj.createTime }}</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="purchaseSystemName"> |
|
|
|
<el-select class="addinputInfo" v-model="formobj.purchaseSystemName" placeholder="请选择" @change="changePurchase" filterable clearable> |
|
|
|
<el-option v-for="item in purchase_list" :key="item.deptSid" :label="item.purchaseSystemName" :value="item.purchaseSystemName"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty"><span class="icon">*</span>开票名称</div> |
|
|
@ -58,9 +67,18 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div class="title">维修单列表</div> |
|
|
|
<div class="title titleOne"> |
|
|
|
<div>维修单列表</div> |
|
|
|
<el-button type="primary" size="mini" class="btntopblueline" @click="chooseGd()">选择工单</el-button> |
|
|
|
</div> |
|
|
|
<el-table :key="tableKey" :data="formobj.asBwinvoiceapplyDetailList" :index="index" border style="width: 100%"> |
|
|
|
<el-table-column width="60" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
|
<el-table-column label="操作" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="danger" size="small" @click="handleDelete(scope.$index)">删除</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="billType" label="维修单类型" align="center" width="140" /> |
|
|
|
<el-table-column prop="sourceBillNo" label="维修单号" align="center" width="170" /> |
|
|
|
<el-table-column prop="customerName" label="客户名称" align="center" min-width="120" /> |
|
|
|
<el-table-column prop="vehMark" label="车牌号" align="center" width="150" /> |
|
|
@ -73,6 +91,7 @@ |
|
|
|
<el-table-column prop="rescueAmount" label="施救费" align="center" width="120" /> |
|
|
|
<el-table-column prop="outAmount" label="外出费" align="center" width="120" /> |
|
|
|
<el-table-column prop="otherAmount" label="其它费用" align="center" width="120" /> |
|
|
|
<el-table-column prop="discountAmount" label="优惠" align="center" width="150" /> |
|
|
|
<el-table-column prop="totalAmount" label="费用合计" align="center" width="120" /> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
@ -87,7 +106,7 @@ |
|
|
|
import req from '@/api/operation/workorderinvoicing' |
|
|
|
import chooseRepairbill from './relation/chooseRepairbill' |
|
|
|
import uploadImg from '@/components/uploadFile/uploadImg' |
|
|
|
import { typeValues } from '@/api/Common/dictcommons' |
|
|
|
import { typeValues, fetchDetailsByUseOrgSid, getOrgSidByPath } from '@/api/Common/dictcommons' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'WorkOrderInvoicingAdd', |
|
|
@ -102,6 +121,7 @@ export default { |
|
|
|
submitdisabled: false, |
|
|
|
tableKey: 1, |
|
|
|
index: 0, |
|
|
|
purchase_list: [], |
|
|
|
invoiceType_list: [], |
|
|
|
formobj: { |
|
|
|
sid: '', |
|
|
@ -123,10 +143,13 @@ export default { |
|
|
|
taskId: '', |
|
|
|
nodeId: '', |
|
|
|
nodeState: '', |
|
|
|
purchaseSystemName: '', |
|
|
|
purchaseSystemSid: '', |
|
|
|
fileList: [], |
|
|
|
asBwinvoiceapplyDetailList: [] |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
purchaseSystemName: [{ required: true, message: '开票单位不能为空', trigger: 'change' }], |
|
|
|
invoiceTitle: [{ required: true, message: '开票名称不能为空', trigger: 'blur' }], |
|
|
|
invoiceTypeValue: [{ required: true, message: '开票类型不能为空', trigger: 'change' }], |
|
|
|
invoiceMoney: [{ required: true, message: '开票金额不能为空', trigger: 'blur' }] |
|
|
@ -140,6 +163,15 @@ export default { |
|
|
|
this.invoiceType_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
fetchDetailsByUseOrgSid(res.data).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.purchase_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
getNumber(val, limit) { |
|
|
|
val = val.replace(/[^0-9.]/g, '') // 保留数字 |
|
|
@ -190,6 +222,14 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changePurchase(value) { |
|
|
|
const choose = this.purchase_list.filter((item) => item.purchaseSystemName === value) |
|
|
|
if (choose.length > 0 && choose !== null) { |
|
|
|
this.formobj.purchaseSystemSid = choose[0].deptSid |
|
|
|
} else { |
|
|
|
this.formobj.purchaseSystemSid = '' |
|
|
|
} |
|
|
|
}, |
|
|
|
invoiceTypeChange(value) { |
|
|
|
const choose = this.invoiceType_list.filter((item) => item.dictValue === value) |
|
|
|
if (choose.length > 0 && choose !== null) { |
|
|
@ -203,6 +243,9 @@ export default { |
|
|
|
const aa = [] |
|
|
|
this.$refs['divGD'].showData(aa, this.formobj.deptSid) |
|
|
|
}, |
|
|
|
handleDelete(index) { |
|
|
|
this.formobj.asBwinvoiceapplyDetailList.splice(index, 1) |
|
|
|
}, |
|
|
|
backData(value) { |
|
|
|
this.viewState = 1 |
|
|
|
if (value.length > 0) { |
|
|
@ -210,6 +253,8 @@ export default { |
|
|
|
this.formobj.asBwinvoiceapplyDetailList.push({ |
|
|
|
sid: '', |
|
|
|
mainSid: '', |
|
|
|
billType: e.billType, |
|
|
|
billTypeKey: e.billTypeKey, |
|
|
|
sourceBillSid: e.sid, |
|
|
|
sourceBillNo: e.billNo, |
|
|
|
customerSid: e.customerSid, |
|
|
@ -291,6 +336,8 @@ export default { |
|
|
|
taskId: '', |
|
|
|
nodeId: '', |
|
|
|
nodeState: '', |
|
|
|
purchaseSystemName: '', |
|
|
|
purchaseSystemSid: '', |
|
|
|
fileList: [], |
|
|
|
asBwinvoiceapplyDetailList: [] |
|
|
|
} |
|
|
@ -311,4 +358,11 @@ export default { |
|
|
|
/deep/ .el-form-item__error { |
|
|
|
margin-left: 120px !important; |
|
|
|
} |
|
|
|
.titleOne { |
|
|
|
padding: 7px; |
|
|
|
display: flex; |
|
|
|
flex-direction: row; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
</style> |
|
|
|