@@ -18,19 +18,19 @@
*分公司名称
- {{ formobj.useOrgName }}
+ {{ formobj.useOrgName }}
*申请人
- {{ formobj.createByName }}
+ {{ formobj.createByName }}
*申请日期
- {{ formobj.applicationDate }}
+ {{ formobj.applicationDate }}
选择
@@ -61,7 +60,7 @@
*常用配置
- {{ formobj.configName }}
+ {{ formobj.configName }}
@@ -69,7 +68,7 @@
内部编码
-
+
{{ formobj.insideCode }}
@@ -77,13 +76,13 @@
*销售指导价
- {{ formobj.guidedPrice }}
+ {{ formobj.guidedPrice }}
*厂家合同价
-
+
@@ -94,7 +93,9 @@
-
+
+
+
@@ -102,8 +103,8 @@
- 否
是
+ 否
@@ -140,7 +141,9 @@
-
+
+
+
@@ -148,7 +151,7 @@
-
+ {{ formobj.depositBankName }}
@@ -156,7 +159,7 @@
-
+ {{ formobj.bankAccount }}
@@ -166,7 +169,9 @@
-
+
+
+
@@ -174,7 +179,7 @@
-
+ {{ formobj.modelBankName }}
@@ -182,7 +187,7 @@
-
+ {{ formobj.modelBankAccount }}
@@ -191,7 +196,7 @@
其他费用名称
-
+
@@ -199,7 +204,7 @@
费用合计
-
+
@@ -209,7 +214,7 @@
备注
-
+
@@ -265,13 +270,15 @@
import modellibrary from '@/views/baseoutsourcingapplication/relation/modellibrary'
import req from '@/api/baseoutsourcingapplication/baseoutsourcingapplication'
-import configuration from '@/views/baseoutsourcingapplication/chexingbyconfiguration'
+import configuration from './chexingbyconfiguration'
import { getStorage } from '@/utils/auth'
+import { getPathSidByUserSid } from '@/api/cheliang/basevehiclemodel'
export default {
name: 'BaseOutsourcingApplicationAdd',
components: {
- modellibrary, configuration
+ modellibrary,
+ configuration
},
data() {
return {
@@ -291,6 +298,8 @@ export default {
uploadAction: process.env.VUE_APP_BASE_API + '/base/file/upload',
filType: '.pdf,.docx',
fileList: [],
+ wcgys_list: [],
+ account_list: [],
formobj: {
remarks: '',
useOrgName: '',
@@ -303,11 +312,12 @@ export default {
insideCode: '',
staffSid: window.sessionStorage.getItem('staffSid'),
applicationCode: '', // 申请编号
- createByName: window.sessionStorage.getItem('name'), // 申请人姓名
+ createByName: '', // 申请人姓名
applicationDate: '', // 申请日期
externalMiningTypeKey: '1', // 外采类型key
externalMiningTypeValue: '', // 外采类型value
purchasingUnitName: '', // 采购单位名称
+ purchasingUnitSid: '',
modelSid: '', // 车型sid
modelName: '', // 车型名称
configName: '', // 常用配置名称
@@ -323,7 +333,6 @@ export default {
baseOutsourcingApplicationVehicleDtos: [],
taskId: '',
businessSid: '',
- comment: '',
instanceId: '',
modelId: ''
},
@@ -336,24 +345,11 @@ export default {
},
obj: {},
rules: {
- createByName: [{ required: true, message: '申请人姓名不能为空', trigger: 'blur' }], // 申请人姓名
- externalMiningTypeKey: [{ required: true, message: '外采类型key不能为空', trigger: 'blur' }], // 外采类型key
- externalMiningTypeValue: [{ required: true, message: '外采类型value不能为空', trigger: 'blur' }], // 外采类型value
- purchasingUnitName: [{ required: true, message: '采购单位不能为空', trigger: 'blur' }], // 采购单位名称
- depositBankName: [{ required: true, message: '车款开户银行不能为空', trigger: 'blur' }], // 采购单位名称
- bankAccount: [{ required: true, message: '车款银行账号不能为空', trigger: 'blur' }], // 采购单位名称
- modelBankName: [{ required: true, message: '订金开户银行不能为空', trigger: 'blur' }], // 采购单位名称
- modelBankAccount: [{ required: true, message: '订金银行账号不能为空', trigger: 'blur' }], // 采购单位名称
- modelSid: [{ required: true, message: '车型不能为空', trigger: 'blur' }], // 车型sid
- configSid: [{ required: true, message: '常用配置不能为空', trigger: 'blur' }], // 常用配置名称
+ purchasingUnitName: [{ required: true, message: '外采供应商不能为空', trigger: 'change' }], // 采购单位名称
+ accountName: [{ required: true, message: '车款账户不能为空', trigger: 'blur' }], // 车款账户
purchasePrice: [{ required: true, message: '采购价格不能为空', trigger: 'blur' }], // 采购价格
- // guidedPrice: [{ required: true, message: '销售指导价不能为空', trigger: 'blur' }], // 销售指导价
- manufactorSettlementPrice: [{ required: true, message: '厂家合同价不能为空', trigger: 'blur' }], // 厂家合同价
num: [{ required: true, message: '台数不能为空', trigger: 'blur' }], // 台数
- deposit: [{ required: true, message: '订金不能为空', trigger: 'blur' }], // 订金
- // expenseName: [{ required: true, message: '费用名称不能为空', trigger: 'blur' }], // 费用名称
- // totalExpenseAmount: [{ required: true, message: '费用金额合计不能为空', trigger: 'blur' }], // 费用金额合计
- orgSid: [{ required: true, message: '部门sid不能为空', trigger: 'blur' }] // 部门sid
+ deposit: [{ required: true, message: '订金不能为空', trigger: 'blur' }] // 订金
}
}
},
@@ -388,6 +384,22 @@ export default {
}, '*')
},
methods: {
+ init() {
+ getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
+ if (res.success) {
+ req.fetchOrgBySid(res.data).then((resp) => {
+ if (resp.success) {
+ this.formobj.useOrgName = resp.data.name
+ }
+ })
+ req.wcgysNamesDown(res.data).then((response) => {
+ if (response.success) {
+ this.wcgys_list = response.data
+ }
+ })
+ }
+ })
+ },
// 删除附件
handleRemoveAttachment(file, files) {
this.fileList = this.fileList.filter(item => item.uid !== file.uid)
@@ -431,7 +443,6 @@ export default {
this.formobj.configSid = info[0].configSid // 常用配置sid
this.formobj.guidedPrice = info[0].guidedPrice// 销售指导价
this.formobj.insideCode = info[0].insideCode// 内部编码
- // this.formobj.manufactorSettlementPrice = info[0].manufactorSettlementPrice// 厂家合同价
},
handleSubmit() {
// var contract = this.formobj.contract
@@ -443,62 +454,37 @@ export default {
this.$message({ showClose: true, type: 'success', message: '请检查是否先付款已选择' })
return
}
+ if (this.formobj.modelName === '' || this.formobj.modelName === null) {
+ this.$message({ showClose: true, type: 'error', message: '车型不能为空,请选择车型' })
+ return
+ }
// 提交的代码
this.submitdisabled = true
this.formobj.userSid = window.sessionStorage.getItem('userSid')
this.formobj.orgSid = this.$store.getters.orgSid
- req.doSubmit(this.formobj).then(resp => {
- this.submitdisabled = false
- if (resp.success) {
- window.parent.postMessage({
- cmd: 'returnHeight',
- params: {
- // 告诉父级页面,子页面的弹框高度。
- code: 1
+ this.$refs['form_obj'].validate(valid => {
+ if (valid) {
+ req.doSubmit(this.formobj).then(resp => {
+ this.submitdisabled = false
+ if (resp.success) {
+ window.parent.postMessage({
+ cmd: 'returnHeight',
+ params: {
+ // 告诉父级页面,子页面的弹框高度。
+ code: 1
+ }
+ }, '*')
+ } else {
+ // 根据resp.code进行异常情况处理
}
- }, '*')
- } else {
- // 根据resp.code进行异常情况处理
+ }).catch(() => {
+ this.submitdisabled = false
+ })
}
- }).catch(() => {
- this.submitdisabled = false
})
},
- quedingVehicle() {
- var obj = this.$refs['vehicle'].getSids()
- var length = obj.length
-
- if (length < 1) {
- alert('必须选择一条数据!')
- return
- }
- this.formobj.num = length
- this.formobj.baseOutsourcingApplicationVehicleDtos = obj
- this.vehicleDialogVisible = false
- },
- queding(dialog) {
- var obj = this.$refs['modellibrary'].getConfigDataList()
- var length = obj.configs.length
- if (length > 1) {
- alert('只能选择一条数据!')
- return
- } else if (length < 1) {
- alert('必须选择一条数据!')
- return
- }
- this.formobj.modelName = obj.model.vehicleAlias
- this.formobj.modelSid = obj.model.sid
- this.formobj.configName = obj.configs[0].configName
- this.formobj.configSid = obj.configs[0].sid
- this.formobj.guidedPrice = obj.configs[0].guidedPrice // 销售指导价
- this.formobj.manufactorSettlementPrice = 1 // obj.configs[0].manufactorSettlementPrice // 厂家合同价
- this.formobj.baseOutsourcingApplicationVehicleDtos = []
- this.formobj.num = 0
- this.dialogVisible = false
- },
resetState() {
this.viewState = 1
- this.handReset()
},
selectModel() {
this.viewState = 2
@@ -551,8 +537,9 @@ export default {
showEdit(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
+ this.init()
})
- this.viewTitle = '【修改】外采申请表'
+ this.viewTitle = '【编辑】外采申请表'
this.formobj.sid = sid // SID
req.fetchBySid(sid).then(resp => {
if (resp.success) {
@@ -565,7 +552,6 @@ export default {
})
}
this.formobj.contract = vdata.contract
- /* _this.fileList[0] = vdata.contract*/
this.formobj.taskId = vdata.taskId
this.formobj.insideCode = vdata.insideCode
this.formobj.instanceId = vdata.procInstSid
@@ -585,6 +571,7 @@ export default {
this.formobj.externalMiningTypeKey = vdata.externalMiningTypeKey // 外采类型key
this.formobj.externalMiningTypeValue = vdata.externalMiningTypeValue // 外采类型value
this.formobj.purchasingUnitName = vdata.purchasingUnitName // 采购单位名称
+ this.formobj.purchasingUnitSid = vdata.purchasingUnitSid
this.formobj.modelSid = vdata.modelSid // 车型sid
this.formobj.modelName = vdata.modelName // 车型名称
this.formobj.configName = vdata.configName // 常用配置名称
@@ -597,6 +584,7 @@ export default {
this.formobj.expenseName = vdata.expenseName // 费用名称
this.formobj.totalExpenseAmount = vdata.totalExpenseAmount // 费用金额合计
this.formobj.orgSid = vdata.orgSid // 部门sid
+ this.formobj.useOrgSid = vdata.useOrgSid
this.formobj.baseOutsourcingApplicationVehicleDtos = vdata.baseOutsourcingApplicationVehicleVos // 部门sid
} else {
// 根据resp.code进行异常情况处理
@@ -605,24 +593,68 @@ export default {
this.formobj = {}
})
},
- changeRadio(val) {
- if (val == 0) {
- this.formobj.accountName = this.formobj.purchasingUnitName
- } else if (val == 1) {
- this.formobj.modelAccountName = ''
- this.formobj.modelBankName = ''
- this.formobj.modelBankAccount = ''
- this.formobj.accountName = this.formobj.purchasingUnitName
- this.formobj.deposit = 0
- }
+ changeWcgys(value) {
+ let bb = null
+ this.wcgys_list.forEach((e) => {
+ if (e.manufacturerName === value) {
+ bb = {
+ sid: e.sid,
+ name: e.manufacturerName
+ }
+ }
+ })
+ this.formobj.purchasingUnitSid = bb.sid
+ this.formobj.accountName = ''
+ this.formobj.depositBankName = ''
+ this.formobj.bankAccount = ''
+ this.formobj.modelAccountName = ''
+ this.formobj.modelBankName = ''
+ this.formobj.modelBankAccount = ''
+ req.bankNamesDown(bb.sid).then((ress) => {
+ if (ress.success) {
+ this.account_list = ress.data
+ }
+ })
},
- handleClose() {
- this.vehicleDialogVisible = false
- this.dialogVisible = false
+ changeAccountName(value) {
+ let bb = null
+ this.account_list.forEach((e) => {
+ if (e.accountName === value) {
+ bb = {
+ bankAccount: e.bankAccount,
+ depositBank: e.depositBank
+ }
+ }
+ })
+ this.formobj.depositBankName = bb.depositBank
+ this.formobj.bankAccount = bb.bankAccount
+ },
+ changeModelAccountName(value) {
+ let bb = null
+ this.account_list.forEach((e) => {
+ if (e.accountName === value) {
+ bb = {
+ bankAccount: e.bankAccount,
+ depositBank: e.depositBank
+ }
+ }
+ })
+ this.formobj.modelBankName = bb.depositBank
+ this.formobj.modelBankAccount = bb.bankAccount
+ },
+ changeRadio() {
+ this.formobj.modelAccountName = ''
+ this.formobj.modelBankName = ''
+ this.formobj.modelBankAccount = ''
+ this.formobj.deposit = 0
},
saveOrUpdate() {
this.formobj.userSid = window.sessionStorage.getItem('userSid')
this.formobj.orgSid = this.$store.getters.orgSid
+ if (this.formobj.modelName === '' || this.formobj.modelName === null) {
+ this.$message({ showClose: true, type: 'error', message: '车型不能为空,请选择车型' })
+ return
+ }
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
diff --git a/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/chexingbyconfiguration.vue b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/chexingbyconfiguration.vue
new file mode 100644
index 0000000000..7393203e7e
--- /dev/null
+++ b/anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/chexingbyconfiguration.vue
@@ -0,0 +1,209 @@
+
+
+
+
+
+
+
{{ searchxianshitit }}
+
+
+
+
+
+
+
+
+ {{ scope.row.vehicleAlias }}
+
+
+
+
+ {{ scope.row.configName }}
+
+
+
+
+ {{ scope.row.guidedPrice }}
+
+
+
+
+
+
+
+
+
+
+
+