|
|
@ -162,48 +162,98 @@ |
|
|
|
<el-image style="width: 178px;height: 178px;padding-left: 5px" v-for="(item,index) in srcList" :key="index" :src="item" :preview-src-list="srcList"></el-image> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<el-dialog :append-to-body="true" :visible.sync="dialogFileVisible"> |
|
|
|
<el-dialog :append-to-body="true" :visible.sync="dialogFileVisible" width="80%"> |
|
|
|
<el-form :model="formobj" ref="form_obj" :rules="rules" class="formadd"> |
|
|
|
<el-row style="border: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>移交日期</span> |
|
|
|
<el-row style="border-top: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>车架号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item prop="transferTime"> |
|
|
|
<el-date-picker v-model="formobj.transferTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ formobj.vinNo }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>接收人</span> |
|
|
|
</el-row> |
|
|
|
<div v-if="formobj.invoiceTitle !== ''"> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>开票单位</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ formobj.invoiceTitle }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>开票类型</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ formobj.invoiceType }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>开票名称</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ formobj.invoicingName }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>开票金额</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ formobj.invoiceAmount }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>发票号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item> |
|
|
|
<span>{{ formobj.invoiceNo }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</div> |
|
|
|
<el-row> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>选择接收岗位</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-form-item prop="recipient"> |
|
|
|
<el-select v-model="formobj.recipient" placeholder="请选择" @change="changeRecipient" filterable clearable> |
|
|
|
<el-option v-for="item in user_list" :key="item.userSid" :label="item.userName" :value="item.userName"/> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item prop="receiveRoleSid"> |
|
|
|
<el-select v-model="formobj.receiveRoleSid" placeholder="请选择" filterable clearable> |
|
|
|
<el-option v-for="item in user_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" class="tleftb"> |
|
|
|
<span>移交备注</span> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>备注</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="18"> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.transferRemarks" placeholder="若为邮寄发票,请写明快递公司、快递单号" clearable/> |
|
|
|
<el-input v-model="formobj.transferDept" placeholder="若为邮寄发票,请写明快递公司、快递单号" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button size="small" type="primary" @click="handleConfirm">确定</el-button> |
|
|
|
<el-button size="small" @click="dialogFileVisible = false">取消</el-button> |
|
|
|
</span> |
|
|
|
<div style="text-align: center;padding-top: 5px"> |
|
|
|
<el-button size="small" type="primary" @click="handleConfirm">确认</el-button> |
|
|
|
<el-button size="small" @click="dialogFileVisible = false">关闭</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { listPage, cancellation, saveOrUpdate } from '@/api/anruifinmanagement/fininvoiceapply' |
|
|
|
import { getOrgSidByPath, typeValues, getButtonPermissions, getGressionUserList } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import { listPage, cancellation, invoiceYJ, invoiceYJCH } from '@/api/anruifinmanagement/fininvoiceapply' |
|
|
|
import { getOrgSidByPath, typeValues, getButtonPermissions } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
@ -238,6 +288,13 @@ export default { |
|
|
|
btnKey: 'doHandover', |
|
|
|
btnLabel: '移交' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'doRevocation', |
|
|
|
btnLabel: '撤回' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
@ -261,12 +318,25 @@ export default { |
|
|
|
tableKey: 0, |
|
|
|
list: [], |
|
|
|
sids: [], |
|
|
|
nodeState_list: [], |
|
|
|
multipleSelection: [], |
|
|
|
srcList: [], |
|
|
|
invoiceType_list: [], |
|
|
|
state_list: [], |
|
|
|
invoiceState_list: [], |
|
|
|
user_list: [], |
|
|
|
user_list: [ |
|
|
|
{ |
|
|
|
sid: '9b0cb349-4665-4908-9a44-bdb9c3871cbf', |
|
|
|
name: '分公司销售内勤' |
|
|
|
}, |
|
|
|
{ |
|
|
|
sid: 'b1a32e21-2d4b-4f99-82cf-e99d96da3d5d', |
|
|
|
name: '分公司金融内勤' |
|
|
|
}, |
|
|
|
{ |
|
|
|
sid: '89d7f310-a221-405b-858e-dd650e0993d5', |
|
|
|
name: '分公司销售专员' |
|
|
|
} |
|
|
|
], |
|
|
|
TakeTicket: [ |
|
|
|
{ |
|
|
|
dictKey: 1, |
|
|
@ -301,16 +371,20 @@ export default { |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
formobj: { |
|
|
|
recipient: '', |
|
|
|
recipientSid: '', |
|
|
|
showTransfer: true, |
|
|
|
transferTime: '', |
|
|
|
transferRemarks: '', |
|
|
|
sid: '' |
|
|
|
vinNo: '', |
|
|
|
invoiceTitle: '', |
|
|
|
invoiceType: '', |
|
|
|
invoicingName: '', |
|
|
|
invoiceAmount: '', |
|
|
|
invoiceNo: '', |
|
|
|
sids: [], |
|
|
|
transferSid: '', |
|
|
|
orgPath: '', |
|
|
|
receiveRoleSid: '', |
|
|
|
transferDept: '' |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
transferTime: [{ required: true, message: '移交日期不能为空', trigger: 'blur' }], |
|
|
|
recipient: [{ required: true, message: '接收人不能为空', trigger: 'change' }] |
|
|
|
receiveRoleSid: [{ required: true, message: '选择接收岗位不能为空', trigger: 'change' }] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
@ -352,6 +426,9 @@ export default { |
|
|
|
case 'doHandover': |
|
|
|
this.doHandover() |
|
|
|
break |
|
|
|
case 'doRevocation': |
|
|
|
this.doRevocation() |
|
|
|
break |
|
|
|
case 'doCancellation': |
|
|
|
this.doCancellation() |
|
|
|
break |
|
|
@ -381,11 +458,6 @@ export default { |
|
|
|
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.listQuery.params.createOrgSid = res.data |
|
|
|
getGressionUserList({ userSid: window.sessionStorage.getItem('userSid'), orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.user_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
console.log(this.listQuery.params.createOrgSid) |
|
|
|
} |
|
|
@ -399,17 +471,12 @@ export default { |
|
|
|
}, |
|
|
|
// 获取数据sid |
|
|
|
handleSelectionChange(row) { |
|
|
|
this.multipleSelection = row |
|
|
|
const aa = [] |
|
|
|
const bb = [] |
|
|
|
row.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
bb.push({ |
|
|
|
billingState: element.billingState, |
|
|
|
transferState: element.transferState |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
this.nodeState_list = bb |
|
|
|
console.log('获取sids数组', this.sids) |
|
|
|
}, |
|
|
|
// 查询列表信息 |
|
|
@ -458,10 +525,10 @@ export default { |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
toEdit() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
if (this.nodeState_list.length > 0) { |
|
|
|
for (var i = 0; i < this.nodeState_list.length; i++) { |
|
|
|
if (this.nodeState_list[i].billingState === '作废' || this.nodeState_list[i].billingState === '已开票') { |
|
|
|
if (this.multipleSelection.length === 1) { |
|
|
|
if (this.multipleSelection.length > 0) { |
|
|
|
for (var i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
if (this.multipleSelection[i].billingState === '作废' || this.multipleSelection[i].billingState === '已开票') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因选择的记录中包含作废或已开票的,操作失败' }) |
|
|
|
return |
|
|
|
} |
|
|
@ -475,42 +542,77 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
doHandover() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
if (this.nodeState_list[0].billingState === '已开票' && this.nodeState_list[0].transferState === '未移交') { |
|
|
|
var nowDate = new Date() |
|
|
|
var date = { |
|
|
|
year: nowDate.getFullYear(), |
|
|
|
month: nowDate.getMonth() + 1, |
|
|
|
day: nowDate.getDate() |
|
|
|
} |
|
|
|
var dayDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day) |
|
|
|
this.formobj = { |
|
|
|
recipient: '', |
|
|
|
recipientSid: '', |
|
|
|
showTransfer: true, |
|
|
|
transferTime: dayDate, |
|
|
|
transferRemarks: '', |
|
|
|
sid: '' |
|
|
|
this.formobj = { |
|
|
|
vinNo: '', |
|
|
|
invoiceTitle: '', |
|
|
|
invoiceType: '', |
|
|
|
invoicingName: '', |
|
|
|
invoiceAmount: '', |
|
|
|
invoiceNo: '', |
|
|
|
sids: [], |
|
|
|
transferSid: '', |
|
|
|
orgPath: '', |
|
|
|
receiveRoleSid: '', |
|
|
|
transferDept: '' |
|
|
|
} |
|
|
|
if (this.multipleSelection.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行移交操作' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
for (var i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
if (this.multipleSelection[i].billingState !== '已开票' || this.multipleSelection[i].transferState !== '未移交' || this.multipleSelection[i].isTakeTicket !== '是') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择发票状态为已开票,交接状态为未移交,是否领取发票为是的进行移交操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.dialogFileVisible = true |
|
|
|
} |
|
|
|
if (this.multipleSelection.length === 1) { |
|
|
|
this.formobj.vinNo = this.multipleSelection[0].vinNo |
|
|
|
this.formobj.invoiceTitle = this.multipleSelection[0].invoiceTitle |
|
|
|
this.formobj.invoiceType = this.multipleSelection[0].invoiceType |
|
|
|
this.formobj.invoicingName = this.multipleSelection[0].invoicingName |
|
|
|
this.formobj.invoiceAmount = this.multipleSelection[0].invoiceAmount |
|
|
|
this.formobj.invoiceNo = this.multipleSelection[0].invoiceNo |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择发票状态为已开票且交接状态为未移交的进行移交操作' }) |
|
|
|
return |
|
|
|
for (var k = 0; k < this.multipleSelection.length; k++) { |
|
|
|
this.formobj.vinNo += this.multipleSelection[k].vinNo + ',' |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行移交操作' }) |
|
|
|
return |
|
|
|
this.formobj.sids = this.sids |
|
|
|
this.formobj.orgPath = window.sessionStorage.getItem('defaultOrgPath') |
|
|
|
this.formobj.transferSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.dialogFileVisible = true |
|
|
|
} |
|
|
|
}, |
|
|
|
changeRecipient(value) { |
|
|
|
const choose = this.user_list.filter((item) => item.userName === value) |
|
|
|
this.formobj.recipientSid = choose[0].userSid |
|
|
|
doRevocation() { |
|
|
|
if (this.multipleSelection.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请至少选择一条记录进行撤回操作' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
for (var i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
if (this.multipleSelection[i].transferState !== '移交中') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择交接状态为移交中的进行撤回操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
const tip = '请确认是否撤回所选' + this.sids.length + '条记录' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
invoiceYJCH(this.sids).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '撤回成功' }) |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
handleConfirm() { |
|
|
|
this.formobj.sid = this.sids[0] |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
saveOrUpdate(this.formobj).then((resp) => { |
|
|
|
invoiceYJ(this.formobj).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '移交成功' }) |
|
|
|
this.getList() |
|
|
@ -525,9 +627,9 @@ export default { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行作废操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.nodeState_list.length > 0) { |
|
|
|
for (var i = 0; i < this.nodeState_list.length; i++) { |
|
|
|
if (this.nodeState_list[i].billingState === '作废') { |
|
|
|
if (this.multipleSelection.length > 0) { |
|
|
|
for (var i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
if (this.multipleSelection[i].billingState === '作废') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因选择的记录中包含作废的,操作失败' }) |
|
|
|
return |
|
|
|
} |
|
|
|