Browse Source

完善销售订单--审批增加选择开票单位功能、去掉选择采购系统

master
yunuo970428 1 year ago
parent
commit
76532ecfbf
  1. 9
      anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js
  2. 67
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdanByCaiGou.vue
  3. 63
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdanByJinRong.vue

9
anrui-buscenter/anrui-buscenter-ui/src/api/dictcommons/dictcommons.js

@ -53,6 +53,15 @@ export function fetchDetailsByUseOrgSid(data) {
})
}
// 根据分公司全路径Sid获取分公司下开票信息(采购系统不能为空)
export function getInvoicingList(data) {
return request({
url: '/fin/v1/fincompanyinvoicing/getInvoicingList',
method: 'GET',
parmas: data
})
}
// 获取下拉框
export function typeValues(data) {
return request({

67
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdanByCaiGou.vue

@ -357,23 +357,23 @@
</div>
</el-form>
</el-dialog>
<el-dialog :visible.sync="purchaseVisible" width="60%">
<el-dialog :visible.sync="companyInvoicingVisible" width="60%">
<el-form class="formadd">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="6" class="tleftb">
<span><span class="icon">*</span>采购系统:</span>
<span><span class="icon">*</span>开票单位:</span>
</el-col>
<el-col :span="18">
<el-form-item>
<el-select v-model="purchaseName" placeholder="请选择" @change="changePurchase" clearable class="">
<el-option v-for="item in purchase_list" :key="item.deptSid" :label="item.purchaseSystemName" :value="item.purchaseSystemName"></el-option>
<el-select v-model="linkByParameter.companyInvoicingName" placeholder="请选择" @change="changeCompanyInvoicing" clearable class="">
<el-option v-for="item in companyInvoicing_list" :key="item.companyInvoicingSid" :label="item.companyInvoicingName" :value="item.companyInvoicingName"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<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="cancel">取消</el-button>
<el-button type="info " size="mini" @click="companyInvoicingVisible = false">取消</el-button>
</div>
</el-form>
</el-dialog>
@ -382,7 +382,7 @@
</template>
<script>
import { fetchDetailsBySid, completeBy, breakProcess, reject, getNextNodesForSubmit, getPreviousNodesForReject, delegate, assignTask } from '@/api/salesManagement/orderManagement'
import { getOrgSidByPath, fetchDetailsByUseOrgSid, selectStaffListss } from '@/api/dictcommons/dictcommons'
import { getInvoicingList, selectStaffListss } from '@/api/dictcommons/dictcommons'
import financialschemeInfo from '../../publicPage/financialschemeInfo'
export default {
@ -396,9 +396,8 @@ export default {
viewState: 1,
tableKey: 0,
index: 0,
purchase_list: [],
purchaseName: '',
purchaseSid: '',
companyInvoicing_list: [],
companyInvoicingVisible: false,
formobj: {
affiliatedCompany: '',
affiliatedCompanySid: '',
@ -415,7 +414,6 @@ export default {
busSalesOrderVehicleList: [],
busSalesOrderotherMessageDetailsVo: [],
busSalesVehicleOrderList: [],
companyInvoicingName: '',
concatNo: '',
createDate: '',
customerName: '',
@ -442,10 +440,11 @@ export default {
type: '',
useOrgName: '',
useOrgSid: '',
purchaseSystemName: '',
purchaseSystemSid: '',
finPlanState: false,
nowCarUnknownVinNum: ''
companyInvoicingName: '',
companyInvoicingSid: '',
purchaseSystemName: '',
purchaseSystemSid: ''
},
options: [],
operation: '', //
@ -459,7 +458,6 @@ export default {
},
nextNode: {}, //
nodeDialogVisible: false,
purchaseVisible: false, //
currentLink: true,
countersignLink: false,
//
@ -471,6 +469,8 @@ export default {
orgSidPath: '',
taskDefKey: '',
userSid: '',
companyInvoicingName: '',
companyInvoicingSid: '',
purchaseSystemName: '',
purchaseSystemSid: ''
},
@ -531,13 +531,9 @@ export default {
} else {
this.formobj.busSalesOrderModel.vinNo = ''
}
getOrgSidByPath({ orgPath: this.formobj.orgSidPath }).then((res) => {
getInvoicingList({ orgPath: this.formobj.orgSidPath }).then((res) => {
if (res.success) {
fetchDetailsByUseOrgSid(res.data).then((response) => {
if (response.success) {
this.purchase_list = response.data
}
})
this.companyInvoicing_list = res.data
}
})
}
@ -591,9 +587,11 @@ export default {
})
return sums
},
changePurchase(value) {
const choose = this.purchase_list.filter((item) => item.purchaseSystemName === value)
this.purchaseSid = choose[0].deptSid
changeCompanyInvoicing(value) {
const choose = this.companyInvoicing_list.filter((item) => item.companyInvoicingName === value)
this.linkByParameter.companyInvoicingSid = choose[0].companyInvoicingSid
this.linkByParameter.purchaseSystemName = choose[0].purchaseSystemName
this.linkByParameter.purchaseSystemSid = choose[0].purchaseSystemSid
},
//
openTurnDo(val) {
@ -628,10 +626,10 @@ export default {
//
openAgree(val) {
this.operation = val
this.purchaseName = this.formobj.purchaseSystemName
this.purchaseSid = this.formobj.purchaseSystemSid
if (this.formobj.type === '3' || (this.formobj.nowCarUnknownVinNum !== '' && this.formobj.nowCarUnknownVinNum !== '0')) {
this.purchaseVisible = true
if (this.formobj.payTypeKey === '1') {
this.companyInvoicingVisible = true
this.linkByParameter.companyInvoicingName = this.formobj.companyInvoicingName
this.linkByParameter.companyInvoicingSid = this.formobj.companyInvoicingSid
} else {
this.currentLink = true
this.countersignLink = false
@ -647,13 +645,11 @@ export default {
}
},
confirm() {
if (this.purchaseName === '') {
this.$message({ showClose: true, type: 'error', message: '采购系统不能为空' })
if (this.linkByParameter.companyInvoicingName === '') {
this.$message({ showClose: true, type: 'error', message: '开票单位不能为空' })
return
}
this.formobj.purchaseSystemName = this.purchaseName
this.formobj.purchaseSystemSid = this.purchaseSid
this.cancel()
this.companyInvoicingVisible = false
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
@ -666,11 +662,6 @@ export default {
this.submitdisabled = false
})
},
cancel() {
this.purchaseVisible = false
this.purchaseName = ''
this.purchaseSid = ''
},
//
openReject(val) {
this.operation = val
@ -780,8 +771,6 @@ export default {
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
this.linkByParameter.purchaseSystemName = this.formobj.purchaseSystemName
this.linkByParameter.purchaseSystemSid = this.formobj.purchaseSystemSid
completeBy(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({

63
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdanByJinRong.vue

@ -357,13 +357,33 @@
</div>
</el-form>
</el-dialog>
<el-dialog :visible.sync="companyInvoicingVisible" width="60%">
<el-form class="formadd">
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="6" class="tleftb">
<span><span class="icon">*</span>开票单位:</span>
</el-col>
<el-col :span="18">
<el-form-item>
<el-select v-model="linkByParameter.companyInvoicingName" placeholder="请选择" @change="changeCompanyInvoicing" clearable class="">
<el-option v-for="item in companyInvoicing_list" :key="item.companyInvoicingSid" :label="item.companyInvoicingName" :value="item.companyInvoicingName"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<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="companyInvoicingVisible = false">取消</el-button>
</div>
</el-form>
</el-dialog>
<financialschemeEdit :modelSid="formobj.busSalesOrderModel.modelSid" ref="divAdd" v-show="viewState == 2" @doback="resetState"/>
</div>
</template>
<script>
import { fetchDetailsBySid, complete, breakProcess, reject, getNextNodesForSubmit, getPreviousNodesForReject, delegate, assignTask } from '@/api/salesManagement/orderManagement'
import { fetchDetailsBySid, completeBy, breakProcess, reject, getNextNodesForSubmit, getPreviousNodesForReject, delegate, assignTask } from '@/api/salesManagement/orderManagement'
import financialschemeEdit from '../../publicPage/financialschemeEdit'
import { selectStaffListss } from '@/api/dictcommons/dictcommons'
import { selectStaffListss, getInvoicingList } from '@/api/dictcommons/dictcommons'
export default {
name: 'xiaoshoudingdanByJinRong',
@ -376,6 +396,8 @@ export default {
viewState: 1,
tableKey: 0,
index: 0,
companyInvoicingVisible: false,
companyInvoicing_list: [],
formobj: {
affiliatedCompany: '',
affiliatedCompanySid: '',
@ -392,7 +414,6 @@ export default {
busSalesOrderVehicleList: [],
busSalesOrderotherMessageDetailsVo: [],
busSalesVehicleOrderList: [],
companyInvoicingName: '',
concatNo: '',
createDate: '',
customerName: '',
@ -419,7 +440,11 @@ export default {
type: '',
useOrgName: '',
useOrgSid: '',
finPlanState: false
finPlanState: false,
companyInvoicingName: '',
companyInvoicingSid: '',
purchaseSystemName: '',
purchaseSystemSid: ''
},
options: [],
operation: '', //
@ -443,7 +468,11 @@ export default {
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
userSid: '',
companyInvoicingName: '',
companyInvoicingSid: '',
purchaseSystemName: '',
purchaseSystemSid: ''
},
//
countersign: {
@ -502,6 +531,11 @@ export default {
} else {
this.formobj.busSalesOrderModel.vinNo = ''
}
getInvoicingList({ orgPath: this.formobj.orgSidPath }).then((res) => {
if (res.success) {
this.companyInvoicing_list = res.data
}
})
}
})
selectStaffListss().then((res) => {
@ -553,6 +587,12 @@ export default {
})
return sums
},
changeCompanyInvoicing(value) {
const choose = this.companyInvoicing_list.filter((item) => item.companyInvoicingName === value)
this.linkByParameter.companyInvoicingSid = choose[0].companyInvoicingSid
this.linkByParameter.purchaseSystemName = choose[0].purchaseSystemName
this.linkByParameter.purchaseSystemSid = choose[0].purchaseSystemSid
},
//
openTurnDo(val) {
this.operation = val
@ -586,10 +626,19 @@ export default {
//
openAgree(val) {
this.operation = val
this.companyInvoicingVisible = true
this.linkByParameter.companyInvoicingName = this.formobj.companyInvoicingName
this.linkByParameter.companyInvoicingSid = this.formobj.companyInvoicingSid
},
confirm() {
if (this.linkByParameter.companyInvoicingName === '') {
this.$message({ showClose: true, type: 'error', message: '开票单位不能为空' })
return
}
this.companyInvoicingVisible = false
this.currentLink = true
this.countersignLink = false
this.dialogList.comment = '同意'
console.log(this.current, 9898)
getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey, businessSid: this.linkByParameter.businessSid }).then((resp) => {
if (resp.success) {
var arr = resp.data
@ -708,7 +757,7 @@ export default {
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
complete(this.linkByParameter).then((response) => {
completeBy(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',

Loading…
Cancel
Save