|
|
@ -151,12 +151,41 @@ |
|
|
|
<el-dialog :append-to-body="true" :visible.sync="dialogImgVisible"> |
|
|
|
<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-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-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-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" 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" clearable> |
|
|
|
<el-option v-for="item in user_list" :key="item.userSid" :label="item.userName" :value="item.userName"/> |
|
|
|
</el-select> |
|
|
|
</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> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { listPage, cancellation } from '@/api/anruifinmanagement/fininvoiceapply' |
|
|
|
import { getOrgSidByPath, typeValues, getButtonPermissions } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import { listPage, cancellation, saveOrUpdate } from '@/api/anruifinmanagement/fininvoiceapply' |
|
|
|
import { getOrgSidByPath, typeValues, getButtonPermissions, getGressionUserList } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import ButtonBar from '@/components/ButtonBar' |
|
|
@ -184,6 +213,13 @@ export default { |
|
|
|
btnKey: 'toEdit', |
|
|
|
btnLabel: '编辑' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'doHandover', |
|
|
|
btnLabel: '移交' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'danger', |
|
|
|
size: 'small', |
|
|
@ -212,6 +248,7 @@ export default { |
|
|
|
invoiceType_list: [], |
|
|
|
state_list: [], |
|
|
|
invoiceState_list: [], |
|
|
|
user_list: [], |
|
|
|
FormLoading: false, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
@ -234,7 +271,17 @@ export default { |
|
|
|
size: 10, |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
rules: {} |
|
|
|
formobj: { |
|
|
|
recipient: '', |
|
|
|
recipientSid: '', |
|
|
|
showTransfer: true, |
|
|
|
transferTime: '', |
|
|
|
sid: '' |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
transferTime: [{ required: true, message: '移交日期不能为空', trigger: 'blur' }], |
|
|
|
recipient: [{ required: true, message: '接收人不能为空', trigger: 'change' }] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -272,6 +319,9 @@ export default { |
|
|
|
case 'toEdit': |
|
|
|
this.toEdit() |
|
|
|
break |
|
|
|
case 'doHandover': |
|
|
|
this.doHandover() |
|
|
|
break |
|
|
|
case 'doCancellation': |
|
|
|
this.doCancellation() |
|
|
|
break |
|
|
@ -301,6 +351,11 @@ 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) |
|
|
|
} |
|
|
@ -318,7 +373,10 @@ export default { |
|
|
|
const bb = [] |
|
|
|
row.forEach(element => { |
|
|
|
aa.push(element.sid) |
|
|
|
bb.push(element.billingState) |
|
|
|
bb.push({ |
|
|
|
billingState: element.billingState, |
|
|
|
transferState: element.transferState |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
this.nodeState_list = bb |
|
|
@ -372,7 +430,7 @@ export default { |
|
|
|
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] === '作废' || this.nodeState_list[i] === '已开票') { |
|
|
|
if (this.nodeState_list[i].billingState === '作废' || this.nodeState_list[i].billingState === '已开票') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因选择的记录中包含作废或已开票的,操作失败' }) |
|
|
|
return |
|
|
|
} |
|
|
@ -385,6 +443,44 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
doHandover() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
if (this.nodeState_list[0].billingState === '已开票' && this.nodeState_list[0].transferState === '未移交') { |
|
|
|
this.formobj = { |
|
|
|
recipient: '', |
|
|
|
recipientSid: '', |
|
|
|
showTransfer: true, |
|
|
|
transferTime: '', |
|
|
|
sid: '' |
|
|
|
} |
|
|
|
this.dialogFileVisible = true |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择发票状态为已开票且交接状态为未移交的进行移交操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行移交操作' }) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
changeRecipient(value) { |
|
|
|
const choose = this.user_list.filter((item) => item.userName === value) |
|
|
|
this.formobj.recipientSid = choose[0].userSid |
|
|
|
}, |
|
|
|
handleConfirm() { |
|
|
|
this.formobj.sid = this.sids[0] |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
saveOrUpdate(this.formobj).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '移交成功' }) |
|
|
|
this.getList() |
|
|
|
this.dialogFileVisible = false |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
doCancellation() { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行作废操作' }) |
|
|
@ -392,7 +488,7 @@ export default { |
|
|
|
} |
|
|
|
if (this.nodeState_list.length > 0) { |
|
|
|
for (var i = 0; i < this.nodeState_list.length; i++) { |
|
|
|
if (this.nodeState_list[i] === '作废') { |
|
|
|
if (this.nodeState_list[i].billingState === '作废') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '因选择的记录中包含作废的,操作失败' }) |
|
|
|
return |
|
|
|
} |
|
|
|